mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
This change ensures that the diff test will show the difference between the old and the new library even after we switch the default implementation of `security.TaintTracking` to be the new one.
20 lines
628 B
Plaintext
20 lines
628 B
Plaintext
import cpp
|
|
import semmle.code.cpp.security.Security
|
|
import semmle.code.cpp.security.TaintTrackingImpl as ASTTaintTracking
|
|
import semmle.code.cpp.ir.dataflow.DefaultTaintTracking as IRDefaultTaintTracking
|
|
|
|
predicate astFlow(Expr source, Element sink) { ASTTaintTracking::tainted(source, sink) }
|
|
|
|
predicate irFlow(Expr source, Element sink) { IRDefaultTaintTracking::tainted(source, sink) }
|
|
|
|
from Expr source, Element sink, string note
|
|
where
|
|
astFlow(source, sink) and
|
|
not irFlow(source, sink) and
|
|
note = "AST only"
|
|
or
|
|
irFlow(source, sink) and
|
|
not astFlow(source, sink) and
|
|
note = "IR only"
|
|
select source, sink, note
|