File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,10 +75,6 @@ private DataFlow::SourceNode getASimplePropertyProjectionCallee(
7575) {
7676 singleton = false and
7777 (
78- result = LodashUnderscore:: member ( "pick" ) and
79- objectIndex = 0 and
80- selectorIndex = [ 1 .. max ( result .getACall ( ) .getNumArgument ( ) ) ]
81- or
8278 result = LodashUnderscore:: member ( "pickBy" ) and
8379 objectIndex = 0 and
8480 selectorIndex = 1
@@ -131,6 +127,19 @@ private class SimplePropertyProjection extends PropertyProjection::Range {
131127 override predicate isSingletonProjection ( ) { singleton = true }
132128}
133129
130+ /**
131+ * A property projection with a variable number of selector indices.
132+ */
133+ private class VarArgsPropertyProjection extends PropertyProjection:: Range {
134+ VarArgsPropertyProjection ( ) { this = LodashUnderscore:: member ( "pick" ) .getACall ( ) }
135+
136+ override DataFlow:: Node getObject ( ) { result = getArgument ( 0 ) }
137+
138+ override DataFlow:: Node getASelector ( ) { result = getArgument ( any ( int i | i > 0 ) ) }
139+
140+ override predicate isSingletonProjection ( ) { none ( ) }
141+ }
142+
134143/**
135144 * A taint step for a property projection.
136145 */
You can’t perform that action at this time.
0 commit comments