mirror of
https://github.com/github/codeql.git
synced 2026-06-09 06:58:50 +02:00
18 lines
440 B
Plaintext
18 lines
440 B
Plaintext
/**
|
|
* Provides a predicate identifying assignments of harcoded values to password fields.
|
|
*/
|
|
overlay[local?]
|
|
module;
|
|
|
|
import java
|
|
import HardcodedCredentials
|
|
|
|
/**
|
|
* Holds if non-empty constant value `e` is assigned to password field `f`.
|
|
*/
|
|
predicate passwordFieldAssignedHardcodedValue(PasswordVariable f, CompileTimeConstantExpr e) {
|
|
f instanceof Field and
|
|
f.getAnAssignedValue() = e and
|
|
not e.(StringLiteral).getValue() = ""
|
|
}
|