From 0b6cf1e10b71a674eef2fcddb86cf10ba3043528 Mon Sep 17 00:00:00 2001 From: "continue[bot]" Date: Tue, 9 Dec 2025 20:24:56 +0000 Subject: [PATCH] Update tests to reflect removed token.* and credentials.* patterns Remove test expectation for credentials.json which no longer matches after removing credentials.* pattern. Add new tests to verify legitimate source files (tokens.py, credentials.go, etc.) are not blocked. Co-authored-by: nate --- core/indexing/ignore.vitest.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/indexing/ignore.vitest.ts b/core/indexing/ignore.vitest.ts index 43a271851..54c947d4a 100644 --- a/core/indexing/ignore.vitest.ts +++ b/core/indexing/ignore.vitest.ts @@ -48,7 +48,6 @@ describe("isSecurityConcern", () => { expect(isSecurityConcern("app.secret")).toBe(true); expect(isSecurityConcern("api.secrets")).toBe(true); expect(isSecurityConcern("credentials")).toBe(true); - expect(isSecurityConcern("credentials.json")).toBe(true); expect(isSecurityConcern("auth.json")).toBe(true); expect(isSecurityConcern("token")).toBe(true); expect(isSecurityConcern("api.token")).toBe(true); @@ -183,6 +182,17 @@ describe("isSecurityConcern", () => { expect(isSecurityConcern("secret-utils.js")).toBe(false); expect(isSecurityConcern("token-validator.ts")).toBe(false); }); + + it("should not flag legitimate source files with token/credentials in name", () => { + expect(isSecurityConcern("tokens.py")).toBe(false); + expect(isSecurityConcern("tokens.go")).toBe(false); + expect(isSecurityConcern("tokens.js")).toBe(false); + expect(isSecurityConcern("credentials.py")).toBe(false); + expect(isSecurityConcern("credentials.go")).toBe(false); + expect(isSecurityConcern("credentials.ts")).toBe(false); + expect(isSecurityConcern("token_manager.py")).toBe(false); + expect(isSecurityConcern("credential_helper.js")).toBe(false); + }); }); describe("Edge cases", () => {