File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
rust/ql/src/queries/security/CWE-089 Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,6 @@ module SqlInjectionConfig implements DataFlow::ConfigSig {
27
27
predicate isBarrier ( DataFlow:: Node barrier ) { barrier instanceof SqlInjection:: Barrier }
28
28
}
29
29
30
- /**
31
- * Detect taint flow of tainted data that reaches a SQL sink.
32
- */
33
30
module SqlInjectionFlow = TaintTracking:: Global< SqlInjectionConfig > ;
34
31
35
32
from SqlInjectionFlow:: PathNode sourceNode , SqlInjectionFlow:: PathNode sinkNode
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ let unsafe_query = format!("SELECT * FROM people WHERE firstname='{remote_contro
4
4
5
5
let _ = conn. execute ( unsafe_query. as_str ( ) ) . await ?; // BAD (arbitrary SQL injection is possible)
6
6
7
- let _ = sqlx:: query ( unsafe_query. as_str ( ) ) . fetch_all ( & mut conn) . await ?; // $ BAD (arbitrary SQL injection is possible)
7
+ let _ = sqlx:: query ( unsafe_query. as_str ( ) ) . fetch_all ( & mut conn) . await ?; // BAD (arbitrary SQL injection is possible)
You can’t perform that action at this time.
0 commit comments