Skip to content

Commit c505a6b

Browse files
committed
chore: remove ineffective codeql suppression directives
The inline // codeql[js/insufficient-password-hash] comments did not suppress the alert because CodeQL tracks taint flow from source variables in other files. Retaining the explanatory prose comments for human reviewers; the false positive requires maintainer dismissal in the GitHub Security tab.
1 parent fd44f2a commit c505a6b

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/api/providers/fetchers/modelCache.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ function getCacheKey(options: GetModelsOptions): string {
9494
// Not a password hash -- SHA-256 is used here purely as a cache key discriminator to
9595
// distinguish between different API keys on the same server. It is never used for
9696
// authentication or stored as a credential.
97-
// codeql[js/insufficient-password-hash]
9897
const keyPart =
9998
isKeyScoped && options.apiKey
10099
? createHash("sha256").update(options.apiKey).digest("hex").slice(0, 16)
@@ -115,7 +114,6 @@ function cacheKeyToFilename(cacheKey: string): string {
115114
const prefix = cacheKey.split(":")[0] // provider name -- always filesystem-safe
116115
// Not a password hash -- SHA-256 is used here to produce a collision-free filename
117116
// component from the compound cache key. It is never used for authentication.
118-
// codeql[js/insufficient-password-hash]
119117
const hash = createHash("sha256").update(cacheKey).digest("hex").slice(0, 16)
120118
return `${prefix}_${hash}`
121119
}

0 commit comments

Comments
 (0)