Files
codeql/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsSourceCall.ql

19 lines
642 B
Plaintext

import java
import semmle.code.java.security.HardcodedCredentialsSourceCallQuery
import TestUtilities.InlineExpectationsTest
module HardcodedCredentialsSourceCallTest implements TestSig {
string getARelevantTag() { result = "HardcodedCredentialsSourceCall" }
predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "HardcodedCredentialsSourceCall" and
exists(DataFlow::Node sink | HardcodedCredentialSourceCallFlow::flowTo(sink) |
sink.getLocation() = location and
element = sink.toString() and
value = ""
)
}
}
import MakeTest<HardcodedCredentialsSourceCallTest>