Skip to content

Commit b478c0d

Browse files
author
Max Schaefer
committed
JavaScript: Further broaden the whitelist in PasswordInConfigurationFile.
1 parent c16e9a7 commit b478c0d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

javascript/ql/src/Security/CWE-313/PasswordInConfigurationFile.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ where
5454
(
5555
key.toLowerCase() = "password" and
5656
// exclude interpolations of environment variables
57-
not val.regexpMatch("\\$\\w+|\\$[{(].+[)}]|%.*%")
57+
not val.regexpMatch("\\$.*|%.*%")
5858
or
5959
key.toLowerCase() != "readme" and
6060
// look for `password=...`, but exclude `password=;`, `password="$(...)"`,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
password: $$SOME_VAR

0 commit comments

Comments
 (0)