11import javascript
22import testUtilities.InlineExpectationsTest
33
4- class TestSourcesConfiguration extends TaintTracking :: Configuration {
5- TestSourcesConfiguration ( ) { this = "TestSources" }
4+ module TestConfig implements DataFlow :: ConfigSig {
5+ predicate isSource ( DataFlow :: Node source ) { source instanceof ThreatModelSource }
66
7- override predicate isSource ( DataFlow:: Node source ) { source instanceof ThreatModelSource }
8-
9- override predicate isSink ( DataFlow:: Node sink ) {
7+ predicate isSink ( DataFlow:: Node sink ) {
108 exists ( CallExpr call |
119 call .getAnArgument ( ) = sink .asExpr ( ) and
1210 call .getCalleeName ( ) = "SINK"
1311 )
1412 }
1513}
1614
15+ module TestFlow = TaintTracking:: Global< TestConfig > ;
16+
17+ deprecated class LegacyConfig extends TaintTracking:: Configuration {
18+ LegacyConfig ( ) { this = "TestSources" }
19+
20+ override predicate isSource ( DataFlow:: Node source ) { TestConfig:: isSource ( source ) }
21+
22+ override predicate isSink ( DataFlow:: Node sink ) { TestConfig:: isSink ( sink ) }
23+ }
24+
1725private module InlineTestSources implements TestSig {
1826 string getARelevantTag ( ) { result in [ "hasFlow" , "threat-source" ] }
1927
2028 predicate hasActualResult ( Location location , string element , string tag , string value ) {
2129 exists ( DataFlow:: Node sink |
22- any ( TestSourcesConfiguration c ) . hasFlow ( _ , sink ) and
30+ TestFlow :: flowTo ( sink ) and
2331 value = "" and
2432 location = sink .getLocation ( ) and
2533 tag = "hasFlow" and
@@ -36,3 +44,4 @@ private module InlineTestSources implements TestSig {
3644}
3745
3846import MakeTest< InlineTestSources >
47+ deprecated import testUtilities.LegacyDataFlowDiff:: DataFlowDiff< TestFlow , LegacyConfig >
0 commit comments