mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Refactor output artifact type
This commit is contained in:
@@ -419,7 +419,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())
|
||||
@@ -786,7 +786,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 }
|
||||
|
||||
@@ -1139,7 +1139,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")
|
||||
}
|
||||
|
||||
@@ -191,19 +191,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
|
||||
|
||||
Reference in New Issue
Block a user