We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a76de49 commit 16284fdCopy full SHA for 16284fd
go/ql/lib/semmle/go/security/HardcodedCredentials.qll
@@ -7,6 +7,7 @@
7
import go
8
private import semmle.go.StringOps
9
private import semmle.go.dataflow.ExternalFlow
10
+private import semmle.go.security.SensitiveActions
11
12
/**
13
* Provides default sources, sinks and sanitizers for reasoning about
@@ -36,7 +37,11 @@ module HardcodedCredentials {
36
37
38
/** A hardcoded string literal as a source for hardcoded credentials. */
39
private class HardcodedStringSource extends Source {
- HardcodedStringSource() { this.asExpr() instanceof StringLit }
40
+ HardcodedStringSource() {
41
+ exists(StringLit val | this.asExpr() = val |
42
+ not PasswordHeuristics::isDummyPassword(val.getStringValue())
43
+ )
44
+ }
45
}
46
47
/** A use of a credential. */
0 commit comments