Add scans with Semgrep

This commit is contained in:
eikendev 2022-02-13 15:54:57 +01:00
parent 5cd3627dc6
commit 23e64b8380
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
73 changed files with 3006 additions and 3 deletions

View file

@ -21,6 +21,7 @@ func IsPasswordPwned(password string) (bool, error) {
return true, nil
}
// nosemgrep: tests.semgrep.go.lang.security.audit.crypto.insecure-module-used, tests.semgrep.go.lang.security.audit.crypto.use-of-sha1
hash := sha1.Sum([]byte(password)) //#nosec G401 -- False positive, only the first 5 bytes are transmitted.
hashStr := fmt.Sprintf("%X", hash)
lookup := hashStr[0:5]