File tree Expand file tree Collapse file tree
lib/semmle/python/dataflow/new/internal
test/experimental/dataflow/typetracking-summaries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,21 @@ module TypeTrackingInput implements Shared::TypeTrackingInput {
102102
103103 class LocalSourceNode = DataFlowPublic:: LocalSourceNode ;
104104
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+ }
106120
107121 /**
108122 * 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):
4141tms # $ MISSING: tracked
4242
4343another_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
4646
4747# This will not work, as the call is not found by `getACallSimple`.
4848from json import loads as json_loads
You can’t perform that action at this time.
0 commit comments