mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Fix TaintedPath
This commit is contained in:
@@ -333,17 +333,26 @@ module TaintTracking {
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. Use the predicate `TaintTracking::persistentStorageStep` instead.
|
||||
*
|
||||
* A taint propagating data flow edge through persistent storage.
|
||||
*/
|
||||
class PersistentStorageTaintStep extends SharedTaintStep {
|
||||
deprecated class PersistentStorageTaintStep extends SharedTaintStep {
|
||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(PersistentReadAccess read |
|
||||
pred = read.getAWrite().getValue() and
|
||||
succ = read
|
||||
)
|
||||
persistentStorageStep(pred, succ)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `pred -> succ` is a taint propagating data flow edge through persistent storage.
|
||||
*/
|
||||
predicate persistentStorageStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(PersistentReadAccess read |
|
||||
pred = read.getAWrite().getValue() and
|
||||
succ = read
|
||||
)
|
||||
}
|
||||
|
||||
predicate arrayFunctionTaintStep = ArrayTaintTracking::arrayFunctionTaintStep/3;
|
||||
|
||||
/**
|
||||
|
||||
@@ -661,7 +661,7 @@ module TaintedPath {
|
||||
or
|
||||
promiseTaintStep(src, dst) and srclabel = dstlabel
|
||||
or
|
||||
any(TaintTracking::PersistentStorageTaintStep st).step(src, dst) and srclabel = dstlabel
|
||||
TaintTracking::persistentStorageStep(src, dst) and srclabel = dstlabel
|
||||
or
|
||||
exists(DataFlow::PropRead read | read = dst |
|
||||
src = read.getBase() and
|
||||
|
||||
Reference in New Issue
Block a user