mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
promote PropsTaintStep to a PreCallGraphStep
This commit is contained in:
@@ -852,13 +852,13 @@ private class StateTaintStep extends TaintTracking::SharedTaintStep {
|
||||
}
|
||||
|
||||
/**
|
||||
* A taint propagating data flow edge for assignments of the form `c1.props.p = v`,
|
||||
* A data propagating data flow edge for assignments of the form `c1.props.p = v`,
|
||||
* where `c1` is an instance of React component `C`; in this case, we consider
|
||||
* taint to flow from `v` to any read of `c2.props.p`, where `c2`
|
||||
* data to flow from `v` to any read of `c2.props.p`, where `c2`
|
||||
* also is an instance of `C`.
|
||||
*/
|
||||
private class PropsTaintStep extends TaintTracking::SharedTaintStep {
|
||||
override predicate viewComponentStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
private class PropsTaintStep extends PreCallGraphStep {
|
||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(ReactComponent c, string name, DataFlow::PropRead prn |
|
||||
prn = c.getAPropRead(name) or
|
||||
prn = c.getAPreviousPropsSource().getAPropertyRead(name)
|
||||
|
||||
Reference in New Issue
Block a user