mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Crypto: Tweaks to bad crypto ordering queries.
This commit is contained in:
@@ -23,4 +23,4 @@ where
|
||||
macOp.getAnInputArtifact().asElement() = sink.getNode().asExpr()
|
||||
)
|
||||
select sink, src, sink,
|
||||
"MAC order potentially wrong: observed decrypt output to MAC implying the MAC is on plaintext, and not a cipher."
|
||||
"MAC order potentially wrong: observed a potential decrypt operation output to MAC implying the MAC is on plaintext, and not a cipher."
|
||||
|
||||
@@ -16,7 +16,13 @@ import experimental.quantum.Language
|
||||
// might not be known.
|
||||
// TODO: can we approximate a message source better?
|
||||
module CommonDataFlowNodeConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) { exists(source.asParameter()) }
|
||||
predicate isSource(DataFlow::Node source) {
|
||||
exists(source.asParameter())
|
||||
or
|
||||
exists(Crypto::GenericSourceNode other |
|
||||
other.asElement() = CryptoInput::dfn_to_element(source)
|
||||
)
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
sink = any(Crypto::FlowAwareElement other).getInputNode()
|
||||
@@ -41,7 +47,7 @@ module CommonDataFlowNodeConfig implements DataFlow::ConfigSig {
|
||||
}
|
||||
}
|
||||
|
||||
module CommonDataFlowNodeFlow = DataFlow::Global<CommonDataFlowNodeConfig>;
|
||||
module CommonDataFlowNodeFlow = TaintTracking::Global<CommonDataFlowNodeConfig>;
|
||||
|
||||
from DataFlow::Node src, DataFlow::Node sink1, DataFlow::Node sink2
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user