mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
25 lines
717 B
Plaintext
25 lines
717 B
Plaintext
import java
|
|
import utils.test.InlineExpectationsTest
|
|
import semmle.code.java.security.PartialPathTraversalQuery
|
|
|
|
class TestRemoteSource extends RemoteFlowSource {
|
|
TestRemoteSource() { this.asParameter().hasName(["dir", "path"]) }
|
|
|
|
override string getSourceType() { result = "TestSource" }
|
|
}
|
|
|
|
module Test implements TestSig {
|
|
string getARelevantTag() { result = "hasTaintFlow" }
|
|
|
|
predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasTaintFlow" and
|
|
exists(DataFlow::Node sink | PartialPathTraversalFromRemoteFlow::flowTo(sink) |
|
|
sink.getLocation() = location and
|
|
element = sink.toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|
|
|
|
import MakeTest<Test>
|