mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
24 lines
739 B
Plaintext
24 lines
739 B
Plaintext
import javascript
|
|
import semmle.javascript.security.SensitiveActions
|
|
|
|
query predicate cleartextPasswordExpr(CleartextPasswordExpr e) { any() }
|
|
|
|
string getASamplePassword() {
|
|
result =
|
|
[
|
|
"abcdefgh", "sOKY6ccizpmvF*32so%Q", "XXXXXXXX", "example_password", "change_me", "",
|
|
"insert-auth-from-gui", "admin", "root"
|
|
]
|
|
}
|
|
|
|
query predicate dummyPasswords(string password, boolean isDummy) {
|
|
password = getASamplePassword() and
|
|
if PasswordHeuristics::isDummyPassword(password) then isDummy = true else isDummy = false
|
|
}
|
|
|
|
query predicate processTermination(NodeJSLib::ProcessTermination term) { any() }
|
|
|
|
query predicate sensitiveAction(SensitiveAction ac) { any() }
|
|
|
|
query predicate sensitiveExpr(SensitiveExpr e) { any() }
|