mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
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