File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed
javascript/ql/test/library-tests/Security/heuristics Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1+ legacyDataFlowDifference
2+ consistencyIssue
Original file line number Diff line number Diff line change @@ -2,12 +2,28 @@ import javascript
22private import semmle.javascript.heuristics.AdditionalSources
33import testUtilities.ConsistencyChecking
44
5- class Taint extends TaintTracking :: Configuration {
6- Taint ( ) { this = "Taint" }
5+ module TestConfig implements DataFlow :: ConfigSig {
6+ predicate isSource ( DataFlow :: Node node ) { node instanceof HeuristicSource }
77
8- override predicate isSource ( DataFlow:: Node node ) { node instanceof HeuristicSource }
9-
10- override predicate isSink ( DataFlow:: Node node ) {
8+ predicate isSink ( DataFlow:: Node node ) {
119 node = any ( DataFlow:: CallNode call | call .getCalleeName ( ) = "sink" ) .getAnArgument ( )
1210 }
1311}
12+
13+ module TestFlow = TaintTracking:: Global< TestConfig > ;
14+
15+ class Consistency extends ConsistencyConfiguration {
16+ Consistency ( ) { this = "Consistency" }
17+
18+ override DataFlow:: Node getAnAlert ( ) { TestFlow:: flowTo ( result ) }
19+ }
20+
21+ class LegacyConfig extends TaintTracking:: Configuration {
22+ LegacyConfig ( ) { this = "LegacyConfig" }
23+
24+ override predicate isSource ( DataFlow:: Node source ) { TestConfig:: isSource ( source ) }
25+
26+ override predicate isSink ( DataFlow:: Node sink ) { TestConfig:: isSink ( sink ) }
27+ }
28+
29+ import testUtilities.LegacyDataFlowDiff:: DataFlowDiff< TestFlow , LegacyConfig >
You can’t perform that action at this time.
0 commit comments