@@ -11,40 +11,38 @@ import javascript
1111import ZipSlipCustomizations:: ZipSlip
1212
1313// Materialize flow labels
14- private class ConcretePosixPath extends TaintedPath:: Label:: PosixPath {
14+ deprecated private class ConcretePosixPath extends TaintedPath:: Label:: PosixPath {
1515 ConcretePosixPath ( ) { this = this }
1616}
1717
18- private class ConcreteSplitPath extends TaintedPath:: Label:: SplitPath {
18+ deprecated private class ConcreteSplitPath extends TaintedPath:: Label:: SplitPath {
1919 ConcreteSplitPath ( ) { this = this }
2020}
2121
2222/** A taint tracking configuration for unsafe archive extraction. */
2323module ZipSlipConfig implements DataFlow:: StateConfigSig {
24- class FlowState = DataFlow :: FlowLabel ;
24+ class FlowState = TaintedPath :: FlowState ;
2525
26- predicate isSource ( DataFlow:: Node source , DataFlow :: FlowLabel label ) {
27- label = source .( Source ) .getAFlowLabel ( )
26+ predicate isSource ( DataFlow:: Node source , FlowState state ) {
27+ state = source .( Source ) .getAFlowState ( )
2828 }
2929
30- predicate isSink ( DataFlow:: Node sink , DataFlow:: FlowLabel label ) {
31- label = sink .( Sink ) .getAFlowLabel ( )
32- }
30+ predicate isSink ( DataFlow:: Node sink , FlowState state ) { state = sink .( Sink ) .getAFlowState ( ) }
3331
3432 predicate isBarrier ( DataFlow:: Node node ) {
3533 node instanceof TaintedPath:: Sanitizer or
3634 node = DataFlow:: MakeBarrierGuard< TaintedPath:: BarrierGuard > :: getABarrierNode ( )
3735 }
3836
39- predicate isBarrier ( DataFlow:: Node node , DataFlow:: FlowLabel label ) {
40- node = DataFlow:: MakeLabeledBarrierGuard< TaintedPath:: BarrierGuard > :: getABarrierNode ( label )
37+ predicate isBarrier ( DataFlow:: Node node , FlowState state ) {
38+ node =
39+ DataFlow:: MakeStateBarrierGuard< FlowState , TaintedPath:: BarrierGuard > :: getABarrierNode ( state )
4140 }
4241
4342 predicate isAdditionalFlowStep (
44- DataFlow:: Node node1 , DataFlow:: FlowLabel state1 , DataFlow:: Node node2 ,
45- DataFlow:: FlowLabel state2
43+ DataFlow:: Node node1 , FlowState state1 , DataFlow:: Node node2 , FlowState state2
4644 ) {
47- TaintedPath:: isAdditionalTaintedPathFlowStep ( node1 , node2 , state1 , state2 )
45+ TaintedPath:: isAdditionalFlowStep ( node1 , state1 , node2 , state2 )
4846 }
4947}
5048
@@ -76,6 +74,7 @@ deprecated class Configuration extends DataFlow::Configuration {
7674 DataFlow:: Node src , DataFlow:: Node dst , DataFlow:: FlowLabel srclabel ,
7775 DataFlow:: FlowLabel dstlabel
7876 ) {
79- ZipSlipConfig:: isAdditionalFlowStep ( src , srclabel , dst , dstlabel )
77+ ZipSlipConfig:: isAdditionalFlowStep ( src , TaintedPath:: Label:: toFlowState ( srclabel ) , dst ,
78+ TaintedPath:: Label:: toFlowState ( dstlabel ) )
8079 }
8180}
0 commit comments