Skip to content

Commit e70297a

Browse files
committed
Shared: Content based models is now printed with dfc-generated provenance.
1 parent 53c20cc commit e70297a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,16 @@ module MakeModelGenerator<
556556

557557
private module PropagateContentFlow = ContentDataFlow::Global<PropagateContentFlowConfig>;
558558

559+
private module ContentModelPrintingInput implements Printing::ModelPrintingSig {
560+
class SummaryApi = DataFlowSummaryTargetApi;
561+
562+
class SourceOrSinkApi = SourceOrSinkTargetApi;
563+
564+
string getProvenance() { result = "dfc-generated" }
565+
}
566+
567+
private module ContentModelPrinting = Printing::ModelPrinting<ContentModelPrintingInput>;
568+
559569
private string getContentOutput(ReturnNodeExt node) {
560570
result = PrintReturnNodeExt<paramReturnNodeAsContentOutput/2>::getOutput(node)
561571
}
@@ -853,7 +863,7 @@ module MakeModelGenerator<
853863
exists(string input, string output, boolean lift, boolean preservesValue |
854864
captureFlow0(api, input, output, _, lift) and
855865
preservesValue = max(boolean p | captureFlow0(api, input, output, p, lift)) and
856-
result = ModelPrinting::asModel(api, input, output, preservesValue, lift)
866+
result = ContentModelPrinting::asModel(api, input, output, preservesValue, lift)
857867
)
858868
}
859869
}

0 commit comments

Comments
 (0)