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
210210 import codeql.rust.dataflow.TaintTracking
211211
212212 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+ }
223223 }
224224
225225 module ConstantPasswordFlow = TaintTracking::Global<ConstantPasswordConfig>;
You can’t perform that action at this time.
0 commit comments