mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
The module `Conf` is created so that it can be imported without importing the query predicates from the same file.
26 lines
898 B
Plaintext
26 lines
898 B
Plaintext
/**
|
|
* @kind path-problem
|
|
*/
|
|
|
|
// This query is for debugging InlineTaintTestFailures.
|
|
// The intended usage is
|
|
// 1. load the database of the failing test
|
|
// 2. run this query to see actual paths
|
|
// 3. if necessary, look at partial paths by (un)commenting appropriate lines
|
|
import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
import experimental.meta.InlineTaintTest::Conf
|
|
// import DataFlow::PartialPathGraph
|
|
import DataFlow::PathGraph
|
|
|
|
class Conf extends TestTaintTrackingConfiguration {
|
|
override int explorationLimit() { result = 5 }
|
|
}
|
|
|
|
// from Conf config, DataFlow::PartialPathNode source, DataFlow::PartialPathNode sink
|
|
// where config.hasPartialFlow(source, sink, _)
|
|
from Conf config, DataFlow::PathNode source, DataFlow::PathNode sink
|
|
where config.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "This node receives taint from $@.", source.getNode(),
|
|
"this source"
|