Commit Graph

71212 Commits

Author SHA1 Message Date
Anders Schack-Mulligen
635071fe8a Swift: Add tentative support for speculative taint flow. 2024-10-16 14:35:21 +02:00
Anders Schack-Mulligen
7497d9530d Python: Add tentative support for speculative taint flow. 2024-10-16 14:35:20 +02:00
Anders Schack-Mulligen
8eb0cb4c66 Ruby: Add tentative support for speculative taint flow. 2024-10-16 14:35:20 +02:00
Anders Schack-Mulligen
7b43100af5 C#: Add support for speculative taint flow. 2024-10-16 14:35:19 +02:00
Anders Schack-Mulligen
6c6b6061bc Dataflow: Add consistency check. 2024-10-16 14:35:19 +02:00
Anders Schack-Mulligen
8b99154a00 Java: Add support for speculative taint flow. 2024-10-16 14:35:19 +02:00
Anders Schack-Mulligen
7d123296f8 Dataflow: Add speculative flow modules. 2024-10-16 14:35:18 +02:00
Anders Schack-Mulligen
c80627a3d3 Dataflow: add plumbing for adding provenance to state-steps. 2024-10-16 14:35:18 +02:00
Jeroen Ketema
bee073dee5 Merge pull request #17776 from jketema/parent-scope
C++: Add missing parent scope cases
2024-10-16 13:12:24 +02:00
yoff
6cb607e087 Merge pull request #17779 from github/tausbn/python-run-replace-test
Python: Add `copy.replace` test to list of runnable tests
2024-10-16 13:01:49 +02:00
Paolo Tranquilli
79c3728d1f Merge pull request #17719 from github/redsun82/bazel-lfs
Bazel: skip git lfs endpoints presenting malformed data, and print workaround
2024-10-16 10:57:30 +02:00
Paolo Tranquilli
8f451515e0 Bazel: print workaround for git_lfs_probe.py failing 2024-10-16 10:16:38 +02:00
Paolo Tranquilli
fd31e6d813 Bazel: skip git lfs endpoints presenting malformed data 2024-10-16 10:01:19 +02:00
Taus
65dbc1de91 Python: Add copy.replace test to list of runnable tests 2024-10-15 18:17:00 +02:00
Taus
28f8874243 Merge pull request #17688 from github/tausbn/python-3.13-default-type-parser-support
Python: Add support for type parameter defaults
2024-10-15 18:01:51 +02:00
Taus
d4e0cb2ffa Merge pull request #17767 from github/tausbn/python-3.13-model-flow-in-replace
Python: Model `copy.replace`
2024-10-15 18:01:28 +02:00
Jeroen Ketema
22b8e2cbb4 C++: Add missing parent scope cases 2024-10-15 17:16:58 +02:00
Paolo Tranquilli
886c7f1f7a Merge pull request #17771 from github/redsun82/rust-codegen
Rust: fix codegen to allow `--force` again
2024-10-15 17:08:39 +02:00
Owen Mansel-Chan
5efb88ed1f Merge pull request #17737 from owen-mc/go/extractor/objecttypes-consistency-generics-2
Go: extractor/objecttypes consistency generics (second try)
2024-10-15 15:50:45 +01:00
Paolo Tranquilli
2c970a080d Rust: remove useless blank line
Co-authored-by: Simon Friis Vindum <simonfv@gmail.com>
2024-10-15 16:50:15 +02:00
Geoffrey White
f9eca42ded Merge pull request #17763 from geoffw0/cfgcount3
Rust: Count number of CFG inconsistencies
2024-10-15 15:43:39 +01:00
Ian Lynagh
196baa99b2 Merge pull request #17769 from igfoo/igfoo/2.1.0-beta2
Kotlin: Fix for 2.1.0-Beta2
2024-10-15 14:56:55 +01:00
Arthur Baars
bdec751527 Merge pull request #17768 from github/post-release-prep/codeql-cli-2.19.2
Post-release preparation for codeql-cli-2.19.2
2024-10-15 15:33:42 +02:00
Geoffrey White
79c5adfc9a Rust: Use correct versions of the consistency predicates. 2024-10-15 14:10:51 +01:00
Paolo Tranquilli
1d9767a163 Merge pull request #17770 from github/redsun82/rust-callable-base
Rust: Add `Callable` as a base class of `Function` and `ClosureExpr`
2024-10-15 15:00:59 +02:00
Paolo Tranquilli
8e31abaefe Rust: fix codegen to allow --force
This passes command line arguments to codegen, allowing in particular
`--force` to be passed.

Also, a convenience `//rust/codegen:py` is added to only run the python
based code generation, which will be faster and enough when
`ast-generator` is unchanged.
2024-10-15 14:37:30 +02:00
Jeroen Ketema
50ec2549c0 Merge pull request #17740 from jketema/requires
C++: Add support for C++ requires expressions
2024-10-15 14:32:28 +02:00
Paolo Tranquilli
bd08bc7923 Rust: address review 2024-10-15 14:21:11 +02:00
Ian Lynagh
b5bfd06624 Kotlin: Fix for 2.1.0-Beta2
We need to catch a different exception now.
2024-10-15 13:17:26 +01:00
github-actions[bot]
079ab77a38 Post-release preparation for codeql-cli-2.19.2 2024-10-15 12:16:59 +00:00
Taus
3b60d8302b Python: Add change note 2024-10-15 12:14:20 +00:00
Taus
778b96aa39 Python: Update test expectations 2024-10-15 12:14:19 +00:00
Taus
eaef783f4b Python: Add partial model for copy.replace
Extends our modelling to partially cover the behaviour of
`copy.replace`. In particular, we model this in two ways:

Firstly, we extend the existing Models-as-Data row for `copy` and
`deepcopy` to also cover `replace`. This means that we treat the result
of `replace` as containing all of the fields of the original object.
This is somewhat _more_ than we want, as strictly speaking the fields
that are overwritten should _not_ propagate flow through the `replace`
call, but currently we don't have a good way of modelling this blocking
of flow.

Secondly, we add a flow summary that adds flow from named arguments of
the `replace` call to the corresponding fields on the base object. This
ensures that we at least have the new flow arising from the `replace`
call.

Note that the flow summary adds this flow for _all_ named arguments of
_all_ `replace` calls throughout the codebase. However, since any
particular `replace` call will only populate a subset of these (the
subset consisting of exactly those named arguments that are in that
particular call), this does not cause any unwanted crosstalk between
different `replace` calls.§
2024-10-15 12:14:19 +00:00
Paolo Tranquilli
5b2eb88672 Merge pull request #17766 from github/aibaars/fix-cwe-link
Fix CWE coverage link in main index
2024-10-15 14:05:50 +02:00
Taus
6f2cfa0ba8 Python: Update CopySummary to use getMaDRepresentation
Demonstrates the somewhat more ergonomic way to use
`getMaDRepresentation` when specifying summaries.

Note that this slightly extends the previous definition, in that
`DictionaryContentAny` is now _also_ propagated by a call to the
`.copy()` method, but I think this is correct.
2024-10-15 11:52:37 +00:00
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