mirror of
https://github.com/github/codeql.git
synced 2025-12-23 20:26:32 +01:00
Extend taint tracking interface with flow states
This commit is contained in:
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
@@ -64,13 +64,30 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
override predicate isSource(DataFlow::Node source) { none() }
|
override predicate isSource(DataFlow::Node source) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `sink` is a relevant taint sink.
|
* Holds if `source` is a relevant taint source with the given initial
|
||||||
|
* `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink
|
||||||
*
|
*
|
||||||
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
*/
|
*/
|
||||||
// overridden to provide taint-tracking specific qldoc
|
// overridden to provide taint-tracking specific qldoc
|
||||||
override predicate isSink(DataFlow::Node sink) { none() }
|
override predicate isSink(DataFlow::Node sink) { none() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `sink` is a relevant taint sink accepting `state`.
|
||||||
|
*
|
||||||
|
* The smaller this predicate is, the faster `hasFlow()` will converge.
|
||||||
|
*/
|
||||||
|
// overridden to provide taint-tracking specific qldoc
|
||||||
|
override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
/** Holds if the node `node` is a taint sanitizer. */
|
/** Holds if the node `node` is a taint sanitizer. */
|
||||||
predicate isSanitizer(DataFlow::Node node) { none() }
|
predicate isSanitizer(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -79,6 +96,16 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultTaintSanitizer(node)
|
defaultTaintSanitizer(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the node `node` is a taint sanitizer when the flow state is
|
||||||
|
* `state`.
|
||||||
|
*/
|
||||||
|
predicate isSanitizer(DataFlow::Node node, DataFlow::FlowState state) { none() }
|
||||||
|
|
||||||
|
final override predicate isBarrier(DataFlow::Node node, DataFlow::FlowState state) {
|
||||||
|
this.isSanitizer(node, state)
|
||||||
|
}
|
||||||
|
|
||||||
/** Holds if taint propagation into `node` is prohibited. */
|
/** Holds if taint propagation into `node` is prohibited. */
|
||||||
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
predicate isSanitizerIn(DataFlow::Node node) { none() }
|
||||||
|
|
||||||
@@ -107,6 +134,25 @@ abstract class Configuration extends DataFlow::Configuration {
|
|||||||
defaultAdditionalTaintStep(node1, node2)
|
defaultAdditionalTaintStep(node1, node2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if the additional taint propagation step from `node1` to `node2`
|
||||||
|
* must be taken into account in the analysis. This step is only applicable
|
||||||
|
* in `state1` and updates the flow state to `state2`.
|
||||||
|
*/
|
||||||
|
predicate isAdditionalTaintStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
|
|
||||||
|
final override predicate isAdditionalFlowStep(
|
||||||
|
DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2,
|
||||||
|
DataFlow::FlowState state2
|
||||||
|
) {
|
||||||
|
this.isAdditionalTaintStep(node1, state1, node2, state2)
|
||||||
|
}
|
||||||
|
|
||||||
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) {
|
||||||
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
(this.isSink(node) or this.isAdditionalTaintStep(node, _)) and
|
||||||
defaultImplicitTaintRead(node, c)
|
defaultImplicitTaintRead(node, c)
|
||||||
|
|||||||
Reference in New Issue
Block a user