yoff
08e115056d
Merge pull request #21519 from github/tausbn/python-port-no-alert-change
2026-03-27 08:44:28 +01:00
Taus
059693ce89
Python: Restrict ShouldBeContextManager.ql results
...
By limiting the results to the class that actually defines the `__del__`
method, we eliminate a bunch of FPs where a _subclass_ of such a class
would also get flagged.
2026-03-24 13:04:44 +00:00
Taus
a276f721f7
Python: Add ternary overridesMethod
...
This one also allows easy access to the method being overridden and the
class on which it resides. This let's us simplify DocStrings.ql
accordingly.
2026-03-23 15:21:27 +00:00
Taus
1ffcdc9293
Python: Select property instead of function
...
in PropertyInOldStyleClass. This matches the previous behaviour more
closely.
2026-03-23 14:55:28 +00:00
Taus
5859590b5d
Python: Fix typo in comment
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-03-23 15:07:31 +01:00
Taus
434b3973eb
Python: Add change note
2026-03-20 13:30:29 +00:00
Taus
3584ad1905
Python: Port DeprecatedSliceMethod.ql
...
Only trivial test changes.
2026-03-20 13:30:29 +00:00
Taus
fa8e4f7314
Python: Port DocStrings.ql
2026-03-20 13:28:45 +00:00
Taus
283231bdbc
Python: Port ShouldBeContextManager.ql
...
Only trivial test changes.
2026-03-20 13:28:45 +00:00
Taus
025a7d0cca
Python: Port UselessClass.ql
...
No test changes.
2026-03-20 13:28:45 +00:00
Taus
8cfdea2001
Python: Port PropertyInOldStyleClass.ql
...
Only trivial test changes.
2026-03-20 13:28:45 +00:00
Taus
e860d706c9
Python: Port SuperInOldStyleClass.ql
2026-03-20 13:28:45 +00:00
Taus
3d20050c0a
Python: Port SlotsInOldStyleClass.ql
...
Only trivial test changes.
2026-03-20 13:28:45 +00:00
Taus
1dcc76996d
Python: Port py/print-during-import
...
Uses a (perhaps) slightly coarser approximation of what modules are
imported, but it's probably fine.
2026-03-20 13:28:44 +00:00
Taus
f4841e1f39
Python: Use API graphs instead of points-to for simple built-ins
...
Also extends the list of known built-ins slightly, to add some that were
missing.
2026-03-20 13:28:44 +00:00
Óscar San José
2139b97628
Merge branch 'main' into post-release-prep/codeql-cli-2.25.0
2026-03-19 13:07:00 +01:00
github-actions[bot]
e3dbf5b022
Post-release preparation for codeql-cli-2.25.0
2026-03-16 16:03:22 +00:00
github-actions[bot]
d6055754b6
Release preparation for version 2.25.0
2026-03-16 12:15:34 +00:00
Owen Mansel-Chan
52809133f5
Add change notes
2026-03-13 11:10:43 +00:00
Owen Mansel-Chan
056aa342fe
Change @security-severity for log injection queries from 7.8 to 6.1
2026-03-13 10:02:01 +00:00
Owen Mansel-Chan
f58a6e5d3a
Change @security-severity for XSS queries from 6.1 to 7.8
2026-03-13 10:01:02 +00:00
Taus
c5360ba46c
Python: Fix bad join in method call order computation
...
This join had badness 1127 on the project FiacreT/M-moire, producing ~31
million tuples in order to end up with only ~27k tuples later in the
pipeline. With the fix, we reduce this by roughly the full 31 million
(the new materialised helper predicate accounting for roughly 130k
tuples on its own).
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2026-03-09 13:09:29 +00:00
github-actions[bot]
e152f08468
Post-release preparation for codeql-cli-2.24.3
2026-03-02 22:51:27 +00:00
github-actions[bot]
7795badd18
Release preparation for version 2.24.3
2026-03-02 13:23:40 +00:00
Taus
6bfb1e1fae
Merge pull request #21344 from github/tausbn/python-remove-points-to-from-metrics-libraries
...
Python: Remove points-to from metrics library
2026-02-24 15:55:16 +01:00
Taus
480ae619e6
Merge pull request #21116 from github/tausbn/python-add-dataflow-overlay-annotations
...
Add `overlay[local]` annotations
2026-02-21 13:44:09 +01:00
Taus
e8de8433f4
Python: Update all metrics-dependant queries
...
The ones that no longer require points-to no longer import
`LegacyPointsTo`. The ones that do use the specific
`...MetricsWithPointsTo` classes that are applicable.
2026-02-19 12:32:27 +00:00
github-actions[bot]
b5898c5a30
Post-release preparation for codeql-cli-2.24.2
2026-02-16 17:07:45 +00:00
Taus
51ebec9164
Python: Fix broken queries
2026-02-16 13:48:32 +00:00
github-actions[bot]
ef04f927fb
Release preparation for version 2.24.2
2026-02-16 13:29:25 +00:00
Taus
7d17454a3b
Merge pull request #21138 from github/tausbn/python-prepare-for-overlay-annotations
...
Prepare dataflow for local annotations
2026-02-12 14:23:45 +01:00
Chris Smowton
5f970d9f2f
Rewordings per copilot
2026-02-12 12:01:33 +00:00
Chris Smowton
bed1ec8981
Enhance path validation recommendations
...
Expanded recommendations for validating user input when constructing file paths, including normalization and using allowlists.
2026-02-11 12:10:08 +00:00
github-actions[bot]
73d06f26cb
Post-release preparation for codeql-cli-2.24.1
2026-02-02 14:04:26 +00:00
github-actions[bot]
0db542e9f0
Release preparation for version 2.24.1
2026-02-02 12:09:09 +00:00
Owen Mansel-Chan
5204255615
Merge pull request #21234 from owen-mc/python/convert-sanitizers-to-mad
...
Python: Allow models-as-data sanitizers
2026-01-30 14:28:39 +00:00
Taus
6113d4be9e
Python: Fix test issues
...
Fixes the test failures that arose from making `ExtractedArgumentNode`
local.
For the consistency checks, we now explicitly exclude the
`ExtractedArgumentNode`s (now much more plentiful due to the
overapproximation) that don't have a corresponding `getCallArg` tuple.
For various queries/tests using `instanceof ArgumentNode`, we instead us
`isArgumentNode`, which explicitly filters out the ones for which
`isArgumentOf` doesn't hold (which, again, is the case for most of the
nodes in the overapproximation).
2026-01-30 12:50:25 +00:00
Owen Mansel-Chan
ef6332c581
Allow MaD sanitizers for queries with MaD sinks
2026-01-30 09:27:59 +00:00
yoff
e7a0fc7140
python: Add query for prompt injection
...
This pull request introduces a new CodeQL query for detecting prompt injection vulnerabilities in Python code targeting AI prompting APIs such as agents and openai. The changes includes a new experimental query, new taint flow and type models, a customizable dataflow configuration, documentation, and comprehensive test coverage.
2026-01-29 23:47:52 +01:00
yoff
3dbfb9fa4b
python: add machinery for MaD barriers
...
and reinstate previously removed barrier
now as a MaD row
2026-01-22 17:30:24 +01:00
github-actions[bot]
48475e66af
Post-release preparation for codeql-cli-2.24.0
2026-01-19 15:49:08 +00:00
github-actions[bot]
4142b9c4ce
Release preparation for version 2.24.0
2026-01-19 14:49:14 +00:00
Ian Lynagh
dcd0a69759
Merge remote-tracking branch 'upstream/main' into igfoo/mb
2026-01-13 01:01:35 +00:00
Taus
89ddd67ebe
Merge pull request #21002 from github/tausbn/python-add-models-for-zstd-compression
...
Python: Add modelling for `zstd.compression`
2026-01-09 14:05:06 +01:00
Taus
8602a2d59b
Python: Use correct first parameter name for zstd call
...
Co-authored-by: yoff <yoff@github.com >
2026-01-07 14:47:11 +01:00
github-actions[bot]
2cb932cf5d
Post-release preparation for codeql-cli-2.23.9
2026-01-06 15:42:16 +00:00
github-actions[bot]
c00663766e
Release preparation for version 2.23.9
2026-01-05 11:57:06 +00:00
Óscar San José
d972af9ef8
Merge branch 'main' of https://github.com/github/codeql into oscarsj/mergeback-rc-3-20-into-main
2025-12-12 13:22:08 +01:00
Taus
ad68a5e4e9
Python: Add modelling for zstd.compression
...
See https://docs.python.org/3/library/compression.zstd.html for
information about this library.
As far as I can tell, the `zstd` library is not vulnerable to things
like ZipSlip, but it _could_ be vulnerable to a decompression bomb
attack, so I extended those models accordingly.
2025-12-09 22:52:16 +00:00
github-actions[bot]
2854330759
Post-release preparation for codeql-cli-2.23.8
2025-12-08 15:49:10 +00:00