File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
docs/codeql/codeql-language-guides Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -210,16 +210,16 @@ The following global taint-tracking query finds places where a string literal is
210
210
import codeql.rust.dataflow.TaintTracking
211
211
212
212
module ConstantPasswordConfig implements DataFlow::ConfigSig {
213
- predicate isSource(DataFlow::Node node) { node.asExpr().getExpr() instanceof StringLiteralExpr }
214
-
215
- predicate isSink(DataFlow::Node node) {
216
- // any argument going to a parameter called `password`
217
- exists(Function f, CallExpr call, int index |
218
- call.getArg(index) = node.asExpr().getExpr() and
219
- call.getStaticTarget() = f and
220
- f.getParam(index).getPat().(IdentPat).getName().getText() = "password"
221
- )
222
- }
213
+ predicate isSource(DataFlow::Node node) { node.asExpr().getExpr() instanceof StringLiteralExpr }
214
+
215
+ predicate isSink(DataFlow::Node node) {
216
+ // any argument going to a parameter called `password`
217
+ exists(Function f, CallExpr call, int index |
218
+ call.getArg(index) = node.asExpr().getExpr() and
219
+ call.getStaticTarget() = f and
220
+ f.getParam(index).getPat().(IdentPat).getName().getText() = "password"
221
+ )
222
+ }
223
223
}
224
224
225
225
module ConstantPasswordFlow = TaintTracking::Global<ConstantPasswordConfig>;
You can’t perform that action at this time.
0 commit comments