mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: PropertyProjectionTest
This commit is contained in:
@@ -134,14 +134,12 @@ private class SimplePropertyProjection extends PropertyProjection::Range {
|
||||
/**
|
||||
* A taint step for a property projection.
|
||||
*/
|
||||
private class PropertyProjectionTaintStep extends TaintTracking::AdditionalTaintStep {
|
||||
PropertyProjection projection;
|
||||
|
||||
PropertyProjectionTaintStep() { projection = this }
|
||||
|
||||
private class PropertyProjectionTaintStep extends TaintTracking::SharedTaintStep {
|
||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
// reading from a tainted object yields a tainted result
|
||||
this = succ and
|
||||
pred = projection.getObject()
|
||||
exists(PropertyProjection projection |
|
||||
pred = projection.getObject() and
|
||||
succ = projection
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user