Merge pull request #17654 from michaelnebel/modelgen/mixedbugfix

C#/Java: Only use heuristic if no content based model exist (in mixed mode).
This commit is contained in:
Michael Nebel
2024-10-04 10:28:49 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -17,12 +17,12 @@ private int getNumMadModeledApis(string package, string provenance, string apiSu
(
// "auto-only"
not sc.hasManualModel() and
sc.hasProvenance("df-generated") and
sc.hasGeneratedModel() and
provenance = "generated"
or
sc.hasManualModel() and
(
if sc.hasProvenance("df-generated")
if sc.hasGeneratedModel()
then
// "both"
provenance = "both"

View File

@@ -881,7 +881,7 @@ module MakeModelGenerator<
string captureMixedFlow(DataFlowSummaryTargetApi api, boolean lift) {
result = ContentSensitive::captureFlow(api, lift)
or
not exists(ContentSensitive::captureFlow(api, lift)) and
not exists(ContentSensitive::captureFlow(api, _)) and
result = captureFlow(api) and
lift = true
}