Skip to content

Commit e011475

Browse files
committed
Rust: fix formatting in doc snippet
1 parent 494d192 commit e011475

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff 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>;

0 commit comments

Comments
 (0)