mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
20 lines
615 B
Plaintext
20 lines
615 B
Plaintext
import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
import TestUtilities.InlineExpectationsTest
|
|
import experimental.dataflow.testConfig
|
|
|
|
class CaptureTest extends InlineExpectationsTest {
|
|
CaptureTest() { this = "CaptureTest" }
|
|
|
|
override string getARelevantTag() { result = "captured" }
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
exists(DataFlow::Node sink | exists(TestConfiguration cfg | cfg.hasFlowTo(sink)) |
|
|
location = sink.getLocation() and
|
|
tag = "captured" and
|
|
value = "" and
|
|
element = sink.toString()
|
|
)
|
|
}
|
|
}
|