File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
swift/ql/lib/codeql/swift/dataflow Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 11import swift
22private import codeql.swift.dataflow.DataFlow
33
4+ /**
5+ * A unit class for adding additional taint steps.
6+ *
7+ * Extend this class to add additional taint steps that should apply to all
8+ * taint configurations.
9+ */
10+ class AdditionalTaintStep extends Unit {
11+ /**
12+ * Holds if the step from `node1` to `node2` should be considered a taint
13+ * step for all configurations.
14+ */
15+ abstract predicate step ( DataFlow:: Node node1 , DataFlow:: Node node2 ) ;
16+ }
17+
418/**
519 * A `Content` that should be implicitly regarded as tainted whenever an object with such `Content`
620 * is itself tainted.
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ private module Cached {
6464 or
6565 // flow through a flow summary (extension of `SummaryModelCsv`)
6666 FlowSummaryImpl:: Private:: Steps:: summaryLocalStep ( nodeFrom , nodeTo , false )
67+ or
68+ any ( AdditionalTaintStep a ) .step ( nodeFrom , nodeTo )
6769 }
6870
6971 /**
You can’t perform that action at this time.
0 commit comments