mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Crypto: Adding a proof of concept bad mac ordering predicate that takes in an ArtifactNode to be used for graph generation to intercept nodes with known mac ordering issues, in order to format the node and output error messages in the graph.
This commit is contained in:
@@ -17,6 +17,13 @@ predicate isDecryptToMacFlow(ArtifactFlow::PathNode src, ArtifactFlow::PathNode
|
||||
)
|
||||
}
|
||||
|
||||
predicate isDecryptToMacNode(Crypto::ArtifactNode node) {
|
||||
exists(ArtifactFlow::PathNode src, ArtifactFlow::PathNode sink |
|
||||
isDecryptToMacFlow(src, sink) and
|
||||
node.asElement() = src.getNode().asExpr()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds when the src node is used as plaintext input to both
|
||||
* an encryption operation and a mac operation, via the
|
||||
|
||||
Reference in New Issue
Block a user