Commit Graph

82246 Commits

Author SHA1 Message Date
Taus
d5e0298999 Python: Add support for Psycopg2 database connection pools
Our current modelling only treated `psycopg2` insofar as it implemented
PEP 249 (which does not define any notion of connection pool), which
meant we were missing database connections that arose from such pools.

With these changes, we add support for the three classes relating to
database pools that are defined in `psycopg2`. (Note that
`getAnInstance` automatically looks at subclasses, which means this
should also handle cases where the user has defined a new subclass that
inherits from one of these three classes.)
2025-08-25 12:35:57 +00:00
Tom Hvitved
88059d97c8 Merge pull request #20275 from hvitved/python/fix-print-ast-yaml
Python: Only include relevant YAML in `printAst.ql`
2025-08-25 14:22:14 +02:00
Tom Hvitved
bf7e3dabd6 Python: Only include relevant YAML in printAst.ql 2025-08-25 13:54:19 +02:00
Tom Hvitved
9ef839dc8a Rust: Include synthetic type parameters in Type.getATypeParameter 2025-08-25 13:13:05 +02:00
Tom Hvitved
1d8f29136b Rust: Include getAttributeMacroExpansion in isInMacroExpansion 2025-08-25 11:00:49 +02:00
Anders Schack-Mulligen
4be995dc19 Merge pull request #20267 from aschackmull/java/nullness-fix
Java: Add more nullness tests and fix a bug causing false negatives.
2025-08-25 09:13:25 +02:00
Anders Schack-Mulligen
891ce62948 Merge pull request #17660 from knewbury01/knewbury01/improve-quality-java-set
Remove unnecessary query
2025-08-25 08:37:02 +02:00
Paolo Tranquilli
e20c8e139c Merge pull request #20250 from github/redsun82/redsun82/no-lld
Bazel: do not force `lld` and fix `platforms` warning
2025-08-25 08:32:25 +02:00
Napalys Klicius
38f517ecfa Java: Add lambda-aware test detection to VisibleForTesting query 2025-08-24 10:02:43 +00:00
Napalys Klicius
4149968f33 Java: Remove the hardcoded path filter that excluded CodeQL's own unit tests from the java/visible-for-testing-abuse query. 2025-08-24 09:58:35 +00:00
Jami Cogswell
f0542dd828 Java: add summary to change note 2025-08-22 17:17:51 -04:00
Geoffrey White
4a4f782d86 Rust: Accept another consistency test change. 2025-08-22 16:57:51 +01:00
Geoffrey White
0e2bc7c95d Merge remote-tracking branch 'upstream/main' into pathi 2025-08-22 16:57:41 +01:00
Geoffrey White
08cb038086 Rust: Accept changes to other tests. 2025-08-22 16:17:50 +01:00
Napalys Klicius
4a693d9b60 Update java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToSystemExit.ql
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2025-08-22 16:09:46 +02:00
Henning Makholm
3134c0aa38 Merge pull request #20269 from github/hmakholm/pr/test-run-output
rust integration test: use all output from codeql test run
2025-08-22 15:47:33 +02:00
Geoffrey White
701aec1c8e Rust: Fix the canonicalize models. 2025-08-22 14:35:51 +01:00
Henning Makholm
2e69417d67 rust integration test: use all output from codeql test run
The integration test expectes to find a certain phrase from the
extractor repeated in the _stderr_ of `codeql test run`. However, that
subcommand is about to start reproducing the extractor output as-is,
which means the phrase will instead appear in _stdout_.

Change the integration test to capture all of the output, so it
will keep passing across the change.
2025-08-22 15:27:37 +02:00
Geoffrey White
49c4c34882 Merge pull request #20221 from github/copilot/fix-20220
Rust: Implement a new query for Log Injection
2025-08-22 14:01:49 +01:00
Anders Schack-Mulligen
e343fd32d3 Java: Add change note. 2025-08-22 14:29:27 +02:00
Paolo Tranquilli
e05eca6680 Merge branch 'main' into redsun82/cargo-upgrade-2 2025-08-22 13:52:28 +02:00
Geoffrey White
7279b0318b Rust: Model a few more Path and PathBuf methods. 2025-08-22 11:31:43 +01:00
Jeroen Ketema
374c547fa2 Merge pull request #18722 from superboy-zjc/main
Fix the broken reference
2025-08-22 12:26:59 +02:00
Jeroen Ketema
6ce3aac7b7 Merge pull request #12660 from moshekaplan/patch-1
Correct menu title name of "Open Workspace"
2025-08-22 12:08:06 +02:00
Jeroen Ketema
6d7f6ff77d Merge branch 'main' into patch-1 2025-08-22 11:51:33 +02:00
Florin Coada
ea0e31fc30 Add changelog entry for CodeQL CLI version 2.22.4 2025-08-22 10:19:12 +01:00
Geoffrey White
40b9754071 Rust: Change note. 2025-08-22 09:58:11 +01:00
Geoffrey White
2f2a975350 Rust: Model path::new. 2025-08-22 09:58:09 +01:00
Geoffrey White
d1a5c9b297 Rust: Add a test case resembling code seen in the wild. 2025-08-22 09:58:08 +01:00
Geoffrey White
8b04bc0ceb Rust: Model std::fs::OpenOptions and similar. 2025-08-22 09:58:07 +01:00
Geoffrey White
9fbbe02da0 Rust: Compact these models a little. 2025-08-22 09:58:05 +01:00
Geoffrey White
fcce862cea Rust: Add an explicit test case for sinks with two relevant args. 2025-08-22 09:58:04 +01:00
Geoffrey White
16e0de0cfb Rust: Fill gaps in the tokio models. 2025-08-22 09:58:03 +01:00
Geoffrey White
29e7b6ad2c Rust: Fill a gap in the std::fs model. 2025-08-22 09:58:01 +01:00
Geoffrey White
1d2ac33bb6 Rust: Model async-std::fs. 2025-08-22 09:58:00 +01:00
Geoffrey White
49b4adcc99 Rust: Add more tests for DirEntry, PathBuf, OsString. 2025-08-22 09:57:59 +01:00
Anders Schack-Mulligen
f2352f76c0 Java: Teach guards that exceptions in catch-clauses are non-null. 2025-08-22 10:16:42 +02:00
Anders Schack-Mulligen
02452704b2 Java: Fix bug in nullness 2025-08-22 10:15:22 +02:00
Anders Schack-Mulligen
9fc0793d6a Java: More nullness qltests, including highlight of FN bug. 2025-08-22 10:12:48 +02:00
Anders Schack-Mulligen
1c724372f2 Java: More nullness qltests. 2025-08-22 10:08:17 +02:00
Anders Schack-Mulligen
ba252cb5cf Java: Add a couple of difficult condition correlation tests. 2025-08-22 10:08:00 +02:00
Napalys Klicius
4705ad2e32 Java: Added extra test cases for fields 2025-08-22 09:23:49 +02:00
Napalys Klicius
38b3df07ee Java: Address comments 2025-08-22 09:23:49 +02:00
Napalys Klicius
66f2911497 Update java/ql/src/Violations of Best Practice/Implementation Hiding/VisibleForTestingAbuse.ql
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2025-08-22 09:23:49 +02:00
Napalys Klicius
0b172080aa Update java/ql/src/Violations of Best Practice/Implementation Hiding/VisibleForTestingAbuse.ql
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 09:23:49 +02:00
Napalys Klicius
d20fd5beba Java: updated visible-for-testing-abuse meta data and docs. 2025-08-22 09:23:49 +02:00
Napalys Klicius
ea831a8352 Java: Fix VisibleForTestingAbuse false positives in annotations 2025-08-22 09:23:49 +02:00
Napalys Klicius
eb46e54c43 Java: Refactor VisibleForTestingAbuse query to reduce complexity 2025-08-22 09:23:49 +02:00
Napalys Klicius
225723bfeb Java: Exclude @VisibleForTesting-to-@VisibleForTesting access from VisibleForTestingAbuse alerts 2025-08-22 09:23:49 +02:00
Napalys Klicius
e4042402bc Java: Resolve spurious VisibleForTestingAbuse alerts for inner class access patterns 2025-08-22 09:23:49 +02:00