Skip to content

Commit c579ec9

Browse files
authored
Merge pull request #21575 from hvitved/rust/model-generator-taint-steps
Rust: Include taint steps when generating flow models
2 parents 8987135 + fba4a83 commit c579ec9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rust/ql/src/utils/modelgenerator/internal/CaptureModels.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ private module SummaryModelGeneratorInput implements SummaryModelGeneratorInputS
138138

139139
Parameter asParameter(NodeExtended node) { result = node.asParameter() }
140140

141-
predicate isAdditionalContentFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { none() }
141+
predicate isAdditionalContentFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
142+
RustTaintTracking::defaultAdditionalTaintStep(nodeFrom, nodeTo, _) and
143+
not RustDataFlow::readStep(nodeFrom, _, nodeTo)
144+
}
142145

143146
predicate isField(DataFlow::ContentSet c) {
144147
c.(SingletonContentSet).getContent() instanceof FieldContent

0 commit comments

Comments
 (0)