|
3 | 3 |
|
4 | 4 | ## General improvements |
5 | 5 |
|
6 | | -> Changes that affect alerts in many files or from many queries |
7 | | -> For example, changes to file classification |
| 6 | +Points-to analysis has been re-implemented to support more language features and provide better reachability analysis. |
| 7 | +The new implementation adds the following new features: |
| 8 | + |
| 9 | +* Non-local tracking of bound methods and instances of `super()` |
| 10 | +* Superior analysis of conditionals and thus improved reachability analysis. |
| 11 | +* Superior modelling of descriptors, for example, classmethods and staticmethods. |
| 12 | +* Superior tracking of values through parameters, especially `*` arguments. |
| 13 | + |
| 14 | +A new object API has been provided to complement the new points-to implementation. |
| 15 | +A new class `Value` replaces the old `Object` class. The `Value` class has a simpler and more consistent API compared to `Object`. |
| 16 | +Some of the functionality of `FunctionObject` and `ClassObject` has been added to `Value` to reduce the number of casts to more specific classes. |
| 17 | +For example, the QL to find calls to `os.path.open` has changed from |
| 18 | +`ModuleObject::named("os").attr("path").(ModuleObject).attr("join").(FunctionObject).getACall()` |
| 19 | +to |
| 20 | +`Value::called("os.path.join").getACall()` |
| 21 | + |
| 22 | +The old API is now deprecated, but will be continued to be supported for at least another year. |
| 23 | + |
| 24 | +### Impact on existing queries. |
| 25 | + |
| 26 | +As points-to analysis underpins many queries, and provides the call-graph and reachability analysis required for taint-tracking, the results of many queries may change. |
| 27 | + |
| 28 | +The improved reachability analysis and non-local tracking of bound methods may identify new results. |
| 29 | +The increased precision in tracking of values through `*` arguments may remove false positive results. |
| 30 | + |
| 31 | +Overall the number of true positive results should increase and the number false negative results should decline. |
| 32 | +We welcome feedback on the new implementation, particularly any surprising changes in results. |
| 33 | + |
8 | 34 |
|
9 | 35 | ## New queries |
10 | 36 | | **Query** | **Tags** | **Purpose** | |
|
0 commit comments