mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Fix SensitiveResultReceiver test case
This commit is contained in:
@@ -31,7 +31,7 @@ private predicate untrustedResultReceiverSend(DataFlow::Node src, ResultReceiver
|
||||
UntrustedResultReceiverFlow::flow(src, DataFlow::exprNode(call.getReceiver()))
|
||||
}
|
||||
|
||||
private module SensitiveResultReceiverConfig implements DataFlow::ConfigSig {
|
||||
module SensitiveResultReceiverConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node node) { node.asExpr() instanceof SensitiveExpr }
|
||||
|
||||
predicate isSink(DataFlow::Node node) {
|
||||
|
||||
@@ -14,8 +14,8 @@ class ResultReceiverTest extends InlineExpectationsTest {
|
||||
override string getARelevantTag() { result = "hasSensitiveResultReceiver" }
|
||||
|
||||
override predicate hasActualResult(Location loc, string element, string tag, string value) {
|
||||
exists(DataFlow::PathNode sink |
|
||||
sensitiveResultReceiver(_, sink, _) and
|
||||
exists(SensitiveResultReceiverFlow::PathNode sink |
|
||||
isSensitiveResultReceiver(_, sink, _) and
|
||||
element = sink.toString() and
|
||||
loc = sink.getNode().getLocation() and
|
||||
tag = "hasSensitiveResultReceiver" and
|
||||
|
||||
Reference in New Issue
Block a user