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 {
10
10
predicate isSource ( DataFlow:: Node source ) { source instanceof ThreatModelSource }
11
11
12
12
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") )
14
14
.getArgList ( )
15
15
.getAnArg ( ) = sink .asExpr ( ) .getExpr ( )
16
16
}
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ mod poem_test {
10
10
11
11
#[ handler]
12
12
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
16
16
17
17
"" . to_string ( )
18
18
}
@@ -59,7 +59,7 @@ mod poem_test {
59
59
fn my_poem_handler_6 (
60
60
Query ( a) : Query < String > , // $ Alert[rust/summary/taint-sources]
61
61
) -> String {
62
- sink ( a) ; // $ MISSING: hasTaintFlow
62
+ sink ( a) ; // $ hasTaintFlow
63
63
64
64
"" . to_string ( )
65
65
}
You can’t perform that action at this time.
0 commit comments