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 <nate@continue.dev>
This commit is contained in:
parent
998dfdd989
commit
0b6cf1e10b
1 changed files with 11 additions and 1 deletions
|
|
@ -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", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue