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.
1 parent 2133d1a commit cc3efcdCopy full SHA for cc3efcd
ruby/ql/lib/codeql/ruby/security/UnsafeCodeConstructionQuery.qll
@@ -31,8 +31,11 @@ class Configuration extends TaintTracking::Configuration {
31
result instanceof DataFlow::FeatureHasSourceCallContext
32
}
33
34
- override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
+ override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet set) {
35
+ // allow implicit reads of array elements
36
this.isSink(node) and
- c.isKnownOrUnknownElement(_)
37
+ set.isKnownOrUnknownElement(any(DataFlow::Content::KnownElementContent content |
38
+ content.getIndex().getValueType() = "int"
39
+ ))
40
41
0 commit comments