File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
lib/semmle/python/dataflow/new/internal
test/experimental/dataflow/typetracking-summaries Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,21 @@ module TypeTrackingInput implements Shared::TypeTrackingInput {
102
102
103
103
class LocalSourceNode = DataFlowPublic:: LocalSourceNode ;
104
104
105
- class Content = DataFlowPublic:: Content ;
105
+ class Content extends DataFlowPublic:: Content {
106
+ Content ( ) {
107
+ // TODO: for now, it's not 100% clear if should support non-precise content in
108
+ // type-tracking, or if it will lead to bad results. We start with only allowing
109
+ // precise content, which should always be a good improvement! It also simplifies
110
+ // the process of examining new results from non-precise content steps in the
111
+ // future, since you will _only_ have to look over the results from the new
112
+ // non-precise steps.
113
+ this instanceof DataFlowPublic:: AttributeContent
114
+ or
115
+ this instanceof DataFlowPublic:: DictionaryElementContent
116
+ or
117
+ this instanceof DataFlowPublic:: TupleElementContent
118
+ }
119
+ }
106
120
107
121
/**
108
122
* A label to use for `WithContent` and `WithoutContent` steps, restricting
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ def explicit_identity(x):
41
41
tms # $ MISSING: tracked
42
42
43
43
another_tainted_list = TTS_append_to_list ([], tracked ) # $ tracked
44
- atl = another_tainted_list [0 ] # $ tracked
45
- atl # $ tracked
44
+ atl = another_tainted_list [0 ]
45
+ atl # $ MISSING: tracked
46
46
47
47
# This will not work, as the call is not found by `getACallSimple`.
48
48
from json import loads as json_loads
You can’t perform that action at this time.
0 commit comments