GeezerVison is showing github.com — C#/Java: Go back to access path limit 2 · github/codeql@3ba256a
File tree
Expand file treeCollapse file tree
Open diff view settings
csharp/ql/src/utils/modelgenerator/internal java/ql/src/utils/modelgenerator/internal shared/mad/codeql/mad/modelgenerator/internal
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -260,6 +260,8 @@ module SummaryModelGeneratorInput implements SummaryModelGeneratorInputSig { |
260 | 260 | ) |
261 | 261 | } |
262 | 262 |
|
| 263 | + int contentAccessPathLimitInternal() { result = 2 } |
| 264 | + |
263 | 265 | bindingset[d] |
264 | 266 | private string getFullyQualifiedName(Declaration d) { |
265 | 267 | exists(string qualifier, string name | |
|
Collapse file
Copy file name to clipboardExpand all lines: java/ql/src/utils/modelgenerator/internal/CaptureModels.qll +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -218,6 +218,8 @@ module SummaryModelGeneratorInput implements SummaryModelGeneratorInputSig { |
218 | 218 | ) |
219 | 219 | } |
220 | 220 |
|
| 221 | + int contentAccessPathLimitInternal() { result = 2 } |
| 222 | + |
221 | 223 | predicate isField(DataFlow::ContentSet c) { |
222 | 224 | c instanceof DataFlowUtil::FieldContent or |
223 | 225 | c instanceof DataFlowUtil::SyntheticFieldContent |
|
Collapse file
Copy file name to clipboardExpand all lines: shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll +14-1Lines changed: 14 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -277,6 +277,16 @@ module MakeModelGeneratorFactory< |
277 | 277 | */ |
278 | 278 | predicate isAdditionalContentFlowStep(Lang::Node nodeFrom, Lang::Node nodeTo); |
279 | 279 |
|
| 280 | + /** |
| 281 | + * Gets the access path limit for content flow analysis. |
| 282 | + */ |
| 283 | + default int contentAccessPathLimit() { result = 2 } |
| 284 | + |
| 285 | + /** |
| 286 | + * Gets the internal access path limit for content flow analysis. |
| 287 | + */ |
| 288 | + default int contentAccessPathLimitInternal() { result = Lang::accessPathLimit() } |
| 289 | + |
280 | 290 | /** |
281 | 291 | * Holds if the content set `c` is field like. |
282 | 292 | */ |
@@ -650,7 +660,10 @@ module MakeModelGeneratorFactory< |
650 | 660 | exists(Type t | t = n.(NodeExtended).getType() and not isRelevantType(t)) |
651 | 661 | } |
652 | 662 |
|
653 | | - int accessPathLimit() { result = 2 } |
| 663 | + predicate accessPathLimit = SummaryModelGeneratorInput::contentAccessPathLimit/0; |
| 664 | + |
| 665 | + predicate accessPathLimitInternal = |
| 666 | + SummaryModelGeneratorInput::contentAccessPathLimitInternal/0; |
654 | 667 |
|
655 | 668 | predicate isRelevantContent(DataFlow::ContentSet s) { isRelevantContent0(s) } |
656 | 669 |
|
|