mirror of
https://github.com/github/codeql.git
synced 2026-03-31 04:38:18 +02:00
Instantiate flow barriers from MaD
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
*/
|
||||
|
||||
private import rust
|
||||
private import codeql.rust.dataflow.FlowBarrier
|
||||
private import codeql.rust.dataflow.FlowSummary
|
||||
private import codeql.rust.dataflow.FlowSource
|
||||
private import codeql.rust.dataflow.FlowSink
|
||||
@@ -239,6 +240,22 @@ private class FlowSinkFromModel extends FlowSink::Range {
|
||||
}
|
||||
}
|
||||
|
||||
private class FlowBarrierFromModel extends FlowBarrier::Range {
|
||||
private string path;
|
||||
|
||||
FlowBarrierFromModel() {
|
||||
barrierModel(path, _, _, _, _) and
|
||||
this.callResolvesTo(path)
|
||||
}
|
||||
|
||||
override predicate isBarrier(string output, string kind, Provenance provenance, string model) {
|
||||
exists(QlBuiltins::ExtensionId madId |
|
||||
barrierModel(path, output, kind, provenance, madId) and
|
||||
model = "MaD:" + madId.toString()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private module Debug {
|
||||
private import FlowSummaryImpl
|
||||
private import Private
|
||||
|
||||
Reference in New Issue
Block a user