github-advanced-security[bot] commented on code in PR #2900:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2900#discussion_r4222570236
##########
internal/controller/indexer/indexer.go:
##########
@@ -263,6 +283,48 @@
return secretKeys
}
+// GenKeyAuthKeyIndex hashes a key-auth key so the index never holds plaintext.
+func GenKeyAuthKeyIndex(key string) string {
+ sum := sha256.Sum256([]byte(key))
Review Comment:
## CodeQL / Use of a broken or weak cryptographic hashing algorithm on
sensitive data
[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that
is insecure for password hashing, since it is not a computationally expensive
hash function.
[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that
is insecure for password hashing, since it is not a computationally expensive
hash function.
[Sensitive data (password)](3) is used in a hashing algorithm (SHA256) that
is insecure for password hashing, since it is not a computationally expensive
hash function.
[Show more
details](https://github.com/apache/apisix-ingress-controller/security/code-scanning/4)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]