Rust: Fix toString().

This commit is contained in:
Geoffrey White
2024-11-22 17:09:52 +00:00
parent d8b58f21c7
commit f2f577f86c

View File

@@ -4,13 +4,13 @@ import codeql.rust.Concepts
import utils.InlineFlowTest
/**
* Configuration for flow from any threat model source to an argument of a function called `sink`.
* Configuration for flow from any threat model source to an argument of the function `sink`.
*/
module MyFlowConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelSource }
predicate isSink(DataFlow::Node sink) {
any(CallExpr call | call.getExpr().(PathExpr).getPath().toString() = "sink")
any(CallExpr call | call.getExpr().(PathExpr).getPath().getResolvedPath() = "crate::test::sink")
.getArgList()
.getAnArg() = sink.asExpr().getExpr()
}