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

19 lines
624 B
Plaintext

import java
import semmle.code.java.security.HardcodedCredentialsComparison
import TestUtilities.InlineExpectationsTest
module HardcodedCredentialsComparisonTest implements TestSig {
string getARelevantTag() { result = "HardcodedCredentialsComparison" }
predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "HardcodedCredentialsComparison" and
exists(Expr sink | isHardcodedCredentialsComparison(sink, _, _) |
sink.getLocation() = location and
element = sink.toString() and
value = ""
)
}
}
import MakeTest<HardcodedCredentialsComparisonTest>