Skip to content

Commit 261cabd

Browse files
committed
better comments
1 parent b24c6fd commit 261cabd

File tree

1 file changed

+5
-0
lines changed
  • javascript/ql/lib/semmle/javascript/frameworks

1 file changed

+5
-0
lines changed

javascript/ql/lib/semmle/javascript/frameworks/Execa.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ module Execa {
133133
}
134134

135135
override DataFlow::Node getArgumentList() {
136+
result = this.getParameter(any(int i | i > 2)).asSink() and
137+
// here I should check if the first parameter of Template literal is the rightmost string of this Template literal then the arguments of this command execution will be the second and third and .. parameters
138+
not exists(string s | this.getACall().getArgument(0).mayHaveStringValue(s) | s.matches(""))
139+
or
136140
result = this.getParameter(any(int i | i > 1)).asSink() and
141+
// here I should check if the first parameter of Template literal is a constant which is the command, then the arguments of this command execution will be the first, second and third and .. parameters
137142
not exists(string s | this.getACall().getArgument(0).mayHaveStringValue(s) | s.matches(""))
138143
}
139144

0 commit comments

Comments
 (0)