Skip to content

Commit 5fdc75b

Browse files
committed
Rust: Allow reference content in sinks for taint reach.
1 parent 8631371 commit 5fdc75b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

rust/ql/src/queries/summary/TaintReach.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ private module TaintReachConfig implements DataFlow::ConfigSig {
1515
predicate isSource(DataFlow::Node node) { node instanceof ActiveThreatModelSource }
1616

1717
predicate isSink(DataFlow::Node node) { any() }
18+
19+
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
20+
// flow out from reference content at the sink.
21+
isSink(node) and
22+
c.getAReadContent() instanceof DataFlow::ReferenceContent
23+
}
1824
}
1925

2026
private module TaintReachFlow = TaintTracking::Global<TaintReachConfig>;

0 commit comments

Comments
 (0)