Skip to content

Commit bdc5f9c

Browse files
authored
Merge pull request github#14012 from knewbury01/knewbury01/add-sanitizer-command-query
Java: add sanitizer to command injection query
2 parents ce6fd8a + 5e01e1d commit bdc5f9c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Added new sanitizer to Java command injection model

java/ql/lib/semmle/code/java/security/CommandLineQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ private class DefaultCommandInjectionSanitizer extends CommandInjectionSanitizer
4242
or
4343
this.getType() instanceof BoxedType
4444
or
45+
this.getType() instanceof NumberType
46+
or
4547
isSafeCommandArgument(this.asExpr())
4648
}
4749
}

0 commit comments

Comments
 (0)