Skip to content

Commit ac6c4ad

Browse files
owen-mcsmowton
andcommitted
Apply suggestions from code review
Co-authored-by: Chris Smowton <[email protected]>
1 parent 821f399 commit ac6c4ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class VariableWithSensitiveName extends Variable {
1313
exists(string name | name = this.getName() |
1414
name.regexpMatch(getCommonSensitiveInfoRegex()) and
1515
not name.regexpMatch("(?i).*null.*") and
16-
not name.matches("tokenImage") // appears in parser code generated by JavaCC
16+
name != "tokenImage" // appears in parser code generated by JavaCC
1717
)
1818
}
1919
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
category: minorAnalysis
33
---
4-
* Variables named `tokenImage` are no longer sources for the `java/sensitive-log` query. This is because this variable name is used in parsing code generated by JavaCC, so it causes a larger number of false positive alerts.
4+
* Variables named `tokenImage` are no longer sources for the `java/sensitive-log` query. This is because this variable name is used in parsing code generated by JavaCC, so it causes a large number of false positive alerts.

0 commit comments

Comments
 (0)