mirror of
https://github.com/github/codeql.git
synced 2026-01-02 09:16:34 +01:00
16 lines
416 B
Plaintext
16 lines
416 B
Plaintext
/**
|
|
* Provides a predicate identifying assignments of harcoded values to password fields.
|
|
*/
|
|
|
|
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() = ""
|
|
}
|