Skip to content

Commit 0c9d46a

Browse files
erik-kroghesbena
andcommitted
changes based on review
Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
1 parent c106b09 commit 0c9d46a

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

javascript/ql/src/semmle/javascript/PackageExports.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import javascript
99
/**
1010
* Gets a parameter that is a library input to a top-level package.
1111
*/
12-
DataFlow::ParameterNode getAnLibraryInputParameter() {
12+
DataFlow::ParameterNode getALibraryInputParameter() {
1313
exists(int bound, DataFlow::FunctionNode func |
1414
func = getAValueExportedBy(getTopmostPackageJSON()).getABoundFunctionValue(bound) and
1515
result = func.getParameter(any(int arg | arg >= bound))

javascript/ql/src/semmle/javascript/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module UnsafeShellCommandConstruction {
5252
*/
5353
class ExternalInputSource extends Source, DataFlow::ParameterNode {
5454
ExternalInputSource() {
55-
this = Exports::getAnLibraryInputParameter() and
55+
this = Exports::getALibraryInputParameter() and
5656
not this.getName() = ["cmd", "command"] // looks to be on purpose.
5757
}
5858
}

javascript/ql/src/semmle/javascript/security/performance/PolynomialReDoSCustomizations.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module PolynomialReDoS {
2121

2222
/**
2323
* Gets a string that describes the source.
24-
* For use in the alert message
24+
* For use in the alert message.
2525
*/
2626
string describe() { result = "a user-provided value" }
2727
}
@@ -93,7 +93,7 @@ module PolynomialReDoS {
9393
class StringLengthLimiter extends Sanitizer {
9494
StringLengthLimiter() {
9595
this.(StringReplaceCall).isGlobal() and
96-
// not char classes - they don't remove any repeated pattern.
96+
// not lone char classes - they don't remove any repeated pattern.
9797
not exists(RegExpTerm root | root = this.(StringReplaceCall).getRegExp().getRoot() |
9898
root instanceof RegExpCharacterClass
9999
or
@@ -136,7 +136,7 @@ module PolynomialReDoS {
136136
* A parameter of an exported function, seen as a source for polynomial-redos.
137137
*/
138138
class ExternalInputSource extends Source, DataFlow::ParameterNode {
139-
ExternalInputSource() { this = Exports::getAnLibraryInputParameter() }
139+
ExternalInputSource() { this = Exports::getALibraryInputParameter() }
140140

141141
override string getKind() { result = "library" }
142142

javascript/ql/src/semmle/javascript/security/performance/SuperlinearBackTracking.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ class PolynomialBackTrackingTerm extends InfiniteRepetitionQuantifier {
406406

407407
PolynomialBackTrackingTerm() {
408408
reason = getReasonString(this, pump, prefixMsg, prev) and
409-
// there might be many reasons for this term to have polynomial backtracking - we pick an arbitary one.
409+
// there might be many reasons for this term to have polynomial backtracking - we pick the shortest one.
410410
reason = min(string msg | msg = getReasonString(this, _, _, _) | msg order by msg.length(), msg)
411411
}
412412

0 commit comments

Comments
 (0)