mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
Use flowFrom.
This commit is contained in:
@@ -263,7 +263,7 @@ module FromSensitiveFlow = TaintTracking::Global<FromSensitiveConfig>;
|
||||
* A taint flow configuration for flow from a sensitive expression to an encryption operation.
|
||||
*/
|
||||
module ToEncryptionConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) { FromSensitiveFlow::flow(source, _) }
|
||||
predicate isSource(DataFlow::Node source) { FromSensitiveFlow::flowFrom(source) }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) { isSinkEncrypt(sink, _) }
|
||||
|
||||
@@ -311,7 +311,7 @@ where
|
||||
FromSensitiveFlow::flowPath(source, sink) and
|
||||
isSinkSendRecv(sink.getNode(), networkSendRecv) and
|
||||
// no flow from sensitive -> evidence of encryption
|
||||
not ToEncryptionFlow::flow(source.getNode(), _) and
|
||||
not ToEncryptionFlow::flowFrom(source.getNode()) and
|
||||
not FromEncryptionFlow::flowTo(sink.getNode()) and
|
||||
// construct result
|
||||
if networkSendRecv instanceof NetworkSend
|
||||
|
||||
@@ -129,7 +129,7 @@ module PointerArithmeticToDerefFlow = DataFlow::Global<PointerArithmeticToDerefC
|
||||
|
||||
predicate pointerArithOverflow(PointerArithmeticInstruction pai, int delta) {
|
||||
pointerArithOverflow0(pai, delta) and
|
||||
PointerArithmeticToDerefFlow::flow(DataFlow::instructionNode(pai), _)
|
||||
PointerArithmeticToDerefFlow::flowFrom(DataFlow::instructionNode(pai))
|
||||
}
|
||||
|
||||
bindingset[v]
|
||||
|
||||
Reference in New Issue
Block a user