mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
remove some more legacy code that existed to support deprecated code
This commit is contained in:
@@ -523,58 +523,6 @@ abstract class LabeledBarrierGuardNode extends BarrierGuardNode {
|
|||||||
override predicate blocks(boolean outcome, Expr e) { none() }
|
override predicate blocks(boolean outcome, Expr e) { none() }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Internal version of AdditionalFlowStep that we can reference without deprecation warnings.
|
|
||||||
abstract private class LegacyAdditionalFlowStep extends DataFlow::Node {
|
|
||||||
/**
|
|
||||||
* Holds if `pred` → `succ` should be considered a data flow edge.
|
|
||||||
*/
|
|
||||||
predicate step(DataFlow::Node pred, DataFlow::Node succ) { none() }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Holds if `pred` → `succ` should be considered a data flow edge
|
|
||||||
* transforming values with label `predlbl` to have label `succlbl`.
|
|
||||||
*/
|
|
||||||
predicate step(
|
|
||||||
DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel predlbl,
|
|
||||||
DataFlow::FlowLabel succlbl
|
|
||||||
) {
|
|
||||||
none()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EXPERIMENTAL. This API may change in the future.
|
|
||||||
*
|
|
||||||
* Holds if `pred` should be stored in the object `succ` under the property `prop`.
|
|
||||||
* The object `succ` must be a `DataFlow::SourceNode` for the object wherein the value is stored.
|
|
||||||
*/
|
|
||||||
predicate storeStep(DataFlow::Node pred, DataFlow::SourceNode succ, string prop) { none() }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EXPERIMENTAL. This API may change in the future.
|
|
||||||
*
|
|
||||||
* Holds if the property `prop` of the object `pred` should be loaded into `succ`.
|
|
||||||
*/
|
|
||||||
predicate loadStep(DataFlow::Node pred, DataFlow::Node succ, string prop) { none() }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EXPERIMENTAL. This API may change in the future.
|
|
||||||
*
|
|
||||||
* Holds if the property `prop` should be copied from the object `pred` to the object `succ`.
|
|
||||||
*/
|
|
||||||
predicate loadStoreStep(DataFlow::Node pred, DataFlow::Node succ, string prop) { none() }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EXPERIMENTAL. This API may change in the future.
|
|
||||||
*
|
|
||||||
* Holds if the property `loadProp` should be copied from the object `pred` to the property `storeProp` of object `succ`.
|
|
||||||
*/
|
|
||||||
predicate loadStoreStep(
|
|
||||||
DataFlow::Node pred, DataFlow::Node succ, string loadProp, string storeProp
|
|
||||||
) {
|
|
||||||
none()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A data flow edge that should be added to all data flow configurations in
|
* A data flow edge that should be added to all data flow configurations in
|
||||||
* addition to standard data flow edges.
|
* addition to standard data flow edges.
|
||||||
@@ -697,40 +645,6 @@ module SharedFlowStep {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Contributes subclasses of `AdditionalFlowStep` to `SharedFlowStep`.
|
|
||||||
*/
|
|
||||||
private class AdditionalFlowStepAsSharedStep extends SharedFlowStep {
|
|
||||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
|
||||||
any(LegacyAdditionalFlowStep s).step(pred, succ)
|
|
||||||
}
|
|
||||||
|
|
||||||
override predicate step(
|
|
||||||
DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel predlbl,
|
|
||||||
DataFlow::FlowLabel succlbl
|
|
||||||
) {
|
|
||||||
any(LegacyAdditionalFlowStep s).step(pred, succ, predlbl, succlbl)
|
|
||||||
}
|
|
||||||
|
|
||||||
override predicate storeStep(DataFlow::Node pred, DataFlow::SourceNode succ, string prop) {
|
|
||||||
any(LegacyAdditionalFlowStep s).storeStep(pred, succ, prop)
|
|
||||||
}
|
|
||||||
|
|
||||||
override predicate loadStep(DataFlow::Node pred, DataFlow::Node succ, string prop) {
|
|
||||||
any(LegacyAdditionalFlowStep s).loadStep(pred, succ, prop)
|
|
||||||
}
|
|
||||||
|
|
||||||
override predicate loadStoreStep(DataFlow::Node pred, DataFlow::Node succ, string prop) {
|
|
||||||
any(LegacyAdditionalFlowStep s).loadStoreStep(pred, succ, prop)
|
|
||||||
}
|
|
||||||
|
|
||||||
override predicate loadStoreStep(
|
|
||||||
DataFlow::Node pred, DataFlow::Node succ, string loadProp, string storeProp
|
|
||||||
) {
|
|
||||||
any(LegacyAdditionalFlowStep s).loadStoreStep(pred, succ, loadProp, storeProp)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A collection of pseudo-properties that are used in multiple files.
|
* A collection of pseudo-properties that are used in multiple files.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -320,14 +320,6 @@ module TaintTracking {
|
|||||||
any(SharedTaintStep step).heuristicStep(pred, succ)
|
any(SharedTaintStep step).heuristicStep(pred, succ)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Holds if `pred -> succ` is an edge contributed by an `AdditionalTaintStep` instance.
|
|
||||||
*/
|
|
||||||
cached
|
|
||||||
predicate legacyAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
|
|
||||||
any(InternalAdditionalTaintStep step).step(pred, succ)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public taint step relations.
|
* Public taint step relations.
|
||||||
*/
|
*/
|
||||||
@@ -441,7 +433,6 @@ module TaintTracking {
|
|||||||
* Holds if `pred -> succ` is an edge used by all taint-tracking configurations.
|
* Holds if `pred -> succ` is an edge used by all taint-tracking configurations.
|
||||||
*/
|
*/
|
||||||
predicate sharedTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
|
predicate sharedTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||||
Cached::legacyAdditionalTaintStep(pred, succ) or
|
|
||||||
Cached::genericStep(pred, succ) or
|
Cached::genericStep(pred, succ) or
|
||||||
Cached::heuristicStep(pred, succ) or
|
Cached::heuristicStep(pred, succ) or
|
||||||
uriStep(pred, succ) or
|
uriStep(pred, succ) or
|
||||||
@@ -456,15 +447,6 @@ module TaintTracking {
|
|||||||
promiseStep(pred, succ)
|
promiseStep(pred, succ)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Internal version of `AdditionalTaintStep` that won't trigger deprecation warnings. */
|
|
||||||
abstract private class InternalAdditionalTaintStep extends DataFlow::Node {
|
|
||||||
/**
|
|
||||||
* Holds if `pred` → `succ` should be considered a taint-propagating
|
|
||||||
* data flow edge.
|
|
||||||
*/
|
|
||||||
abstract predicate step(DataFlow::Node pred, DataFlow::Node succ);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Gets a data flow node referring to the client side URL. */
|
/** Gets a data flow node referring to the client side URL. */
|
||||||
private DataFlow::SourceNode clientSideUrlRef(DataFlow::TypeTracker t) {
|
private DataFlow::SourceNode clientSideUrlRef(DataFlow::TypeTracker t) {
|
||||||
t.start() and
|
t.start() and
|
||||||
|
|||||||
Reference in New Issue
Block a user