@@ -15,29 +15,29 @@ private import semmle.javascript.security.TaintedObject
1515 * A taint tracking configuration for reasoning about template object injection vulnerabilities.
1616 */
1717module TemplateObjectInjectionConfig implements DataFlow:: StateConfigSig {
18- class FlowState = DataFlow :: FlowLabel ;
18+ import semmle.javascript.security.CommonFlowState
1919
20- predicate isSource ( DataFlow:: Node source , DataFlow :: FlowLabel label ) {
21- source .( Source ) .getAFlowLabel ( ) = label
20+ predicate isSource ( DataFlow:: Node source , FlowState state ) {
21+ source .( Source ) .getAFlowState ( ) = state
2222 }
2323
24- predicate isSink ( DataFlow:: Node sink , DataFlow :: FlowLabel label ) {
25- sink instanceof Sink and label = TaintedObject :: label ( )
24+ predicate isSink ( DataFlow:: Node sink , FlowState state ) {
25+ sink instanceof Sink and state . isTaintedObject ( )
2626 }
2727
2828 predicate isBarrier ( DataFlow:: Node node ) { node instanceof Sanitizer }
2929
30- predicate isBarrier ( DataFlow:: Node node , DataFlow :: FlowLabel label ) {
30+ predicate isBarrier ( DataFlow:: Node node , FlowState state ) {
3131 TaintTracking:: defaultSanitizer ( node ) and
32- label .isTaint ( )
32+ state .isTaint ( )
3333 or
34- node = TaintedObject:: SanitizerGuard:: getABarrierNode ( label )
34+ node = TaintedObject:: SanitizerGuard:: getABarrierNode ( state )
3535 }
3636
3737 predicate isAdditionalFlowStep (
38- DataFlow:: Node src , DataFlow :: FlowLabel inlbl , DataFlow:: Node trg , DataFlow :: FlowLabel outlbl
38+ DataFlow:: Node src , FlowState inlbl , DataFlow:: Node trg , FlowState outlbl
3939 ) {
40- TaintedObject:: step ( src , trg , inlbl , outlbl )
40+ TaintedObject:: isAdditionalFlowStep ( src , inlbl , trg , outlbl )
4141 or
4242 // We're not using a taint-tracking config because taint steps would then apply to all flow states.
4343 // So we use a plain data flow config and manually add the default taint steps.
0 commit comments