File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
rust/ql/test/library-tests/dataflow/sources Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module MyFlowConfig implements DataFlow::ConfigSig {
1010 predicate isSource ( DataFlow:: Node source ) { source instanceof ThreatModelSource }
1111
1212 predicate isSink ( DataFlow:: Node sink ) {
13- any ( CallExpr call | call .getFunction ( ) .( PathExpr ) .getResolvedPath ( ) = "crate::test:: sink")
13+ any ( CallExpr call | call .getFunction ( ) .( PathExpr ) .getResolvedPath ( ) . matches ( "%:: sink") )
1414 .getArgList ( )
1515 .getAnArg ( ) = sink .asExpr ( ) .getExpr ( )
1616 }
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ mod poem_test {
1010
1111 #[ handler]
1212 fn my_poem_handler_1 ( Path ( a) : Path < String > ) -> String { // $ Alert[rust/summary/taint-sources]
13- sink ( a. as_str ( ) ) ; // $ MISSING: hasTaintFlow
14- sink ( a. as_bytes ( ) ) ; // $ MISSING: hasTaintFlow
15- sink ( a) ; // $ MISSING: hasTaintFlow
13+ sink ( a. as_str ( ) ) ; // $ hasTaintFlow
14+ sink ( a. as_bytes ( ) ) ; // $ hasTaintFlow
15+ sink ( a) ; // $ hasTaintFlow
1616
1717 "" . to_string ( )
1818 }
@@ -59,7 +59,7 @@ mod poem_test {
5959 fn my_poem_handler_6 (
6060 Query ( a) : Query < String > , // $ Alert[rust/summary/taint-sources]
6161 ) -> String {
62- sink ( a) ; // $ MISSING: hasTaintFlow
62+ sink ( a) ; // $ hasTaintFlow
6363
6464 "" . to_string ( )
6565 }
You can’t perform that action at this time.
0 commit comments