Skip to content

Commit 65cbd47

Browse files
authored
Merge pull request #1314 from xiemaisi/js/fix-hardcoded-pw-fps
JavaScript: Further broaden the whitelist in `PasswordInConfigurationFile`.
2 parents c1e627d + b478c0d commit 65cbd47

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)