@@ -12,26 +12,26 @@ import DeepObjectResourceExhaustionCustomizations::DeepObjectResourceExhaustion
1212 * of user-controlled objects.
1313 */
1414module DeepObjectResourceExhaustionConfig implements DataFlow:: StateConfigSig {
15- class FlowState = DataFlow :: FlowLabel ;
15+ import semmle.javascript.security.CommonFlowState
1616
17- predicate isSource ( DataFlow:: Node source , DataFlow :: FlowLabel label ) {
18- source .( Source ) .getAFlowLabel ( ) = label
17+ predicate isSource ( DataFlow:: Node source , FlowState state ) {
18+ source .( Source ) .getAFlowState ( ) = state
1919 }
2020
21- predicate isSink ( DataFlow:: Node sink , DataFlow :: FlowLabel label ) {
22- sink instanceof Sink and label = TaintedObject :: label ( )
21+ predicate isSink ( DataFlow:: Node sink , FlowState state ) {
22+ sink instanceof Sink and state . isTaintedObject ( )
2323 }
2424
25- predicate isBarrier ( DataFlow:: Node node , DataFlow :: FlowLabel label ) {
26- node = TaintedObject:: SanitizerGuard:: getABarrierNode ( label )
25+ predicate isBarrier ( DataFlow:: Node node , FlowState state ) {
26+ node = TaintedObject:: SanitizerGuard:: getABarrierNode ( state )
2727 }
2828
2929 predicate isBarrier ( DataFlow:: Node node ) { node instanceof Sanitizer }
3030
3131 predicate isAdditionalFlowStep (
32- DataFlow:: Node src , DataFlow :: FlowLabel inlbl , DataFlow:: Node trg , DataFlow :: FlowLabel outlbl
32+ DataFlow:: Node node1 , FlowState state1 , DataFlow:: Node node2 , FlowState state2
3333 ) {
34- TaintedObject:: step ( src , trg , inlbl , outlbl )
34+ TaintedObject:: isAdditionalFlowStep ( node1 , state1 , node2 , state2 )
3535 }
3636}
3737
0 commit comments