Skip to content

Commit d5c44d8

Browse files
Merge pull request github#3315 from tausbn/python-finalise-1.24-change-notes
Python: Finalise change notes for 1.24.
2 parents 163ecd9 + e294681 commit d5c44d8

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

change-notes/1.24/analysis-python.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,52 @@ The following changes in version 1.24 affect Python analysis in all applications
44

55
## General improvements
66

7-
Support for Django version 2.x and 3.x
7+
- Support for Django version 2.x and 3.x
88

9-
## New queries
9+
- Taint tracking now correctly tracks taint in destructuring assignments. For example, if `tainted_list` is a list of tainted tainted elements, then
10+
```python
11+
head, *tail = tainted_list
12+
```
13+
will result in `tail` being tainted with the same taint as `tainted_list`, and `head` being tainted with the taint of the elements of `tainted_list`.
14+
15+
- A large number of libraries and queries have been moved to the new `Value` API, which should result in more precise results.
16+
17+
- The `Value` interface has been extended in various ways:
18+
- A new `StringValue` class has been added, for tracking string literals.
19+
- Values now have a `booleanValue` method which returns the boolean interpretation of the given value.
20+
- Built-in methods for which the return type is not fixed are now modeled as returning an unknown value by default.
1021

11-
| **Query** | **Tags** | **Purpose** |
12-
|-----------------------------|-----------|--------------------------------------------------------------------|
1322

1423
## Changes to existing queries
1524

1625
| **Query** | **Expected impact** | **Change** |
1726
|----------------------------|------------------------|------------------------------------------------------------------|
18-
| Uncontrolled command line (`py/command-line-injection`) | More results | We now model the `fabric` and `invoke` pacakges for command execution. |
27+
| Arbitrary file write during tarfile extraction (`py/tarslip`) | Fewer false negative results | Negations are now handled correctly in conditional expressions that may sanitize tainted values. |
28+
| First parameter of a method is not named 'self' (`py/not-named-self`) | Fewer false positive results | `__class_getitem__` is now recognized as a class method. |
29+
| Import of deprecated module (`py/import-deprecated-module`) | Fewer false positive results | Deprecated modules that are used to provide backwards compatibility are no longer reported.|
30+
| Module imports itself (`py/import-own-module`) | Fewer false positive results | Imports local to a given package are no longer classified as self-imports. |
31+
| Uncontrolled command line (`py/command-line-injection`) | More results | We now model the `fabric` and `invoke` packages for command execution. |
1932

2033
### Web framework support
2134

22-
The QL-library support for the web frameworks Bottle, CherryPy, Falcon, Pyramid, TurboGears, Tornado, and Twisted have
23-
been fixed so they provide a proper HttpRequestTaintSource, instead of a TaintSource. This will enable results for the following queries:
35+
The CodeQL library has improved support for the web frameworks: Bottle, CherryPy, Falcon, Pyramid, TurboGears, Tornado, and Twisted. They now provide a proper `HttpRequestTaintSource`, instead of a `TaintSource`. This will enable results for the following queries:
2436

25-
- py/path-injection
26-
- py/command-line-injection
27-
- py/reflective-xss
28-
- py/sql-injection
29-
- py/code-injection
30-
- py/unsafe-deserialization
31-
- py/url-redirection
37+
- `py/path-injection`
38+
- `py/command-line-injection`
39+
- `py/reflective-xss`
40+
- `py/sql-injection`
41+
- `py/code-injection`
42+
- `py/unsafe-deserialization`
43+
- `py/url-redirection`
3244

33-
The QL-library support for the web framework Twisted have been fixed so they provide a proper
34-
HttpResponseTaintSink, instead of a TaintSink. This will enable results for the following
45+
The library also has improved support for the web framework Twisted. It now provides a proper
46+
`HttpResponseTaintSink`, instead of a `TaintSink`. This will enable results for the following
3547
queries:
3648

37-
- py/reflective-xss
38-
- py/stack-trace-exposure
49+
- `py/reflective-xss`
50+
- `py/stack-trace-exposure`
3951

4052
## Changes to libraries
53+
### Taint tracking
54+
- The `urlsplit` and `urlparse` functions now propagate taint appropriately.
55+
- HTTP requests using the `requests` library are now modeled.

0 commit comments

Comments
 (0)