Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit f4f29be

Browse files
owen-mcsmowton
authored andcommitted
Add ability to specify default taint sanitizers
This allows library models to specify taint sanitizers.
1 parent 01ad7ac commit f4f29be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ql/src/semmle/go/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,10 @@ predicate defaultAdditionalTaintStep(DataFlow::Node src, DataFlow::Node sink) {
167167
localAdditionalTaintStep(src, sink)
168168
}
169169

170+
abstract class DefaultTaintSanitizer extends DataFlow::Node { }
171+
170172
/**
171173
* Holds if `node` should be a sanitizer in all global taint flow configurations
172174
* but not in local taint.
173175
*/
174-
predicate defaultTaintSanitizer(DataFlow::Node node) { none() }
176+
predicate defaultTaintSanitizer(DataFlow::Node node) { node instanceof DefaultTaintSanitizer }

0 commit comments

Comments
 (0)