Skip to content

Commit fbd71cd

Browse files
committed
C++: Update to regexpMatch.
1 parent 9035ca2 commit fbd71cd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cpp/ql/lib/semmle/code/cpp/security/SensitiveExprs.qll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ import cpp
1414
*/
1515
bindingset[s]
1616
private predicate suspicious(string s) {
17-
s.matches([
18-
"%password%", "%passwd%", "%accountid%", "%account%key%", "%accnt%key%", "%license%key%",
19-
"%trusted%"
20-
]) and
17+
s.regexpMatch(".*(password|passwd|accountid|account.?key|accnt.?key|license.?key|trusted).*") and
2118
not s.matches(["%hash%", "%crypt%", "%file%", "%path%", "%invalid%"])
2219
}
2320

0 commit comments

Comments
 (0)