mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
C#: Fake location of methods as we want to use the defined summaries for testing purposes.
This commit is contained in:
@@ -53,6 +53,14 @@ class Conf extends TaintTracking::Configuration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simulate that methods with summaries are not included in the source code.
|
||||||
|
* This is relevant for dataflow analysis using summaries tagged as generated.
|
||||||
|
*/
|
||||||
|
private class MyMethod extends Method {
|
||||||
|
override predicate fromSource() { none() }
|
||||||
|
}
|
||||||
|
|
||||||
from DataFlow::PathNode source, DataFlow::PathNode sink, Conf conf
|
from DataFlow::PathNode source, DataFlow::PathNode sink, Conf conf
|
||||||
where conf.hasFlowPath(source, sink)
|
where conf.hasFlowPath(source, sink)
|
||||||
select sink, source, sink, "$@", source, source.toString()
|
select sink, source, sink, "$@", source, source.toString()
|
||||||
|
|||||||
Reference in New Issue
Block a user