revert the Taint stage, as it caused an alert for ql/abstract-class-import

This commit is contained in:
Erik Krogh Kristensen
2022-03-09 21:15:24 +01:00
parent 7e4ab4c60b
commit 7ca6426ea5
2 changed files with 0 additions and 31 deletions

View File

@@ -3,7 +3,6 @@ private import semmle.python.dataflow.new.DataFlow
private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate
private import semmle.python.dataflow.new.internal.TaintTrackingPublic
private import semmle.python.ApiGraphs
private import semmle.python.internal.CachedStages
/**
* Holds if `node` should be a sanitizer in all global taint flow configurations
@@ -31,7 +30,6 @@ private module Cached {
*/
cached
predicate defaultAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
Stages::Taint::ref() and
localAdditionalTaintStep(nodeFrom, nodeTo)
or
any(AdditionalTaintStep a).step(nodeFrom, nodeTo)
@@ -44,7 +42,6 @@ private module Cached {
*/
cached
predicate localAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
Stages::Taint::ref() and
concatStep(nodeFrom, nodeTo)
or
subscriptStep(nodeFrom, nodeTo)

View File

@@ -176,32 +176,4 @@ module Stages {
PointsTo::AttributePointsTo::variableAttributePointsTo(_, _, _, _, _)
}
}
/**
* The `taint` stage.
*/
cached
module Taint {
/**
* Always holds.
* Ensures that a predicate is evaluated as part of the DataFlow stage.
*/
cached
predicate ref() { 1 = 1 }
private import semmle.python.dataflow.new.internal.TaintTrackingPrivate as TaintTrackingPrivate
/**
* DONT USE!
* Contains references to each predicate that use the above `ref` predicate.
*/
cached
predicate backref() {
1 = 1
or
TaintTrackingPrivate::localAdditionalTaintStep(_, _)
or
TaintTrackingPrivate::defaultAdditionalTaintStep(_, _)
}
}
}