|
1 | 1 | import javascript |
2 | 2 | private import semmle.javascript.dataflow.TypeTracking |
3 | 3 | private import semmle.javascript.internal.CachedStages |
| 4 | +private import sharedlib.SummaryTypeTracker as SummaryTypeTracker |
4 | 5 | private import FlowSteps |
5 | 6 |
|
6 | 7 | cached |
@@ -46,6 +47,12 @@ private module Cached { |
46 | 47 | LoadStoreStep(PropertyName fromProp, PropertyName toProp) { |
47 | 48 | SharedTypeTrackingStep::loadStoreStep(_, _, fromProp, toProp) |
48 | 49 | or |
| 50 | + exists(DataFlow::ContentSet loadContent, DataFlow::ContentSet storeContent | |
| 51 | + SummaryTypeTracker::basicLoadStoreStep(_, _, loadContent, storeContent) and |
| 52 | + fromProp = loadContent.asPropertyName() and |
| 53 | + toProp = storeContent.asPropertyName() |
| 54 | + ) |
| 55 | + or |
49 | 56 | summarizedLoadStoreStep(_, _, fromProp, toProp) |
50 | 57 | } or |
51 | 58 | WithoutPropStep(PropertySet props) { SharedTypeTrackingStep::withoutPropStep(_, _, props) } |
@@ -205,6 +212,21 @@ private module Cached { |
205 | 212 | succ = getACallbackSource(parameter).getParameter(i) and |
206 | 213 | summary = ReturnStep() |
207 | 214 | ) |
| 215 | + or |
| 216 | + SummaryTypeTracker::levelStepNoCall(pred, succ) and summary = LevelStep() |
| 217 | + or |
| 218 | + exists(DataFlow::ContentSet content | |
| 219 | + SummaryTypeTracker::basicLoadStep(pred, succ, content) and |
| 220 | + summary = LoadStep(content.asPropertyName()) |
| 221 | + or |
| 222 | + SummaryTypeTracker::basicStoreStep(pred, succ, content) and |
| 223 | + summary = StoreStep(content.asPropertyName()) |
| 224 | + ) |
| 225 | + or |
| 226 | + exists(DataFlow::ContentSet loadContent, DataFlow::ContentSet storeContent | |
| 227 | + SummaryTypeTracker::basicLoadStoreStep(pred, succ, loadContent, storeContent) and |
| 228 | + summary = LoadStoreStep(loadContent.asPropertyName(), storeContent.asPropertyName()) |
| 229 | + ) |
208 | 230 | } |
209 | 231 | } |
210 | 232 |
|
|
0 commit comments