Merge branch 'brodes/cipher_operation' into brodes/elliptic_curves

This commit is contained in:
REDMOND\brodes
2025-04-02 13:46:12 -04:00
3 changed files with 24 additions and 53 deletions

View File

@@ -573,7 +573,7 @@ module JCAModel {
src.asExpr() instanceof CipherGetInstanceCall
}
predicate isSink(DataFlow::Node sink, FlowState state) { none() }
predicate isSink(DataFlow::Node sink, FlowState state) { none() } // TODO: document this, but this is intentional (avoid cross products?)
predicate isSink(DataFlow::Node sink) {
exists(CipherOperationCall c | c.getQualifier() = sink.asExpr())
@@ -914,7 +914,7 @@ module JCAModel {
type instanceof Crypto::TAsymmetricKeyType
}
override DataFlow::Node getOutputKeyArtifact() { result.asExpr() = this }
override Crypto::ArtifactOutputDataFlowNode getOutputKeyArtifact() { result.asExpr() = this }
override Crypto::KeyArtifactType getOutputKeyType() { result = type }
@@ -1271,7 +1271,7 @@ module JCAModel {
result.asExpr() = this.getInstantiation().getIterationCountArg()
}
override DataFlow::Node getOutputKeyArtifact() {
override Crypto::ArtifactOutputDataFlowNode getOutputKeyArtifact() {
result.asExpr() = this and
super.getMethod().getReturnType().hasName("SecretKey")
}

View File

@@ -199,19 +199,5 @@ module ArtifactUniversalFlowConfig implements DataFlow::ConfigSig {
module GenericDataSourceUniversalFlow = TaintTracking::Global<GenericDataSourceUniversalFlowConfig>;
/*
* class LiteralOrGenericDataSource extends Element {
* DataFlow::Node node;
*
* LiteralOrGenericDataSource() {
* node = this.(Crypto::GenericSourceInstance).getOutputNode() or
* node.asExpr() = this.(Literal)
* }
*
* bindingset[other]
* predicate localFlowsTo(DataFlow::Node other) { DataFlow::localFlow(node, other) }
* }
*/
// Import library-specific modeling
import JCA