Taus
9dc774aaa3
Python: Remove points-to dependency from parts of SSA
...
For whatever reason, the CFG node for exceptions and exception groups
was placed with the points-to code. (Probably because a lot of the
predicates depended on points-to.)
However, as it turned out, two of the SSA modules only depended on
non-points-to properties of these nodes, and so it was fairly
straightforward to remove the imports of `LegacyPointsTo` for those
modules.
In the process, I moved the aforementioned CFG node types into
`Flow.qll`, and changed the classes in the `Exceptions` module to the
`...WithPointsTo` form that we introduced elsewhere.
2025-11-26 12:30:31 +00:00
Taus
5b63b4957c
Python: Fix query tests
...
Mostly just adding `private import LegacyPointsTo`. Sometimes getting
rid of other imports that are superceded by that module.
2025-11-26 12:30:30 +00:00
Taus
b93ce98612
Python: Remove points-to from Expr
2025-10-30 13:58:59 +00:00
Joe Farebrother
eb4841230a
Add tests (WIP)
2025-08-25 13:30:45 +01:00
Joe Farebrother
f24f7d5146
Add builtin subclass models, incorporate into query
2025-08-21 13:50:26 +01:00
Joe Farebrother
e42002e1d7
Promote IncorrectExceptOrder.
...
However, we lose some results due to not considering builtin/stdlib types.
2025-08-19 15:30:47 +01:00
Joe Farebrother
b1ee795225
Merge pull request #20086 from joefarebrother/python-qual-raise-not-implemented
...
Python: Modernise raise-not-implemented query
2025-07-24 13:18:21 +01:00
Joe Farebrother
a8cc14493f
Fix typo - add .
...
Co-authored-by: Napalys Klicius <napalys@github.com >
2025-07-24 09:35:05 +01:00
Joe Farebrother
f2dd96ecf4
Update python/ql/src/Exceptions/NotImplementedIsNotAnException.qhelp
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-07-17 22:08:01 +01:00
Joe Farebrother
57f1d07b2b
Undo module deprecation (used by another quality query)
2025-07-17 21:54:55 +01:00
Joe Farebrother
680e31dc48
Modernize raise-not-implemented
2025-07-17 10:02:00 +01:00
Joe Farebrother
909f57261c
Minor doc updates; updating python 2 references to python 3 and updating grammar
2025-07-15 13:26:46 +01:00
Joe Farebrother
fa5b2ef794
Tag remaining high precision quality queries
...
Excluded queries that are python 2 specific; as well as the cyclic import queries
2025-06-19 14:08:07 +01:00
Joe Farebrother
02f8ec33f2
Tag 'type-checking'-like quality queries
2025-06-19 14:07:55 +01:00
Joe Farebrother
5c4548df45
Tag more quality queries.
...
Excluded for now for uncertainty: incomplete ordering, import deprecated module
2025-06-19 14:06:57 +01:00
Joe Farebrother
049c0705a9
Tag quality queries that are high precision and dont use pointsto
2025-06-19 14:06:46 +01:00
erik-krogh
944ca4a0da
fix some more style-guide violations in the alert-messages
2022-10-07 11:23:34 +02:00
CodeQL CI
b48808778f
Merge pull request #10264 from yoff/python/port-RaisesTuple
...
Approved by tausbn
2022-09-19 00:51:29 -07:00
CodeQL CI
ed4b64b1c4
Merge pull request #10265 from yoff/python/port-UnguardedNextInGenerator
...
Approved by tausbn
2022-09-19 00:50:52 -07:00
CodeQL CI
36f8b0554d
Merge pull request #10266 from yoff/python/port-CatchingBaseException
...
Approved by tausbn
2022-09-19 00:50:05 -07:00
Rasmus Lerchedahl Petersen
0cfb49102b
Python: fix non-US spelling
2022-09-07 09:30:42 +02:00
Rasmus Lerchedahl Petersen
5fc1bbc8c5
Python: Only alert on Python 2 code
...
since
- Python 3 is ok from 3.7 onwards
- support for Python 3.6 was just dropped
- we do not actually know the minor version of the analysed code
(only of the extractor)
2022-09-05 13:38:14 +02:00
Rasmus Lerchedahl Petersen
afb50212a0
Python: update version check
...
doc said 3.5 experience says 3.7
2022-09-05 10:50:53 +02:00
Rasmus Lerchedahl Petersen
0599e8ac35
python: add version check
...
and attempt to set version for tests
2022-09-01 23:47:07 +02:00
Rasmus Lerchedahl Petersen
1d2d28be76
python: replace points-to with API graph
2022-09-01 23:24:10 +02:00
Rasmus Lerchedahl Petersen
d102a84e02
python: replace points-to with API graph
2022-09-01 22:58:46 +02:00
Rasmus Lerchedahl Petersen
163bfc4f71
python: replace points-to with API graph
...
- values are identified via `API::builtin`
- `points-to` is approximated by `getAValueReachableFromSource`
2022-09-01 22:47:32 +02:00
Rasmus Lerchedahl Petersen
93fcaf24c1
python: RaisingTuple.ql to not use poins-to
...
Use local dataflow instead and simply check for tuple literals.
2022-09-01 21:45:57 +02:00
Ian Lynagh
3fcfd32eb1
Make *.ql non-executable
2022-08-24 16:55:11 +01:00
Taus
af7f532212
Python: Fix up a bunch of function QLDoc
2022-03-07 18:59:49 +00:00
Taus Brock-Nannestad
f07a7bf8cf
Python: Autoformat everything using qlformat.
...
Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
2020-07-07 15:43:52 +02:00
Rasmus Wriedt Larsen
0b4bfed726
Merge pull request #3156 from tausbn/python-autoformat-all-ql-files
...
Python: Autoformat all `.ql` files.
2020-03-30 16:24:18 +02:00
Taus Brock-Nannestad
87a9f51c78
Python: Autoformat all .ql files.
2020-03-30 11:59:10 +02:00
Taus Brock-Nannestad
6904898a8b
Python: Autoformat query-local libs.
2020-03-20 16:42:46 +01:00
Rasmus Wriedt Larsen
f4e5079dd3
Merge pull request #2991 from BekaValentine/python-objectapi-to-valueapi-unguardednextingenerator
...
Python: ObjectAPI to ValueAPI: UnguardedNextInGenerator
2020-03-19 10:33:32 +01:00
Rebecca Valentine
06f0947318
Update python/ql/src/Exceptions/UnguardedNextInGenerator.ql
...
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2020-03-18 14:16:00 -07:00
Rasmus Wriedt Larsen
9a0b2b1843
Merge pull request #2989 from BekaValentine/python-objectapi-to-valueapi-incorrectexceptorder
...
Python: ObjectAPI to ValueAPI: IncorrectExceptOrder
2020-03-18 18:03:25 +01:00
Taus
ca26feefbf
Merge pull request #2978 from BekaValentine/python-objectapi-to-valueapi-illegalexceptionhandlertype
...
Python: ObjectAPI to ValueAPI: IllegalExceptionHandlerType
2020-03-17 17:56:34 +01:00
Rebecca Valentine
ff6e0ce35c
Python: UnguardedNextInGenerator.ql: Excludes next with default value
2020-03-16 17:08:06 -07:00
Rebecca Valentine
68c455cd97
Python: IncorrectExceptOrder.ql: Autoformats w/ new QL indentation
2020-03-16 16:52:48 -07:00
Rebecca Valentine
45e47b92a0
Python: IllegalExceptionHandlerType.ql: Autoformats
2020-03-16 14:48:05 -07:00
Rebecca Valentine
c670f8180f
Python: Autoformats
2020-03-10 07:57:55 -07:00
Taus
be09c17367
Merge pull request #2990 from BekaValentine/python-objectapi-to-valueapi-raisingtuple
...
Python: ObjectAPI to ValueAPI: RaisingTuple
2020-03-10 00:16:12 +01:00
Taus
96e99f55ad
Merge pull request #2976 from BekaValentine/python-objectapi-to-valueapi-emptyexcept
...
Python: ObjectAPI to ValueAPI: EmptyExcept
2020-03-09 23:56:27 +01:00
Taus
b51e2a9e80
Merge pull request #2977 from BekaValentine/python-objectapi-to-valueapi-catchingbaseexception
...
Python: ObjectAPI to ValueAPI: CatchingBaseException
2020-03-09 22:54:50 +01:00
Rebecca Valentine
3e36c672cf
Python: Removes superfluous cast
2020-03-06 13:06:11 -08:00
Rebecca Valentine
7b49c8e6f8
Python: Fixes bug in modernization
2020-03-06 12:47:46 -08:00
Rebecca Valentine
d535246703
Python: Modernizes query
2020-03-04 17:28:44 -08:00
Rebecca Valentine
646bc29e76
Python: Modernizes query
2020-03-04 17:22:21 -08:00
Rebecca Valentine
b09ab67e75
Python: Modernizes query
2020-03-04 17:10:32 -08:00