Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 251d441

Browse files
authored
Merge pull request #1682 from aschackmull/java/hardcoded-credentials-precision
Java: Improve the precision of java/hardcoded-credential-api-call.
2 parents 34cdf7c + b1b1ede commit 251d441

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ class HardcodedCredentialApiCallConfiguration extends DataFlow::Configuration {
3131
ma.getQualifier() = node1.asExpr()
3232
)
3333
}
34+
35+
override predicate isBarrier(DataFlow::Node n) {
36+
n.asExpr().(MethodAccess).getMethod() instanceof MethodSystemGetenv
37+
}
3438
}
3539

3640
from

0 commit comments

Comments
 (0)