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
12private import codeql.files.FileSystem
2- private import codeql.ruby.DataFlow
33private import codeql.ruby.dataflow.RemoteFlowSources
44private import codeql.ruby.security.CodeInjectionCustomizations
55private import codeql.ruby.security.CommandInjectionCustomizations
@@ -34,6 +34,12 @@ DataFlow::Node relevantTaintSink(string kind) {
3434 kind = "UnsafeDeserialization" and result instanceof UnsafeDeserialization:: Sink
3535 or
3636 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
3743 )
3844}
3945
You can’t perform that action at this time.
0 commit comments