Skip to content

Commit 8539e49

Browse files
committed
fix: add CodeQL suppression for false positive password hash warning
The CodeQL scanner incorrectly flagged SHA-256 usage for workspace path hashing as 'password hashing with insufficient computational effort'. This is a false positive - we're using SHA-256 to create deterministic collection names from workspace paths, not for password hashing. SHA-256 is perfectly appropriate for this non-cryptographic use case. Added suppression comments to clarify the intent and suppress the warning.
1 parent ec14d74 commit 8539e49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/services/code-index/vector-store/qdrant-client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ export class QdrantVectorStore implements IVectorStore {
106106
}
107107

108108
// Generate base collection name from workspace path
109+
// Note: This is NOT password hashing - it's creating a deterministic identifier
110+
// from the workspace path for collection naming. SHA-256 is appropriate here.
111+
// codeql[js/insufficient-password-hash] - False positive: not hashing passwords
109112
const hash = createHash("sha256").update(workspacePath).digest("hex")
110113
this.vectorSize = vectorSize
111114

@@ -762,6 +765,9 @@ export class QdrantVectorStore implements IVectorStore {
762765
}
763766

764767
// Generate base collection name
768+
// Note: This is NOT password hashing - it's creating a deterministic identifier
769+
// from the workspace path for collection naming. SHA-256 is appropriate here.
770+
// codeql[js/insufficient-password-hash] - False positive: not hashing passwords
765771
const hash = createHash("sha256").update(this.workspacePath).digest("hex")
766772
let collectionName = `ws-${hash.substring(0, 16)}`
767773

0 commit comments

Comments
 (0)