mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #1652 from xiemaisi/js/deprecate-isBarrier/2
Approved by asger-semmle
This commit is contained in:
@@ -31,3 +31,6 @@
|
||||
|
||||
- The `getName()` predicate on functions and classes now gets a name
|
||||
inferred from the context if the function or class was not declared with a name.
|
||||
- The two-argument and three-argument variants of `DataFlow::Configuration::isBarrier` and
|
||||
`TaintTracking::Configuration::isSanitizer` have been deprecated. Overriding them no
|
||||
longer has any effect. Use `isBarrierEdge` and `isSanitizerEdge` instead.
|
||||
|
||||
@@ -157,14 +157,14 @@ abstract class Configuration extends string {
|
||||
*
|
||||
* Holds if flow from `src` to `trg` is prohibited.
|
||||
*/
|
||||
predicate isBarrier(DataFlow::Node src, DataFlow::Node trg) { none() }
|
||||
deprecated predicate isBarrier(DataFlow::Node src, DataFlow::Node trg) { none() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `isBarrierEdge` instead.
|
||||
*
|
||||
* Holds if flow with label `lbl` cannot flow from `src` to `trg`.
|
||||
*/
|
||||
predicate isBarrier(DataFlow::Node src, DataFlow::Node trg, FlowLabel lbl) { none() }
|
||||
deprecated predicate isBarrier(DataFlow::Node src, DataFlow::Node trg, FlowLabel lbl) { none() }
|
||||
|
||||
/**
|
||||
* Holds if flow from `pred` to `succ` is prohibited.
|
||||
@@ -486,7 +486,6 @@ private predicate basicFlowStep(
|
||||
// Local flow
|
||||
exists(FlowLabel predlbl, FlowLabel succlbl |
|
||||
localFlowStep(pred, succ, cfg, predlbl, succlbl) and
|
||||
not cfg.isBarrier(pred, succ, predlbl) and
|
||||
not cfg.isBarrierEdge(pred, succ, predlbl) and
|
||||
summary = MkPathSummary(false, false, predlbl, succlbl)
|
||||
)
|
||||
@@ -601,7 +600,6 @@ private predicate callInputStep(
|
||||
)
|
||||
) and
|
||||
not cfg.isBarrier(succ) and
|
||||
not cfg.isBarrier(pred, succ) and
|
||||
not cfg.isBarrierEdge(pred, succ)
|
||||
}
|
||||
|
||||
@@ -656,7 +654,6 @@ private predicate flowThroughCall(
|
||||
ret.asExpr() = f.getAReturnedExpr() and
|
||||
calls(output, f) and // Do not consider partial calls
|
||||
reachableFromInput(f, output, input, ret, cfg, summary) and
|
||||
not cfg.isBarrier(ret, output) and
|
||||
not cfg.isBarrierEdge(ret, output) and
|
||||
not cfg.isLabeledBarrier(output, summary.getEndLabel())
|
||||
)
|
||||
@@ -666,7 +663,6 @@ private predicate flowThroughCall(
|
||||
DataFlow::exceptionalInvocationReturnNode(output, invk.asExpr()) and
|
||||
calls(invk, f) and
|
||||
reachableFromInput(f, invk, input, ret, cfg, summary) and
|
||||
not cfg.isBarrier(ret, output) and
|
||||
not cfg.isBarrierEdge(ret, output) and
|
||||
not cfg.isLabeledBarrier(output, summary.getEndLabel())
|
||||
)
|
||||
@@ -906,7 +902,6 @@ private predicate flowStep(
|
||||
flowIntoHigherOrderCall(pred, succ, cfg, summary)
|
||||
) and
|
||||
not cfg.isBarrier(succ) and
|
||||
not cfg.isBarrier(pred, succ) and
|
||||
not cfg.isBarrierEdge(pred, succ) and
|
||||
not cfg.isLabeledBarrier(succ, summary.getEndLabel())
|
||||
}
|
||||
|
||||
@@ -56,14 +56,14 @@ module TaintTracking {
|
||||
*
|
||||
* Holds if the edge from `source` to `sink` is a taint sanitizer.
|
||||
*/
|
||||
predicate isSanitizer(DataFlow::Node source, DataFlow::Node sink) { none() }
|
||||
deprecated predicate isSanitizer(DataFlow::Node source, DataFlow::Node sink) { none() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `isSanitizerEdge` instead.
|
||||
*
|
||||
* Holds if the edge from `source` to `sink` is a taint sanitizer for data labelled with `lbl`.
|
||||
*/
|
||||
predicate isSanitizer(DataFlow::Node source, DataFlow::Node sink, DataFlow::FlowLabel lbl) {
|
||||
deprecated predicate isSanitizer(DataFlow::Node source, DataFlow::Node sink, DataFlow::FlowLabel lbl) {
|
||||
none()
|
||||
}
|
||||
|
||||
@@ -92,7 +92,6 @@ module TaintTracking {
|
||||
|
||||
final override predicate isBarrierEdge(DataFlow::Node source, DataFlow::Node sink) {
|
||||
super.isBarrierEdge(source, sink) or
|
||||
isSanitizer(source, sink) or
|
||||
isSanitizerEdge(source, sink)
|
||||
}
|
||||
|
||||
@@ -100,7 +99,6 @@ module TaintTracking {
|
||||
DataFlow::Node source, DataFlow::Node sink, DataFlow::FlowLabel lbl
|
||||
) {
|
||||
super.isBarrierEdge(source, sink, lbl) or
|
||||
isSanitizer(source, sink, lbl) or
|
||||
isSanitizerEdge(source, sink, lbl)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user