mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
26 lines
793 B
Plaintext
26 lines
793 B
Plaintext
import java
|
|
import utils.test.InlineExpectationsTest
|
|
import semmle.code.java.security.SensitiveResultReceiverQuery
|
|
|
|
class TestSource extends RemoteFlowSource {
|
|
TestSource() { this.asExpr().(MethodCall).getMethod().hasName("source") }
|
|
|
|
override string getSourceType() { result = "test" }
|
|
}
|
|
|
|
module ResultReceiverTest implements TestSig {
|
|
string getARelevantTag() { result = "hasSensitiveResultReceiver" }
|
|
|
|
predicate hasActualResult(Location loc, string element, string tag, string value) {
|
|
exists(SensitiveResultReceiverFlow::PathNode sink |
|
|
isSensitiveResultReceiver(_, sink, _) and
|
|
element = sink.toString() and
|
|
loc = sink.getNode().getLocation() and
|
|
tag = "hasSensitiveResultReceiver" and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|
|
|
|
import MakeTest<ResultReceiverTest>
|