We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7f76f5b + 0c05fa4 commit fdf1dcaCopy full SHA for fdf1dca
rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll
@@ -53,11 +53,10 @@ module RegexInjection {
53
*/
54
private class NewSink extends Sink {
55
NewSink() {
56
- exists(CallExprCfgNode call, PathExpr path |
57
- path = call.getFunction().getExpr() and
58
- path.getResolvedCrateOrigin() = "repo:https://github.com/rust-lang/regex:regex" and
59
- path.getResolvedPath() = "<crate::regex::string::Regex>::new" and
60
- this.asExpr() = call.getArgument(0) and
+ exists(CallExprBase call, Addressable a |
+ call.getStaticTarget() = a and
+ a.getCanonicalPath() = "<regex::regex::string::Regex>::new" and
+ this.asExpr().getExpr() = call.getArg(0) and
61
not this.asExpr() instanceof LiteralExprCfgNode
62
)
63
}
0 commit comments