File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
ruby/ql/src/queries/meta/internal Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ private import ruby
1
2
private import codeql.files.FileSystem
2
- private import codeql.ruby.DataFlow
3
3
private import codeql.ruby.dataflow.RemoteFlowSources
4
4
private import codeql.ruby.security.CodeInjectionCustomizations
5
5
private import codeql.ruby.security.CommandInjectionCustomizations
@@ -34,6 +34,12 @@ DataFlow::Node relevantTaintSink(string kind) {
34
34
kind = "UnsafeDeserialization" and result instanceof UnsafeDeserialization:: Sink
35
35
or
36
36
kind = "UrlRedirect" and result instanceof UrlRedirect:: Sink
37
+ ) and
38
+ // the sink is not a string literal
39
+ not exists ( Ast:: StringLiteral str |
40
+ str = result .asExpr ( ) .getExpr ( ) and
41
+ // ensure there is no interpolation, as that is not a literal
42
+ not str .getComponent ( _) instanceof Ast:: StringInterpolationComponent
37
43
)
38
44
}
39
45
You can’t perform that action at this time.
0 commit comments