Files
codeql/cpp/ql/test/library-tests/dataflow/security-taint/tainted_diff.ql
Jonas Jensen e95ebb25a5 C++: Ensure tainted_diff.ql keeps using old lib
Without this, the test will compare the IR to itself after we enable it.
2020-02-15 21:10:29 +01:00

17 lines
621 B
Plaintext

import semmle.code.cpp.security.TaintTrackingImpl as AST
import semmle.code.cpp.ir.dataflow.DefaultTaintTracking as IR
import cpp
from Expr source, Element tainted, string side
where
AST::taintedIncludingGlobalVars(source, tainted, _) and
not IR::taintedIncludingGlobalVars(source, tainted, _) and
not tainted.getLocation().getFile().getExtension() = "h" and
side = "AST only"
or
IR::taintedIncludingGlobalVars(source, tainted, _) and
not AST::taintedIncludingGlobalVars(source, tainted, _) and
not tainted.getLocation().getFile().getExtension() = "h" and
side = "IR only"
select source, tainted, side