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

Skip to content

Commit b1b1ede

Browse files
committed
Java: Improve the precision of java/hardcoded-credential-api-call.
1 parent 34cdf7c commit b1b1ede

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)