Commit Graph

82276 Commits

Author SHA1 Message Date
Taus
9802ad77dc Python: Update types_new.py and test output 2025-09-02 12:41:57 +00:00
Taus
235822d782 Python: Improve handling of syntax errors
Rather than relying on matching arbitrary nodes inside tree-sitter-graph
and then checking whether they are of type ERROR or MISSING (which seems
to have stopped working in later versions of tree-sitter), we now
explicitly go through the tree-sitter tree, locating all of the error
and missing nodes along the way. We then add these on to the graph
output in the same format as was previously produced by
tree-sitter-graph.

Note that it's very likely that some of the syntax errors will move
around a bit as a consequence of this change. In general, we don't
expect syntax errors to have stable locations, as small changes in the
grammar can cause an error to appear in a different position, even if
the underlying (erroneous) code has not changed.
2025-09-02 12:41:57 +00:00
Taus
b108d47b26 Python: Update parser test output
It seems that with a newer version of tree-sitter, we no longer parse
the (not actually valid!) syntax `Spam[**P2]` as if the `**` is an
exponentiation operation (with a missing left operand).
2025-09-02 12:41:55 +00:00
Taus
5fb28b9f6d Python: Update bazel dependencies 2025-09-02 12:41:48 +00:00
Taus
76f15a890c Python: Update tree-sitter dependency
Updates the Python extractor to depend on version 0.24.7 of tree-sitter
(and 0.12.0 of tree-sitter-graph).

A few changes were needed in order to make the code build and run after
updating the dependencies:

- In `main.rs`, the `Language` parameter is now passed as a reference.
- In `python.tsg`, many queries had captures that were not actually used
in the body of the stanza. This is no longer allowed (unless the
captures start with an underscore), as it may indicate an error. To fix
this, I added underscores in the appropriate places (and verified that
none of these unused captures were in fact bugs).
2025-09-02 12:40:20 +00:00
Michael Nebel
31852985e5 Merge pull request #20335 from michaelnebel/shared/ql4ql
Shared and Sync: Fix some Ql4Ql violations.
2025-09-02 14:37:34 +02:00
Arthur Baars
0bb7fdccf6 Merge pull request #20347 from github/post-release-prep/codeql-cli-2.23.0
Post-release preparation for codeql-cli-2.23.0
2025-09-02 14:14:03 +02:00
Anders Schack-Mulligen
f833fe0e6e Merge pull request #20300 from aschackmull/cfg/successortype
Shared: Add a shared SuccessorType implementation
2025-09-02 14:09:35 +02:00
Michael Nebel
d3d737b383 Merge pull request #20330 from michaelnebel/python/ql4ql
Python: Fix some Ql4Ql violations.
2025-09-02 14:01:54 +02:00
Michael Nebel
9d521e9cb6 Merge pull request #20333 from michaelnebel/rust/ql4ql
Rust: Fix some Ql4Ql violations.
2025-09-02 14:00:47 +02:00
Michael Nebel
7490d8ddd2 Shared and Sync: Fix some Ql4Ql violations. 2025-09-02 13:54:22 +02:00
github-actions[bot]
e8a2600a0c Post-release preparation for codeql-cli-2.23.0 2025-09-02 11:46:23 +00:00
Michael Nebel
6f5da528a4 Update rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll
Co-authored-by: Simon Friis Vindum <paldepind@github.com>
2025-09-02 13:34:23 +02:00
Michael Nebel
464d8b13a8 Rust: Address review comments. 2025-09-02 13:33:51 +02:00
Arthur Baars
28f02c07d7 Merge pull request #20346 from github/release-prep/2.23.0
Release preparation for version 2.23.0
codeql-cli/v2.23.0
2025-09-02 13:13:45 +02:00
github-actions[bot]
0bfa93828b Release preparation for version 2.23.0 2025-09-02 11:09:32 +00:00
Michael Nebel
90caded4fe Apply suggestion from @aschackmull
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2025-09-02 13:08:31 +02:00
Michael Nebel
7ae5d405fc Merge pull request #20332 from michaelnebel/ruby/ql4ql
Ruby: Fix some Ql4Ql violations.
2025-09-02 12:04:03 +02:00
Michael Nebel
88ee20f189 Merge pull request #20331 from michaelnebel/ql/ql4ql
Ql: Fix some Ql4Ql violations.
2025-09-02 12:02:40 +02:00
Michael Nebel
2a932f0748 Merge pull request #20328 from michaelnebel/java/ql4ql
Java: Fix some Ql4Ql violations.
2025-09-02 12:01:16 +02:00
Joe Farebrother
ab641b3144 Merge pull request #20344 from joefarebrother/fix-changenote
Shared: Fix changenote
2025-09-02 10:58:16 +01:00
Michael Nebel
9a88e38d6f Merge pull request #20327 from michaelnebel/go/ql4ql
Go: Fix some Ql4Ql violations.
2025-09-02 11:45:26 +02:00
Michael Nebel
39d3741a91 Merge pull request #20326 from michaelnebel/csharp/ql4ql
C#: Fix some Ql4Ql violations.
2025-09-02 11:44:22 +02:00
Michael Nebel
f73f9a0447 Merge pull request #20334 from michaelnebel/swift/ql4ql
Swift: Fix a Ql4Ql violation.
2025-09-02 11:40:33 +02:00
Joe Farebrother
11309e99ce Fix changenote 2025-09-02 10:35:58 +01:00
Asger F
19fa29d527 Merge pull request #20307 from asgerf/js/overlay-extract-and-discard-only
JS: Add overlay support to extractor
2025-09-02 11:24:11 +02:00
Tom Hvitved
9bae0bfb35 Merge pull request #20295 from geoffw0/oldpaths1
Rust: Remove extractor path resolution.
2025-09-02 11:17:51 +02:00
Anders Schack-Mulligen
3d4d347150 SuccessorType: Address review comments. 2025-09-02 11:10:00 +02:00
Simon Friis Vindum
0ed6428a94 Merge pull request #20321 from paldepind/rust/trait-method-scope-2
Rust: Take trait visibility into account when resolving paths and methods
2025-09-02 10:58:00 +02:00
Michael Nebel
55e5281429 Go: Fix a couple more spelling errors. 2025-09-02 10:47:36 +02:00
Michael Nebel
a732b36fa8 Update java/ql/src/experimental/quantum/Analysis/ArtifactReuse.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2025-09-02 10:39:37 +02:00
Michael Nebel
367027e777 Ql: Fix some Ql4Ql violations. 2025-09-02 10:01:14 +02:00
Tom Hvitved
1130595c67 Merge pull request #20340 from hvitved/rust/taint-tracking-implicit-deref-at-sinks
Rust: Deref as taint step
2025-09-02 09:44:33 +02:00
Michael Nebel
d0323a6425 Fix one more violation. 2025-09-02 09:42:05 +02:00
Michael Nebel
ef4b41ab6d C#: Replace exists with any. 2025-09-02 09:26:37 +02:00
Michael Nebel
0c5c798ca5 Merge pull request #20290 from michaelnebel/csharp/xmldictionaryreader
C#: Add manual models for more some XML related classes.
2025-09-02 09:12:54 +02:00
Simon Friis Vindum
322ef4d985 Rust: Account for trait visibility when resolving paths and methods 2025-09-02 09:01:17 +02:00
Tom Hvitved
5b51bb2ef0 Rust: Deref as taint step 2025-09-02 08:55:10 +02:00
Henry Mercer
d71991fdc0 Merge pull request #20320 from github/henrymercer/default-queries
Specify default queries in `codeql-extractor.yml`
2025-09-01 15:52:47 +01:00
Michael Nebel
55dd098307 C#: Address review comments. 2025-09-01 15:43:49 +02:00
Michael Nebel
aa8a72d639 C#: Add change-note. 2025-09-01 15:43:48 +02:00
Michael Nebel
525c095287 C#: Update expected test output. 2025-09-01 15:43:46 +02:00
Michael Nebel
5cd30f023c C#: Add some XmlTextReader models. 2025-09-01 15:43:44 +02:00
Michael Nebel
8a480b6be1 C#: Update test expected output. 2025-09-01 15:43:42 +02:00
Michael Nebel
8b2ebaa047 C#: Promote some generated- and refine models for XmlReader. 2025-09-01 15:43:40 +02:00
Michael Nebel
1d35bd1a59 C#: Update expected test output. 2025-09-01 15:43:38 +02:00
Michael Nebel
beeb91dd2a C#: Add some XmlDictionaryReader models. 2025-09-01 15:43:36 +02:00
Michael Nebel
011f8dd3b3 Swift: Fix a Ql4Ql violation. 2025-09-01 15:22:56 +02:00
Michael Nebel
37997c0561 Rust: Fix some Ql4Ql violations. 2025-09-01 15:21:41 +02:00
Michael Nebel
c5cf46bc2c Ruby: Fix some Ql4Ql violations. 2025-09-01 15:19:25 +02:00