mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge pull request #1314 from xiemaisi/js/fix-hardcoded-pw-fps
JavaScript: Further broaden the whitelist in `PasswordInConfigurationFile`.
This commit is contained in:
@@ -54,7 +54,7 @@ where
|
||||
(
|
||||
key.toLowerCase() = "password" and
|
||||
// exclude interpolations of environment variables
|
||||
not val.regexpMatch("\\$\\w+|\\$[{(].+[)}]|%.*%")
|
||||
not val.regexpMatch("\\$.*|%.*%")
|
||||
or
|
||||
key.toLowerCase() != "readme" and
|
||||
// look for `password=...`, but exclude `password=;`, `password="$(...)"`,
|
||||
|
||||
1
javascript/ql/test/query-tests/Security/CWE-313/tst7.yml
Normal file
1
javascript/ql/test/query-tests/Security/CWE-313/tst7.yml
Normal file
@@ -0,0 +1 @@
|
||||
password: $$SOME_VAR
|
||||
Reference in New Issue
Block a user