Files
codeql/javascript/ql/test/tutorials/Introducing the JavaScript libraries/query15.qll
2019-03-05 08:14:47 +00:00

16 lines
430 B
Plaintext

import javascript
class TrackedStringLiteral extends DataFlow::TrackedNode {
TrackedStringLiteral() { this.asExpr() instanceof ConstantString }
}
query predicate test_query15(DataFlow::Node sink) {
exists(TrackedStringLiteral source, SsaExplicitDefinition def |
source.flowsTo(sink) and
sink = DataFlow::ssaDefinitionNode(def) and
def.getSourceVariable().getName().toLowerCase() = "password"
|
any()
)
}