Commit Graph

85368 Commits

Author SHA1 Message Date
Taus
ce914019c5 Python: Add getMaDRepresentation()
This adds a convenient way of getting the Models-as-Data representation
of a particular type of content. This avoids repeating the same
construction over and over in our various summaries. Currently this is
defined for all types of content except the captured variable content,
which to my knowledge doesn't have any representation in Models-as-Data.
2024-10-15 11:50:38 +00:00
Taus
e16405c675 Python: Add test for copy.replace
This test demonstrates the current state of affairs: that `copy.replace`
essentially blocks all flow of taint through it, because it has not been
modelled yet.
2024-10-15 11:48:43 +00:00
Jeroen Ketema
168f7f5d34 C++: Add support for C++ requires expressions 2024-10-15 13:44:17 +02:00
Arthur Baars
af6fc676ce Fix CWE coverage link in main index 2024-10-15 13:34:38 +02:00
Taus
417e60a466 Python: Update extractor version 2024-10-15 11:22:54 +00:00
Taus
d905010aa8 Python: Add change note 2024-10-15 11:22:34 +00:00
Taus
8630f57710 Python: Add up-/downgrade scripts
Adds up- and downgrade scripts for the support for type parameter
defaults.

In the upgrade direction we do nothing, matching the behaviour of
`getDefault` not having a result for old databases.

In the downgrade direction, we explicitly remove the relevant child (via
the `py_exprs` database relation) for `TypeVar`, `TypeVarTuple`, and
`ParamSpec` parameters.
2024-10-15 11:22:33 +00:00
Taus
819b3d77ab Python: Update test expectations
Note that this still includes the somewhat puzzling parsing of
`Spam[**P2]` as an exponentiation with an empty left hand side. When we
fix that bug, we should also update this test to contain actually valid
syntax.
2024-10-15 11:22:33 +00:00
Taus
182a192cc0 Python: Regenerate dbscheme/AST 2024-10-15 11:22:33 +00:00
Taus
36d89745f9 Python: Fix dbscheme/AST autogeneration
There was an errant `ql` in the relevant paths, a leftover from the move
from the internal repo. Also, we can no longer rely on an intree version
of the CodeQL CLI, so from now on we'll just assume it's present in the
path. (On Codespaces, `gh codeql` is a decent replacement, especially if
using the `install-stub` functionality.
2024-10-15 11:22:32 +00:00
Taus
2af0d78435 Python: Add default field to the relevant AST nodes 2024-10-15 11:22:32 +00:00
Taus
55ee3eb36b Python: Add TSG support for type defaults 2024-10-15 11:22:31 +00:00
Taus
6545bfffa7 Python: Regenerate parser files
Two new files -- alloc.h and array.h -- suddenly appeared. Presumably
they are used by the somewhat newer version of tree-sitter. To be safe,
I included them in this commit.
2024-10-15 11:22:31 +00:00
Taus
882249ef82 Python: Add grammar support for type defaults
Also fixes an oversight in the grammar: starred expressions should be
allowed inside the subscript of an `Index` expression.
2024-10-15 11:22:30 +00:00
Taus
1ced5b44d7 Python: Add test for type parameter defaults 2024-10-15 11:22:30 +00:00
Arthur Baars
15bc417a17 Merge pull request #17764 from github/release-prep/2.19.2
Release preparation for version 2.19.2
2024-10-15 13:08:40 +02:00
Arthur Baars
9ba8045837 Fix typos in changelog entries 2024-10-15 11:06:20 +00:00
Rasmus Lerchedahl Petersen
195b70aca6 python: Add test for functional-like programming
This can also serve for a place to add tests for
constructs like threading.Thread, mulitprocess.Process, concurrent.futures.ThreadPoolExecutor, and concurrent.futures.ProcessPoolExecutor.
2024-10-15 12:54:30 +02:00
Ian Lynagh
24d98eef83 Merge pull request #17741 from github/igfoo/logverb
Kotlin: Log our verbosity level
2024-10-15 11:42:15 +01:00
Geoffrey White
abc4981300 Rust: Address QL-for-QL complaint. 2024-10-15 11:30:03 +01:00
github-actions[bot]
255f55cf1a Release preparation for version 2.19.2 2024-10-15 10:29:25 +00:00
Geoffrey White
983179b84e Rust: Autoformat. 2024-10-15 11:23:16 +01:00
Owen Mansel-Chan
1626af0ae1 Merge pull request #17748 from owen-mc/go/join-order-fix/data-flow-node-gettype
Go: Fix bad join order in `SummarizedParameterNode.gettype`
2024-10-15 10:14:38 +01:00
Paolo Tranquilli
248eb7f00c Merge branch 'main' into rust/callable-base 2024-10-15 11:03:11 +02:00
Geoffrey White
7d9a3e1399 Merge pull request #17756 from geoffw0/unusedvar6
Rust: More test cases for rust/unused-variable
2024-10-15 10:02:37 +01:00
Arthur Baars
508e8157b3 Merge pull request #17746 from github/aibaars/macro-pat-irrefutable
Rust: add MacroPat to isExhaustiveMatch
2024-10-15 10:45:06 +02:00
Geoffrey White
5e33d9a145 Rust: Further changes from code review. 2024-10-15 09:38:17 +01:00
Geoffrey White
8169ccd21e Apply suggestions from code review
Co-authored-by: Simon Friis Vindum <paldepind@github.com>
2024-10-15 09:36:09 +01:00
Simon Friis Vindum
cc1e33fb64 Merge pull request #17713 from hvitved/rust/ssa
Rust: Initial SSA implementation
2024-10-15 09:59:48 +02:00
Alvaro Muñoz
e2e1dddb36 Move arg injection sinks to ShellScript class 2024-10-15 09:48:01 +02:00
Kevin Stubbings
d195273bf4 Add mux.Vars() and url.Path sanitizers 2024-10-14 19:49:29 -07:00
Geoffrey White
57875554f4 Rust: Accept consistency failures in the new test cases. 2024-10-14 17:06:55 +01:00
Geoffrey White
e5885f65db Rust: Add more test cases for unused variables and unreachable code. 2024-10-14 16:25:18 +01:00
Geoffrey White
528641c55a Rust: Test spacing. 2024-10-14 16:25:17 +01:00
Geoffrey White
134539060d Rust: correct some 'spurious' annotations that are off by one line. 2024-10-14 16:24:44 +01:00
Geoffrey White
25b592fc89 Merge pull request #17744 from geoffw0/unusedvar5
Rust: Unused variable follow-up work
2024-10-14 16:20:52 +01:00
Taus
5115216c2d Merge pull request #17755 from github/python/more-adj
python: more adjustments...
2024-10-14 17:16:16 +02:00
yoff
da5e9ac18c python: more adjustments... 2024-10-14 14:54:33 +00:00
Edward Minnix III
ade5686e52 Merge pull request #17335 from egregius313/egregius313/go/dataflow/models/stdin
Go: Implement `stdin` models
2024-10-14 10:38:27 -04:00
Taus
96ea9507a4 Merge pull request #17754 from github/python/extractor-expectations
python: update extractor expectations
2024-10-14 16:35:06 +02:00
yoff
9d8d7ab237 python: update extractor expectations 2024-10-14 14:14:40 +00:00
Arthur Baars
ae7afa7aff Update rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll
Co-authored-by: Simon Friis Vindum <simonfv@gmail.com>
2024-10-14 15:20:43 +02:00
Alvaro Muñoz
2e5379f289 Update expected tests 2024-10-14 15:10:31 +02:00
Arthur Baars
867c8a7fa6 Merge branch 'main' into aibaars/macro-pat-irrefutable 2024-10-14 15:02:28 +02:00
Simon Friis Vindum
ef1592fe32 Merge pull request #17751 from paldepind/rust-rename-predicate
Rust: Rename isIrrefutablePattern to isExhaustiveMatch
2024-10-14 14:47:15 +02:00
Arthur Baars
493a68a232 Rust: add MacroPat to isExhaustiveMatch 2024-10-14 13:55:59 +02:00
Simon Friis Vindum
22261c1480 Rust: Rename isIrrefutablePattern to isExhaustiveMatch 2024-10-14 13:43:57 +02:00
Simon Friis Vindum
d0f978d937 Merge pull request #17749 from paldepind/rust-cfg-handle-question-mark
Rust: Handle question mark operator in CFG
2024-10-14 13:19:46 +02:00
Arthur Baars
de612963de Merge pull request #17750 from yoff/python/extractor-test-expectaionts
Python: adjust test expectations for extractor test
2024-10-14 12:54:15 +02:00
Alvaro Muñoz
ff17d1dcb1 Add CmdI test 2024-10-14 12:50:11 +02:00