Commit Graph

4008 Commits

Author SHA1 Message Date
Mark Shannon
2bdf42388c Python: Fix up pruning in QL to better handle constraints from constants. 2019-07-23 16:28:13 +01:00
Mark Shannon
88f9685d40 Merge rc/1.21 into master 2019-07-18 16:40:32 +01:00
Mark Shannon
c6ae06f1df Python: modernize regex library to use new points-to. 2019-07-18 14:16:57 +01:00
Mark Shannon
54a8c64b23 Python points-to: Remove negative recursion when using legacy points-to in legacy points-to extensions. 2019-07-18 14:16:52 +01:00
Mark Shannon
3035178391 Python: Better API for parameters. 2019-07-16 16:50:40 +01:00
Mark Shannon
b4d413cfa8 Python points-to: Track implicit module attributes through phi-nodes. 2019-07-16 15:39:58 +01:00
Mark Shannon
2c5b1c0810 Fix semantic merge conflict between #1470 and #1487. 2019-07-15 15:34:00 +01:00
Taus
f12c057826 Merge pull request #1470 from markshannon/python-tarslip
Python: "TarSlip" query
2019-07-15 12:43:47 +02:00
yh-semmle
a0dc84010a Merge pull request #1518 from Semmle/rc/1.21
Merge rc/1.21 into master
2019-06-28 13:52:18 -04:00
Mark Shannon
8570b4117f Python: Add opaque 'decorated function' for complex decorated functions. Allows finding calls in taint-tracking without contaminating points-to results. 2019-06-28 12:14:10 +01:00
Taus
1b98f248e5 Merge branch 'master' into python-better-handling-calls-on-edge-of-context 2019-06-28 11:27:42 +02:00
Taus
fad37bd6c9 Merge pull request #1487 from markshannon/python-tuple-assignment-points-to
Python ESSA dataflow: better handling of tuple unpacking.
2019-06-28 11:05:03 +02:00
Taus
2576884667 Merge pull request #1499 from markshannon/python-fix-regex-parsing
Python regex: Fix handling of character sets.
2019-06-27 17:49:21 +02:00
Mark Shannon
347e3f3bd0 Python regex: Fix handling of character sets where first character in set is '['. 2019-06-26 10:55:47 +01:00
Taus
76f8da8986 Merge pull request #1484 from markshannon/python-aggressive-pruning
Python: Use aggressive dead-code elimination when pruning.
2019-06-25 19:17:44 +02:00
Mark Shannon
6f1399be9b Python: Better handle calls on edge of context. 2019-06-25 16:15:39 +01:00
Mark Shannon
a917019915 Python: Add failing tests for undefined variable as value and nested 'from import *'. 2019-06-24 14:54:25 +01:00
Mark Shannon
9d6df78d44 Python: Dataflow: Remove IterationDefinition ESSA definition and add iteration assignment to ESSA assignment definition.
Enhance points-to and taint-tracking to add operational step sequence to next(iter(seq)) in for statement.
2019-06-21 15:55:27 +01:00
Taus
927d72414b Merge pull request #1483 from markshannon/merge-121
Merge rc/1.21 into master
2019-06-21 14:11:07 +02:00
Mark Shannon
a5f741e504 Python: Use aggressive dead-code elimination when pruning. 2019-06-21 13:03:36 +01:00
Taus
832abc7835 Merge pull request #1473 from markshannon/python-points-to-more-unknowns
Python: Fix getOperand for 'not' node and make sure it can only point-to a boolean.
2019-06-21 11:03:23 +02:00
Mark Shannon
26f870bc7f Merge branch 'rc/1.21' into master 2019-06-21 09:52:44 +01:00
Mark Shannon
bbf25f3a23 Python points-to. If __all__ is overly complex, treat all 'public' symbols as exported. 2019-06-21 09:47:50 +01:00
Taus
85ad89c299 Merge pull request #1292 from markshannon/python-prune-in-ql
Python: Do pruning in QL.
2019-06-19 16:58:27 +02:00
Mark Shannon
39b7a69abd Python: Tarslip query: Fix up sanitizers. 2019-06-19 15:00:02 +01:00
Mark Shannon
6f15c84bdc Python: Tarslip query; Add sink for members and sanitizers for tarinfo objects. 2019-06-19 11:48:31 +01:00
Mark Shannon
e14f7ef466 Python: Tarslip query; track info objects and handle sanitization. 2019-06-19 11:48:31 +01:00
Mark Shannon
ea4e263060 Python: Initial version and help of tar-slip (CWE-022) query. 2019-06-19 11:48:31 +01:00
Mark Shannon
5b145edc3f Python: Fix getOperand() for not node and make sure it can only point-to a boolean. 2019-06-19 11:23:02 +01:00
Taus
cb43d27344 Merge pull request #1472 from markshannon/python-taint-through-iterators
Python: Track taint through iteration and iterators including generators.
2019-06-19 11:33:10 +02:00
Mark Shannon
e8190d9a7b Python: Track taint through 'yield' expressions. 2019-06-18 16:39:52 +01:00
Mark Shannon
97c98f29e4 Python taint-tracking: Support iterables of taint. 2019-06-18 16:39:47 +01:00
Mark Shannon
918bdecba5 Python: Don't record taint past sinks. 2019-06-18 16:34:23 +01:00
Mark Shannon
62591e469e Python: Avoid duplicate modules in points-to and resulting blow-up. 2019-06-17 17:53:17 +01:00
Taus
51e06376a3 Merge pull request #1456 from markshannon/python-remove-value-get-source
Python: Remove Value.getSource(). It has no use.
2019-06-14 13:33:08 +02:00
Mark Shannon
1d269b0cd5 Python: Add extra test for pruning. 2019-06-14 09:59:28 +01:00
Mark Shannon
30e1cbc5fc Python: Remove Value.getSource(). It has no use. 2019-06-13 18:23:54 +01:00
Mark Shannon
00fa80346b Python (pruning): Fix up handling of integer inequality. 2019-06-13 18:20:15 +01:00
Taus
635de7cbe9 Merge pull request #1440 from markshannon/python-sanity-improvements
Python sanity improvements
2019-06-13 14:59:43 +02:00
Mark Shannon
77030c4dde Merge branch 'rc/1.21' into 'master' 2019-06-13 12:32:45 +01:00
Mark Shannon
97294e16e0 Python: Update tests to account for improved API. 2019-06-12 15:00:20 +01:00
Mark Shannon
3b31b9cf58 Python: Extend object API. Clearly differentiate between what an object is called, and what it is named. 2019-06-12 14:59:39 +01:00
Mark Shannon
0b7d73456e Remove incorrect metadata from test query. 2019-06-12 14:31:21 +01:00
Esben Sparre Andreasen
3f11ae7eaa Merge remote-tracking branch 'rc/1.21' into master 2019-06-12 12:57:55 +02:00
Mark Shannon
0c02d3deef Python: Fix up expected test results for six test. 2019-06-11 15:44:44 +01:00
Taus
1ff67f74e1 Merge pull request #1407 from markshannon/python-fix-odasa-7104
Python points-to. Improve handling of socket module.
2019-06-11 11:04:29 +02:00
Mark Shannon
0f0dc81291 Python ESSA: Remove method-callsite definitions when call is in a test defining a pi-node. 2019-06-10 11:23:15 +01:00
Mark Shannon
cd793091ca Python points-to: Make sure that vararg tuples are only assigned to vararg parameters. 2019-06-07 15:31:17 +01:00
Mark Shannon
9e537a76dc Python points-to: Handle varargs in caller 2019-06-07 15:31:17 +01:00
Mark Shannon
468975b0e5 Python points-to: Handle varargs in callee. 2019-06-07 15:31:17 +01:00