Skip to content

Commit 6c9f248

Browse files
michaelnebelMathiasVP
authored andcommitted
Shared: Avoid generating taint based heuristic summaries when a content sensitive summary can be generated.
1 parent 6437168 commit 6c9f248

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -995,13 +995,13 @@ module MakeModelGeneratorFactory<
995995
DataFlowSummaryTargetApi api0, string input0, string output0, boolean preservesValue0
996996
|
997997
// If the heuristic summary is taint-based, and we can generate a content-sensitive
998-
// summary that is value-preserving then we omit generating any heuristic summary.
999-
preservesValue = false and
1000-
preservesValue0 = true
998+
// summary then we omit generating the heuristic summary.
999+
preservesValue = false
10011000
or
1002-
// However, if they're both value-preserving (or both taint-based) then we only
1003-
// generate a heuristic summary if we didn't generate a content-sensitive summary.
1004-
preservesValue = preservesValue0 and
1001+
// If they're both value-preserving then we only generate a heuristic summary if
1002+
// we didn't generate a content-sensitive summary on the same input/output pair.
1003+
preservesValue = true and
1004+
preservesValue0 = true and
10051005
input0 = input and
10061006
output0 = output
10071007
|

0 commit comments

Comments
 (0)