mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
22 lines
654 B
Plaintext
22 lines
654 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 source, DataFlow::Node sink |
|
|
exists(TestConfiguration cfg | cfg.hasFlow(source, sink))
|
|
|
|
|
location = sink.getLocation() and
|
|
tag = "captured" and
|
|
value = "" and
|
|
element = sink.toString()
|
|
)
|
|
}
|
|
}
|