Files
codeql/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql
2023-03-29 22:33:09 -04:00

19 lines
631 B
Plaintext

import java
import semmle.code.java.security.InsecureBasicAuthQuery
import TestUtilities.InlineExpectationsTest
class HasInsecureBasicAuthTest extends InlineExpectationsTest {
HasInsecureBasicAuthTest() { this = "HasInsecureBasicAuthTest" }
override string getARelevantTag() { result = "hasInsecureBasicAuth" }
override predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "hasInsecureBasicAuth" and
exists(DataFlow::Node sink | InsecureBasicAuthFlow::flowTo(sink) |
sink.getLocation() = location and
element = sink.toString() and
value = ""
)
}
}