mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
deprecate TrackedNodes.qll
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import javascript
|
||||
|
||||
class TrackedStringLiteral extends DataFlow::TrackedNode {
|
||||
TrackedStringLiteral() { this.asExpr() instanceof ConstantString }
|
||||
DataFlow::Node constantString(DataFlow::TypeTracker t) {
|
||||
t.start() and
|
||||
result.asExpr() instanceof ConstantString
|
||||
or
|
||||
exists(DataFlow::TypeTracker t2 | t = t2.smallstep(constantString(t2), result))
|
||||
}
|
||||
|
||||
query predicate test_query15(DataFlow::Node sink) {
|
||||
exists(TrackedStringLiteral source, SsaExplicitDefinition def |
|
||||
source.flowsTo(sink) and
|
||||
exists(SsaExplicitDefinition def |
|
||||
sink = constantString(DataFlow::TypeTracker::end()) and
|
||||
sink = DataFlow::ssaDefinitionNode(def) and
|
||||
def.getSourceVariable().getName().toLowerCase() = "password"
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user