Compare commits

..

8526 Commits

Author SHA1 Message Date
Pierre
1e51587083 Merge pull request #15635 from github/patch-2.16.2-change-note
Fix change note on 2.16.2 release branch
2024-02-16 16:22:01 +01:00
Pierre
1a48c039f0 Update CHANGELOG.md 2024-02-16 15:13:28 +01:00
Pierre
492f743393 Update 0.9.4.md
This patches the changenote in the release branch to be in line with the version on main, so that changelog generation can proceed from the release branch.
2024-02-16 14:11:42 +01:00
Dave Bartolomeo
753d78a695 Merge pull request #15557 from github/release-prep/2.16.2
Release preparation for version 2.16.2
2024-02-08 08:16:00 -08:00
github-actions[bot]
36f01ff31a Release preparation for version 2.16.2 2024-02-08 15:25:24 +00:00
Dave Bartolomeo
a1395d5094 Merge pull request #15556 from github/dbartol/revert-release-prep
Revert "Merge pull request #15522 from github/release-prep/2.16.2"
2024-02-08 07:22:25 -08:00
Dave Bartolomeo
a58dd45d0b Revert "Merge pull request #15522 from github/release-prep/2.16.2"
This reverts commit c4c8cd6b34, reversing
changes made to 525f27173d.
2024-02-08 09:28:34 -05:00
Dave Bartolomeo
c4c8cd6b34 Merge pull request #15522 from github/release-prep/2.16.2
Release preparation for version 2.16.2
2024-02-06 06:21:14 -08:00
Mathias Vorreiter Pedersen
33cefabe27 Update cpp/ql/src/CHANGELOG.md 2024-02-06 11:05:22 +00:00
Mathias Vorreiter Pedersen
6c1e3b1ba6 Update cpp/ql/src/change-notes/released/0.9.4.md 2024-02-06 11:02:15 +00:00
github-actions[bot]
c1b35fbf47 Release preparation for version 2.16.2 2024-02-05 17:58:57 +00:00
Joe Farebrother
525f27173d Merge pull request #15396 from joefarebrother/android-sensitive-ui-text
Java: Add query for sensitive data exposed in text fields
2024-02-05 15:47:03 +00:00
Tony Torralba
6fbbb82f68 Merge pull request #15517 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-02-05 08:45:57 +01:00
github-actions[bot]
ee5df7bf58 Add changed framework coverage reports 2024-02-05 00:16:44 +00:00
Joe Farebrother
3878192810 Apply suggestions from documentation review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2024-02-02 17:21:23 +00:00
Ian Lynagh
643817e74e Merge pull request #15477 from igfoo/igfoo/kot_path_trans
Kotlin: Add path transformer support
2024-02-02 15:34:14 +00:00
Mathias Vorreiter Pedersen
8d53bce842 Merge pull request #15476 from geoffw0/preprocblock
C++: Add PreprocBlock.qll library
2024-02-02 15:06:17 +00:00
Max Schaefer
21c0422dc7 Merge pull request #15499 from github/max-schaefer/automodel-functional-interface-expr
Automodel: Do not consider `@FunctionalInterface`-typed expressions as candidates.
2024-02-02 14:28:41 +00:00
Jeroen Ketema
6b13a8c568 Merge pull request #15504 from MathiasVP/block-summary-flow-out-of-strdup-and-friends
C++: Block summary flow through `strdup` and friends
2024-02-02 14:47:05 +01:00
Anders Schack-Mulligen
f631c01fe2 Merge pull request #15511 from aschackmull/java/adjust-mad-abstractstringbuilder
Java: Remove two redundant models implied by CharSequence models.
2024-02-02 14:45:06 +01:00
Michael Nebel
bf94a75698 Merge pull request #15502 from michaelnebel/csharp/refstructdataflow
C#: Inter-procedural dataflow for `ref` structs when used as arguments.
2024-02-02 14:44:51 +01:00
Tom Hvitved
6df313b9d1 Merge pull request #15509 from hvitved/csharp/node-reuse-dependency-fetching
C#: Disable msbuild node reuse in dependency fetcher
2024-02-02 13:54:53 +01:00
Geoffrey White
72948cbc46 C++: Remove all cached tags. 2024-02-02 12:23:06 +00:00
Anders Schack-Mulligen
49b00f3842 Java: Remove two redundant models implied by CharSequence models. 2024-02-02 13:17:26 +01:00
Mathias Vorreiter Pedersen
439d3d2438 C++: Add tests with higher level of indirection. 2024-02-02 12:09:46 +00:00
Mathias Vorreiter Pedersen
0729c602c5 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2024-02-02 10:39:40 +00:00
Geoffrey White
56538472cf C++: Update the change note. 2024-02-02 09:55:44 +00:00
Geoffrey White
7c37be2e88 C++: Address implicit this. 2024-02-02 09:49:13 +00:00
Mathias Vorreiter Pedersen
b0393287cd Merge pull request #15421 from jketema/unique-function-fix
C++: Ensure that only one Function exists for every function - take 2
2024-02-02 09:42:32 +00:00
Tom Hvitved
fa3130cc95 C#: Disable msbuild node reuse in dependency fetcher 2024-02-02 10:15:33 +01:00
Tamás Vajk
5ab4ed1b3b Merge pull request #15505 from tamasvajk/feature/improve-logs
C#: Improve messages in buildless extraction logs
2024-02-02 09:22:17 +01:00
Mathias Vorreiter Pedersen
6f5ed9ad3b C++: Accept test changes. 2024-02-01 20:15:15 +00:00
Mathias Vorreiter Pedersen
5ad3e97798 C++: Fix TODO by blocking summary flow through functions that don't preserve identity. 2024-02-01 20:15:15 +00:00
Ian Lynagh
68f267798e Kotlin: Add support for path transformers 2024-02-01 18:07:47 +00:00
Tamas Vajk
7b554636ae C#: Improve messages in buildless extraction logs 2024-02-01 16:45:59 +01:00
Jeroen Ketema
6db68c067f C++: Update stats file 2024-02-01 16:12:53 +01:00
Jeroen Ketema
05e78f14a4 C++: Add upgrade and downgrade scripts 2024-02-01 16:12:53 +01:00
Jeroen Ketema
a79754b696 C++: Resolve functions using complete mangled names 2024-02-01 16:12:53 +01:00
Jeroen Ketema
972d86c0a0 C++: Add column to mangled_name table with completeness information 2024-02-01 16:12:53 +01:00
Mathias Vorreiter Pedersen
1ac75def2b C++: Add another testcase with spurious summary flow. 2024-02-01 15:11:52 +00:00
Michael Nebel
551a7f9577 C#: Update expected test output. 2024-02-01 15:04:06 +01:00
Michael Nebel
9191acc412 C#: Prevent flow out of non ref fields in ref structs used as arguments. 2024-02-01 15:04:06 +01:00
Michael Nebel
4a89cbe8ea C#: Add postupdate nodes for arguments of struct type. 2024-02-01 15:04:06 +01:00
Michael Nebel
4dfeff38f9 C#: Add dataflow field test for ref structs with ref and ordinary fields. 2024-02-01 15:04:06 +01:00
Michael B. Gale
73d0b7ef49 Merge pull request #15492 from github/mbg/go/include-versions-in-newer-diagnostic
Go: Include versions in newer Go version needed diagnostic
2024-02-01 12:22:27 +00:00
Tom Hvitved
8972133d4b Merge pull request #15498 from hvitved/ruby/ctx-sensitivity-test
Ruby: Add another dataflow test
2024-02-01 12:46:53 +01:00
Henti Smith
16e62e6649 Merge pull request #15475 from github/henti/update_dotnet
Updated dotnet version to 8.0.101
2024-02-01 11:25:21 +00:00
Max Schaefer
e47b021050 Do not consider expressions as candidates whose type is annotated with @FunctionalInterface. 2024-02-01 11:04:14 +00:00
Tom Hvitved
5080077038 Merge pull request #15484 from hvitved/csharp/qualified-delegate-extraction-fix
C#: Fix extraction of qualified delegate calls
2024-02-01 11:50:09 +01:00
Tom Hvitved
d1ed317832 C#: Add tests for qualified delegate pointer calls 2024-02-01 10:59:05 +01:00
Tom Hvitved
792f302bd4 Ruby: Add another dataflow test 2024-02-01 10:52:06 +01:00
Koen Vlaswinkel
ce4d8d6b51 Merge pull request #15490 from github/koesie10/ruby-model-constructor-on-new
Ruby: Model constructors in endpoint query on new instead of initialize
2024-02-01 09:31:49 +01:00
Tamás Vajk
1478709382 Merge pull request #15491 from tamasvajk/feature/node-reuse-autobuild
C#: Disable msbuild node reuse in autobuild
2024-02-01 09:26:32 +01:00
Michael B. Gale
90eba711a3 Go: Include versions in newer Go version log message 2024-01-31 17:45:58 +00:00
Harry Maclean
06334eee2e Merge pull request #14554 from maikypedia/maikypedia/insecure-randomness
Ruby: Add Insecure Randomness Query
2024-01-31 17:16:32 +00:00
Tamas Vajk
a486481453 Fix integration test result after merge 2024-01-31 16:20:06 +01:00
Tamas Vajk
4608550e48 C#: Disable msbuild node reuse in autobuild 2024-01-31 16:14:40 +01:00
Tamas Vajk
3d25ebc13c Revert "C#: Add /nodeReuse:false to autobuild build command"
This reverts commit bcee901fbd.
2024-01-31 16:12:21 +01:00
Henti Smith
96f366f819 Updated version from PR#15472 2024-01-31 14:07:22 +00:00
Michael B. Gale
84baea5df2 Go: Include versions in newer Go version needed diagnostic 2024-01-31 13:29:53 +00:00
Koen Vlaswinkel
d5f0a5ce72 Use predicate for isConstructor 2024-01-31 14:19:14 +01:00
Tamas Vajk
bcee901fbd C#: Add /nodeReuse:false to autobuild build command 2024-01-31 14:12:49 +01:00
Koen Vlaswinkel
c1aaf5a574 Ruby: Model constructors in endpoint query on new 2024-01-31 13:54:48 +01:00
Tom Hvitved
e7676a00d2 Merge pull request #15370 from hvitved/ruby/erb-flow
Ruby: Model flow through `ViewComponent` render methods
2024-01-31 13:24:10 +01:00
Tom Hvitved
c74bc68287 C#: Fix extraction of qualified delegate calls 2024-01-31 13:21:16 +01:00
Joe Farebrother
9130603334 Address reviews - use SimpleTypeSanitizer and alter qldoc style 2024-01-31 11:31:25 +00:00
Harry Maclean
abf015b142 Merge pull request #15485 from github/koesie10/ruby-model-only-relevant-types
Ruby: Only model relevant files for type models
2024-01-31 11:23:40 +00:00
Henti Smith
51f4179b77 Merge branch 'main' into henti/update_dotnet 2024-01-31 11:06:23 +00:00
Koen Vlaswinkel
817fd8c097 Ruby: Move TestFile to modeling Util module
The TestFile class in the ModelEditor module is more accurate than the
existing RelevantFile class in the Util module, so this moves the
TestFile class to Util and redefines RelevantFile in terms of the
TestFile.
2024-01-31 11:53:30 +01:00
Koen Vlaswinkel
b51379b533 Ruby: Only model relevant files for type models 2024-01-31 11:30:16 +01:00
Tamás Vajk
73f96fb66e Merge pull request #15472 from tamasvajk/feature/compiler-args
C#: Extract expanded compiler arguments
2024-01-31 11:26:07 +01:00
Tom Hvitved
c21bf5d82c C#: Add tests for qualified delegate calls 2024-01-31 11:22:35 +01:00
Mathias Vorreiter Pedersen
4b5a203b46 Merge pull request #15463 from microsoft/42-false-positive-cpp-uninitializedlocal
False positive fix for cpp/uninitialized-local
2024-01-31 09:31:31 +00:00
Harry Maclean
a298a395e6 Merge pull request #15473 from github/koesie10/ruby-model-only-public-methods
Ruby: Only generate models for public methods
2024-01-31 09:27:27 +00:00
Mathias Vorreiter Pedersen
f3eac550c3 Merge pull request #15461 from MathiasVP/propagate-edge-kinds
C++: Support function calls throwing exceptions in the IR
2024-01-31 09:25:46 +00:00
Michael Nebel
e575e97eb9 C#: Update cil attribute expected output. 2024-01-31 10:08:55 +01:00
Tamás Vajk
1d56a8a924 Apply suggestions from code review
Co-authored-by: Tom Hvitved <hvitved@github.com>
2024-01-31 09:46:57 +01:00
Michael Nebel
9a6751a6dd C#: Update the RuntimeFrameworkVersion to 8.0.1. 2024-01-31 09:27:37 +01:00
Tamas Vajk
dabe63ce8b Add change note 2024-01-31 08:44:43 +01:00
Tamas Vajk
1d525dd06c Add new DB stats file 2024-01-31 08:32:17 +01:00
Tamas Vajk
8008152199 List compiler /analyzer arguments in cs/telemetry/extraction-information 2024-01-31 08:32:16 +01:00
Tamas Vajk
fb4315f1fc Add DB upgrade/downgrade folders 2024-01-31 08:32:16 +01:00
Tamas Vajk
fddbb1a722 C#: Extract expanded compiler arguments 2024-01-31 08:32:16 +01:00
Tamas Vajk
0196d808c7 Update expected test results in integration tests 2024-01-31 08:30:43 +01:00
Harry Maclean
4cfdf8b7a3 Ruby: Add test case for view without ERB template 2024-01-30 20:30:59 +01:00
Tom Hvitved
803513acc6 Add change note 2024-01-30 20:30:58 +01:00
Tom Hvitved
d2d017dd64 Ruby: Model flow through ViewComponent render methods 2024-01-30 20:30:58 +01:00
Tom Hvitved
817a2b71a8 Add more tests 2024-01-30 20:30:58 +01:00
Harry Maclean
557b49cfc5 Ruby: Add basic modeling for ViewComponent 2024-01-30 20:30:58 +01:00
Harry Maclean
5b3a2b35b7 Update expected file 2024-01-30 20:30:58 +01:00
Harry Maclean
75a37486c9 Add WIP query for erb flow 2024-01-30 20:30:58 +01:00
Harry Maclean
bf3b86b402 Add test for erb flow 2024-01-30 20:30:58 +01:00
Tom Hvitved
2d95ac9d5f Merge pull request #15468 from hvitved/ruby/ctx-sensitivity-rework 2024-01-30 20:27:43 +01:00
Arthur Baars
4591560692 Merge pull request #14544 from p-/p--oj-ox-unsafe-deser
Ruby: additional unsafe deserialization sinks for ox and one for oj
2024-01-30 19:28:32 +01:00
Geoffrey White
1b433c7af3 C++: Add QLDoc comments. 2024-01-30 17:54:28 +00:00
Ian Lynagh
2eb9b61412 Kotlin: Add a test for path transformers 2024-01-30 17:40:43 +00:00
Geoffrey White
c29d0b78ce C++: Add top of file doc comment. 2024-01-30 17:29:18 +00:00
Geoffrey White
8b2888c2de C++: Change note. 2024-01-30 17:24:05 +00:00
Geoffrey White
4ae8a9a6c4 C++: Add PreprocBlock tests. 2024-01-30 16:47:35 +00:00
Peter Stöckli
fb075a9e88 Rename 2023-10-19-unsafe-deserialization-sinks.md to 2024-01-30-unsafe-deserialization-sinks.md 2024-01-30 17:31:33 +01:00
Henti Smith
612256b760 Updated dotnet to 8.0.101
This is a corresponding PR to https://github.com/github/semmle-code/pull/48786
2024-01-30 16:23:07 +00:00
Sid Shankar
f557110d9b Merge pull request #15465 from sidshank/sidshank/rename-file-name-for-extracted-files-diagnostic
JS/TS/Python/Ruby: Renames diagnostic query files and tests
2024-01-30 10:19:00 -05:00
Koen Vlaswinkel
0442631c68 Ruby: Only generate models for public methods 2024-01-30 16:07:34 +01:00
Rasmus Wriedt Larsen
c265c15f3f Merge pull request #15398 from RasmusWL/html-escape
Python: Add `html.escape` as HTML sanitizer
2024-01-30 16:06:01 +01:00
Koen Vlaswinkel
8aa3542d13 Merge pull request #15470 from github/koesie10/add-summary-neutral-ruby-supported
Ruby: Correctly report supported status of summary and neutral models
2024-01-30 15:46:45 +01:00
Peter Stöckli
1947dee46a Merge branch 'main' into p--oj-ox-unsafe-deser 2024-01-30 15:33:39 +01:00
Benjamin Rodes
1a044fbbde Merge branch '42-false-positive-cpp-uninitializedlocal' of https://github.com/microsoft/codeql into 42-false-positive-cpp-uninitializedlocal 2024-01-30 09:22:51 -05:00
Benjamin Rodes
f58f77de82 PR change suggestions. 2024-01-30 09:22:22 -05:00
Peter Stöckli
9596aebee3 Format: getValue now on one line 2024-01-30 15:22:16 +01:00
Ben Rodes
8c04bbfb57 Update cpp/ql/src/change-notes/2024-01-29-uninitialized-local-false-positive.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2024-01-30 09:19:49 -05:00
Peter Stöckli
3c8bc96ab5 replace occurence of AssignExprCfgNode for Oj as well 2024-01-30 15:17:37 +01:00
Peter Stöckli
e87effc18c Apply suggestions from code review
Co-authored-by: Arthur Baars <aibaars@github.com>
2024-01-30 15:14:35 +01:00
Harry Maclean
e5ba8fe625 Merge pull request #15467 from hmac/hmac-and-barrier
Ruby: Block flow from LHS of && expressions
2024-01-30 14:02:39 +00:00
Koen Vlaswinkel
b32071999b Ruby: Correctly report supported status of summary and neutral models 2024-01-30 15:00:13 +01:00
Geoffrey White
af17ae236f C++: Autoformat. 2024-01-30 13:47:11 +00:00
Geoffrey White
310c78d1e7 C++: Add PreprocBlock.qll library. 2024-01-30 13:47:07 +00:00
Mathias Vorreiter Pedersen
e2ae4a699c C++: Add change note. 2024-01-30 11:44:46 +00:00
Mathias Vorreiter Pedersen
33e37536df C++: Accept test changes. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
1dfd32ee5c C++: Model function calls throwing exceptions. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
eb94203f04 C++: Add an 'EdgeKind' column to 'getExceptionSuccessorInstruction'. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
8bb17a7127 C++: Add an 'EdgeKind' column to 'getInitializationSuccessor'. 2024-01-30 11:32:50 +00:00
Mathias Vorreiter Pedersen
4fb20e14f5 C++: Add an 'EdgeKind' column to 'getChildTrueSuccessor' and 'getChildFalseSuccessor'. 2024-01-30 11:32:47 +00:00
Mathias Vorreiter Pedersen
10ae793de5 C++: Add an 'EdgeKind' column to 'getFirstInstruction'. 2024-01-30 11:31:41 +00:00
Mathias Vorreiter Pedersen
d2e8b88b24 C++: Add an 'EdgeKind' column to 'getChildSuccessor'. 2024-01-30 11:26:46 +00:00
Rasmus Wriedt Larsen
c70b32f7eb Python: Require quote escaping for html.escape 2024-01-30 12:17:01 +01:00
Harry Maclean
f230e618a3 Ruby: Update tests 2024-01-30 09:43:56 +00:00
Michael Nebel
41cca4711b Merge pull request #15426 from michaelnebel/csharp/collectionexpressions
C# 12: Support for collection expressions.
2024-01-30 10:39:39 +01:00
Mathias Vorreiter Pedersen
78d5d9a7ab Merge pull request #15448 from microsoft/false_positive_cpp_incorrect_string_type_conversion
cpp/incorrect-string-type-conversion false positive fixes
2024-01-30 09:37:01 +00:00
Mathias Vorreiter Pedersen
56e44f9b3c Merge pull request #15458 from MathiasVP/dataflow-node-deduplication
C++: Fix more `asExpr` duplication
2024-01-30 09:34:57 +00:00
Mathias Vorreiter Pedersen
436a9ce604 Merge pull request #15460 from MathiasVP/fix-scanf-fp-2
C++: Fix another FP in `cpp/incorrectly-checked-scanf`
2024-01-30 09:32:32 +00:00
Tom Hvitved
503d2f7b95 Ruby: Rework mayBenefitFromCallContext 2024-01-30 09:57:29 +01:00
Harry Maclean
75b13da4e4 Ruby: Block flow from LHS of && expressions
The only values that can flow from the LHS of an && expression are
`false` and `nil`, neither of which seem relevant for any of our
queries.
2024-01-30 08:53:32 +00:00
Joe Farebrother
460ffc89b2 Add additional test cases 2024-01-29 22:43:28 +00:00
Sid Shankar
b1d7a635f5 Renames diagnostic query files and tests
This commit renames the files relating to the diagnostic query that produces information on the number of files extracted. The files have been renamed from "SuccessfullExtractedFiles.*" to "ExtractedFiles.*". All related tests and test files have been renamed too.

The `@tags` and `@id` attributes of the queries have been left untouched, consistent with the `@tags` and `@id` for similar queries in other languages.
2024-01-29 20:19:20 +00:00
Benjamin Rodes
13cf555cee False positive fix for cpp/uninitialized-local 2024-01-29 13:21:05 -05:00
Joe Farebrother
3abd67064d Add change note 2024-01-29 16:33:07 +00:00
Mathias Vorreiter Pedersen
5024df9c4e C++: Add change note. 2024-01-29 16:30:55 +00:00
Joe Farebrother
94075ef148 Fix FPs - consider flow through fields when determining whether a view is masked, and find more instances of findViewById. 2024-01-29 16:25:38 +00:00
Joe Farebrother
8d201626e1 Add documentation 2024-01-29 16:25:38 +00:00
Joe Farebrother
aa78050933 Implement checks for elements hidden by their xml attributes 2024-01-29 16:25:38 +00:00
Joe Farebrother
6081f18089 Add unit tests + make some fixes 2024-01-29 16:25:37 +00:00
Joe Farebrother
8582093e65 Implement checks for parent views being hidden 2024-01-29 16:25:37 +00:00
Joe Farebrother
1b13597d72 Implement checks for calls that may safely mask information 2024-01-29 16:25:37 +00:00
Joe Farebrother
5dd0addfc2 Add sensitive text flow query 2024-01-29 16:25:36 +00:00
Mathias Vorreiter Pedersen
ea79a84c2e C++: Accept test changes. 2024-01-29 16:24:44 +00:00
Mathias Vorreiter Pedersen
ebd1595fbe C++: Fix FP by concluding that a less-than-zero check also implies a not-equal-to-EOF check. 2024-01-29 16:24:36 +00:00
Mathias Vorreiter Pedersen
7e29141196 C++: Add FP test. 2024-01-29 16:23:37 +00:00
Ben Rodes
308a3b533f Update cpp/ql/src/change-notes/2024-01-29-false_positive_incorrect_string_type_conversion.md
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-01-29 09:35:59 -05:00
Mathias Vorreiter Pedersen
aeae208dc3 Merge pull request #15456 from MathiasVP/fix-scanf-fp
C++: Fix FP in `cpp/incorrectly-checked-scanf`
2024-01-29 14:30:20 +00:00
Benjamin Rodes
6f17c432d9 Change log 2024-01-29 09:19:39 -05:00
Mathias Vorreiter Pedersen
320092092d C++: Accept test changes. 2024-01-29 14:11:07 +00:00
Mathias Vorreiter Pedersen
a4727b5597 C++: Fix 'asExpr' duplication. 2024-01-29 14:11:01 +00:00
Mathias Vorreiter Pedersen
044d94c580 C++: Add change note 2024-01-29 13:47:17 +00:00
Michael Nebel
cda09478c5 C# Update expected test output and remove false positive. 2024-01-29 14:37:25 +01:00
Michael Nebel
63c06b72b1 C#: Chop dataflow of spread into smaller steps and make sure to only propagate element flow for the spread operator. 2024-01-29 14:34:57 +01:00
Michael Nebel
b6f94ea44a C#: Add example test of field flow via the spread operator, which leads to a false positive. 2024-01-29 14:30:52 +01:00
Michael Nebel
cd5f678e1c C#: Add IntegerCollection class to the CollectionFlow tests and update line numbers in expected test output. 2024-01-29 14:28:05 +01:00
yoff
391ca5d8a6 Merge pull request #15390 from Marcono1234/marcono1234/python-ascii-regex-flag 2024-01-29 14:27:50 +01:00
Tamás Vajk
39b32a9068 Merge pull request #15454 from tamasvajk/standalone/cshtml-default
C#: Change asp.net core view generation to be opt out
2024-01-29 13:22:44 +01:00
Tamas Vajk
4dffb3bfdd Change integration test to specify .net 6.0 as target framework 2024-01-29 12:40:51 +01:00
Mathias Vorreiter Pedersen
a5794509ec C++: Accept test changes. 2024-01-29 11:33:14 +00:00
Mathias Vorreiter Pedersen
41f44f598a C++: Explicitly check that a check for EOF isn't present. 2024-01-29 11:33:14 +00:00
Tamas Vajk
f16aa034a2 Code quality improvement 2024-01-29 12:29:01 +01:00
Ian Lynagh
79d9109850 Merge pull request #15428 from igfoo/igfoo/catch_illegal_arg
Kotlin: Catch/ignore a IllegalArgumentException exception
2024-01-29 11:27:38 +00:00
Ian Lynagh
76e417c23e Merge pull request #14940 from igfoo/igfoo/comments
Kotlin 2: Comment improvements
2024-01-29 11:27:19 +00:00
Mathias Vorreiter Pedersen
3a66fd7175 C++: Add FP test. 2024-01-29 10:59:38 +00:00
Tamas Vajk
7a8d83e859 C#: Add integration test with asp.net core view generation on dotnet 6
Source generators are needed for asp.net core view generation. Dotnet 6 is the first version where we support view generation. This commit adds an integration test for this.
2024-01-29 11:52:55 +01:00
Tamas Vajk
92fec66370 C#: Add integration test for disabled asp.net core view generation 2024-01-29 11:52:55 +01:00
Tamas Vajk
d7de5fcfcb C#: Change asp.net core view generation to be opt out 2024-01-29 10:52:26 +01:00
Tony Torralba
49d6d3fa0c Merge pull request #15449 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-29 10:27:32 +01:00
github-actions[bot]
6d06c9cb7d Add changed framework coverage reports 2024-01-29 00:16:27 +00:00
Maiky
c2c4d9e4d1 ` change to <code>
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
2024-01-27 14:08:55 +01:00
Mathias Vorreiter Pedersen
a391f7802d C++: Add a test. 2024-01-27 13:08:52 +00:00
maikypedia
d7314a1689 File format 2024-01-27 14:07:36 +01:00
Marcono1234
1ad08efe08 Python: Support a (ASCII) inline regex flag 2024-01-26 22:18:49 +01:00
Ben Rodes
f79846467e Update cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-01-26 15:25:08 -05:00
Benjamin Rodes
b7648bcf27 Adding test cases. 2024-01-26 15:19:07 -05:00
Benjamin Rodes
562221f48e False positive fix. 2024-01-26 13:27:14 -05:00
Geoffrey White
d19ad49313 Merge pull request #15381 from geoffw0/cppfiles
C++: Report any extracted file as successfully extracted
2024-01-26 18:18:27 +00:00
Edward Minnix III
4602f8933d Merge pull request #15292 from egregius313/egregius313/java/dataflow/common-sanitizers/uuid-and-date
Java: Add `java.util.UUID` and `java.util.Date` to the `SimpleTypeSanitizer` class
2024-01-26 13:16:18 -05:00
Geoffrey White
b125d2c9ab Merge branch 'main' into cppfiles 2024-01-26 16:47:48 +00:00
Joe Farebrother
031bd8bd0c Merge pull request #15281 from joefarebrother/android-sensitive-ui-notif
Java: Add query for exposure of sensitive information to android notifiactions
2024-01-26 16:42:55 +00:00
Max Schaefer
73130ec665 Merge pull request #15436 from github/max-schaefer-patch-1
Java: Add models for overloads of DatagramPacket constructor
2024-01-26 16:13:11 +00:00
Henry Mercer
452359f20e Merge pull request #15446 from github/codeql-cli-2.16.1
Merge `codeql-cli-2.16.1` back to `main`
2024-01-26 15:52:56 +00:00
Henry Mercer
720d87391d Merge pull request #15447 from github/henrymercer/2.16.0-mergeback
Merge `codeql-cli-2.16.0` back into `codeql-cli-2.16.1`
2024-01-26 15:42:05 +00:00
Henry Mercer
6bef1404fd Merge remote-tracking branch 'origin/codeql-cli-2.16.1' into henrymercer/2.16.0-mergeback 2024-01-26 13:53:13 +00:00
Florin Coada
b24dad6ac3 Merge pull request #15438 from github/changedocs/2.16.1
Generate changelog for 2.16.1
2024-01-26 13:46:14 +00:00
Michael Nebel
da4a9b620a C#: Add change note. 2024-01-26 14:24:27 +01:00
Michael Nebel
13b8d57bff C#: Add collection flow test cases for collection expressions. 2024-01-26 14:18:16 +01:00
Michael Nebel
168f5b5554 C#: Add dataflow support for collection expressions. 2024-01-26 14:18:16 +01:00
Michael Nebel
8eb89cf0bb C#: Add test and expected output. 2024-01-26 14:18:16 +01:00
Tamás Vajk
7a50d7a95f Merge pull request #15437 from tamasvajk/feature/log-verbosity
C#: Introduce log verbosity extractor option
2024-01-26 12:33:06 +01:00
Michael Nebel
74cb1ea584 C#: Add QL library expression support for collection expressions. 2024-01-26 11:50:20 +01:00
Tony Torralba
52d7bd93a5 Merge pull request #15420 from github/java/update-mad-decls-after-triage-2024-01-24T10-05-04
Java: Update MaD Declarations after Triage
2024-01-26 08:42:49 +01:00
Erik Krogh Kristensen
8e11c75745 Merge pull request #15441 from github/dependabot/cargo/ql/chrono-0.4.33
Bump chrono from 0.4.32 to 0.4.33 in /ql
2024-01-26 08:10:37 +01:00
dependabot[bot]
5fac945b33 Bump chrono from 0.4.32 to 0.4.33 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.32 to 0.4.33.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.32...v0.4.33)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 03:25:31 +00:00
Michael Nebel
1252d3ee89 C#: Rename CollectionExpr to EnumerableCollectionExpr. 2024-01-25 19:53:51 +01:00
Michael Nebel
5ab64f4a65 C#: Introduce extractor support for collection expressions. 2024-01-25 19:53:51 +01:00
Michael Nebel
0477bba34e C#: Add database upgrade- and downgrade scripts. 2024-01-25 19:53:51 +01:00
Michael Nebel
e2614a1e4c C#: Add some dummy db stats for the new expression kinds. 2024-01-25 19:45:56 +01:00
Michael Nebel
1ef8daf7cd C#: Add some more collection and spread element expression kinds to the dbscheme. 2024-01-25 19:45:56 +01:00
Mathias Vorreiter Pedersen
863e6c8009 Merge pull request #15427 from MathiasVP/asexpr-and-asindirectexpr-tests
C++: Add `asExpr` and `asIndirectExpr` library tests (and fix more duplication)
2024-01-25 16:58:18 +00:00
Tony Torralba
d299971086 Fix code review mistake 2024-01-25 17:42:11 +01:00
Tamas Vajk
c4849f9a17 Add change note 2024-01-25 17:33:06 +01:00
Mathias Vorreiter Pedersen
2db76c7fad Merge pull request #15434 from MathiasVP/fix-dataflow-join-order
DataFlow: Fix join order
2024-01-25 16:32:14 +00:00
Tamas Vajk
b8c8f52efc C#: Introduce extractor option for logging verbosity 2024-01-25 17:20:47 +01:00
Tony Torralba
661c5cf6aa Merge pull request #15409 from erik-krogh/path-java
Java: Improve the QHelp for `java/path-injection`.
2024-01-25 17:14:59 +01:00
Ian Lynagh
c0a9c11101 Kotlin: Catch/ignore a IllegalArgumentException exception
This works around
    https://youtrack.jetbrains.com/issue/KT-63847/K2-IllegalStateException-IrFieldPublicSymbolImpl-for-java.time-Clock.OffsetClock.offset0-is-already-bound
2024-01-25 16:04:08 +00:00
Florin Coada
d884941b8a restored settings file 2024-01-25 15:57:48 +00:00
Florin Coada
c3238743b1 Changedocs for 2.16.1 2024-01-25 15:55:32 +00:00
Tamas Vajk
bb4327294d Rename verbosity property to legacy 2024-01-25 16:03:23 +01:00
Tamas Vajk
0e5e57dc56 Adjust 'silent' flag parsing 2024-01-25 16:00:44 +01:00
Max Schaefer
13f0df3588 Add two more models. 2024-01-25 15:00:22 +00:00
Paolo Tranquilli
b2489f7109 Merge pull request #15433 from github/redsun82/clang-format
Swift: update formatting to `clang-format` 17.0.6
2024-01-25 15:58:28 +01:00
Max Schaefer
5235291919 Add models for overloads of DatagramPacket constructor 2024-01-25 14:49:05 +00:00
Tamas Vajk
9b4cdd0d4f Separate logging classes into separate files 2024-01-25 15:38:16 +01:00
Tamas Vajk
2c72d7ea1e C#: Improve code quality 2024-01-25 15:18:55 +01:00
Henry Mercer
10343dd822 Merge pull request #15416 from github/post-release-prep/codeql-cli-2.16.1
Post-release preparation for codeql-cli-2.16.1
2024-01-25 14:15:25 +00:00
Tony Torralba
282632c33b Add new snippets as tests 2024-01-25 15:11:11 +01:00
Erik Krogh Kristensen
fb11e4e14f Merge pull request #15435 from erik-krogh/remove-at-to-z
remove an FP in overly-large-range for [@-Z]
2024-01-25 14:43:12 +01:00
erik-krogh
396da117bb remove an FP in overly-large-range for [@-Z] 2024-01-25 14:15:06 +01:00
Tamás Vajk
2333b8db5b Merge pull request #15432 from tamasvajk/fix/extraction-information
C#: Filter results of division by 0 from `cs/telemetry/extraction-information`
2024-01-25 14:07:19 +01:00
Stephan Brandauer
1f9a968774 Java: PR discussion 2024-01-25 13:59:47 +01:00
Paolo Tranquilli
33b6ce7365 Swift: update formatting to clang-format 17.0.6
Also, added a format check in `swift.yml`.
2024-01-25 13:58:14 +01:00
Mathias Vorreiter Pedersen
db929ccf9b DataFlow: Fix join order. 2024-01-25 12:51:35 +00:00
erik-krogh
73e3fada44 add missing </p> 2024-01-25 12:14:10 +01:00
Tamas Vajk
055ead20e3 C#: Filter results of division by 0 from cs/telemetry/extraction-information 2024-01-25 12:08:15 +01:00
erik-krogh
05a59d2a94 apply suggestions from doc review 2024-01-25 11:20:46 +01:00
Tamás Vajk
01b89508a8 Merge pull request #15424 from tamasvajk/standalone/logging
C#: Improve log messages in buildless mode + some cleanup/refactoring
2024-01-25 11:08:50 +01:00
yoff
930f1b50b9 Merge pull request #15397 from github/tausbn/python-fix-deepcopy-mutable-default-fp
Python: Fix `deepcopy` mutable default FP
2024-01-25 10:32:58 +01:00
Stephan Brandauer
5d6ee9c0cb Update java/ql/lib/ext/com.fasterxml.jackson.databind.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-25 10:00:56 +01:00
Robert Marsh
67a86391a2 Merge pull request #15318 from rdmarsh2/rdmarsh2/cpp/first-class-destructors
C++: First-class destructors in AST
2024-01-24 16:19:10 -05:00
Robert Marsh
0bc023139b C++: autoformat for first-class destructors 2024-01-24 18:52:54 +00:00
Robert Marsh
56c9566867 C++: more documentation for implict destructor calls 2024-01-24 18:52:54 +00:00
Robert Marsh
3970a9fe39 C++: switch to getImplicitDestructorCall 2024-01-24 18:52:54 +00:00
Robert Marsh
3a0290b1e8 C++: add destructors in PrintAST 2024-01-24 18:52:54 +00:00
Robert Marsh
1acc111b63 C++: add getSyntheticDestructor to Expr and Stmt 2024-01-24 18:52:54 +00:00
Chris Smowton
32a2ea1690 Merge pull request #15413 from smowton/smowton/admin/buildless-sibling-project-tests
Add tests for Java buildless w/sibling projects
2024-01-24 18:51:10 +00:00
Chris Smowton
ed9abdd9bd Mock Java 8 toolchain so sibling test works on arm runners 2024-01-24 16:51:38 +00:00
Chris Smowton
287fb8003d Make all toolchains available to test 2024-01-24 16:51:38 +00:00
Chris Smowton
16d30d7335 Remove xml and properties tests 2024-01-24 16:51:38 +00:00
Chris Smowton
042a3b64bb Use Java 11 to run old Gradle 2024-01-24 16:51:38 +00:00
Chris Smowton
b5429f1a50 Add test for buildless with sibling projects 2024-01-24 16:51:38 +00:00
Chris Smowton
e3ef8aa6f6 Adjust test expectations 2024-01-24 16:51:37 +00:00
Chris Smowton
96bf47fbd9 Remove accidentally-committed actual files 2024-01-24 16:51:37 +00:00
Tony Torralba
cbcc090a19 Merge pull request #15423 from atorralba/atorralba/go/awslambda-global-context
Go: Add AwsLambda to the global context
2024-01-24 17:40:00 +01:00
Mathias Vorreiter Pedersen
7916616ee1 C++: Fix duplication for indirect exprs similar to how we fixed it in #15410. 2024-01-24 16:20:06 +00:00
Mathias Vorreiter Pedersen
4e18cca0f4 C++: Add a way to test the behavior of 'asExpr' and 'toString' on dataflow nodes. 2024-01-24 16:12:47 +00:00
Tamas Vajk
199b0578be C#: Log number of restored dotnet framework variants 2024-01-24 15:23:38 +01:00
Stephan Brandauer
4e63cbc993 Merge branch 'main' into java/update-mad-decls-after-triage-2024-01-24T10-05-04 2024-01-24 14:55:20 +01:00
Tamas Vajk
30095e3179 Refactor dotnet restore calls 2024-01-24 13:56:40 +01:00
Ian Lynagh
67242278ee Merge pull request #15384 from igfoo/igfoo/kt2
Kotlin: Support Kotlin 2.0.0-Beta3
2024-01-24 12:47:35 +00:00
Taus
96b1b8e402 Python: Remove empty lines from test file 2024-01-24 12:31:23 +00:00
Tamas Vajk
d742cd3e44 C#: Remove progress monitor from dependency fetcher, use logger directly 2024-01-24 12:29:02 +01:00
Tamas Vajk
13a8168c8e C#: Improve log messages in standalone extractor 2024-01-24 12:28:00 +01:00
Tony Torralba
3b7d6a4806 Go: Add AwsLambda to the global context 2024-01-24 11:33:26 +01:00
Stephan Brandauer
d5bcbcddab Update MaD Declarations after Triage 2024-01-24 11:05:07 +01:00
Michael B. Gale
514430e8b9 Merge pull request #15411 from github/mbg/go/refactor-go-autobuilder 2024-01-24 09:15:04 +00:00
Henry Mercer
3af42d57a0 Merge pull request #15402 from github/henrymercer/csharp-build-mode
C#: Enable standalone extraction via `--build-mode`
2024-01-24 09:01:03 +00:00
Tony Torralba
0bb0e52adb Merge pull request #15418 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-24 09:23:55 +01:00
Michael Nebel
2be1ee8b34 Merge pull request #15394 from michaelnebel/csharp/urlredirect-sanitizer
C#: Add more santizers to the `cs/web/unvalidated-url-redirection` query.
2024-01-24 08:42:05 +01:00
Ed Minnix
ef884fa721 Change note 2024-01-23 22:35:05 -05:00
github-actions[bot]
465e8d3530 Add changed framework coverage reports 2024-01-24 00:17:20 +00:00
github-actions[bot]
d0b74c00fe Post-release preparation for codeql-cli-2.16.1 2024-01-23 23:02:29 +00:00
Henry Mercer
0928c93989 Use TryGetValue 2024-01-23 20:43:19 +00:00
Henry Mercer
e73c1b7281 Be forgiving with casing of build mode environment variable 2024-01-23 20:35:43 +00:00
Henry Mercer
a75c8273f9 C#: Allow checking environment variables that may be undefined
The build mode environment variable for instance is only set when a build mode is specified.
2024-01-23 20:33:16 +00:00
Henry Mercer
766e0e61ed Merge pull request #15414 from github/release-prep/2.16.1
Release preparation for version 2.16.1
2024-01-23 19:57:39 +00:00
github-actions[bot]
7ef611e6dc Release preparation for version 2.16.1 2024-01-23 19:45:16 +00:00
Ed Minnix
dca24ded18 Add UUID and Date to the list of types in the SimpleTypeSanitizer class 2024-01-23 13:36:03 -05:00
Edward Minnix III
3c8b09307d Merge pull request #15291 from egregius313/egregius313/java/dataflow/default-sanitizers
Java: Introduce a common sanitizer type for types which cannot realistically carry taint.
2024-01-23 13:28:03 -05:00
Mathias Vorreiter Pedersen
145b5a30bd Merge pull request #15343 from microsoft/38-cpp-generalize-use-after-free-libraries
Generalization of FlowAfterFree
2024-01-23 16:49:29 +00:00
Ben Rodes
55fe8d376c Update cpp/ql/lib/semmle/code/cpp/security/flowafterfree/UseAfterFree.qll 2024-01-23 10:49:47 -05:00
Benjamin Rodes
dfb3aec002 Removing unnecessary private modules and adding comments. 2024-01-23 10:47:38 -05:00
Mathias Vorreiter Pedersen
42fd3fc836 C++: Make more things 'private' and add QLDoc to public things. (#40) 2024-01-23 10:27:01 -05:00
Mathias Vorreiter Pedersen
b1b236d82d Merge pull request #15410 from MathiasVP/less-dataflow-duplication
C++: Remove more `asExpr` duplication
2024-01-23 14:50:01 +00:00
Michael Nebel
10be0deeb5 C#: Add a couple more testcases. 2024-01-23 15:09:10 +01:00
Edward Minnix III
0e866a5447 Merge pull request #15359 from egregius313/egregius313/csharp/dataflow/threat-modeling/add-threatmodelflowsource
C#: Threat Modeling - Introduce `ThreatModelFlowSource`
2024-01-23 09:02:10 -05:00
Michael B. Gale
cf1aab0157 Go: Move identify environment code to separate file 2024-01-23 13:59:34 +00:00
Michael B. Gale
ee36e7424a Go: Move project analysis code to separate file 2024-01-23 13:59:33 +00:00
Michael B. Gale
0dc3c847bc Go: Move go invocations to separate file 2024-01-23 13:59:33 +00:00
erik-krogh
158ff0da0a add a trailing slash to the folder check in the QHelp for java/path-injection 2024-01-23 14:46:02 +01:00
Tamás Vajk
df8d453058 Merge pull request #15395 from tamasvajk/feature/standalone-nuget-restore-retry
C#: Try fallback `dotnet restore` without nuget.config
2024-01-23 14:45:00 +01:00
Erik Krogh Kristensen
f1d6f56621 Merge pull request #15393 from erik-krogh/deps-jan-2024
All: delete outdated deprecations
2024-01-23 13:52:38 +01:00
Mathias Vorreiter Pedersen
8b172c133d C++: Accept test changes. 2024-01-23 12:06:42 +00:00
Mathias Vorreiter Pedersen
5bc602a208 C++: Ensure that we don't create a result for 'asExpr' on an instruction node if a result also exists for an operand node (and vice versa). 2024-01-23 12:06:35 +00:00
erik-krogh
00dadeb3bf delete the markdown file again 2024-01-23 12:57:15 +01:00
erik-krogh
57e0b3cceb iterate on the java/path-injection qhelp 2024-01-23 12:56:43 +01:00
erik-krogh
4958c19c67 move the examples for the qhelps into an example/ folder 2024-01-23 12:56:23 +01:00
erik-krogh
6b66f5cbc5 check in the TaintedPath qhelp as markdown to get pretty diffs 2024-01-23 12:56:22 +01:00
Chris Smowton
43453fea52 Merge pull request #15408 from smowton/smowton/admin/log-setup-go-message
Log advice when a newer Go version is required under Actions
2024-01-23 11:32:38 +00:00
Mathias Vorreiter Pedersen
d29d060706 Merge pull request #15401 from alexet/make-intended-join-order
CPP: Fix join ordering hints to make them do what they intend.
2024-01-23 11:30:20 +00:00
Chris Smowton
7e96eaa273 Log advice when a newer Go version is required under Actions 2024-01-23 10:49:52 +00:00
Tony Torralba
77e724b3ba Merge pull request #15188 from github/java/update-mad-decls-after-triage-2023-12-21T14-39-02
Java: Update MaD Declarations after Triage
2024-01-23 11:34:57 +01:00
Tony Torralba
fcd9a5ed71 Update java/ql/lib/change-notes/2023-12-21-new-models.md 2024-01-23 11:18:12 +01:00
Joe Farebrother
dedba1fc54 Address review comments - add barrierIn and fix a model for a PendingIntent sink 2024-01-23 09:51:42 +00:00
Joe Farebrother
0acb647e7d Fix tests and add notification sink kind to model verification 2024-01-23 09:51:41 +00:00
Joe Farebrother
b23bbf93d4 Reorder sink models 2024-01-23 09:51:41 +00:00
Joe Farebrother
69faafa194 Add change note 2024-01-23 09:51:40 +00:00
Joe Farebrother
1190352b67 Add qhelp 2024-01-23 09:51:40 +00:00
Joe Farebrother
d806fcae3d Remove sink models involving PendingIntent; as they do not carry sensitive data (including from the original intent they were created with) 2024-01-23 09:51:39 +00:00
Joe Farebrother
2ca164ce35 Generate androidx stubs and correct some models 2024-01-23 09:51:39 +00:00
Joe Farebrother
bafd65b1d2 Add tests to cover each modeled sink + some corrections to the models 2024-01-23 09:51:38 +00:00
Joe Farebrother
a1a2acd3ce Add additional test cases 2024-01-23 09:51:38 +00:00
Joe Farebrother
f9bb004618 Add sink models to notification builder setters 2024-01-23 09:51:38 +00:00
Joe Farebrother
cd19a91704 Add unit test 2024-01-23 09:51:37 +00:00
Joe Farebrother
3aa27148de Split existing tests under CWE-200 into separate folders 2024-01-23 09:51:37 +00:00
Joe Farebrother
143ce0b94a Add sensitive notification query 2024-01-23 09:51:37 +00:00
Stephan Brandauer
95b439bf31 Merge branch 'main' into java/update-mad-decls-after-triage-2023-12-21T14-39-02 2024-01-23 09:40:50 +01:00
Stephan Brandauer
cd765e7c19 work on review comments
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-23 09:35:36 +01:00
Stephan Brandauer
8b34407ab7 Java: java.awt.Desktop::browse is a url-redirection sink
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-23 09:28:13 +01:00
Michael Nebel
95a200453b Merge pull request #15404 from michaelnebel/csharp/inlinearraydummystats
C#: Add dummy stats for inline_array_type.
2024-01-23 09:17:18 +01:00
Michael Nebel
123e86e0e0 C#: Add dummy stats for inline_array_type. 2024-01-23 08:29:01 +01:00
Erik Krogh Kristensen
97071b0dc7 Merge pull request #15403 from github/dependabot/cargo/ql/chrono-0.4.32
Bump chrono from 0.4.31 to 0.4.32 in /ql
2024-01-23 08:20:28 +01:00
Ed Minnix
fcbee1994b Update change note 2024-01-22 23:57:31 -05:00
Ed Minnix
fb80c5ea84 Rename SimpleScalarSanitizer to SimpleTypeSanitizer 2024-01-22 23:55:29 -05:00
Ed Minnix
696788e5b2 Rename semmle.code.java.security.dataflow.CommonSanitizers to semmle.code.java.security.Sanitizers 2024-01-22 23:52:19 -05:00
Ed Minnix
bb44277090 Make import of dataflow private 2024-01-22 23:40:24 -05:00
Ed Minnix
ec3d683186 Change change note category to feature 2024-01-22 23:39:23 -05:00
Ed Minnix
38828672a9 Update change note 2024-01-22 23:38:33 -05:00
Ed Minnix
32fe8e02fb Change note 2024-01-22 23:38:31 -05:00
Ed Minnix
3311b3be8e Convert experimental queries' isBarrier to use instanceof SimpleScalarSanitizer 2024-01-22 23:38:29 -05:00
Ed Minnix
67dfca2e58 Convert libraries to use instanceof SimpleScalarSanitizer 2024-01-22 23:38:26 -05:00
Ed Minnix
7f7c49d6ce Add the SimpleScalarSanitizer class
The `SimpleScalarSanitizer` class represents common scalar types which
cannot realistically carry taint (e.g. primitives/numbers, and
eventually UUIDs and Dates)
2024-01-22 23:38:24 -05:00
dependabot[bot]
e9a1fa9592 Bump chrono from 0.4.31 to 0.4.32 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.31 to 0.4.32.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.31...v0.4.32)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 03:12:14 +00:00
Taus
24b37ffd36 Merge pull request #15187 from github/max-schaefer/py-url-redirection
Python: Add support for more URL redirect sanitisers.
2024-01-22 23:19:36 +01:00
Henry Mercer
6724dea54d C#: Enable standalone extraction via --build-mode 2024-01-22 19:12:07 +00:00
Alex Eyers-Taylor
891d398c3f CPP: Fix join ordering hints 2024-01-22 19:00:18 +00:00
erik-krogh
865df920f9 add change-notes 2024-01-22 19:30:57 +01:00
Ed Minnix
a6c977c169 Use appropriate pack for test models 2024-01-22 12:24:21 -05:00
Max Schaefer
5c43a0b1e4 Merge pull request #15356 from github/max-schaefer/automodel-void-source-candidates
Automodel: Switch tests to inline expectations
2024-01-22 17:05:10 +00:00
Rasmus Wriedt Larsen
00dc55d825 Python: Add change-note 2024-01-22 17:32:33 +01:00
Rasmus Wriedt Larsen
cbed6e861d Python: Add html.escape as HTML sanitizer 2024-01-22 17:32:28 +01:00
Benjamin Rodes
da10e6ca5b Moving FlowAfterFree and UseAfterFree.qll as a general purpose lib. 2024-01-22 11:18:03 -05:00
Ed Minnix
ff6d4c6ae6 Deprecation message 2024-01-22 11:09:53 -05:00
Ed Minnix
0ff12c07c7 Convert existing mapped-property classes to directly extend DatabaseInputSource 2024-01-22 11:09:51 -05:00
Ed Minnix
975327648c Remove commented-out code 2024-01-22 11:09:50 -05:00
Ed Minnix
51564200a1 Documentation for FlowSources library 2024-01-22 11:09:48 -05:00
Ed Minnix
83e66136ce Change note 2024-01-22 11:09:46 -05:00
Ed Minnix
c530fbd9f8 C# Threat Modeling Tests 2024-01-22 11:09:45 -05:00
Ed Minnix
3c9c07ec40 Rename SourceNode.qll to FlowSources.qll 2024-01-22 11:09:43 -05:00
Ed Minnix
392eac5f9a Refactor source node classes to use SourceNode superclass
Refactor the existing flowsource classes to use the `SourceNode` class
to specify which threat model they support.
2024-01-22 11:09:41 -05:00
Ed Minnix
d29df68c97 Introduce the SourceNode and ThreatModelFlowSource classes
1. Introduces the `SourceNode` class which allows dataflow nodes
   representing sources to indicate the threat model they are associated
   with.
2. Introduces the `ThreatModelFlowSource` class which represents a
   source node which respects the threat model configuration
2024-01-22 11:09:39 -05:00
Ed Minnix
ad093fde4f Add dependency on codeql/threat-models shared library 2024-01-22 11:09:38 -05:00
Taus
d6d59377d3 Python: Fix flow through deepcopy
Or, more generally, any copy step, as these presumably do not preserve
object identity.

(Arguably, `copy` could still be susceptible to interior mutability, but
I think that's outside the scope of this query anyway.)
2024-01-22 15:40:30 +00:00
Benjamin Rodes
2181fcf284 Updating .expected to account for new free/deallocation sources. 2024-01-22 10:36:24 -05:00
Taus
14c958ac4d Python: Remove mutable default sources from inside stdlib 2024-01-22 15:23:52 +00:00
Taus
411c107660 Python: Add tests for deepcopy FPs
There are two issues with `deepcopy` here. Firstly, the `deepcopy` function itself
has a mutable default value in its parameter `_nil` (set to the empty list by default).

Now, this value is never actually returned from `deepcopy`, as it is only used as a
sentinel, but our analysis is not clever enough to see this. Thus, it thinks that this
mutable default is returned, and hence the result of any call to `deepcopy` is a
potential source.

To remedy this, I opted to simply exclude all sources that originate from within the
standard library. It is very unlikely for any of the sources in the standard library
to be legit.

Secondly, `deepcopy` -- by virtue of being a function that we model as preserving
values -- admits data-flow through its calls, but this is not correct for the mutable
default query, as it is here the _identity_ of the default value in question that is
important. Thus, we get spurious flow through `deepcopy` for this specific query.
2024-01-22 15:21:57 +00:00
Tamas Vajk
de4e3963e7 C#: Try fallback nuget restore without nuget.config 2024-01-22 15:42:06 +01:00
Tamas Vajk
7c290ee2ba C#: Add integration test with nuget.config 2024-01-22 15:36:38 +01:00
Geoffrey White
0a8869c636 Merge pull request #15385 from geoffw0/swiftfiles
Swift: Report any extracted file as successfully extracted
2024-01-22 14:24:05 +00:00
Taus
4742481070 Python: Consolidate "mutable default" tests
Moves the existing tests into the `ModificationOfParameterWithDefault` subdirectory
which already contained a bunch more tests. In the process, I also removed some
duplicated test cases.
2024-01-22 13:50:33 +00:00
Max Schaefer
a4639c7ff9 Update qhelp to mention solution using urlparse. 2024-01-22 13:36:12 +00:00
Max Schaefer
17e3a45ad7 Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2024-01-22 13:36:12 +00:00
Max Schaefer
98178458d0 Python: Add support for more URL redirect sanitisers.
Since some sanitisers don't handle backslashes correctly, I updated the data-flow configuration to incorporate a flow state tracking whether or not backslashes have been eliminated or converted to forward slashes.
2024-01-22 13:24:18 +00:00
Max Schaefer
99c99145a2 Rename {source,sink}Model to {source,sink}ModelCandidate. 2024-01-22 13:10:51 +00:00
Michael Nebel
1bb6f4962d C#: Match any {digit} in the format string. 2024-01-22 14:03:37 +01:00
Geoffrey White
58c4bf5915 Merge branch 'main' into cppfiles 2024-01-22 12:24:33 +00:00
Max Schaefer
a3816d75b3 Remove redundant imports. 2024-01-22 10:54:01 +00:00
Max Schaefer
78e5a1a546 Autoformat. 2024-01-22 10:45:33 +00:00
Michael Nebel
b006b28e8a C#: Add change note. 2024-01-22 11:28:27 +01:00
Michael Nebel
5016113a0f C#: Add a string.Format sanitizer to url redirect and update expected test output. 2024-01-22 11:21:35 +01:00
Michael Nebel
884f3f1505 C#: Add string interpolation expression sanitizer to url redirect and update expected test output. 2024-01-22 11:21:19 +01:00
Michael Nebel
e33d5b5fb6 C#: Add some test examples for UrlRedirect using string interpolation and string.Format. 2024-01-22 09:42:23 +01:00
erik-krogh
f60c01e3a8 Py: delete import that no longer exists 2024-01-22 09:22:50 +01:00
erik-krogh
0511786a22 delete typo files from list of synchronized files 2024-01-22 09:15:27 +01:00
erik-krogh
8be7eadace delete outdated deprecations 2024-01-22 09:11:35 +01:00
Erik Krogh Kristensen
6533269387 Merge pull request #15392 from github/dependabot/cargo/ql/regex-1.10.3
Bump regex from 1.10.2 to 1.10.3 in /ql
2024-01-22 08:29:35 +01:00
dependabot[bot]
eb1a0fece8 Bump regex from 1.10.2 to 1.10.3 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 03:54:51 +00:00
Geoffrey White
a39bb8c037 Swift: Rename the query file. 2024-01-19 17:58:58 +00:00
Geoffrey White
c515ea3f8a Swift: Change note. 2024-01-19 17:58:58 +00:00
Geoffrey White
ed602642b6 Swift: Basic test for getRelativePath. 2024-01-19 17:58:58 +00:00
Geoffrey White
8cf691a477 Swift: Add File.getRelativePath and update swift/diagnostics/successfully-extracted-files. 2024-01-19 17:58:58 +00:00
Ian Lynagh
60a59cb89e Kotlin: Update 2.0.0 version support 2024-01-19 17:52:38 +00:00
Geoffrey White
5127542677 C++: Rename the query file. 2024-01-19 16:31:34 +00:00
Geoffrey White
01ee61e5ea C++: Change note. 2024-01-19 15:56:54 +00:00
Geoffrey White
4691bf2cb5 C++: Be more optimistic about successfully scanned files. 2024-01-19 15:55:54 +00:00
Geoffrey White
2eba3db1cb C++: Add a test for SuccessfullyExtractedFiles.ql and friends. 2024-01-19 15:50:28 +00:00
Ian Lynagh
d40814d48a Kotlin: Add 2.0.0 beta 3 and remove beta 1 2024-01-19 13:36:55 +00:00
Chris Smowton
7e1dd38623 Merge pull request #15378 from github/smowton/admin/document-aws-lambda
Note AWS Lambda support
2024-01-19 12:11:28 +00:00
Chris Smowton
79928b9f76 Be consistent
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-19 10:44:36 +00:00
Chris Smowton
e999e38b43 Note AWS Lambda support
JS/TS support is old; noting for symmetry with advertised support in Python. Golang support is new as of https://github.com/github/codeql/pull/15373
2024-01-19 10:33:40 +00:00
Tony Torralba
7e7175f49d Merge pull request #15373 from atorralba/atorralba/go/aws-lambda-sources
Go: Add flow sources for AWS Lambda function handlers
2024-01-19 11:21:20 +01:00
Joe Farebrother
4de19b3ec9 Merge pull request #15039 from joefarebrother/csharp-razor-flow-page-models
C#: Add flow steps from a PageModel to cshtml page.
2024-01-19 10:07:25 +00:00
Tony Torralba
8d6aa281b9 Update go/ql/lib/semmle/go/frameworks/AwsLambda.qll
Co-authored-by: Chris Smowton <smowton@github.com>
2024-01-19 10:48:34 +01:00
Pierre
51a65f9794 Merge pull request #15376 from github/sitedocs/2.15.5-2
Regenerate 2.16.0 changelog with fixed changenote
2024-01-19 10:43:21 +01:00
Tony Torralba
9a0fb39382 Model StartWithContext
Co-authored-by: Chris Smowton <smowton@github.com>
2024-01-19 09:25:35 +01:00
Tony Torralba
d3a9a5ec3f Update go/ql/lib/semmle/go/frameworks/AwsLambda.qll
Co-authored-by: Chris Smowton <smowton@github.com>
2024-01-19 09:22:46 +01:00
Michael Nebel
24855ddc64 Merge pull request #15328 from michaelnebel/csharp/inlinearrays
C# 12: Inline array support.
2024-01-19 09:11:26 +01:00
Michael Nebel
cb53ca4e1f Merge pull request #15367 from michaelnebel/csharp/nullablesimpletypesanitizer
C#: Consider nullable simple types as sanitizers.
2024-01-19 09:09:36 +01:00
Aditya Sharad
a3c0425eb3 Merge pull request #15349 from github/remove-codeql-cli-docs
Remove outdated CodeQL CLI docs
2024-01-18 09:45:05 -08:00
Pierre
4922b7fd11 Regenerate 2.16.0 changelog with fixed changenote 2024-01-18 18:08:50 +01:00
Tony Torralba
716c6cd519 Merge pull request #15375 from atorralba/atorralba/docs/amend-change-note
Fix change note category for clarity
2024-01-18 17:49:00 +01:00
Benjamin Rodes
833ef9d6d6 Further reorg of libraries and predicates to allow for more reusable and consistent libraries. 2024-01-18 11:17:24 -05:00
Tony Torralba
736df6fb05 Fix change note category for clarity 2024-01-18 17:09:34 +01:00
Benjamin Rodes
967526b285 Separating out use after free logic into a library and a ql so the query can be expanded easily. 2024-01-18 10:59:17 -05:00
Benjamin Rodes
8bd682b3f2 Deallocation.qll formatting. 2024-01-18 10:49:23 -05:00
Benjamin Rodes
7e70b30772 Adding missing windows library free functions to deallocation set 2024-01-18 09:59:28 -05:00
Alex Ford
9536fb5cae Merge pull request #15372 from github/rb/docs-ruby-3-3
Ruby: update supported version to 3.3
2024-01-18 14:47:15 +00:00
Tony Torralba
1d7dbec719 Go: Add flow sources for AWS Lambda function handlers 2024-01-18 15:17:21 +01:00
Michael B. Gale
d8eef2716b Merge pull request #15360 from github/mbg/csharp/redefine-successfully-extracted-files 2024-01-18 14:09:20 +00:00
Michael Nebel
43350b0664 C#: Add change note. 2024-01-18 13:55:18 +01:00
Michael Nebel
9e9b5292f2 C#: Add change note. 2024-01-18 13:50:52 +01:00
Michael B. Gale
d0003ce7be C#: Rename query to ExtractedFiles 2024-01-18 12:47:11 +00:00
Michael Nebel
337ab611c9 C#: Update expected test output. 2024-01-18 12:53:48 +01:00
Michael Nebel
9460c91c8c C#: Also consider nullable simple types (and datetime) as simple type sanitizers. 2024-01-18 12:53:29 +01:00
Michael Nebel
559842071a C#: Add example of log forging alert for simple nullable types and updated expected test output. 2024-01-18 12:50:40 +01:00
Michael Nebel
f8f95e6a19 C#: Add models as data test for inline arrays. 2024-01-18 12:23:26 +01:00
Michael Nebel
1d88ca2388 C#: Add more InlineArray test cases. 2024-01-18 12:23:26 +01:00
Michael Nebel
70e7c92774 C#: Also check the namespace of the InlineArrayAttribute. 2024-01-18 11:09:01 +01:00
Michael Nebel
674838e698 C#: Add flow test for inline arrays. 2024-01-18 11:09:01 +01:00
Michael Nebel
f14b3265ab C#: Move static methods in CollectionFlow as these impact result line numbers. 2024-01-18 11:09:00 +01:00
Michael Nebel
47505b3bfa C#: Add array access test for an inline array. 2024-01-18 11:09:00 +01:00
Michael Nebel
0453bb86e0 C#: Update test output of existing expressions tests. 2024-01-18 11:09:00 +01:00
Michael Nebel
ae52779cf6 C#: Add inline array test to expressions. 2024-01-18 11:09:00 +01:00
Michael Nebel
de831d188f C#: Add inline type array test. 2024-01-18 11:09:00 +01:00
Michael Nebel
8a97c8c28e C#: Add QL support for InlineArrayType. 2024-01-18 11:09:00 +01:00
Erik Krogh Kristensen
cda2ef4db5 Merge pull request #15364 from github/dependabot/cargo/ql/rayon-1.8.1
Bump rayon from 1.8.0 to 1.8.1 in /ql
2024-01-18 09:24:30 +01:00
dependabot[bot]
7b574bb07a Bump rayon from 1.8.0 to 1.8.1 in /ql
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.0 to 1.8.1.
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 03:16:14 +00:00
Michael B. Gale
a30791833d C#: Report any extracted file as successfully extracted 2024-01-17 20:57:39 +00:00
Michael B. Gale
4a71ddd8b6 Merge pull request #15355 from github/mbg/go/increase-test-robustness
Go: Improve robustness of integration tests
2024-01-17 16:45:30 +00:00
Ben Rodes
67e43ecc44 Merge branch 'main' into 38-cpp-generalize-use-after-free-libraries 2024-01-17 08:05:41 -08:00
Michael B. Gale
783f006d62 Go: Update go clean -modcache comment 2024-01-17 16:04:13 +00:00
Sid Shankar
2d71294f61 Merge pull request #15256 from sidshank/change/adjust-extracted-files-diagnostics
Js/Py/Rb: Report any extracted file as successfully extracted
2024-01-17 11:04:06 -05:00
Mathias Vorreiter Pedersen
39dafd6f6a C++: Suggestions to #15343 (#39)
* C++: Change the interface of 'FlowAfterFree' so that the module it takes
a single module as a parameter.

* C++: Add another predicate to the module signature.

* C++: Convert the use-after-free and double-free libraries to use new interface.

* C++: Accept test changes.
2024-01-17 11:02:46 -05:00
Max Schaefer
7bc03040ec Make tags for positive and negative examples more precise. 2024-01-17 15:57:27 +00:00
Max Schaefer
3ae484868a Merge pull request #15326 from github/max-schaefer/automodel-negative-sink-models
Automodel: Apply negative characteristics only to endpoints of the right kind.
2024-01-17 15:54:28 +00:00
Calum Grant
4660a25d44 Merge pull request #15354 from github/calumgrant/shared-diagnostics
C++/Swift: Create shared library and share Diagnostics
2024-01-17 15:40:12 +00:00
Max Schaefer
ae23920a6d Fix spurious source models for primitive types in framework mode. 2024-01-17 15:36:31 +00:00
Max Schaefer
9975f974ee Autoformat. 2024-01-17 14:53:09 +00:00
Max Schaefer
6d2bf68a86 Use inline expectations for all framework-mode tests. 2024-01-17 14:52:42 +00:00
Max Schaefer
6c47a5d5f9 Refactor framework-mode queries to make them more easily testable. 2024-01-17 14:51:58 +00:00
Erik Krogh Kristensen
17466385e0 Merge pull request #15351 from erik-krogh/zero-to-question
JS/PY/JAVA/RB: mark the range [0-?] as good in the overly-large-range query
2024-01-17 15:51:42 +01:00
Michael B. Gale
c00520011c Go: Install integration test dependencies to local GOPATH 2024-01-17 14:51:06 +00:00
Michael B. Gale
afc673324f Go: Move integration test sources to subdirectories 2024-01-17 14:50:57 +00:00
Max Schaefer
adea805546 Refactor application-mode tests so we can reuse most of it for framework mode. 2024-01-17 14:49:19 +00:00
Max Schaefer
312dd16956 Consolidate application mode tests. 2024-01-17 14:48:27 +00:00
Max Schaefer
692d5e55a2 Use inline expectations for positive examples. 2024-01-17 14:48:22 +00:00
Max Schaefer
83c567385f Use inline expectations for negative-example tests as well. 2024-01-17 14:47:39 +00:00
Max Schaefer
1ebd0747a8 Fix treatment of void method calls. 2024-01-17 14:40:47 +00:00
Max Schaefer
18e44b6f5c Turn AutomodelApplicationModeExtractCandidates into an inline-expectations test. 2024-01-17 14:40:46 +00:00
Max Schaefer
587d69e88c Refactor application-mode candidate-extraction query so we can test its results before sampling. 2024-01-17 14:40:46 +00:00
Max Schaefer
800a78d258 Treat unexploitable types more centrally.
The apparently missing test result is due to sampling.
2024-01-17 14:40:37 +00:00
Calum Grant
d57fc3d7db C++: Remove unneeded includes 2024-01-17 14:34:28 +00:00
Sid Shankar
2c683c910f Merge branch 'change/adjust-extracted-files-diagnostics' of https://github.com/sidshank/codeql into change/adjust-extracted-files-diagnostics 2024-01-17 14:32:36 +00:00
Sid Shankar
0824ab77e9 Adds change notes 2024-01-17 14:31:40 +00:00
Max Schaefer
8614d7bddb Address review feedback. 2024-01-17 14:29:52 +00:00
Calum Grant
51c5afff8b Create shared/cpp library and move Diagnostics there 2024-01-17 14:23:18 +00:00
AlexDenisov
8610c950e1 Merge pull request #15329 from github/alexdenisov/duplicate-destructor-calls
C++: update tests to pick up destructor changes
2024-01-17 15:05:30 +01:00
Michael Nebel
fcb9e473c0 C#: Add upgrade and downgrade scripts. 2024-01-17 14:08:18 +01:00
Michael Nebel
83c16ae993 C#: Extract structs representing inline arrays as inline arrays. 2024-01-17 14:01:05 +01:00
Michael Nebel
5e692a882e C#: Update dbscheme with a typekind for inline arrays. 2024-01-17 14:01:05 +01:00
erik-krogh
1a8a70dc1b mark the range [0-?] as good in the overly-large-range query 2024-01-17 13:11:57 +01:00
Mathias Vorreiter Pedersen
b7a7963d05 Merge pull request #15348 from MathiasVP/remove-bad-magic-swift 2024-01-17 12:00:22 +00:00
Alex Denisov
f1049a4431 C++: update tests to pick up destructor changes 2024-01-17 12:05:30 +01:00
Michael B. Gale
5cf9bc2a76 Merge pull request #15341 from github/mbg/go/simplify-tests 2024-01-17 10:56:34 +00:00
Felicity Chapman
e96585f777 Remove outdated CodeQL CLI docs 2024-01-17 09:29:53 +00:00
Sid Shankar
59098be8c4 Merge branch 'main' into change/adjust-extracted-files-diagnostics 2024-01-16 21:51:41 -05:00
Mathias Vorreiter Pedersen
6391346ade Swift: Add 'nomagic'. 2024-01-16 23:08:20 +00:00
Mathias Vorreiter Pedersen
1fba345fb3 Merge pull request #15219 from rdmarsh2/rdmarsh2/swift/parameterized-cfg-library
Swift: switch to shared, parameterized CFG library
2024-01-16 21:54:05 +00:00
Benjamin Rodes
9a0e2e57ba Updating .expected 2024-01-16 13:18:25 -05:00
Benjamin Rodes
a0ef7955b1 Updating FlowAfterFree to not enforce dominance of source/sink. DoubleFree and UseAfterFree queries now enforce dominance. 2024-01-16 13:15:36 -05:00
Pierre
d6030764aa Merge pull request #15279 from github/sitedocs/2.15.5-2
Generate Changelogs for 2.15.5 & 2.16.0
2024-01-16 18:29:22 +01:00
Shati Patel
e50a0ee7f9 Merge pull request #15333 from github/shati-patel/settings-telemetry
Add note about telemetry for CodeQL extension settings
2024-01-16 17:05:45 +00:00
Pierre
4866c9c811 Add 2.16.0 changelog and move query list link to index 2024-01-16 17:07:14 +01:00
Michael B. Gale
08c4dc1ea5 Go: Exclude all FlowSummaryNodes from test results 2024-01-16 15:51:40 +00:00
Alexander Eyers-Taylor
934474681d Merge pull request #15254 from github/post-release-prep/codeql-cli-2.16.0
Post-release preparation for codeql-cli-2.16.0
2024-01-16 14:50:40 +00:00
Calum Grant
e18ee790f2 Merge pull request #15322 from github/calumgrant/swift-diagnostics
Swift extractor: Generalise SwiftDiagnostics
2024-01-16 14:30:17 +00:00
Michael Nebel
8d64d71583 C#: Move the gen kind enum script. 2024-01-16 14:18:41 +01:00
Alex Ford
abbc80ac8a Ruby: update supported version to 3.3 2024-01-16 12:55:58 +00:00
AlexDenisov
696a72a127 Merge pull request #15259 from github/alexdenisov/swift-5.9.2
Swift: upgrade to 5.9.2
2024-01-16 12:49:13 +01:00
Calum Grant
7cadb0a574 Swift extractor: Simplify declarations back 2024-01-16 11:31:15 +00:00
Calum Grant
f400a5f49f Swift extractor: Fix Linux build 2024-01-16 11:05:05 +00:00
Calum Grant
2cc574dc70 Swift extractor: Use a global variable for the extractor name 2024-01-16 10:56:18 +00:00
Rasmus Wriedt Larsen
6f45de1095 Merge pull request #15325 from RasmusWL/c#-filter-order
C#: Respect order of `LGTM_INDEX_FILTERS` in buildless extraction
2024-01-16 09:28:44 +01:00
Tony Torralba
2246c969a3 Merge pull request #15244 from Marcono1234/marcono1234/regex-flags
Java: Improve Regex flag parsing
2024-01-16 08:25:49 +01:00
Shati Patel
c445b2b547 Add note about telemetry for CodeQL extension settings 2024-01-15 16:32:27 +00:00
Mathias Vorreiter Pedersen
c38ae93640 Swift: Fix import. 2024-01-15 15:42:51 +00:00
Mathias Vorreiter Pedersen
e735ced751 Swift: Autoformat. 2024-01-15 15:24:27 +00:00
Michael B. Gale
6c9f79cc32 Merge pull request #15327 from github/mbg/go/handle-pre-release-versions
Go: Better handle pre-release versions
2024-01-15 15:24:23 +00:00
github-actions[bot]
57df8b92df Post-release preparation for codeql-cli-2.16.0 2024-01-15 15:00:50 +00:00
Rasmus Wriedt Larsen
13c236227f C#: Apply suggestions from code review
Co-authored-by: Michael B. Gale <mbg@github.com>
2024-01-15 15:51:36 +01:00
Rasmus Wriedt Larsen
086e4f7f12 C#: Adjust test for LGTM_INDEX_FILTERS 2024-01-15 15:50:25 +01:00
Michael B. Gale
8c13429163 Go: Ensure getEnvGoSemVer returns a canonical SemVer 2024-01-15 14:20:48 +00:00
Michael B. Gale
a64c001637 Go: Remove unnecessary call to Canonical 2024-01-15 14:19:55 +00:00
Owen Mansel-Chan
63a914a324 Merge pull request #15324 from owen-mc/go/add-fasthttp-to-frameworks-for-coverage
Go: add fasthttp to frameworks for coverage
2024-01-15 14:15:19 +00:00
Michael B. Gale
42dcb5f94d Go: Better handle pre-release versions 2024-01-15 14:00:56 +00:00
Max Schaefer
90a4552c4f Fix omittable exists. 2024-01-15 13:45:03 +00:00
Max Schaefer
fee44074f7 Autoformat. 2024-01-15 13:44:45 +00:00
Max Schaefer
3befce98b3 When checking whether an endpoint has already been modelled, make sure to take the extensibleType into account. 2024-01-15 12:09:39 +00:00
Max Schaefer
68cf9aca12 Remove a few getExtensibleType checks which are now unnecessary. 2024-01-15 11:50:59 +00:00
Rasmus Wriedt Larsen
59d239b230 C#: Respect order of LGTM_INDEX_FILTERS in buildless extraction
That is, using `exclude:**/*\ninclude:**/*` should include everything.
2024-01-15 11:45:58 +01:00
Owen Mansel-Chan
d85628e6a6 Update Go coverage reports 2024-01-15 10:17:48 +00:00
Owen Mansel-Chan
216464f382 Add fasthttp framework to the coverage reports 2024-01-15 10:14:06 +00:00
Calum Grant
39edfa3c14 Swift extractor: Rename a SwiftDiagnostic to Diagnostic 2024-01-15 09:34:28 +00:00
Calum Grant
f82c29ee37 Swift extractor: Generalize SwiftDiagnostics 2024-01-15 09:12:26 +00:00
Owen Mansel-Chan
057ee85cd0 Merge pull request #14123 from am0o0/amammad-go-fastHttp
Go: fasthttp
2024-01-14 20:12:31 +00:00
Ian Lynagh
ff2b40a53d Merge pull request #15315 from igfoo/igfoo/typo
C++: Fix typo
2024-01-12 18:28:32 +00:00
Ian Lynagh
e357d18d35 C++: Fix typo 2024-01-12 17:57:34 +00:00
Max Schaefer
919330fb53 Some more performance refactoring. 2024-01-12 17:38:58 +00:00
Max Schaefer
bb63fcde43 Refactor to avoid bad join order. 2024-01-12 15:24:24 +00:00
Alexander Eyers-Taylor
2704f4ed36 Merge pull request #15266 from github/felicitymay-publish-docs
Update supported-versions-compilers.rst on release candidate branch
2024-01-12 14:58:32 +00:00
Alexander Eyers-Taylor
7cd6c2601e Merge branch 'codeql-cli-2.16.0' into felicitymay-publish-docs 2024-01-12 14:58:12 +00:00
Michael Nebel
275822f80d Merge pull request #15296 from michaelnebel/csharp/getruntimeargument
C#: Improve getRuntimeArgumentForParameter to consider named arguments.
2024-01-12 15:57:17 +01:00
Michael Nebel
9becd0876f Merge pull request #15179 from michaelnebel/modelgenrespectmanual
C#/Java: Increase precision of model generation.
2024-01-12 15:12:21 +01:00
Alexander Eyers-Taylor
b2f1fbe875 Merge pull request #15305 from github/alexdenisov/revert-swift-change
Revert "Swift: separate installation of dependencies and autobuilding"
2024-01-12 13:55:54 +00:00
Max Schaefer
45ca301593 Rename a predicate. 2024-01-12 13:18:05 +00:00
Michael Nebel
dcce93ac4c C#: Address more review comments. 2024-01-12 14:07:27 +01:00
Michael Nebel
37a21ec548 Java: Address review comments. 2024-01-12 13:36:23 +01:00
Michael Nebel
74cdcab6d8 Java: Update expected test output. 2024-01-12 13:36:23 +01:00
Michael Nebel
6af0bca777 Java: Avoid generating contradicting summary and neutral summary models. 2024-01-12 13:36:23 +01:00
Michael Nebel
03d4025b99 Java: Add a testcase where both a neutral summary and summary is being generated. 2024-01-12 13:36:23 +01:00
Michael Nebel
c7045fbb99 C#: Add some test cases for excluding methods for model generation. 2024-01-12 13:35:23 +01:00
Michael Nebel
8702293878 C#: Update expected test output for type based model generator. 2024-01-12 13:35:23 +01:00
Michael Nebel
81de9d35af C#/Java: Don't generate models if there exist a manual summary or neutral summary. 2024-01-12 13:35:22 +01:00
Max Schaefer
ea26e21454 Extend negative characteristics for exceptions to source models. 2024-01-12 12:20:22 +00:00
Max Schaefer
06ba5ea9f8 Eliminate GetCallable modules and use getCallable instead. 2024-01-12 12:03:49 +00:00
Max Schaefer
76b84301e3 Share some code. 2024-01-12 12:03:49 +00:00
Max Schaefer
9f443d4f83 Make Unexploitable*Characteristic more precise. 2024-01-12 12:03:41 +00:00
Alex Denisov
28dd2e979b Revert "Swift: separate installation of dependencies and autobuilding"
This reverts commit dd13ea3d0a.
2024-01-12 12:34:13 +01:00
Mathias Vorreiter Pedersen
6bd31deb00 Merge pull request #15282 from MathiasVP/fix-duplicate-final-global-value
C++: Fix duplicate "final global value" nodes
2024-01-12 11:05:19 +00:00
Max Schaefer
a8336328fd Merge pull request #15176 from github/max-schaefer/py-url-redirection-qhelp
Python: Mention more sanitisation options in py/url-redirection qhelp.
2024-01-12 10:50:33 +00:00
Michael Nebel
c68f9b05cd C#: Address review comments. 2024-01-12 11:24:37 +01:00
Mathias Vorreiter Pedersen
8f36584bd9 C++: Fix Code Scanning errors. 2024-01-12 10:20:20 +00:00
Jeroen Ketema
b209ea6735 Merge pull request #15304 from MathiasVP/revert-12125
C++: Revert "Merge pull request #12125 from jketema/unique-function"
2024-01-12 11:20:00 +01:00
Mathias Vorreiter Pedersen
34980bfe20 C++: Add more QLDoc. 2024-01-12 10:12:34 +00:00
Tony Torralba
448439e76b Merge pull request #15294 from atorralba/atorralba/go/insecure-randomness-index-flowstep
Go: Recognize unsafe candidate selection in `go/insecure-randomness`
2024-01-12 11:08:56 +01:00
Owen Mansel-Chan
6945289afc Merge pull request #15246 from owen-mc/java/manual-neutral-overrides-generated
C#/Java: Manual neutral summaries should block generated summaries
2024-01-12 10:05:18 +00:00
Owen Mansel-Chan
ed4843f397 Merge pull request #15302 from github/dependabot/go_modules/go/extractor/extractor-dependencies-159a68acba
Bump the extractor-dependencies group in /go/extractor with 1 update
2024-01-12 10:03:58 +00:00
Michael Nebel
9f14c7c408 Merge pull request #15297 from michaelnebel/csharp/typealias
C# 12: Type alias [Test only]
2024-01-12 11:03:25 +01:00
Mathias Vorreiter Pedersen
fe2c806c2d C++: Undo some of the reverting. 2024-01-12 09:35:50 +00:00
Mathias Vorreiter Pedersen
84d08b0417 Revert "Merge pull request #12125 from jketema/unique-function"
This reverts commit 9c039c4a08, reversing
changes made to ecd2003c14.
2024-01-12 09:29:17 +00:00
Felicity Chapman
e408078eaa Merge pull request #15235 from github/docs-11486-security-severity
Replace blog link with link to GitHub user docs
2024-01-12 09:21:08 +00:00
Tony Torralba
87c6a3e38c Merge pull request #15301 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-12 09:31:27 +01:00
Tony Torralba
31c11add85 Updated change note 2024-01-12 08:55:24 +01:00
dependabot[bot]
dd08c31dc5 Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/tools](https://github.com/golang/tools).


Updates `golang.org/x/tools` from 0.16.1 to 0.17.0
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.1...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 03:24:29 +00:00
github-actions[bot]
add9c4e489 Add changed framework coverage reports 2024-01-12 00:16:38 +00:00
Jeroen Ketema
1c9f5b8b74 Merge pull request #15300 from github/sashabu/uuidof
C++: Add a test with `__uuidof` in a template.
2024-01-12 00:05:49 +01:00
Felicity Chapman
f06cca8eff Merge branch 'main' into docs-11486-security-severity 2024-01-11 22:28:30 +00:00
Alexandre Boulgakov
3493252321 C++: Add a test with __uuidof in a template. 2024-01-11 22:11:50 +01:00
Andrew Eisenberg
42f6dbe0b1 Merge pull request #15288 from github/aeisenberg/problem.severity
Update query-metadata-style-guide.md clarify problem.severity
2024-01-11 12:53:13 -08:00
Asger F
59c9ac735a Merge pull request #15295 from asgerf/js/type-model-export
JS: Include sink nodes as base-case when resolving types
2024-01-11 20:47:32 +01:00
Tony Torralba
12c5b46a0a Reduce FPs
* Restrict allowed types in the flow step

* Discard more non-crypto-related TLS APIs
2024-01-11 16:20:46 +01:00
Michael Nebel
0fa2067c3f C#: Update expected test output. 2024-01-11 16:19:24 +01:00
Michael Nebel
b03eecb5ab C#: Add support for named arguments in getRuntimeArgumentForParameter. 2024-01-11 16:19:24 +01:00
Michael Nebel
85f0ad623b C#: Add testexample of using named arguments when calling a delegate. 2024-01-11 16:19:24 +01:00
Michael Nebel
8b464fbc4a Merge pull request #15249 from michaelnebel/csharp/lambdadefaultparams
C# 12: Support for lambda `param` parameter and parameter defaults.
2024-01-11 16:18:03 +01:00
Owen Mansel-Chan
5e9ddd8c63 Apply suggestions from code review on change notes
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-01-11 15:15:21 +00:00
Michael Nebel
ef73fc3a6f C#: Add a test for type alias. 2024-01-11 16:13:35 +01:00
Owen Mansel-Chan
3c369f88bb Add change notes 2024-01-11 14:00:17 +00:00
Erik Krogh Kristensen
d782bd9b1f Merge pull request #13624 from jorgectf/seclab/dotjs
JS: Add `dot.js` support
2024-01-11 14:57:19 +01:00
Owen Mansel-Chan
def957e814 Accept review suggestion fixing a comment
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2024-01-11 13:56:27 +00:00
Tom Hvitved
a1036c81ee Merge pull request #15273 from hvitved/ruby/captured-yield
Ruby: Handle captured `yield` calls
2024-01-11 14:34:34 +01:00
Owen Mansel-Chan
2f01688319 Merge pull request #15280 from owen-mc/java/add-manual-models-for-df-generation
Java: improve models for some important JDK methods
2024-01-11 12:47:37 +00:00
Asger F
82cee61999 JS: Include sink nodes as base-case when resolving types 2024-01-11 13:41:21 +01:00
Max Schaefer
6e9c90a6bb Properly distinguish negative source and sink characteristics.
In particular, `IsSanitizerCharacteristic` is a negative _source_ characteristic (not a negative sink characteristic), while `NeutralModelCharacteristic` is both.

This eliminates the erroneous test results.
2024-01-11 12:36:48 +00:00
Max Schaefer
ff4555ac5b Get rid of negative sink types.
Instead of positively implying the negative sink type, negative sink characteristics now negatively imply all sink types (but not source types). This is simpler and sice we will never have a huge number of sink types it doesn't impact performance either.

Changes to test results:

- The call to `createDirectories` at `Test.java:87` is now correctly classified as a source candidate, having previously been erroneously excluded by a negative _sink_ characteristic.
- The call to `compareTo` at `Test.java:48` is now erroneously classified as a source candidate; it should be suppressed by `IsSanitizerCharacteristic`, which is a negative sink characteristic, but should really be a negative source characteristic.
- In framework mode, several endpoints are now erroneously classified as source candidates even though they have neutral models, because `NeutralModelCharacteristic` is currently only a negative sink characteristic and not a negative source characteristic.
2024-01-11 12:19:53 +00:00
Max Schaefer
bcf4f4febd Drop a conjunct which is now spurious. 2024-01-11 11:56:59 +00:00
Max Schaefer
03ca244df2 Associate endpoints with their potential endpoint types and check these when determining candidates.
This prevents us from associating a sink candidate with a source type and vice versa.

However, this does not fix the problem of negative characteristics for sink types excluding source candidates.
2024-01-11 11:44:14 +00:00
Max Schaefer
a6d996b478 Add an example of a missed source candidate.
`Files.list` has a taint step from its first argument to its result, so that first argument should not be considered a sink candidate (and it is not). However, due to a bug in `IsMaDTaintStepCharacteristic` it is also not considered a source candidate, which is wrong: as the example shows, if that argument is a call we do very much want to consider it as a source candidate.
2024-01-11 11:27:34 +00:00
Max Schaefer
8e429bd399 Rename isSinkCandidate (and a related predicate) to isCandidate.
This reflects the fact that these predicates also deal with source candidates.
2024-01-11 11:20:51 +00:00
Tony Torralba
05b487e3a6 Go: Recognize unsafe candidate selection in go/insecure-randomness 2024-01-11 11:58:12 +01:00
Max Schaefer
dba2e06a1d Merge pull request #15283 from github/max-schaefer/release-automodel-query-pack
Release automodel extraction queries v0.0.12.
2024-01-11 10:28:55 +00:00
Tony Torralba
8ccacafb59 Merge pull request #15289 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-11 10:15:34 +01:00
Michael Nebel
1770beea25 C#: Update QL doc for getRuntimeArgumentForParameter. 2024-01-11 09:07:15 +01:00
Michael Nebel
4c1e84b992 C#: Address review comments. 2024-01-11 09:07:15 +01:00
Michael Nebel
4dedc454ae C#: Add change-note. 2024-01-11 09:07:15 +01:00
Michael Nebel
e18534e748 C#: Force population of compiler generated delegates used for lambdas. 2024-01-11 09:07:15 +01:00
Michael Nebel
9a64e2a9b0 C#: Add test for lambda default parameters. 2024-01-11 09:07:15 +01:00
Michael Nebel
71c996a0be C#: Update lambdaArgument expected output. 2024-01-11 09:07:14 +01:00
Michael Nebel
b2faf3618c C#: Add support for params parameters in getRuntimeArgumentForParameter. 2024-01-11 09:07:14 +01:00
Michael Nebel
f0852c89bc C#: Add test for lambda arguments. 2024-01-11 09:07:14 +01:00
Paolo Tranquilli
482b5f3b29 Merge pull request #15265 from github/redsun82/def-to-non-header-include-exceptions
C++: add `.def` to exceptions to AV rule 32
2024-01-11 08:34:43 +01:00
github-actions[bot]
7db46b6ab6 Add changed framework coverage reports 2024-01-11 00:16:44 +00:00
Andrew Eisenberg
2f190d6552 Update docs/query-metadata-style-guide.md
Co-authored-by: Angela P Wen <angelapwen@github.com>
2024-01-10 14:27:00 -08:00
Owen Mansel-Chan
3767348dec Update test expectations 2024-01-10 22:25:08 +00:00
Owen Mansel-Chan
7824e60acd Manual neutral summaries should block generated summaries 2024-01-10 22:25:06 +00:00
Owen Mansel-Chan
52563b01b7 Factor logic out into interpretNeutral 2024-01-10 22:25:04 +00:00
Owen Mansel-Chan
370a32da8b Test summary models and neutral models, manual and generated 2024-01-10 22:25:02 +00:00
Andrew Eisenberg
303272d0d4 Update query-metadata-style-guide.md clarify problem.severity 2024-01-10 13:47:35 -08:00
Erik Krogh Kristensen
51fe477ed1 Merge pull request #15271 from erik-krogh/fastTS
JS: faster TypeScript extraction
2024-01-10 21:02:34 +01:00
Owen Mansel-Chan
9e2e01ff89 Update Top JDK APIs test expectation 2024-01-10 17:07:33 +00:00
Ian Lynagh
5d3166cfef Kotlin: Tweak code formatting 2024-01-10 16:39:49 +00:00
Ian Lynagh
80163c5aac Kotlin 2: Just accept the remaining comment differences for now 2024-01-10 16:39:47 +00:00
Ian Lynagh
ce4253c17f Kotlin 2: Remove an expected diagnostic match
It is only generated when using the PSI comment extractor.
2024-01-10 16:39:04 +00:00
Ian Lynagh
20254fd71e Kotlin: Accept a location change 2024-01-10 16:39:04 +00:00
Ian Lynagh
b3f8167973 Kotlin: Don't warn if we can't find a label for a fake owner
The fake owner probably just wasn't extracted
2024-01-10 16:39:02 +00:00
Owen Mansel-Chan
33030417b4 Add change note 2024-01-10 15:48:28 +00:00
Tony Torralba
52d3e3da31 Merge pull request #15268 from atorralba/atorralba/go/cleartext-logging-src-and-sink-improvs
Go: Adds sources and sinks to `go/clear-text-logging`
2024-01-10 15:52:40 +01:00
Tom Hvitved
ad75562b55 CPP: Update expected test output 2024-01-10 15:27:22 +01:00
Ian Wright
3534bfca9c Merge pull request #15251 from github/z80coder/dry-run
Support dry-run of publishing script
2024-01-10 14:16:10 +00:00
Philip Ginsbach
a732199317 Merge pull request #15261 from github/ginsbach/WeakAliasesInLanguageReference
document weak aliases in the language reference
2024-01-10 13:55:10 +00:00
Ian Lynagh
f111fba4b7 Merge pull request #15269 from igfoo/igfoo/ktfmt
Kotlin: Reformat code
2024-01-10 13:35:35 +00:00
Tom Hvitved
295198744b Ruby: Handle captured yield calls 2024-01-10 14:25:15 +01:00
Tom Hvitved
55be4c39ef Ruby: Add data flow call sensitivity test 2024-01-10 14:25:12 +01:00
Paolo Tranquilli
1034c3d2f9 Merge pull request #15277 from github/redsun82/swift-fix-upgrade
Swift: fix upgrade and downgrade scripts
2024-01-10 14:19:25 +01:00
Tony Torralba
5e8c63c3aa Use arg position instead of arg as class field to reduce number of instances 2024-01-10 14:12:29 +01:00
Owen Mansel-Chan
28aa9b2b3c C#: Emulate that some methods don't have a body (so generated summaries will be applied) 2024-01-10 12:54:33 +00:00
erik-krogh
06c1fff770 address review comments 2024-01-10 13:53:54 +01:00
Tony Torralba
78c0cdfa2c Apply suggestions from code review
co-authored-by: Owen Mansel-Chan <owen-mc@github.com>
2024-01-10 13:33:41 +01:00
Tony Torralba
3534f692dc Fix test expectations
Barrier-in addition removes an overlapping path
2024-01-10 13:33:41 +01:00
Tony Torralba
80526e509e Go: Adds sources and sinks to go/clear-text-logging 2024-01-10 13:33:41 +01:00
Tony Torralba
ca0a1dc7ae Merge pull request #15267 from atorralba/atorralba/go/fmt-appenderorsprinter-mad
Go: Migrate AppenderOrSprinter model to models-as-data
2024-01-10 13:31:19 +01:00
Paolo Tranquilli
e64ce228bb Merge pull request #15276 from github/redsun82/cmake-drop-internal-transition
Bazel/CMake: drop confusing `_INTERNAL_TRANSITION` suffix
2024-01-10 13:18:33 +01:00
Pierre
78f0aa971b Fix historic changelogs (security coverage section) 2024-01-10 13:02:09 +01:00
Pierre
365cde36ae Create 2.15.5 changelog 2024-01-10 13:01:49 +01:00
Mathias Vorreiter Pedersen
7a0cbb4e5a C++: Accept test changes. 2024-01-10 11:55:53 +00:00
Mathias Vorreiter Pedersen
0c3ea6c5df C++: Fix conflation issue. 2024-01-10 11:55:39 +00:00
Mathias Vorreiter Pedersen
259bf27334 C++: Add pointer/pointee conflation test. 2024-01-10 11:51:40 +00:00
Ian Wright
75545db97c restore files, whether overriding or not 2024-01-10 11:40:31 +00:00
Tony Torralba
46df5857ec Update test expectations 2024-01-10 12:31:02 +01:00
Max Schaefer
8d56ee4a56 Release automodel extraction queries v0.0.12. 2024-01-10 11:29:36 +00:00
Paolo Tranquilli
796c862623 Swift: fix downgrade script 2024-01-10 12:23:48 +01:00
Paolo Tranquilli
1d483cff1d Swift: fix upgrade script 2024-01-10 12:09:11 +01:00
Ian Wright
f793ce1e49 remove temp testing comments 2024-01-10 11:07:06 +00:00
Ian Wright
ed8422a2da remove need for CODEQL_DIST path 2024-01-10 11:07:06 +00:00
Ian Wright
0d2ec2d632 install codeql extension 2024-01-10 11:07:06 +00:00
Ian Wright
62bdaf069b use gh tool to access codeql 2024-01-10 11:07:05 +00:00
Ian Wright
30e5be68c9 temp comment for testing 2024-01-10 11:07:05 +00:00
Ian Wright
9895114e05 temp comment for testing 2024-01-10 11:07:05 +00:00
Ian Wright
0f76fbad36 better processing of args 2024-01-10 11:07:05 +00:00
Ian Wright
749f8b9807 fix help message 2024-01-10 11:07:05 +00:00
Ian Wright
00f4991648 support dry-run
fix

fix

temp

temp

better support for dry-run

fix

fix

fix

fix

reinstate exits
2024-01-10 11:07:05 +00:00
Paolo Tranquilli
b93d108400 Bazel/CMake: drop confusing _INTERNAL_TRANSITION suffix 2024-01-10 12:00:40 +01:00
Tony Torralba
dc911c3f28 Apply suggestions from code review
co-authored-by: Owen Mansel-Chan <owen-mc@github.com>
2024-01-10 11:53:53 +01:00
Philip Ginsbach
d38d4aadf2 try to be clearer about weak and strong aliases in the language reference 2024-01-10 10:53:20 +00:00
Tom Hvitved
c9cf2a899c Merge pull request #15260 from hvitved/dataflow/may-benefit-from-cctx-simplify
Data flow: Remove column from `mayBenefitFromCallContext`
2024-01-10 11:43:15 +01:00
Philip Ginsbach
29e4623d02 fix typos and other small improvements from review 2024-01-10 10:42:04 +00:00
Max Schaefer
ac8e92eec5 Merge pull request #15264 from github/max-schaefer/automodel-exclude-generated-calls
Automodel: Do not generate features for compiler-generated program elements.
2024-01-10 10:22:00 +00:00
Erik Krogh Kristensen
77b0c7f025 Merge pull request #15221 from erik-krogh/react-step
JS: promote `PropsTaintStep` to a `PreCallGraphStep`
2024-01-10 10:17:32 +01:00
Erik Krogh Kristensen
3000b4b9b3 rename PropsTaintStep to PropsFlowStep
Co-authored-by: Asger F <asgerf@github.com>
2024-01-10 09:45:29 +01:00
Tony Torralba
d6082f8446 Merge pull request #14926 from ebickle/fix/update-gson-model
Java: Improve Gson parse, get, and stream models
2024-01-10 09:11:01 +01:00
Michael Nebel
94bf5a41e6 Merge pull request #15225 from michaelnebel/java/modeldiffworkflow
Java: Bring the Model Diff workflow back into a working state.
2024-01-10 08:50:31 +01:00
Philip Ginsbach
1284fc529f documentation: update definition of applicativeness in the specification 2024-01-09 17:09:05 +00:00
Philip Ginsbach
b393bc9a88 documentation: update definition of definite environment in the specification 2024-01-09 17:08:59 +00:00
Philip Ginsbach
805e9d8910 documentation: weak and strong aliases in the specification 2024-01-09 17:00:45 +00:00
Max Schaefer
9b7cfd88cd Clarify relationship of isFromSource and Element::fromSource. 2024-01-09 16:21:36 +00:00
Tony Torralba
a0f6b5ea10 Update test expectations 2024-01-09 17:00:20 +01:00
Tony Torralba
da4049e25c Go: Migrate AppenderOrSprinter model to models-as-data 2024-01-09 16:35:47 +01:00
Ian Lynagh
bf611feab3 Kotlin: Reformat code
Using:
    java -jar ktfmt-0.46-jar-with-dependencies.jar --kotlinlang-style java/kotlin-extractor/**/*.kt
2024-01-09 15:33:41 +00:00
Felicity Chapman
be0df9298f Update supported-versions-compilers.rst on 2.16.0 branch 2024-01-09 15:06:51 +00:00
Paolo Tranquilli
27160b8861 C++: add change note 2024-01-09 15:31:43 +01:00
erik-krogh
d0fcb7d1ed faster TypeScript extraction by not having to compute the "type-string" for a type every time 2024-01-09 15:30:55 +01:00
Paolo Tranquilli
0bfeadbf1f C++: add .def to exception to test 2024-01-09 15:30:27 +01:00
Paolo Tranquilli
270df940ff C++: add .def to exceptions to AV rule 32
This is used as textual includes in several projects for macro
metaprogramming, for example in `llvm-project` and in `swift` (and since
some time in our internal codebase as well).
2024-01-09 15:18:13 +01:00
Max Schaefer
3e8775daaa Automodel: Do not generate features for compiler-generated program elements.
These have dummy locations, which breaks certain invariants that break downstream processing.
2024-01-09 13:39:46 +00:00
Ian Lynagh
0bc1463ab0 Merge pull request #14941 from igfoo/igfoo/dff
Kotlin 2: Accept some location changes
2024-01-09 12:20:37 +00:00
Ian Lynagh
95f336c05b Merge pull request #14393 from igfoo/igfoo/no1.4
Kotlin: Remove 1.4 compatibility
2024-01-09 12:20:15 +00:00
Mathias Vorreiter Pedersen
1c81c9b6e3 Merge pull request #15262 from MathiasVP/fix-qldoc-on-cmpWithLinearBound
C++: Fix QLDoc on `cmpWithLinearBound`
2024-01-09 11:16:42 +00:00
Philip Ginsbach
225aff47ed documentation: update section on applicativity 2024-01-09 10:39:18 +00:00
Philip Ginsbach
493158a3f5 documentation: add section no strong and weak aliases 2024-01-09 10:39:18 +00:00
Tom Hvitved
f90201eb56 Data flow: Remove column from mayBenefitFromCallContext 2024-01-09 11:34:43 +01:00
Mathias Vorreiter Pedersen
f5e1e49761 C++: Fix QLDoc on 'cmpWithLinearBound' as a response to #15248. 2024-01-09 10:07:22 +00:00
Alex Denisov
0e73531aa9 Swift: upgrade to 5.9.2 2024-01-09 09:23:32 +01:00
Tony Torralba
3224b5c1b9 Merge pull request #15257 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-09 08:57:28 +01:00
github-actions[bot]
384cf90e8f Add changed framework coverage reports 2024-01-09 00:17:10 +00:00
maikypedia
6c8fbe877d Changes 2024-01-09 00:46:41 +01:00
Eric Bickle
f6fa7120d9 Merge branch 'main' into fix/update-gson-model 2024-01-08 15:46:14 -08:00
Sid Shankar
b26fef816a Rb: Report any extracted file as successfully extracted 2024-01-08 22:21:30 +00:00
Sid Shankar
fb660b8f05 Py: Report any extracted file as successfully extracted 2024-01-08 22:20:51 +00:00
Sid Shankar
e30a0d1e83 JS: Report any extracted file as successfully extracted 2024-01-08 22:19:33 +00:00
Robert Marsh
ec6d8da6b6 Swift: merge ControlFlowGraphParameter into ControlFlowGraphImplSpecific 2024-01-08 21:31:15 +00:00
Eric Bickle
929ce65af1 Remove zero width space characters. 2024-01-08 13:15:38 -08:00
Jeroen Ketema
9330afbe8a Merge pull request #15252 from jketema/builtin-rm
C++: Remove test that is no longer relevant
2024-01-08 20:38:46 +01:00
Edward Minnix III
e9467fe2d6 Merge pull request #14724 from egregius313/egregius313/java/environment-variable-injection
Java: Environment variable injection query
2024-01-08 13:06:31 -05:00
Mathias Vorreiter Pedersen
18bd0d0ad0 Merge pull request #14954 from microsoft/32-cpp-string-concatenation-library
32 cpp string concatenation library
2024-01-08 18:42:31 +01:00
Geoffrey White
2f6f376d2d Merge pull request #15230 from geoffw0/swiftui
Swift: Add dataflow tests for property wrappers and SwiftUI
2024-01-08 17:41:43 +00:00
Alexander Eyers-Taylor
98a2af8fed Merge pull request #15250 from github/release-prep/2.16.0
Release preparation for version 2.16.0
2024-01-08 16:58:40 +00:00
Cornelius Riemenschneider
c84e85d35d Merge pull request #15232 from github/criemen/bump-bazel-rules
Bazel: Bump dependant rules versions.
2024-01-08 17:49:21 +01:00
Ian Lynagh
d7cdad04dd Merge pull request #14895 from igfoo/igfoo/kt-snap
Kotlin: Add a 2.0.255 snapshot
2024-01-08 16:13:03 +00:00
Ed Minnix
55da62e9cf Remove stray comma
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2024-01-08 11:09:11 -05:00
Alex Ford
ef8ca55d92 Merge pull request #15203 from pwntester/patch-3
Ruby: Update Kernel.qll to include `Object.send` aliases
2024-01-08 15:32:57 +00:00
Chuan-kai Lin
a743fca3a5 Merge pull request #15243 from github/cklin/upgrade-delete-fixes-ruby
Ruby: Fix upgrade delete directives
2024-01-08 07:27:59 -08:00
Chuan-kai Lin
c4e5506a2c Merge pull request #15242 from github/cklin/upgrade-delete-fixes-csharp
C#: Fix upgrade delete directives
2024-01-08 07:27:40 -08:00
Chuan-kai Lin
d7e22b2ddd Merge pull request #15241 from github/cklin/upgrade-delete-fixes-cpp
C++: Fix upgrade delete directives
2024-01-08 07:27:27 -08:00
Chris Smowton
b7158ab1d7 Merge pull request #15231 from github/smowton/admin/note-java-21-support
Note Java 21 support
2024-01-08 15:19:48 +00:00
Ed Minnix
b8466b45be Update change note date 2024-01-08 09:39:11 -05:00
Edward Minnix III
2440075402 Remove off-topic reference
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-08 09:39:10 -05:00
Edward Minnix III
3816271b3e Remove redundant CWE link
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-08 09:39:10 -05:00
Ed Minnix
2eff6b351c Add comment 2024-01-08 09:39:09 -05:00
Ed Minnix
16bb19e176 Add OWASP and CERT references 2024-01-08 09:39:08 -05:00
Ed Minnix
9f974415c0 Add references to CWE-454 (External Initialization of Trusted Variables) 2024-01-08 09:39:07 -05:00
Ed Minnix
97b29bb965 Add Java Tutorial reference 2024-01-08 09:39:06 -05:00
Edward Minnix III
938d52b86f Docs review suggestions
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2024-01-08 09:39:05 -05:00
Ed Minnix
a528db8958 Use MapMutation instead of MethodCall 2024-01-08 09:39:05 -05:00
Ed Minnix
e14be0e971 Add BAD markers to samples 2024-01-08 09:39:04 -05:00
Ed Minnix
709649e9df Model replace and putIfAbsent 2024-01-08 09:39:03 -05:00
Ed Minnix
1544330f3f Minor fixes for code review 2024-01-08 09:38:53 -05:00
Ed Minnix
4b9b27c395 change note 2024-01-08 09:38:52 -05:00
Edward Minnix III
18e8a27fca Reworded name and description 2024-01-08 09:38:51 -05:00
Edward Minnix III
1f37e70d83 Fix typos
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2024-01-08 09:38:51 -05:00
Ed Minnix
51006aa088 Formatting fix 2024-01-08 09:38:50 -05:00
Ed Minnix
6eff72f99a Include other map mutations 2024-01-08 09:38:49 -05:00
Ed Minnix
4fc6f710a4 Fix alert message 2024-01-08 09:38:48 -05:00
Ed Minnix
1550f5df2a Environment variable injection query documentation 2024-01-08 09:38:47 -05:00
Ed Minnix
f1f0f50c92 TaintedEnvironmentVariableQuery docs 2024-01-08 09:38:47 -05:00
Ed Minnix
818c5de8d5 security-severity metadata 2024-01-08 09:38:46 -05:00
Ed Minnix
d4e2b84348 Cleanup helper dataflow configuration 2024-01-08 09:38:45 -05:00
Ed Minnix
f05f16116b Testing for Environment variable injection 2024-01-08 09:38:45 -05:00
Ed Minnix
8ed3f3c865 Move to library 2024-01-08 09:38:44 -05:00
Ed Minnix
65d05bf3de Add environment-injection to Model Validation 2024-01-08 09:38:43 -05:00
Ed Minnix
814885f7f6 Hudson environment variables models 2024-01-08 09:38:43 -05:00
Ed Minnix
028bd49211 org.apache.commons.exec models 2024-01-08 09:38:42 -05:00
Ed Minnix
b482b36b5f Initial ProcessBuilder support 2024-01-08 09:38:41 -05:00
Ed Minnix
ad32b81492 environment-injection sink 2024-01-08 09:38:41 -05:00
Ed Minnix
93025cc8cf Argument injection initial commit 2024-01-08 09:38:40 -05:00
Tony Torralba
7e6f2d1fc5 Merge pull request #14681 from atorralba/atorralba/java/weak-randomness-cve-coverage
Java: Add more sinks to the Insecure Randomness query
2024-01-08 15:33:03 +01:00
Robert Marsh
51acd1169c Swift: accept test output 2024-01-08 14:29:51 +00:00
Jeroen Ketema
e772531bb3 C++: Remove test that is no longer relevant 2024-01-08 15:24:41 +01:00
Geoffrey White
6636c76af8 Merge pull request #15122 from geoffw0/pwhash
Swift: Query for Use of an inappropriate cryptographic hashing algorithm on passwords
2024-01-08 14:11:02 +00:00
Ian Lynagh
02734be287 Kotlin: Fix building with 2.0.255 snapshots
A couple of extension functions were moved
2024-01-08 13:25:25 +00:00
Ian Lynagh
9bc0167566 Kotlin: Add a 2.0.255 snapshot
The current master isn't compatible with the 2.0.0-Beta1
2024-01-08 13:25:25 +00:00
github-actions[bot]
a6c8cc9551 Release preparation for version 2.16.0 2024-01-08 13:11:26 +00:00
Cornelius Riemenschneider
b0599edb7e Bazel: Bump dependant rules versions.
This doesn't bump rules_python, as there's some incompatible changes in that
which will need further addressing.
2024-01-08 11:21:02 +01:00
Arthur Baars
f4df5c9556 Merge pull request #15224 from aibaars/ruby-update-grammar
Ruby: update tree-sitter-ruby
2024-01-08 11:01:42 +01:00
Tamás Vajk
6b8ed7ee71 Merge pull request #15175 from tamasvajk/feature/arg-param-mapping
C#: Improve arg-param mapping logic to better handle arguments passed to `params` parameters
2024-01-08 10:42:38 +01:00
Tom Hvitved
25e2271b2f Merge pull request #15157 from hvitved/dataflow/fwd-flow-in-non-linear-rec
Data flow: Avoid unnecessary non-linear recursion in `fwdFlowIn`
2024-01-08 10:31:51 +01:00
Tamas Vajk
e67035f891 Fix comment in test file 2024-01-08 10:00:39 +01:00
Tamas Vajk
e70cb1f259 Code quality improvement: simplify DataFlowPrivate::isParamsArg 2024-01-08 10:00:39 +01:00
Tamas Vajk
91637d49d4 Fix null dereference false positive 2024-01-08 10:00:39 +01:00
Tamas Vajk
a354ca3264 Add null dereference test case with false positive 2024-01-08 10:00:39 +01:00
Tamas Vajk
35ee3246bb Add change note 2024-01-08 10:00:39 +01:00
Tamas Vajk
7daeeef3a1 C#: Improve arg-param mapping logic to consider named arguments passed to params parameters 2024-01-08 10:00:39 +01:00
Tamas Vajk
9bb807431d C#: Improve arg-param mapping logic to consider arguments passed to params parameters 2024-01-08 10:00:39 +01:00
Tamas Vajk
93b0eb9ba3 C#: Add more test cases to argument-parameter mapping test 2024-01-08 10:00:39 +01:00
Alvaro Muñoz
dbefc132de Apply suggestions from code review
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2024-01-07 10:31:50 +01:00
Marcono1234
3edfdc5ceb Java: Improve Regex flag parsing
Fixes:
- Flag `d` not being recognized
- Syntax for disabling flags (`-`) not being recognized
- Non-capturing group with flags erroneously containing `:` as literal
2024-01-06 04:15:09 +01:00
Chuan-kai Lin
66d2b9b7d2 Ruby: Fix upgrade delete directives 2024-01-05 14:21:52 -08:00
Chuan-kai Lin
6e25fb129b C#: Fix upgrade delete directives 2024-01-05 14:21:08 -08:00
Chuan-kai Lin
6f5bce046c C++: Fix upgrade delete directives 2024-01-05 14:20:30 -08:00
Robert Marsh
80452cc9f7 Swift: redirect consistency queries to new module 2024-01-05 21:28:21 +00:00
Robert Marsh
2d457e17d6 Swift: autoformat for CFG library 2024-01-05 21:28:07 +00:00
Robert Marsh
86f59a1c13 Swift: add AnnotatedExitNode to cfg to match prior interface 2024-01-05 21:25:08 +00:00
Robert Marsh
ea4855bc06 Swift: add change note for parameterized CFG library 2024-01-05 21:24:44 +00:00
Robert Marsh
2f0d052558 Swift: header comment for ControlFlowGraphParameter 2024-01-05 21:19:46 +00:00
Henry Mercer
93d9332ab4 Merge pull request #15236 from github/codeql-cli-2.15.5
Merge `codeql-cli-2.15.5` back to `main`
2024-01-05 18:49:40 +00:00
Harry Maclean
d1fc40ce4f Merge pull request #15234 from pwntester/patch-4
Ruby: Add `[]` to the methods returning an `ActionController::Parameters"
2024-01-05 15:41:48 +00:00
Chuan-kai Lin
35c7d3ab15 Merge pull request #15237 from github/cklin-patch-1
Python: Fix typo in upgrade script
2024-01-05 07:40:18 -08:00
Chuan-kai Lin
2924be554c Python: Fix typo in upgrade script 2024-01-05 07:15:21 -08:00
Henry Mercer
59edae0b17 Merge pull request #15229 from github/codeql-cli-2.15.4
Merge `codeql-cli-2.15.4` into `codeql-cli-2.15.5`
2024-01-05 15:12:22 +00:00
Felicity Chapman
8fdeb5691b Fix bad table formatting 2024-01-05 14:50:16 +00:00
Alvaro Muñoz
9146407f23 Add [] to the list of methods returning an `ActionController::Parameters" 2024-01-05 15:14:11 +01:00
Felicity Chapman
222c498ded Replace blog link with link to GitHub user docs 2024-01-05 14:13:38 +00:00
Arthur Baars
20022b6f3a Add test case 2024-01-05 14:39:30 +01:00
Arthur Baars
aad42b1b0d Add change note 2024-01-05 14:36:52 +01:00
Arthur Baars
6ed7223167 Ruby: update tree-sitter-ruby 2024-01-05 14:33:14 +01:00
Geoffrey White
0aec2b1bf4 Swift: Improve consistency of phrasing arouaround 'computationally hard'. 2024-01-05 13:21:01 +00:00
Ben Rodes
250ed48bf3 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-01-05 08:19:11 -05:00
Geoffrey White
a0ea7148cb Swift: Add GOOD and BAD comments in the sensitive data hashing examples as well. 2024-01-05 13:17:21 +00:00
Geoffrey White
80afa65751 Swift: Add GOOD and BAD comments. 2024-01-05 13:16:41 +00:00
Geoffrey White
657e4d4132 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2024-01-05 13:04:47 +00:00
Chris Smowton
48d48c16ab Note Java 21 support
Supported as of CodeQL release 2.15.4
2024-01-05 11:26:23 +00:00
Geoffrey White
2ab5e6f64c Swift: Add link / reference to CryptoSwift. 2024-01-05 11:02:55 +00:00
Michael Nebel
04a724f373 Java: Update the model diff workflow. 2024-01-05 11:28:47 +01:00
Rasmus Wriedt Larsen
95c24275f2 Merge pull request #15044 from RasmusWL/automated-subclass-models
Python: Automated subclass models
2024-01-05 10:43:48 +01:00
Michael Nebel
8fe73f72cc Java: Trigger Models as Data diff workflow on changes to the shared scripts. 2024-01-05 09:22:49 +01:00
Michael Nebel
8810f166ee Merge pull request #15228 from michaelnebel/modelgenoutputdir
Java/C#: Make it possible to specify subfolder location of generated model files.
2024-01-05 09:18:41 +01:00
Michael Nebel
a3e2d40392 Merge pull request #15222 from michaelnebel/csharp/updatestats
C#: Update DB stats.
2024-01-05 09:15:47 +01:00
Ben Rodes
2b325e99ce Merge branch 'main' into 32-cpp-string-concatenation-library 2024-01-04 15:28:28 -05:00
Benjamin Rodes
ed788e0a7a Updating test output. 2024-01-04 15:27:29 -05:00
Benjamin Rodes
e9bb3b4b28 Limiting << operator to ostream, and putting this check at the same location as the check for basic_string for + operator. 2024-01-04 15:25:47 -05:00
Chris Smowton
8144d90d4d Merge pull request #15227 from smowton/smowton/admin/add-test-buildless-maven-multimodule
Add test for Java buildless vs Maven multimodule projects
2024-01-04 16:36:44 +00:00
Geoffrey White
4016033f88 Swift: Add dataflow test cases for property wrappers. 2024-01-04 15:39:20 +00:00
Ian Wright
3668ba6b03 Merge pull request #15226 from github/z80coder/release-automodel-0.0.4
0.0.11 release of `automodel` extraction queries
2024-01-04 15:03:35 +00:00
Joe Farebrother
e8c0fceb81 Use post-update nodes for this access in void handler 2024-01-04 14:25:39 +00:00
Joe Farebrother
7d11e4486e Adress reveiw comments - update tests to path-problem and support all this qualifiers 2024-01-04 14:25:39 +00:00
Joe Farebrother
cdeac9b7f8 Add change note + fix qldoc 2024-01-04 14:25:39 +00:00
Joe Farebrother
b9754df390 Add case for void-returning handler methods 2024-01-04 14:25:39 +00:00
Joe Farebrother
00892e127f Add unit test + fix flow step 2024-01-04 14:25:38 +00:00
Joe Farebrother
c3cd40fc69 Add flow steps from page models 2024-01-04 14:25:38 +00:00
Owen Mansel-Chan
6f9242b1cb Merge pull request #15162 from owen-mc/go/stratify-cfg-succ
Go: Stratify `CFG::succ` to avoid recursion
2024-01-04 14:11:25 +00:00
Ben Rodes
8d84540a54 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2024-01-04 09:09:20 -05:00
Ian Wright
dab28edfa9 0.0.11 release of automodel extraction queries 2024-01-04 13:10:46 +00:00
Michael Nebel
e44b2d26ce Java/C#: Make it possible to specify subfolder location of generated model files. 2024-01-04 14:05:13 +01:00
Michael Nebel
682aef9548 Merge pull request #15212 from michaelnebel/csharp/stringreplace
C#: Fix Log forging false positive.
2024-01-04 13:38:29 +01:00
Geoffrey White
fb77e3733b Swift: Add a test of SwiftUI secure fields as a sensitive data source. 2024-01-04 12:34:33 +00:00
Chris Smowton
c90171c73f Add test for Java buildless vs Maven multimodule projects 2024-01-04 12:30:13 +00:00
Michael Nebel
4961e659b4 C#: Update DB stats. 2024-01-04 13:07:49 +01:00
Ian Wright
7c6d30b1a2 Merge pull request #15165 from github/z80coder/automodel-release
ensure `publish.sh` uses the latest `automodel` release
2024-01-04 11:58:59 +00:00
Owen Mansel-Chan
ce3097e9ce Fix manual models for String.valueOf(Object)
Add a neutral model for it, but also a summary model for `String.valueOf(CharSequence)`
2024-01-04 11:31:20 +00:00
Owen Mansel-Chan
0076f06ce7 Improve manual models of java.lang.Exception 2024-01-04 11:31:18 +00:00
Owen Mansel-Chan
e415c54c5e Reorder manual models of java.lang.Throwable 2024-01-04 11:31:16 +00:00
Owen Mansel-Chan
f52ea5c2fd Improve manual models of java.lang.Throwable 2024-01-04 11:31:14 +00:00
Ian Wright
468454645e better 2024-01-04 11:15:05 +00:00
Ian Wright
4530510450 check if provided argument is valid 2024-01-04 11:02:58 +00:00
Ian Wright
545b5e7e83 better comment 2024-01-04 11:02:58 +00:00
Ian Wright
fb44b9c7dd better comment 2024-01-04 11:02:57 +00:00
Ian Wright
e4a798e9cc better comment 2024-01-04 11:02:57 +00:00
Ian Wright
af940f5e41 don't specify defaults 2024-01-04 11:02:57 +00:00
Ian Wright
45b1790fa2 add publication warning 2024-01-04 11:02:57 +00:00
Ian Wright
337512174f wip
wip

wip

more checks

fix bug if release folder already exists

fix bug if release folder already exists

ensure branch has correct release; dry-run

simplify branches

step by step

fix paths

pushd/popd

pushd/popd

use bash

simplify

simplify

simplify

simplify

add dry run
2024-01-04 11:02:57 +00:00
Ian Wright
6572be668c get release version 2024-01-04 11:02:57 +00:00
erik-krogh
58dc14d5bb update expected output 2024-01-04 11:38:58 +01:00
erik-krogh
a9f2b3fad6 promote PropsTaintStep to a PreCallGraphStep 2024-01-04 10:45:22 +01:00
Geoffrey White
31af8b9024 Swift: Test SwiftUI flow sources. 2024-01-04 09:28:10 +00:00
Michael Nebel
5778720194 Merge pull request #15220 from github/workflow/coverage/update
Update CSV framework coverage reports
2024-01-04 09:39:58 +01:00
Owen Mansel-Chan
e2e91ebe1c Fix capitalization in predicate name
This was introduced by a copy-paste error
2024-01-04 07:08:37 +00:00
Owen Mansel-Chan
dfd25f705d Add pragma[nomagic] to top-level succ0 and remove cached 2024-01-04 07:06:55 +00:00
github-actions[bot]
63a1e8fcf7 Add changed framework coverage reports 2024-01-04 00:16:48 +00:00
Robert Marsh
41ac0fca85 Swift: use toString and Location from shared CFG library 2024-01-03 21:11:15 +00:00
Owen Mansel-Chan
90f07d2116 Add pragma[nomagic] to member 'succ0' 2024-01-03 16:54:58 +00:00
Owen Mansel-Chan
697aa609f4 Merge pull request #15211 from owen-mc/go/redefine-successfully-extracted-files
Go: report any extracted file as successfully extracted
2024-01-03 16:07:09 +00:00
Owen Mansel-Chan
14cffc3170 Merge pull request #15128 from owen-mc/go/fix-fp-incorrect-integer-conversion-signedness
Go: fix FP in incorrect integer conversion query relating to strict comparisons with MaxInt and MaxUint
2024-01-03 14:57:34 +00:00
Owen Mansel-Chan
bb44141390 Add QLDoc for succ0 2024-01-03 14:55:56 +00:00
Owen Mansel-Chan
032574f3d1 Make succ0 private 2024-01-03 14:55:42 +00:00
Owen Mansel-Chan
6ecf6ea3ac Rename succSimple to succ0 2024-01-03 14:51:57 +00:00
Jeroen Ketema
466536a914 Merge pull request #15214 from jketema/improve-test
C++: Improve special members test by printing more function details
2024-01-03 15:18:23 +01:00
Chris Smowton
723d3ee34c Merge pull request #15190 from fossilet/fix-class
Add missing `override`.
2024-01-03 13:47:24 +00:00
Ian Lynagh
7b48e2e4ae Merge pull request #15049 from igfoo/igfoo/UnderscoreIdentifier
Kotlin 2: Accept changes in query-tests/UnderscoreIdentifier
2024-01-03 13:43:24 +00:00
Owen Mansel-Chan
0279e4903f Mention query in change note 2024-01-03 13:02:49 +00:00
Harry Maclean
c96be39474 Merge pull request #15048 from hmac/hmac-model-editor-ruby-modules
Ruby: Model editor improvements
2024-01-03 12:53:43 +00:00
Jeroen Ketema
ae135ac633 C++: Improve special members test by printing more function details
Without this it is very hard to see what specifically is defaulted/deleted.
2024-01-03 13:35:25 +01:00
Michael Nebel
b083c35b40 Merge pull request #15174 from michaelnebel/csharp/dotnet8runtimemodels
C#: .NET 8 Runtime models.
2024-01-03 11:30:59 +01:00
Michael Nebel
0c78cccf62 C#: Add change note. 2024-01-03 11:12:35 +01:00
Michael Nebel
9763c00f99 C#: Update expected test output. 2024-01-03 11:09:35 +01:00
Michael Nebel
31e12f7a06 C#: Recognize all overloads of String.Replace as a replace method. 2024-01-03 11:08:05 +01:00
Jeroen Ketema
a205a03f3c Merge pull request #15210 from jketema/function-types
C++: Support more function types
2024-01-03 11:02:58 +01:00
Michael Nebel
0c4e1fca1b C#: Add testcase with false positive for CWE-117 (overload of String.Relace not correctly recognized as a sanitizer). 2024-01-03 10:56:56 +01:00
Owen Mansel-Chan
13b00bae17 Update test expectation 2024-01-02 22:38:30 +00:00
Eric Bickle
4fa5b2ae41 Add change nodes for GSON coverage 2024-01-02 14:17:23 -08:00
Eric Bickle
0cd89bf815 Merge branch 'main' into fix/update-gson-model 2024-01-02 14:05:33 -08:00
Owen Mansel-Chan
9f8b5bccc2 Go: report any extracted file as successfully extracted 2024-01-02 21:39:28 +00:00
Jeroen Ketema
262985a760 C++: Add change note 2024-01-02 16:32:24 +01:00
Harry Maclean
22830c7311 Ruby: Address review comments 2024-01-02 14:39:53 +00:00
Jeroen Ketema
9c1de5b2b6 C++: Support more function types 2024-01-02 15:13:20 +01:00
Harry Maclean
4c6855ed93 Ruby: Address review comments 2024-01-02 13:51:12 +00:00
Jeroen Ketema
671343619f Merge pull request #15197 from jketema/attr-expr-arg
C++: Support attribute arguments that are expressions
2024-01-02 13:34:44 +01:00
Jeroen Ketema
f59a00c5ea Update cpp/ql/lib/semmle/code/cpp/Specifier.qll
Co-authored-by: Calum Grant <42069085+calumgrant@users.noreply.github.com>
2024-01-02 12:52:18 +01:00
Alvaro Muñoz
2964aef083 Update Kernel.qll to include send aliases
Add `public_send` and `__send__` as Code Injection sinks as proposed by @vcsjones
2023-12-28 19:08:03 +01:00
Owen Mansel-Chan
19c5d1fd1d Merge pull request #15181 from felickz/go-xxe-libxml2
GO - Add sink for libxml2 in go/xml/xpath-injection via XPath.qll
2023-12-24 22:04:46 +00:00
Jeroen Ketema
ad2fb7c6d5 C++: Support attribute arguments that are expressions 2023-12-23 10:04:50 +01:00
Aditya Sharad
bbe3269b8c Merge pull request #15189 from github/adityasharad/merge/3.12-main
Merge `rc/3.12` into `main`
2023-12-22 11:26:37 -08:00
Robert Marsh
a9c917010f Swift: fix missing keypath CFGs 2023-12-22 17:55:00 +00:00
Chad Bentz
730f6ed5b0 Merge branch 'main' into go-xxe-libxml2 2023-12-22 11:57:43 -05:00
Chad Bentz
86c258df7e mention sinks in changelog 2023-12-22 16:56:54 +00:00
Chad Bentz
cf25cc9531 Add docs 2023-12-22 16:53:21 +00:00
Edward Minnix III
d6d76fa4f1 Merge pull request #15183 from egregius313/egregius313/java/fix-weak-hashing-adddition
Java: Fix minor error in `java/potentially-weak-cryptographic-algorithm`
2023-12-22 11:38:55 -05:00
Edward Minnix III
be50696746 Merge pull request #100 from atorralba/atorralba/java/weak-hashing-suggestion
Java: Generalize MaybeBrokenCryptoAlgorithmQuery.qll
2023-12-22 09:03:59 -05:00
Jeroen Ketema
9c039c4a08 Merge pull request #12125 from jketema/unique-function
C++: Ensure that only one `Function` exists for every function
2023-12-22 13:56:35 +01:00
Jeroen Ketema
1cb02475a8 Update cpp/ql/lib/change-notes/2023-12-22-unique-function.md 2023-12-22 13:33:20 +01:00
Jeroen Ketema
d4f9e89b5b C++: Add change note 2023-12-22 13:20:38 +01:00
Mathias Vorreiter Pedersen
ecd2003c14 Merge pull request #15191 from MathiasVP/show-indirections-in-ssainternals-2
C++: Show base variable in SSA variable `toString`s
2023-12-22 12:58:12 +01:00
Arthur Baars
c5b6f48569 Merge pull request #15127 from smowton/smowton/feature/buildless-tests
Add buildless tests
2023-12-22 11:39:16 +01:00
Mathias Vorreiter Pedersen
ffdd28eaa9 C++: Show base variable in SSA variable 'toString's. 2023-12-22 10:29:31 +01:00
Tony Torralba
67f8bcce44 Merge pull request #14752 from masterofnow/LoadClassNoSignatureCheck
Java: Insecure Loading of Class in Android App without Package Signature Checking
2023-12-22 10:24:34 +01:00
Tony Torralba
8ad787f3b8 Java: Generelize MaybeBrokenCryptoAlgorithmQuery.qll 2023-12-22 10:15:40 +01:00
fossilet
611f1cede7 Add missing override. 2023-12-22 15:52:02 +08:00
Ed Minnix
8051cfcef5 Fix tests and fix getStringValue method 2023-12-21 22:48:08 -05:00
Ed Minnix
6455e1893d Add more test cases 2023-12-21 22:48:08 -05:00
Ed Minnix
7f9dff2dc7 Fix minor error in Weak Hashing 2023-12-21 22:48:07 -05:00
Aditya Sharad
b1803d0ac2 Merge rc/3.12 into main 2023-12-21 16:40:51 -08:00
masterofnow
0fd09759df Added sample java file for qhelp to render correctly. 2023-12-22 08:31:23 +08:00
masterofnow
cb5733d647 Apply suggestions from code review
Update to documentation.

Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-22 08:25:05 +08:00
AlexDenisov
e43fafc249 Merge pull request #15116 from github/alexdenisov/improve-swift-autobuilder-further
Swift: separate installation of dependencies and autobuilding
2023-12-21 17:35:34 +01:00
Jeroen Ketema
f7da6f56f3 C++: Ensure that only one Function exists for every function 2023-12-21 16:33:22 +01:00
Stephan Brandauer
a9d21cef01 Update MaD Declarations after Triage 2023-12-21 15:39:03 +01:00
Mathias Vorreiter Pedersen
7a10d88f36 Merge pull request #15185 from MathiasVP/show-indirections-in-ssainternals 2023-12-21 13:52:14 +01:00
masterofnow
7162540faf Added options, .qhelp and .expected file for unit test. 2023-12-21 19:57:37 +08:00
Mathias Vorreiter Pedersen
1007c4fc83 C++: Show indirections when printing SSA variables. 2023-12-21 10:38:58 +01:00
Tony Torralba
55f15d2deb Merge pull request #15182 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-21 09:39:36 +01:00
masterofnow
8dc522fb5f Merge remote-tracking branch 'origin/LoadClassNoSignatureCheck' into LoadClassNoSignatureCheck 2023-12-21 12:15:06 +08:00
masterofnow
25c818f425 Added unit test files. 2023-12-21 12:13:00 +08:00
Chad Bentz
7c93a2c825 Add const XMLParseNoEnt to stub 2023-12-21 00:49:14 +00:00
Chad Bentz
667861f575 depstubber with latest change
- still failing with ./tst.go:195:25: undefined: parser.XMLParseNoEnt
2023-12-21 00:42:37 +00:00
Chad Bentz
6f3867d804 stub the type Parser + the function New
(it will automatically make stubs for all the methods on that type)

Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-12-20 19:25:48 -05:00
Chad Bentz
4c46be1ed0 Use 3 arg overload on Method for hasQualifiedName for Package/Name/Type 2023-12-21 00:23:01 +00:00
github-actions[bot]
d77e8df800 Add changed framework coverage reports 2023-12-21 00:16:28 +00:00
Andrew Eisenberg
0cc4ba6552 Merge pull request #15164 from github/aeisenberg/system-reqs 2023-12-20 12:13:51 -08:00
Andrew Eisenberg
c6d1b6cb58 Update docs/codeql/codeql-overview/system-requirements.rst 2023-12-20 11:51:23 -08:00
yoff
b83c743810 Merge pull request #14944 from yoff/python/captured-variables-basic
Python: Basic implementation of variable capture
2023-12-20 16:53:48 +01:00
Max Schaefer
706dee927d Merge pull request #15160 from github/max-schaefer/csharp-xss
C#: Mention more XSS sanitisation options in query help.
2023-12-20 15:39:25 +00:00
Rasmus Lerchedahl Petersen
da4aef80e9 Revert "Python: make it a real consistency check"
This reverts commit 45411f4a93.
2023-12-20 16:15:17 +01:00
Max Schaefer
fea69263f3 Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-12-20 15:06:03 +00:00
Rasmus Lerchedahl Petersen
0f89f69555 Python: fix VariableWrite and remove unneded step 2023-12-20 15:45:18 +01:00
Tony Torralba
1b9f59efa7 Merge pull request #14646 from github/java/update-mad-decls-after-triage-2023-10-31T15-52-01
Java: Update MaD Declarations after Triage
2023-12-20 15:37:19 +01:00
Tony Torralba
39708524e7 Minor fixes
- Query ID
- MethodAccess -> MethodCall
- Redundant import
- Formatting
2023-12-20 15:31:09 +01:00
Rasmus Lerchedahl Petersen
d039ceb689 Python: add test for fields 2023-12-20 15:23:45 +01:00
Rasmus Lerchedahl Petersen
706e9dc896 Python: fix compilation 2023-12-20 15:23:33 +01:00
Tony Torralba
e744d974e8 Merge pull request #14580 from github/java/update-mad-decls-after-triage-2023-10-24T15-42-01
Java: Update MaD Declarations after Triage
2023-12-20 15:01:24 +01:00
Tony Torralba
2df8bcb9dc Update java/ql/lib/change-notes/2023-10-31-new-models.md
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-12-20 14:59:07 +01:00
Rasmus Lerchedahl Petersen
45411f4a93 Python: make it a real consistency check 2023-12-20 14:53:37 +01:00
Rasmus Lerchedahl Petersen
215b146f06 Python: remove unused member predicate 2023-12-20 14:45:00 +01:00
Rasmus Lerchedahl Petersen
491ca3f1e6 Python: hide synthetic variable node 2023-12-20 14:42:45 +01:00
Rasmus Lerchedahl Petersen
afb3d1da6f Python: move capture node to DataFlowPrivate 2023-12-20 14:41:17 +01:00
Rasmus Lerchedahl Petersen
3cea46fe7b Python: fix typos 2023-12-20 14:35:10 +01:00
erik-krogh
fe3e768414 update expected output of tests 2023-12-20 14:10:36 +01:00
Rasmus Lerchedahl Petersen
f8417b0dd8 Merge branch 'main' of https://github.com/github/codeql into python/captured-variables-basic 2023-12-20 13:16:42 +01:00
yoff
19813c8ba6 Merge pull request #15166 from yoff/python/add-scope-entry-definition-nodes
Python: Add scope entry definition nodes
2023-12-20 13:14:11 +01:00
Rasmus Lerchedahl Petersen
7749b8e60e Python: add change-note 2023-12-20 12:53:37 +01:00
Mathias Vorreiter Pedersen
be3f9d3078 Merge pull request #15173 from jketema/unneeded 2023-12-20 12:43:42 +01:00
Max Schaefer
66fe32ab82 Python: Mention more sanitisation options in py/url-redirection qhelp. 2023-12-20 11:31:07 +00:00
Rasmus Lerchedahl Petersen
07c88dc0be Python: remove unnecessary post-processing
also, it is slightly incorrect...
2023-12-20 12:09:15 +01:00
Rasmus Lerchedahl Petersen
169d7a3c98 Python: Add scope entry definition nodes
otherwise we confuse captured variables
in the single scope entry cfg node. Now
we have one for each defined variable.
2023-12-20 12:09:00 +01:00
Rasmus Lerchedahl Petersen
3b7e29bed6 Python: add test for crosstalk 2023-12-20 12:08:05 +01:00
Tamás Vajk
d3c685a41a Merge pull request #15156 from tamasvajk/standalone/temp-folder-structure
C#: Fix working directory structures in standalone
2023-12-20 11:57:42 +01:00
masterofnow
e85c4b5bf6 Update query from code review feedback to express it as a dataflow problem. 2023-12-20 18:28:16 +08:00
Tamas Vajk
b1413a1d98 Add readonly to tempFolderPath field 2023-12-20 11:16:52 +01:00
Mathias Vorreiter Pedersen
44124158c4 Merge pull request #15078 from alexet/unique-pointer-temporary
CPP: Add query for detecting invalid uses of temporary unique pointers.
2023-12-20 11:16:01 +01:00
Michael Nebel
089cad0ea8 C#: Update expected test output for FlowSummaries tests. 2023-12-20 11:10:30 +01:00
Tamas Vajk
90fc54ca05 Apply review feedback: use Lazy<> instead of locking 2023-12-20 11:04:39 +01:00
Michael Nebel
9236a10d98 C#: Update .NET Runtime models (.NET 8). 2023-12-20 10:56:38 +01:00
Koen Vlaswinkel
32d1f057df Merge pull request #15159 from github/koesie10/csharp-model-editor-tests
C#: Classify test support files in model editor queries
2023-12-20 10:54:24 +01:00
Mathias Vorreiter Pedersen
57e0804cef Update cpp/ql/src/Security/CWE/CWE-416/UseOfUniquePointerAfterLifetimeEnds.ql
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-12-20 10:52:42 +01:00
Tamas Vajk
dc36cdbede Only delete dotnet-install.sh if not in scratch directory 2023-12-20 10:51:23 +01:00
Max Schaefer
7c4275ad44 Address review comments. 2023-12-20 09:36:07 +00:00
Michael Nebel
86881b4e1e C#: Add empty definitions for all extensible model related predicates. 2023-12-20 10:22:43 +01:00
Michael Nebel
5796297fc3 C#/Java: Update the model generator script usage examples and description. 2023-12-20 10:17:08 +01:00
Jeroen Ketema
12abf07d1d C++: Remove unneeded extractor option 2023-12-20 09:58:32 +01:00
Michael Nebel
6831775a8d Merge pull request #15154 from michaelnebel/csharp/morestubs
C#: Replace more hand written stubs with generated ones.
2023-12-20 09:54:19 +01:00
Koen Vlaswinkel
d09fadf22e C#: Introduce TestRelatedFile class 2023-12-20 09:53:51 +01:00
Owen Mansel-Chan
9697d76c2d Stratify CFG::succ to avoid recursion
The first level doesn't deal with defer statements properly.
The second level usees the first level to deal with them properly.
2023-12-19 21:33:13 +00:00
Óscar San José
b55c299533 Merge pull request #15112 from fossilet/upstream_main
Fix sphinx.add_lexer.
2023-12-19 21:28:24 +01:00
Tom Hvitved
5be4fe1887 Data flow: Avoid unnecessary non-linear recursion in fwdFlowIn 2023-12-19 21:03:03 +01:00
Aditya Sharad
fba5ad5342 Merge pull request #15153 from github/post-release-prep/codeql-cli-2.15.5
Post-release preparation for codeql-cli-2.15.5
2023-12-19 09:11:26 -08:00
Edward Minnix III
06544e989e Merge pull request #15126 from egregius313/egregius313/java/minor/add-replace-to-mapmutator
Java: Add the `Map#replace` and `Map#replaceAll` methods to `MapMutator` in `Maps.qll`
2023-12-19 12:10:34 -05:00
Andrew Eisenberg
35578deccb Update system requirements for ruby 2023-12-19 09:02:55 -08:00
Rasmus Wriedt Larsen
72687e0368 Merge branch 'main' into automated-subclass-models 2023-12-19 17:08:25 +01:00
Rasmus Wriedt Larsen
56d86f9980 Revert "NEVER MERGE: Ensure we don't use site-packages stuff"
This reverts commit 0ed363bd79f9d3f9e9a905c1192adfe88f1faffb.
2023-12-19 17:07:40 +01:00
Rasmus Wriedt Larsen
9863309631 Python: auto subclass capture
(locally done with split + 5 x modeling runs + join, but squashed into one commit)
2023-12-19 17:07:40 +01:00
Rasmus Wriedt Larsen
ca7b69ec1f NEVER MERGE: Ensure we don't use site-packages stuff 2023-12-19 17:07:40 +01:00
Rasmus Wriedt Larsen
de2a563a8e Python: Delete old auto subclass capture files
In the final git history this only deletes one file, but when working
locally I deleted ALL files.
2023-12-19 17:07:21 +01:00
Rasmus Wriedt Larsen
bf271d7f0f Python: refactor how subclasses are specified
A little more explicit, so less prone to be overlooked when adding a new spec
2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
32251a041b Python: Fill getFullyQualifiedName for rest of subclassing specs 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
a78f13cb2e Python: Ignore known subclass models 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
24a3a23c9c Python: Regenerate rest_framework models 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
3e878f5a0b Python: Model django response subclass relationship 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
abe6f1639a Python: Add example of models subclassing problem
In reality, we only want to model this as a `rest_framework.response.Response`, since our .qll modeling is more precise for rest-framework responses than if we also modeled it as a basic django http response. (specifically, that default mime-type handling is way different).
2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
5c89c38c92 Python: Add the rest_framework models for demonstration purposes
Although it might be hidden by github UI by default, it could be
interesting for a reviewer to notice the effect changes in the modeling
query has to the results in this file.
2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
ee3319b7b0 Python: Make split/join executable (chmod +x) 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
cfd3f8938e Python: Highlight split/join subclass files usage 2023-12-19 17:07:02 +01:00
Rasmus Wriedt Larsen
933938d926 Python: Make rest_framework tests runnable again 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
3e6423a13c Python: Add ability to split and join autogenerated yml files
Verified by joining all files, splitting again, and observing no diff in
git.

(these operations only take a few seconds on my local machine, so
shouldn't be too much of an issue)
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
f30a3b0aba Python: Script: Improve performance by using C++ impl
these changes took performance for loading and writing all files locally
29.60s to 3.17s

(that is, using `gather_from_existing`)
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
13c2378b58 Python: Update a few QLdocs 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
2f5d51c752 Python: treat auto subclass capture models as auto-generated
Co-authored-by: Taus <tausbn@github.com>
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
937af906fd Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
0fe29b6a86 Python: Recover subclass finder .expected after cherry picking commits from https://github.com/github/codeql/pull/15030 2023-12-19 17:07:01 +01:00
Rasmus Lerchedahl Petersen
75f9eeb4e9 Python: adjust test expectations
mostly removing of nodes from the graph.
One result lost:
```
check("submodule.submodule_attr", submodule.submodule_attr, "submodule_attr", globals()) #$ MISSING:prints=submodule_attr
```
2023-12-19 17:07:01 +01:00
Rasmus Lerchedahl Petersen
c563c7fbe4 Python: remove control flow nodes
for module entry definitions from the dataflow graph.
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
e050f2e998 Python: Adjust subclass finder to no ESSA nodes
But the new test results looks very strange indeed!
2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
60b784a919 Python: Don't filter subclass tests away 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
a9a0216c43 Python: Add change-note 2023-12-19 17:07:01 +01:00
Rasmus Wriedt Larsen
fa3e16adea Python: Refactor taint-sinks meta queries 2023-12-19 17:07:01 +01:00
Koen Vlaswinkel
0f71df9c41 C#: Extend TestFile instead of separate class 2023-12-19 16:37:49 +01:00
Ed Minnix
a93d6dd956 Change note 2023-12-19 10:28:23 -05:00
Ed Minnix
ce130c6ed5 Add replace to MapMutator 2023-12-19 10:23:06 -05:00
Jeroen Ketema
4009b42891 Merge pull request #15146 from jketema/almost-empty-pch
C++: Update test after extractor changes
2023-12-19 16:20:35 +01:00
Max Schaefer
dc8be7bbf0 Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-12-19 15:09:42 +00:00
Benjamin Rodes
f26330e6bd Removing redundant/bad string type check. 2023-12-19 09:41:29 -05:00
Benjamin Rodes
6fb01925d0 Updating test ql file and applying formatting. 2023-12-19 09:39:46 -05:00
Tamas Vajk
278d9b1dfb Fix integration tests 2023-12-19 15:33:46 +01:00
Benjamin Rodes
48866e5358 Updates to address PR comments. 2023-12-19 09:33:07 -05:00
Michael Nebel
681ac7e5f0 C#: Update tests (and expected output) to use the generated EntityFramework stubs. 2023-12-19 15:22:45 +01:00
Michael Nebel
80f3c6cc2b C#: Manual changes to the project dependecies to avoid conflicts when multiple projects are loaded from source. 2023-12-19 15:21:56 +01:00
Michael Nebel
272f3265ea C#: Delete the handwritten EntityFramework stubs. 2023-12-19 15:20:53 +01:00
Tamas Vajk
016d200355 Fix unit tests 2023-12-19 15:14:47 +01:00
Tony Torralba
c8a369d9ef Update java/ql/lib/ext/jakarta.persistence.model.yml 2023-12-19 14:58:07 +01:00
Ben Rodes
387eddadad Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-12-19 08:48:51 -05:00
Ben Rodes
29a0da6cd9 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-19 08:48:20 -05:00
Ben Rodes
49728571cf Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-12-19 08:47:58 -05:00
Ben Rodes
66f725dd05 Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-19 08:47:48 -05:00
Mathias Vorreiter Pedersen
cfaa2d881a Merge pull request #15152 from MathiasVP/fix-unnecessary-evaluation-of-debug-strings
C++: Fix unnecessary evaluation of debug strings
2023-12-19 13:59:20 +01:00
Koen Vlaswinkel
d22acfb449 C#: Classify test support files in model editor queries 2023-12-19 13:49:53 +01:00
Tamas Vajk
ad394a0d84 C#: Download dotnet-install.sh to the scratch dir 2023-12-19 13:11:22 +01:00
Tamas Vajk
dd64b436c0 C#: Fix working directory structures in standalone 2023-12-19 12:54:00 +01:00
Max Schaefer
71dbd1a059 C#: Mention more XSS sanitisation options in query help. 2023-12-19 11:33:26 +00:00
Mathias Vorreiter Pedersen
95cd31fce3 C++: Silence warnings. 2023-12-19 12:29:16 +01:00
Mathias Vorreiter Pedersen
4844c43f06 C++: Cleanup now that we're back to an abstract class. 2023-12-19 12:11:38 +01:00
Mathias Vorreiter Pedersen
937e0ee8d2 C++: Go back to abstract classes. 2023-12-19 12:10:57 +01:00
Michael Nebel
37b510cac0 C#: Add stubs for entity framework. 2023-12-19 11:52:59 +01:00
Mathias Vorreiter Pedersen
b6974d674c Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DebugPrinting.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-19 11:47:46 +01:00
Michael Nebel
e12165707f C#: Delete the hand written stub System.Data.cs. 2023-12-19 11:37:33 +01:00
Michael Nebel
19a4cf3a7b C#: Update test cases that depends on System.Data.cs to use generated stubs. 2023-12-19 11:37:32 +01:00
Michael Nebel
7cb758a61b C#: Add stubs for System.Data.OleDb. 2023-12-19 11:37:32 +01:00
github-actions[bot]
8f72b0e4f7 Post-release preparation for codeql-cli-2.15.5 2023-12-19 10:32:57 +00:00
Mathias Vorreiter Pedersen
8230a90db6 C++: No need for another 'stars' predicate in 'PrintIRUtilities'. 2023-12-19 11:22:27 +01:00
Rasmus Wriedt Larsen
2305d55967 Merge pull request #15101 from yoff/python/update-InlineTaintTestPaths-to-new-api
Python: update to new API update is in a comment, so compilation never failed in CI.
2023-12-19 11:10:55 +01:00
Mathias Vorreiter Pedersen
9b25834771 C++: Use parameterized modules instead of abstract classes and predicates to handle debug printing. 2023-12-19 11:08:41 +01:00
Jorge
f8cfd698fa Merge branch 'main' into seclab/dotjs 2023-12-19 10:44:52 +01:00
Mathias Vorreiter Pedersen
501645920f C++: Move private stuff from 'DataFlowUtil' to public stuff 'DataFlowPrivate'. Also make 'PostUpdateNodeImpl' public in 'DataFlowUtil'. Sadly, this means that it's visible at the query level (as DataFlow::PostUpdateNodeImpl), but I've added a big INTERNAL QLDoc on it to make sure people don't use it. 2023-12-19 10:41:35 +01:00
yoff
1417c2cdd5 Update python/ql/lib/change-notes/2023-12-18-support-variable-capture.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-19 10:08:59 +01:00
yoff
a60c52b8b7 Merge branch 'main' into python/captured-variables-basic 2023-12-18 23:44:46 +01:00
Rasmus Lerchedahl Petersen
8b7b58279a Python: add change-note
I chose `category: majorAnalysis`, the description is
"An API has changed in a way that may affect the results produced
by a query that consumes the API."
The API in question here is `flowPath` which is used by all our
data flow queries.
2023-12-18 23:42:39 +01:00
Jeroen Ketema
180e752a23 C++: Update test after extractor changes
Also remove incorrect FP comment. clang does not support `#pragma hdrstop` in
its non-cl-emulation mode.
2023-12-18 23:30:13 +01:00
Aditya Sharad
d540fc0794 Merge pull request #15141 from github/release-prep/2.15.5
Release preparation for version 2.15.5
2023-12-18 14:30:01 -08:00
Rasmus Lerchedahl Petersen
78c484faab Python: remove support for capturing callbacks
This will be added in a follow-up PR instead.
2023-12-18 23:24:57 +01:00
Rasmus Lerchedahl Petersen
6e4011d2ae Python: rename sythetic nodes
Avoid the term "closure" as it is somewhat academic.
2023-12-18 23:16:51 +01:00
Rasmus Lerchedahl Petersen
c0b3d98c6d Python: Add a bit more detail to comment. 2023-12-18 22:44:26 +01:00
Rasmus Lerchedahl Petersen
456209b269 Python: Move predicate closer to its use 2023-12-18 22:29:09 +01:00
Rasmus Lerchedahl Petersen
86bb884f67 Python: better comment 2023-12-18 22:26:46 +01:00
github-actions[bot]
19af35b29a Release preparation for version 2.15.5 2023-12-18 21:22:44 +00:00
Rasmus Lerchedahl Petersen
7324177786 Python: address QL alerts 2023-12-18 22:20:28 +01:00
Rasmus Lerchedahl Petersen
25c83dc70d Python: adjust comment 2023-12-18 22:15:37 +01:00
Rasmus Lerchedahl Petersen
bf1ad23678 Python: add comments
- on debug predicates
- on JS implementation
2023-12-18 22:00:13 +01:00
Rasmus Lerchedahl Petersen
c88d686ce4 Python: move SynthCapturePostUpdateNode
next to `SynthCaptureNode`
2023-12-18 21:37:52 +01:00
yoff
f50817e92a Merge pull request #15104 from RasmusWL/fewer-meta-queries
Python: Remove `@tags meta` from internal debug queries
2023-12-18 21:27:33 +01:00
yoff
e0c027f13c Merge pull request #14848 from hvitved/python/shared-type-tracking
Python: Adopt shared type tracking library
2023-12-18 21:14:42 +01:00
Mathias Vorreiter Pedersen
41c49ae05b Merge pull request #15136 from MathiasVP/fix-joins-in-use-after-free 2023-12-18 17:18:06 +01:00
Edward Minnix III
56921a6e21 Merge pull request #14040 from egregius313/egregius313/weak-hashing-properties
Java: Add support for algorithm names specified in `.properties` files to `java/potentially-weak-cryptographic-algorithm`
2023-12-18 09:38:58 -05:00
Tamás Vajk
d5f47a3d75 Merge pull request #15124 from tamasvajk/feature/telemetry/extraction-information
C#: Add telemetry query to report extractor information
2023-12-18 15:30:35 +01:00
Tamás Vajk
c5cf0641bf Merge pull request #15131 from tamasvajk/standalone/file-name
C#: Exclude not existing or problematic files from standalone extraction
2023-12-18 15:30:01 +01:00
Arthur Baars
4de335e8a2 Merge pull request #15134 from github/alexdenisov/skip-codesign-tracing
Swift: do not trace codesign binary
2023-12-18 15:26:37 +01:00
Rasmus Lerchedahl Petersen
d6544cc550 Python: remove consistency exclusion 2023-12-18 15:24:49 +01:00
Mathias Vorreiter Pedersen
d308bb40a0 Merge pull request #15132 from MathiasVP/fix-joins-in-isModifiableAtImpl
C++: Fix joins in `isModifiableAtImpl`
2023-12-18 15:01:36 +01:00
Paolo Tranquilli
3cb14c63ee Merge pull request #15135 from github/redsun82/fix-cmake-bazel-version
Bazel/CMake: use bazelisk to use correct bazel version
2023-12-18 15:01:10 +01:00
Mathias Vorreiter Pedersen
aafde4d18d C++: Fix joins in 'cpp/use-after-free'. 2023-12-18 14:49:09 +01:00
Tamas Vajk
f9c6d5e808 Ensure files are only enumerated once 2023-12-18 14:39:02 +01:00
Alex Denisov
6cbf8abf59 Swift: do not trace codesign binary 2023-12-18 14:24:07 +01:00
Tamas Vajk
b14d26ab62 C#: Exclude not existing or problematic files from extraction 2023-12-18 14:10:56 +01:00
Tom Hvitved
a776132a10 Python: Deprecate more predicates 2023-12-18 13:05:17 +01:00
Jorge
b81fbd7669 Add change note 2023-12-18 12:55:30 +01:00
Paolo Tranquilli
452b8d22a3 Bazel/CMake: use bazelisk to use correct bazel version
(cherry picked from commit 819fc52854)
2023-12-18 12:49:54 +01:00
Tamas Vajk
1a8857dab8 Create problematic additional file in integration test 2023-12-18 12:32:24 +01:00
maikypedia
a3ae8bd2c0 Add change note 2023-12-18 12:28:35 +01:00
maikypedia
8b2accca83 Add fixes and suggestions 2023-12-18 12:20:32 +01:00
Mathias Vorreiter Pedersen
50b754b6c1 Merge pull request #15129 from MathiasVP/fix-joins-in-wrong-type-format-argument
C++: Fix joins in `cpp/wrong-type-format-argument`
2023-12-18 12:17:17 +01:00
Mathias Vorreiter Pedersen
f5c52ac496 C++: Fix joins in 'isModifiableAtImpl'. 2023-12-18 12:02:33 +01:00
Michael Nebel
d8fdba009a Merge pull request #15119 from michaelnebel/csharp/stubgenimprovements
C#: Escape method names in stub generation.
2023-12-18 11:35:29 +01:00
Michael Nebel
b10137c24c C#: Pick the first version number encountered. 2023-12-18 11:02:49 +01:00
Tamas Vajk
de1134ac48 C#: Add linux-only integration test 2023-12-18 10:55:11 +01:00
Mathias Vorreiter Pedersen
8ed9fbb295 Merge pull request #15123 from MathiasVP/fix-fps-in-double-free
C++: Fix FPs in `cpp/double-free` and `cpp/use-after-free`
2023-12-18 10:44:18 +01:00
Mathias Vorreiter Pedersen
e88c6888bc Merge pull request #15121 from MathiasVP/fix-joins-in-av-rule-145
C++: Fix joins in `AV Rule 145`
2023-12-18 10:42:46 +01:00
Tamas Vajk
3f843d820c Add telemetry query for known/unknown expression kinds 2023-12-18 10:02:32 +01:00
Mathias Vorreiter Pedersen
3897befbe2 C++: Fix joins in 'cpp/wrong-type-format-argument'. 2023-12-18 09:49:34 +01:00
Tony Torralba
9446249e94 Merge pull request #15012 from atorralba/atorralba/java/fix-missing-pinning-fp
Java: Fix FPs in Missing certificate pinning
2023-12-18 09:37:18 +01:00
Tony Torralba
0524289a73 Update java/ql/src/Security/CWE/CWE-327/MaybeBrokenCryptoAlgorithm.ql 2023-12-18 08:50:10 +01:00
Tom Hvitved
020a049d30 Merge pull request #15103 from hvitved/ruby/simple-pattern-flow
Ruby: Model simple pattern matching as value steps instead of taint steps
2023-12-18 08:49:11 +01:00
Mathias Vorreiter Pedersen
2eda5927d9 Merge pull request #15125 from geoffw0/launchoptions
Swift: Add more test cases for application(...launchOptions...).
2023-12-18 08:42:50 +01:00
Owen Mansel-Chan
5a2c48f37f Add change note 2023-12-17 06:28:35 +00:00
Owen Mansel-Chan
e45e92eaa7 Fix MaxIntOrMaxUint.isBoundFor
It was wrong for strictnessOffset = 1 before.
2023-12-17 06:16:33 +00:00
Owen Mansel-Chan
36c4f5d1b2 Add failing test
The cause of the test failure is confusion about
whether the architecture is 32 bit or 64 bit.
2023-12-17 04:43:14 +00:00
masterofnow
4a77f45aa6 Minor adjustment to resolve error for codeql version 2.15.4 2023-12-16 12:41:39 +08:00
masterofnow
99b273d308 Apply suggestions from code review
Added suggestion from atorralba.

Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-16 12:00:45 +08:00
Rasmus Lerchedahl Petersen
64655a0ea8 Python: Use enw class name 2023-12-16 01:36:46 +01:00
Rasmus Lerchedahl Petersen
b505778bc8 Python: remove non-local steps 2023-12-16 01:03:27 +01:00
Rasmus Lerchedahl Petersen
661ba1ca7b Python: move restriction into branch predicate
Otherwise we get loads of nodes with missing locations
from the brnach nodes that are not matched.
2023-12-16 00:33:11 +01:00
Chad Bentz
b02bac5190 Test run 2023-12-15 22:55:10 +00:00
Rasmus Lerchedahl Petersen
5de1725648 Python: update class name 2023-12-15 23:50:29 +01:00
Rasmus Lerchedahl Petersen
4a1fcde649 Python: abandon synthetic node
for `CapturingClosureArgumentNode`.

Unless we define it for every single `CallNode`, we need a more
sophisticated mutual recursion with the call graph construction.
There is built-in support for that, but we are currently not using it.
2023-12-15 23:42:29 +01:00
Chris Smowton
84c86f256a Add buildless tests 2023-12-15 22:37:55 +00:00
Rasmus Lerchedahl Petersen
e36b079e0f Python: fix compilation error
introduced by bad merge
2023-12-15 21:27:22 +01:00
Rasmus Lerchedahl Petersen
416ba6a709 Python: use updated API 2023-12-15 21:26:05 +01:00
Eric Bickle
95ce7c9ba4 Merge branch 'main' into fix/update-gson-model 2023-12-15 10:15:53 -08:00
Geoffrey White
1908575386 Swift: Add more test cases for launchOptions as a source. 2023-12-15 18:11:28 +00:00
Mathias Vorreiter Pedersen
ef916f0ba0 C++: Mitigate ODR violations. 2023-12-15 17:16:04 +00:00
Ed Minnix
09a0730491 QLdoc fix 2023-12-15 11:13:09 -05:00
Ed Minnix
02581a3850 Move class for getProperty method call to Properties.qll 2023-12-15 11:09:08 -05:00
Ed Minnix
73cb01fc89 Remove integration test (ported to query test)
The `.properties` file extractor has been enabled by default, so the
test about sources from `getProperty` calls can be ported to a query test.
2023-12-15 11:09:08 -05:00
Ed Minnix
fc53727b9d Bump change note date 2023-12-15 11:09:08 -05:00
Ed Minnix
8826eaf1a3 Move test case to query tests 2023-12-15 11:09:08 -05:00
Ed Minnix
afefccf8f7 Update change note 2023-12-15 11:09:08 -05:00
Ed Minnix
0d12981d6a Bump change note 2023-12-15 11:09:08 -05:00
Ed Minnix
078a33eecc Updated change note 2023-12-15 11:09:07 -05:00
Ed Minnix
1c3993e632 QLDocs 2023-12-15 11:09:07 -05:00
Ed Minnix
8e55ced288 Update test to use MaybeBrokenCryptoAlgorithm 2023-12-15 11:09:07 -05:00
Ed Minnix
83c6ece405 Move weak hashing into MaybeBrokenCryptoAlgorithm 2023-12-15 11:09:07 -05:00
Ed Minnix
fbc2a33597 Replace MethodAccess with MethodCall 2023-12-15 11:09:07 -05:00
Ed Minnix
c20ea1f629 Bump change note date 2023-12-15 11:09:07 -05:00
Ed Minnix
cb0ea350b5 Improve docs 2023-12-15 11:09:07 -05:00
Ed Minnix
0efca8200d Weak Hashing query wording 2023-12-15 11:09:07 -05:00
Ed Minnix
86b57a11ac Bump change note date 2023-12-15 11:09:07 -05:00
Ed Minnix
25fa8d5ae7 Move some logic to class 2023-12-15 11:09:07 -05:00
Ed Minnix
4ff6c1e2ea Test case
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-15 11:09:07 -05:00
Ed Minnix
93cf5b8eb9 Weak Hashing Property initial query 2023-12-15 11:09:07 -05:00
Tamas Vajk
e62d542e8f C#: Add telemetry query to report extractor information 2023-12-15 16:25:38 +01:00
Geoffrey White
f6a4970012 Swift: Autoformat. 2023-12-15 14:58:11 +00:00
Mathias Vorreiter Pedersen
82b9f1b31c C++: Accept test changes. 2023-12-15 14:57:31 +00:00
Mathias Vorreiter Pedersen
0543ed115e C++: Add barrier for array lookups in 'cpp/double-free' and 'cpp/use-after-free'. 2023-12-15 14:57:17 +00:00
Michael Nebel
38ae848b94 C#: Update generated stubs. 2023-12-15 15:50:08 +01:00
Geoffrey White
0b04e4abe5 Swift: Address QL-for-QL alerts. 2023-12-15 14:48:30 +00:00
Michael Nebel
e69f0e3461 C#: Don't generate stubs for the record Clone method. 2023-12-15 15:41:59 +01:00
Mathias Vorreiter Pedersen
dc9c538fcc Merge pull request #15120 from MathiasVP/fix-joins-in-av-rule-79
C++: Fix joins in `cpp/resource-not-released-in-destructor`
2023-12-15 14:06:53 +00:00
Rasmus Lerchedahl Petersen
1ee11ae7af Merge branch 'main' of https://github.com/github/codeql into python/captured-variables-basic 2023-12-15 14:31:57 +01:00
Geoffrey White
034daa9b35 Swift: Address false positives. 2023-12-15 13:29:49 +00:00
Mathias Vorreiter Pedersen
1cbe01923d C++: Fix joins in 'AV Rule 145'. 2023-12-15 13:08:13 +00:00
Rasmus Lerchedahl Petersen
8601105988 Python: Address TODO comment 2023-12-15 14:03:38 +01:00
Rasmus Lerchedahl Petersen
e1bf2821d9 Python: split variable capture instantiation out
into its own file.
2023-12-15 13:59:52 +01:00
Rasmus Lerchedahl Petersen
f668453d01 Python: move things around 2023-12-15 13:48:50 +01:00
Rasmus Lerchedahl Petersen
739b839628 Python: use updated names 2023-12-15 13:48:28 +01:00
Jeroen Ketema
3977689808 Merge pull request #15117 from jketema/buffer
C++: Only consider the maximum buffer size for badly bounded write
2023-12-15 13:46:09 +01:00
yoff
b07316f4ae Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-15 13:41:04 +01:00
Rasmus Lerchedahl Petersen
a311582285 Python: Bring back (now simplified) exclusion 2023-12-15 13:28:16 +01:00
Alex Eyers-Taylor
8e92fcc08f CPP: Format Temporaries 2023-12-15 12:00:44 +00:00
yoff
4b89a412c6 Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-15 12:59:01 +01:00
Rasmus Lerchedahl Petersen
d3b237bf7e Python: rename synthetic lambda nodes 2023-12-15 12:55:26 +01:00
Geoffrey White
326242a1fb Swift: Change note. 2023-12-15 11:39:09 +00:00
Mathias Vorreiter Pedersen
2c5f65a241 C++: Drive-by cleanup: This case is redundant since a 'DestructorCall' is also a 'FunctionCall'. 2023-12-15 11:38:52 +00:00
Mathias Vorreiter Pedersen
ce326a0f79 C++: Fix joins. 2023-12-15 11:37:28 +00:00
Geoffrey White
b7a533f879 Swift: Update .qhelp for Swift. 2023-12-15 11:32:14 +00:00
Alexander Eyers-Taylor
c68d3c5983 Update cpp/ql/src/Security/CWE/CWE-416/Temporaries.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-15 11:23:11 +00:00
Alex Denisov
dd13ea3d0a Swift: separate installation of dependencies and autobuilding
`pod install` could generate Xcode projects files needed for
autobuilding, so it's better to install dependencies first, and then do
re-scan to pick up the new files.
2023-12-15 12:20:36 +01:00
Geoffrey White
0ff84b467f Swift: Create examples for the .qhelp in Swift, and test them. 2023-12-15 11:14:05 +00:00
Michael Nebel
f6af593b0b C#: Add a unit test for escaping method names. 2023-12-15 12:04:46 +01:00
Alex Eyers-Taylor
49e1467581 CPP: Fix handling of ternary operators in tempory queries and add tests. 2023-12-15 11:03:23 +00:00
Anders Schack-Mulligen
1ea1130271 Merge pull request #15062 from aschackmull/dataflow/deprecate-flowstatestring
Dataflow: Deprecate FlowStateString.
2023-12-15 11:59:04 +01:00
Michael Nebel
671692177e C#: Escape method names. 2023-12-15 11:34:06 +01:00
Jeroen Ketema
0b1b1be356 C++: Add change note 2023-12-15 11:13:52 +01:00
Erik Krogh Kristensen
16e53d3972 Merge pull request #15115 from erik-krogh/no-types-integration-test
JS: add integration test for the new extractor option to disable type extraction
2023-12-15 11:13:14 +01:00
Rasmus Lerchedahl Petersen
5b6ea15028 Python: remove unneeded consistency exclusion 2023-12-15 11:09:37 +01:00
Michael Nebel
d59b5a9647 Merge pull request #15100 from michaelnebel/csharp/stubsrefresh
C#: .NET8 Stubs update.
2023-12-15 10:46:43 +01:00
Jeroen Ketema
2065ecff66 C++: Only consider the maximum buffer size for badly bounded write 2023-12-15 10:46:13 +01:00
Rasmus Lerchedahl Petersen
bfdcae4538 Python : P -> PY 2023-12-15 10:43:02 +01:00
erik-krogh
a694928dd3 use the extractor option directly instead 2023-12-15 10:39:36 +01:00
erik-krogh
9c520778c7 Merge remote-tracking branch 'upstream/main' into no-types-integration-test 2023-12-15 10:38:05 +01:00
Rasmus Lerchedahl Petersen
262d43abcf Python: Make compile and add comment 2023-12-15 10:28:51 +01:00
Rasmus Lerchedahl Petersen
2051ba3395 Python: hide synthesized capture nodes 2023-12-15 10:26:56 +01:00
Rasmus Lerchedahl Petersen
f96c52ed3b Python: make compile again
also improve comment
2023-12-15 10:25:49 +01:00
Jeroen Ketema
b29c886d9b Merge pull request #15107 from MathiasVP/better-tostring
C++: Produce a better `toString` for dataflow nodes with indirections
2023-12-15 10:19:53 +01:00
Michael Nebel
305e015948 C#: Update flowsummaries expected tests. 2023-12-15 10:02:02 +01:00
Michael Nebel
3ead21fb13 C#: Update options files. 2023-12-15 10:02:02 +01:00
Michael Nebel
588fe2792c C#: Update/Add some hand-written stubs for CWE-079 and CWE-611. 2023-12-15 10:02:02 +01:00
Michael Nebel
597a47b2d5 C#: Modify System.Web.cs manual stub to avoid overlap with generated stub. 2023-12-15 10:02:02 +01:00
Michael Nebel
0e6399e1cc C#: Make manual adjustments to the generated stubs. 2023-12-15 10:02:02 +01:00
Michael Nebel
8967a0996b C#: Update all generated stubs. 2023-12-15 10:02:02 +01:00
yoff
c395d2d957 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-12-15 09:58:27 +01:00
erik-krogh
ad4f464850 add warnOnImplicitThis 2023-12-15 09:55:30 +01:00
erik-krogh
9cc708b122 add integration test for the new extractor option to disable type extraction 2023-12-15 09:53:13 +01:00
Erik Krogh Kristensen
9543c23aba Merge pull request #15111 from erik-krogh/mergeback-ts-extractor
JS: TypeScript extractor fixes into rc/3.12
2023-12-15 09:21:20 +01:00
Michael Nebel
5bc2183fc3 Merge pull request #15108 from michaelnebel/csharp/stubgenscripts
C#: Stub generator scripts.
2023-12-15 09:16:36 +01:00
yoff
72430438f3 Merge pull request #15109 from RasmusWL/consistency-cleanup
Python: Delete old copy of DataFlowImplConsistency.qll
2023-12-15 08:58:32 +01:00
Anders Schack-Mulligen
337e5e458c Update java/ql/lib/semmle/code/java/security/InsufficientKeySize.qll
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-15 08:48:50 +01:00
fossilet
795668ddaf Fix sphinx.add_lexer. 2023-12-15 09:58:46 +08:00
Rasmus Lerchedahl Petersen
abd544d96c Python: consistency failure gone 2023-12-15 00:38:58 +01:00
Rasmus Lerchedahl Petersen
b6123de518 Python: simplify assignments to captured variables 2023-12-15 00:34:52 +01:00
Erik Krogh Kristensen
a700aa4cde Merge pull request #15110 from rvermeulen/rvermeulen/xml-attr-data-flow-node
JavaScript: Add support for XML attributes in the data flow graph
2023-12-14 21:45:57 +01:00
Geoffrey White
363ec0a917 Swift: Update swift/summary/query-sinks. 2023-12-14 20:22:36 +00:00
erik-krogh
c752f26f91 use direct string comparison instead, that doesn't crash on invalid values 2023-12-14 20:43:16 +01:00
erik-krogh
5bbf79bf26 fix the parsing of boolean environment variables in the TypeScript extractor 2023-12-14 20:43:16 +01:00
erik-krogh
1a0d29ba8a rename extractor environment variable to CODEQL_EXTRACTOR_JAVASCRIPT_OPTION_SKIP_TYPES 2023-12-14 20:43:16 +01:00
erik-krogh
62205f6a7f add environment variable to skip extraction of types in TypeScript 2023-12-14 20:43:16 +01:00
erik-krogh
b5fe0e5709 make sure reset() is called when manually invoking the TS extractor, so environment-variables are read 2023-12-14 20:43:16 +01:00
erik-krogh
96d1573978 move TypeVarDepth further up, so its declared before it's used 2023-12-14 20:43:15 +01:00
erik-krogh
10cf53b8d3 fix a this reference
`this` didn't refer to anything specific, and it was in fact `undefined` in the context it was invoked. There was already a  `let typeTable = this;` further up (where `this` refers to the class instance), so I used `typeTable`.
2023-12-14 20:43:15 +01:00
erik-krogh
43b228dbb4 exclude all the lib.d.ts files when running the TS extractor directly
e.g. the `lib.es5.d.ts` file was not excluded
2023-12-14 20:43:15 +01:00
Erik Krogh Kristensen
e838562591 Merge pull request #15105 from erik-krogh/fix-boolean-parse
JS: fix the parsing of boolean environment variables in the TypeScript extractor
2023-12-14 20:41:14 +01:00
Remco Vermeulen
133a243298 Add support for XML attributes in the data flow graph 2023-12-14 11:33:53 -08:00
Tom Hvitved
25a676ac6a Ruby: Model simple pattern matching as value steps instead of taint steps 2023-12-14 20:18:24 +01:00
Geoffrey White
9ec08c1c4b Swift: Add a couple of sinks missing from sensitive data hashing as well. 2023-12-14 18:04:35 +00:00
Geoffrey White
3a900f1f8b Swift: Fix some inconsistencies in the test cases. 2023-12-14 18:04:34 +00:00
Geoffrey White
7ba18e64a0 Swift: Add sinks for algorithms that are OK for sensitive data hashing but not for password hashing. 2023-12-14 18:04:34 +00:00
Geoffrey White
c2d49c0fff Swift: Address a weakness in the sensitive data regexs. 2023-12-14 18:04:34 +00:00
Geoffrey White
87eb96ed3b Swift: Add more cases to test. 2023-12-14 18:04:34 +00:00
Geoffrey White
22ed20dd7c Swift: Upgrade SecKeyCopyExternalRepresentation source to be considered a password / key rather than a miscellaneous credential. 2023-12-14 18:04:34 +00:00
Rasmus Wriedt Larsen
2a98a7e615 Python: Delete old copy of DataFlowImplConsistency.qll
We forgot to delete that file in https://github.com/github/codeql/pull/8457
2023-12-14 18:18:25 +01:00
Mathias Vorreiter Pedersen
7af6496a71 C++: Add change note. 2023-12-14 17:13:23 +00:00
Robert Marsh
3738e19db6 Swift: fix compilation failures outside CFG code 2023-12-14 16:39:51 +00:00
Geoffrey White
10b4c98e80 Swift: Move password sources to be reported by the new query. 2023-12-14 16:09:47 +00:00
Geoffrey White
5faa25fc6c Swift: Make passwords their own sensitive data type. 2023-12-14 16:09:47 +00:00
Geoffrey White
b5a45c64ff Swift: Define barriers, additional flow steps and sinks. 2023-12-14 16:09:47 +00:00
Geoffrey White
e5bf929cdb Swift: Split off WeakPasswordHashingExtensions.qll as we normally do. 2023-12-14 16:09:46 +00:00
Geoffrey White
db1508d108 Swift: Trivial changes - query ID / metadata, imports. 2023-12-14 16:09:46 +00:00
Geoffrey White
9774c3cb4f Swift: Copy WeakPasswordHashing query from csharp. 2023-12-14 16:09:45 +00:00
Geoffrey White
be7d0acfea Swift: Minor fixes for the existing weak sensitive data hashing query (naming consistency, remove unused import). 2023-12-14 16:09:45 +00:00
amammad
4d9aad92a1 remove a duplicate test 2023-12-14 17:08:18 +01:00
Mathias Vorreiter Pedersen
04ca36f9b0 Merge pull request #15106 from geoffw0/revrevtest
Swift: Revert:Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query"
2023-12-14 15:56:46 +00:00
Mathias Vorreiter Pedersen
61e30b9ff8 C++: Accept more test changes. 2023-12-14 15:25:29 +00:00
Michael Nebel
82784b4364 C#: Add a script for generating stubs for all packages needed for testing. 2023-12-14 16:11:17 +01:00
Geoffrey White
7e6ff7c826 Swift: Disable the part of the test that triggers an extraction issue. 2023-12-14 15:04:48 +00:00
Mathias Vorreiter Pedersen
368f438754 C++: Add more QLDoc. 2023-12-14 14:49:48 +00:00
Geoffrey White
3193ceb3f9 Merge pull request #15052 from geoffw0/pointermodels
Swift: Expand models for UnsafePointer and friends
2023-12-14 14:46:48 +00:00
Mathias Vorreiter Pedersen
0c100eb122 C++: Accept test changes. 2023-12-14 14:44:58 +00:00
Mathias Vorreiter Pedersen
8a52565395 C++: Improve 'toString' on the most common dataflow nodes. 2023-12-14 14:44:42 +00:00
amammad
d84333dad8 added *ReadBody* Methods as UntrustedFlowSource 2023-12-14 15:31:09 +01:00
Anders Schack-Mulligen
7623432c76 Java: Remove/deprecate FlowStateString-based extension points. 2023-12-14 15:15:58 +01:00
Owen Mansel-Chan
9cb0bb2fc9 Merge pull request #15034 from github/dependabot/github_actions/actions/setup-go-5
Bump actions/setup-go from 4 to 5
2023-12-14 14:14:03 +00:00
Anders Schack-Mulligen
8ef4821f63 Python: Remove references to FlowStateString. 2023-12-14 15:05:33 +01:00
Anders Schack-Mulligen
a1068ce2f9 Dataflow: deprecate references 2023-12-14 15:05:33 +01:00
Anders Schack-Mulligen
07ad770437 Dataflow: Deprecate FlowStateString. 2023-12-14 15:05:33 +01:00
Geoffrey White
987cdff862 Revert "Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query""
This reverts commit a478980e48.
2023-12-14 13:56:35 +00:00
erik-krogh
0db788bb10 use direct string comparison instead, that doesn't crash on invalid values 2023-12-14 14:50:17 +01:00
erik-krogh
5e91b2f5bc fix the parsing of boolean environment variables in the TypeScript extractor 2023-12-14 14:40:10 +01:00
Rasmus Wriedt Larsen
36b635fb70 Python: Remove @tags meta from internal debug queries
These queries were great when evaluating coverage of the new call-graph compared with the old.

However, they are not useful to run as part of our DCA experiments.
2023-12-14 14:39:32 +01:00
Geoffrey White
36d0148aa1 Swift: Comment out lines that don't extract correctly right now. 2023-12-14 13:27:05 +00:00
Erik Krogh Kristensen
063f69c10e Merge pull request #15072 from erik-krogh/ts-various
JS: Various TypeScript extraction fixes.
2023-12-14 14:17:42 +01:00
Koen Vlaswinkel
7c141b9239 Merge pull request #15089 from github/koesie10/csharp-model-editor-generics
C#: Fix names of generic types/methods in model editor queries
2023-12-14 14:17:14 +01:00
Michael Nebel
3d012cd35f C#: Move the generator class to a helper file. 2023-12-14 14:11:59 +01:00
Michael Nebel
8343ce0754 C#: Re-factor the make_stubs_nuget script to more easily allow multiple nuget references. 2023-12-14 14:11:59 +01:00
Tom Hvitved
6fc9e6193a Add change note 2023-12-14 13:25:21 +01:00
Tom Hvitved
84aa9f17a0 Python/Ruby: Use SummaryTypeTracker from typetracking pack 2023-12-14 13:25:18 +01:00
Tom Hvitved
1e24de7e83 Copy SummaryTypeTracker.qll to typetracking pack 2023-12-14 13:22:48 +01:00
Tom Hvitved
3b1146bf98 Python: Adopt shared type tracking library 2023-12-14 13:22:44 +01:00
erik-krogh
72e99b5b9d rename extractor environment variable to CODEQL_EXTRACTOR_JAVASCRIPT_OPTION_SKIP_TYPES 2023-12-14 12:52:49 +01:00
Tom Hvitved
4776e9ccd2 Type tracking: Allow for a non-standard flowsTo predicate 2023-12-14 12:36:09 +01:00
Tom Hvitved
c8b4a215bc Merge pull request #14573 from hvitved/flow-summary-impl-param
Move `FlowSummaryImpl.qll` to `dataflow` pack
2023-12-14 12:24:15 +01:00
Rasmus Lerchedahl Petersen
0b6d47b8bc Python: update to new API
update is in a comment, so compilation
never failed in CI.
2023-12-14 11:56:05 +01:00
Rasmus Lerchedahl Petersen
2a5736e73d Python: add consistency exception
this must have been lost in my
clean-up rebase.
2023-12-14 11:50:09 +01:00
Tom Hvitved
8f0e0b6559 Merge pull request #15090 from hvitved/inline-flow-test-get-arg-string
InlineFlowTest: Allow for custom `getArgString`
2023-12-14 10:53:55 +01:00
Tamás Vajk
3487f9d143 Merge pull request #15070 from tamasvajk/standalone/exclusions
C#: Remove unneeded options and add support for `paths/paths-ignore` in standalone
2023-12-14 10:41:53 +01:00
Rasmus Lerchedahl Petersen
479d81fb75 Python: fix nonlocal captured variables
This depends on the extractor fix
2023-12-14 10:37:27 +01:00
Rasmus Lerchedahl Petersen
38e03216f6 Python: allow CaptureArgumentNodes as multiple arguemnts
These are the labmda self references. This is similar to
how `BlockParameterArgumentNode` is excluded for Ruby.

It is important that we restrict `call` in this logic.
Otherwise, we get a cartesian product and the consistency
check runs for a very long time...
2023-12-14 10:32:29 +01:00
Tom Hvitved
7da10e0013 Merge pull request #15095 from hvitved/dataflow/boolean-class
Data flow: Use `Boolean` class
2023-12-14 10:29:52 +01:00
Rasmus Lerchedahl Petersen
f32d5e422d Python: typo 2023-12-14 10:28:26 +01:00
Rasmus Lerchedahl Petersen
efcdb3e67e Python: filter local flow from a node to itself 2023-12-14 10:28:26 +01:00
Rasmus Lerchedahl Petersen
5471c92e9f Python: exclusion for summary nodes
as in Ruby
2023-12-14 10:28:26 +01:00
Rasmus Lerchedahl Petersen
061fd014a6 Python: further restrict LibraryLambdaMethod
On the small test project, this reduces the number
of instances from 285 to 22.
2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
453ab9ca7b Python: restrict LibraryLambdaMethod 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
17a0029585 Python: support callbacks to library calls
TODO:
The member predicate `LibraryLambdaMethod::getACall` is
currently too permissive.
Ideally, we would have `libraryCallHasLambdaArg`
as in Ruby. But even a more precise
`libraryCall` predicate might be fine.
2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
7565873e83 Python: test callbacks to library calls 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
797deebcdd Python: exclude CaptureNodes 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
b513871b9b Python: add consistency exclusions 2023-12-14 10:27:15 +01:00
Rasmus Lerchedahl Petersen
c054ba6a97 python: instantiate module for variable capture
This provides variable capture in standard situations:
- nested functions
- lambdas
There are some deficiencies:
- we do not yet handle objects capturing variables.
- we do not handle variables captured via the `nonlocal` keyword.
  This should be solved at the AST level, though, and then it
  should "just work".

There are still inconsistencies in the case where
a `SynthesizedCaptureNode` has a comprehensions
as its enclosing callable. In this case,
`TFunction(cn.getEnclosingCallable())` is not
defined and so getEnclosingCallable does not exist
for the `CaptureNode`.
2023-12-14 10:25:39 +01:00
Rasmus Lerchedahl Petersen
6db55cd12f Python: add missing annotation 2023-12-14 10:20:49 +01:00
Tamas Vajk
ee70de8879 Fix code review findings 2023-12-14 10:15:22 +01:00
Tom Hvitved
8fc6fb1ec0 Apply suggestions from code review
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-12-14 10:10:53 +01:00
Koen Vlaswinkel
96feb2c787 C#: Rename getMethodName to getEndpointName 2023-12-14 10:04:46 +01:00
Tom Hvitved
098afb935b Address more review comments 2023-12-14 09:48:45 +01:00
Tamas Vajk
728229e6e1 Fix code review findings 2023-12-14 09:44:20 +01:00
yoff
b78ceb61a3 Merge pull request #15099 from fossilet/fix-qll-typo
Fix typo in qll.
2023-12-14 09:43:26 +01:00
Chris Smowton
d884726490 Merge pull request #15098 from fossilet/fix-signature-doc
Fix typo.
2023-12-14 08:35:56 +00:00
fossilet
1cc2f073c4 Fix typo in qll. 2023-12-14 16:05:14 +08:00
Tom Hvitved
5a426d1800 Data flow: Use Boolean class 2023-12-14 09:04:16 +01:00
Michael Nebel
1653433f39 Merge pull request #15096 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-14 08:51:34 +01:00
fossilet
9157dde4e2 Fix typo. 2023-12-14 15:35:13 +08:00
github-actions[bot]
c1325d798f Add changed framework coverage reports 2023-12-14 00:16:18 +00:00
Edward Minnix III
14a76278b8 Merge pull request #14802 from egregius313/egregius313/java/update-ql-integration-test
Java: Add `.properties` file references in integration tests
2023-12-13 18:40:03 -05:00
Ed Minnix
717e69ac0e Add properties file references 2023-12-13 16:54:55 -05:00
Robert Marsh
0e5255ea88 Swift: switch to shared, parameterized CFG library 2023-12-13 20:13:11 +00:00
Paolo Tranquilli
307da3417d Merge pull request #15091 from github/redsun82/fix-cmake-bazel-version
Bazel/CMake: use bazelisk to use correct bazel version
2023-12-13 19:06:37 +01:00
Jeroen Ketema
4d922ddb0c Merge pull request #15092 from jketema/mb12
Merge back `rc/3.12` into main
2023-12-13 17:45:58 +01:00
Geoffrey White
e8f8aa266f Merge remote-tracking branch 'upstream/main' into pointermodels 2023-12-13 16:43:15 +00:00
Paolo Tranquilli
9e300a9906 Merge branch 'main' into redsun82/fix-cmake-bazel-version 2023-12-13 17:36:07 +01:00
Jeroen Ketema
25a1b0532e Merge pull request #15094 from github/revert-13870-commoncrypto1
Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query"
2023-12-13 17:21:44 +01:00
Mathias Vorreiter Pedersen
a478980e48 Revert "Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query" 2023-12-13 15:40:09 +00:00
Mathias Vorreiter Pedersen
5ddfb1f7c3 Merge pull request #15088 from MathiasVP/debug-mode-for-dataflow-printing
C++: Easier debugging of dataflow node `toString` output
2023-12-13 15:15:41 +00:00
Jeroen Ketema
99e65df6ce Merge remote-tracking branch 'upstream/rc/3.12' into mb12 2023-12-13 15:43:39 +01:00
Paolo Tranquilli
819fc52854 Bazel/CMake: use bazelisk to use correct bazel version 2023-12-13 15:32:06 +01:00
Mathias Vorreiter Pedersen
401ab3b035 C++: Fix 'isDebugMode'. It was computing 'isNotDebugMode' (oops). 2023-12-13 14:31:45 +00:00
Mathias Vorreiter Pedersen
fcc3113bfc C++: Privately import 'Node0ToString'. 2023-12-13 14:31:02 +00:00
Michael Nebel
b765ba387f Merge pull request #13110 from GeekMasher/csharp-aws
[CSharp] AWS Lambda Modelling
2023-12-13 15:14:58 +01:00
Geoffrey White
023d72b6fb Merge remote-tracking branch 'upstream/main' into pointermodels 2023-12-13 14:07:17 +00:00
Tamas Vajk
c870b0d4e9 Add more logging to the file filtering 2023-12-13 14:14:07 +01:00
Tamas Vajk
694be29311 Remove uneeded option from the help 2023-12-13 14:13:41 +01:00
Tom Hvitved
28a2d05cf8 InlineFlowTest: Allow for custom getArgString 2023-12-13 13:58:44 +01:00
Koen Vlaswinkel
e177f8783a C#: Share qualified name module for model editor queries 2023-12-13 13:48:44 +01:00
Koen Vlaswinkel
ea504cddd1 C#: Use correct names for generic types/methods in model editor queries 2023-12-13 13:48:23 +01:00
Michael Nebel
ffc36e4ccd Merge pull request #15085 from michaelnebel/csharp/telemetrycalls
C#: Telemetry should only count calls in source.
2023-12-13 13:46:16 +01:00
Koen Vlaswinkel
79f5a6acab C#: Add test model for generic method 2023-12-13 13:46:06 +01:00
Michael Nebel
3b9737fa88 C#: Update Amazon stubs to use .NET 8 as target framework. 2023-12-13 13:11:31 +01:00
Michael Nebel
c6a6a9f631 C#: Update Aws test files. 2023-12-13 13:07:29 +01:00
Michael Nebel
fa4f91988f C#: Add autogenerated stubs for Aws.Lambda.Core and Aws.Lambda.APIGatewayEvents. 2023-12-13 13:07:29 +01:00
Mathew Payne
f336ff0063 Add change notes 2023-12-13 13:07:28 +01:00
Mathew Payne
2e0ac264e7 feat: Add AWS Lambda logging 2023-12-13 13:07:28 +01:00
Mathew Payne
6c138ae485 feat: Add models and expected 2023-12-13 13:07:28 +01:00
Mathew Payne
2f5cb1ab29 feat: Add initial tests for AWS Lambda support 2023-12-13 13:07:28 +01:00
Mathew Payne
78a3749601 feat: Add Amazon Lambda testing stubs 2023-12-13 13:07:28 +01:00
Mathias Vorreiter Pedersen
45080ec9f0 C++: Create an abstract class to control debug 'toString' output for dataflow nodes. 2023-12-13 12:05:04 +00:00
Tamas Vajk
f2435f89f1 Simplify test setup 2023-12-13 13:03:23 +01:00
Tamas Vajk
993dd767ac C#: Add paths/paths-ignore support in standalone 2023-12-13 12:15:56 +01:00
Tamas Vajk
21229b93bf C#: Remove unneeded options from standalone extractor 2023-12-13 12:15:56 +01:00
Michael Nebel
8218f80154 C#: Base all telemetry tests on stubs. 2023-12-13 11:57:44 +01:00
Michael Nebel
57d5d71d03 C#: Only count calls in source code. 2023-12-13 11:57:32 +01:00
Michael Nebel
16e86134f3 Merge pull request #15087 from michaelnebel/csharp/stubgenrefreadonly
C#: Stub generator support for `ref readonly` parameters.
2023-12-13 11:46:45 +01:00
Owen Mansel-Chan
56507c2709 Merge pull request #15084 from github/dependabot/go_modules/go/extractor/extractor-dependencies-88d2ef26ea
Bump the extractor-dependencies group in /go/extractor with 1 update
2023-12-13 10:21:32 +00:00
Michael Nebel
b023338ed7 Merge pull request #15086 from michaelnebel/csharp/testusemorestubs
C#: Base more tests purely on stubs.
2023-12-13 11:19:38 +01:00
Tony Torralba
66b54f03b7 Rename test 2023-12-13 11:15:27 +01:00
Tony Torralba
d955dce72a Improve source of randomness detection
Also sanitize flow out of sinks to avoid overlapping paths
2023-12-13 11:15:27 +01:00
Tony Torralba
fc45621ab1 Add pac4j JWT cryptographic key sinks 2023-12-13 11:15:27 +01:00
Tony Torralba
7bc907840c Fix tests 2023-12-13 11:15:27 +01:00
Tony Torralba
3a5d711711 Add cookie sinks 2023-12-13 11:15:27 +01:00
Tony Torralba
435d1f97a3 Add sink for OpenSAML's RequestType.setID 2023-12-13 11:15:27 +01:00
Michael Nebel
b7f4bfe719 C#: Add a unit test for stub generation of ref readonly parameters. 2023-12-13 11:09:57 +01:00
Michael Nebel
766baa9a50 C#: Add support for ref readonly parameters in the stub generator. 2023-12-13 11:09:57 +01:00
Tony Torralba
4cb53a76d6 Merge pull request #15082 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-13 10:35:49 +01:00
Michael Nebel
35a615cac3 C#: Base the remoteflowsource test on stubs and update line numbers in expected output. 2023-12-13 10:07:57 +01:00
Michael Nebel
94d81b501b C#: Base the CWE-614 tests purely on stubs. 2023-12-13 10:07:57 +01:00
Michael Nebel
4fc8762444 C#: Base the asp/basic tests on stubs only. 2023-12-13 10:07:57 +01:00
Michael Nebel
0b39f1155e C#: Base the remaning CWE-1004 tests purely on stubs. 2023-12-13 10:07:57 +01:00
Michael Nebel
cdf6b28e13 C#: Base the modelgenerator/dataflow tests on stubs. 2023-12-13 10:07:56 +01:00
masterofnow
e1b8fabf7f Use global instead of local taint tracking. 2023-12-13 13:50:34 +08:00
masterofnow
8538c12267 Merge branch 'github:main' into LoadClassNoSignatureCheck 2023-12-13 13:47:40 +08:00
dependabot[bot]
dae1a5c70e Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/tools](https://github.com/golang/tools).

- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 04:02:50 +00:00
github-actions[bot]
9b20665d75 Add changed framework coverage reports 2023-12-13 00:16:25 +00:00
Alexander Eyers-Taylor
236a6a1bce CPP: Apply suggestions from code review
Fix spelling in query id

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-12 17:22:46 +00:00
Tony Torralba
bd8f35bef7 Java: Fix FPs in Missing certificate pinning
Local URIs should never require pinning
2023-12-12 18:02:12 +01:00
Florin Coada
e637eb720b Merge pull request #15076 from github/changedocs/2.15.4
Release change notes for 2.15.4
2023-12-12 16:51:28 +00:00
Alex Eyers-Taylor
136a77b86e CPP: Add change note for cpp/use-of-uniwue-pointer-after-lifetime-ends 2023-12-12 16:47:55 +00:00
Alex Eyers-Taylor
e9bc5a54ea CPP: Add query for detecting invalid uses of temporary unique pointers. 2023-12-12 16:22:20 +00:00
Tony Torralba
27be5ba14b Merge pull request #15073 from atorralba/atorralba/java/remove-invalid-ognl-sinks
Java: Remove invalid OGNL sinks
2023-12-12 16:52:31 +01:00
Owen Mansel-Chan
5675df842e Merge pull request #15054 from owen-mc/go/find-more-callees-for-captured-variables
Go: Also follow jump steps when looking for a callee source
2023-12-12 15:49:15 +00:00
Geoffrey White
609f92c7ac Merge pull request #13870 from geoffw0/commoncrypto1
Swift: CommonCrypto test cases for the BrokenCryptoAlgorithm query
2023-12-12 15:26:02 +00:00
Mathew Payne
7a48152ea9 Add Go Stubs for LibXML2 2023-12-12 15:10:08 +00:00
Chad Bentz
2d33f86d41 Initial Push
- Sample test  (test not compiling)
- Stubs not generating
2023-12-12 15:00:00 +00:00
Edward Minnix III
4d6521fd7a Merge pull request #13608 from egregius313/egregius313/weak-randomness
Java: Add Weak Randomness Query (CWE-330/338)
2023-12-12 09:40:11 -05:00
Florin Coada
062a85e77b Removed local preview dox-out 2023-12-12 14:32:46 +00:00
Tony Torralba
fad53a25c0 Update java/ql/lib/ext/struts2.model.yml
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-12-12 14:58:47 +01:00
Mathias Vorreiter Pedersen
3dea467dcc Merge pull request #15047 from MathiasVP/add-puns-for-addresses-of-arguments
C++: Add `PostUpdateNode`s for addresses of outgoing arguments
2023-12-12 13:55:13 +00:00
Mathias Vorreiter Pedersen
412ea67ba0 Merge pull request #15075 from MathiasVP/print-data-flow-relevant-IR
C++: Add a `PropertyProvider` for only showing dataflow-relevant IR
2023-12-12 13:51:11 +00:00
Tom Hvitved
3c2336e40b Merge pull request #15074 from hvitved/dataflow/get-node-type-cached
Data flow: Use cached `nodeDataFlowType` instead of `getNodeType`
2023-12-12 14:49:41 +01:00
Florin Coada
c78dfea3db Release changenotes for 2.15.4 2023-12-12 13:46:32 +00:00
Mathias Vorreiter Pedersen
97f2be9b82 C++: Fix QLDoc. 2023-12-12 13:45:18 +00:00
yoff
a39eb5efc9 Merge pull request #15051 from yoff/python/slightly-improve-tarslip
Python: slightly improve tarslip logic
2023-12-12 14:43:43 +01:00
Mathias Vorreiter Pedersen
1ad0e6524e Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintDataFlowRelevantIR.qll 2023-12-12 13:15:36 +00:00
Mathias Vorreiter Pedersen
11386494b7 C++: Factor out the property provider which hides instructions and operands out of the 'LocalFlowPropertyProvider' class and into a separate class. 2023-12-12 13:04:31 +00:00
Tom Hvitved
a46964dfe8 Address review comments 2023-12-12 13:55:52 +01:00
Tom Hvitved
b3929e2375 Data flow: Use cached nodeDataFlowType instead of getNodeType 2023-12-12 13:46:39 +01:00
Tony Torralba
103110f9c2 Java: Remove invalid OGNL sinks
Fixes #15053
2023-12-12 13:39:51 +01:00
Alexander Eyers-Taylor
e87b3911dc Merge pull request #14910 from alexet/incorrect-scanf
CPP: Add query for detecteing incorrect error checking for scanf
2023-12-12 11:57:17 +00:00
Geoffrey White
f2e3391a33 Swift: Accept test regression. 2023-12-12 11:37:05 +00:00
erik-krogh
896432b646 add environment variable to skip extraction of types in TypeScript 2023-12-12 12:25:00 +01:00
Mathias Vorreiter Pedersen
4d430d5df0 Merge pull request #15037 from aschackmull/range/prunebounds
Rangeanalysis: Prune range calculation.
2023-12-12 11:18:26 +00:00
Mathias Vorreiter Pedersen
cec785c8cc C++: Respond to review comments. 2023-12-12 11:16:41 +00:00
Mathias Vorreiter Pedersen
f284fde93c C++: Update QLDoc. 2023-12-12 11:09:36 +00:00
Mathias Vorreiter Pedersen
a6104ad878 C++: Fix test annotations. 2023-12-12 11:06:18 +00:00
Rasmus Wriedt Larsen
42a6309f25 Merge pull request #15071 from github/RasmusWL/generate-code-scanning-query-list
Add @RasmusWL as CODEOWNER of a misc file
2023-12-12 10:53:11 +01:00
erik-krogh
cf31ef4960 make sure reset() is called when manually invoking the TS extractor, so environment-variables are read 2023-12-12 10:51:09 +01:00
Jeroen Ketema
611a177c3c Merge pull request #15066 from jketema/ql-test
C++: Update test for CLI changes
2023-12-12 10:36:57 +01:00
erik-krogh
c246a9c12c move TypeVarDepth further up, so its declared before it's used 2023-12-12 10:34:42 +01:00
erik-krogh
13a01e1545 fix a this reference
`this` didn't refer to anything specific, and it was in fact `undefined` in the context it was invoked. There was already a  `let typeTable = this;` further up (where `this` refers to the class instance), so I used `typeTable`.
2023-12-12 10:32:31 +01:00
Rasmus Wriedt Larsen
aa6a455ece Update CODEOWNERS 2023-12-12 10:31:36 +01:00
erik-krogh
ca95a6e9cf exclude all the lib.d.ts files when running the TS extractor directly
e.g. the `lib.es5.d.ts` file was not excluded
2023-12-12 10:29:09 +01:00
Tom Hvitved
9b043a10cc Merge pull request #15063 from hvitved/csharp/use-scratch-dir
C#: Use `CODEQL_EXTRACTOR_CSHARP_SCRATCH_DIR` instead of `Path.GetTempPath`
2023-12-12 08:16:04 +01:00
Owen Mansel-Chan
0fb58caa8c Update go/ql/lib/change-notes/2023-12-08-find-more-callees-for-captured-functions.md
Co-authored-by: Chris Smowton <smowton@github.com>
2023-12-11 20:42:48 +00:00
Edward Minnix III
06eef93f89 Docs review suggestions 2023-12-11 11:18:40 -05:00
Edward Minnix III
ce20c4ae03 Docs review suggestions
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-12-11 11:18:40 -05:00
Ed Minnix
7362158229 Fix test case 2023-12-11 11:18:40 -05:00
Ed Minnix
1271cd3348 Remove unnecessary crypto sinks 2023-12-11 11:18:40 -05:00
Ed Minnix
3ca039bc8f Rename to InsecureRandomness 2023-12-11 11:18:40 -05:00
Ed Minnix
6e70e6c85a Use pre-exisiting type for SecureRandom 2023-12-11 11:18:39 -05:00
Edward Minnix III
4678302edb Update query metadata
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-11 11:18:39 -05:00
Ed Minnix
bbf99375c7 Alter cookie sinks to instead focus on creation of a cookie 2023-12-11 11:18:39 -05:00
Ed Minnix
4bdf2b5e18 Bump change note date 2023-12-11 11:18:39 -05:00
Ed Minnix
b9d2a26e6e Move ESAPI models into the Weak Randomness query
These models don't need to apply to all queries. So instead they are
better suited to be within the weak randomness query itself.
2023-12-11 11:18:39 -05:00
Ed Minnix
7f3995f524 Remove extra encryption-iv models 2023-12-11 11:18:39 -05:00
Ed Minnix
7241e0920c Replace convertBytesToString with models 2023-12-11 11:18:39 -05:00
Ed Minnix
e9ca4a25d4 Update to new MethodCall name 2023-12-11 11:18:39 -05:00
Ed Minnix
a1e9564cc5 Add more sources 2023-12-11 11:18:39 -05:00
Ed Minnix
b8b2de2f3c Remove use of crypto-parameter sink kind 2023-12-11 11:18:39 -05:00
Ed Minnix
646254c9b2 Add credentials sinks from SensitiveApi 2023-12-11 11:18:39 -05:00
Ed Minnix
057a74d914 Remove unnused class 2023-12-11 11:18:39 -05:00
Ed Minnix
fb875f5095 More variety of test cases 2023-12-11 11:18:39 -05:00
Ed Minnix
ba3c38c226 Restrict addCookie to specific interface 2023-12-11 11:18:38 -05:00
Ed Minnix
dc3e4cd928 Refactored method accesses to the RandomDataSource library 2023-12-11 11:18:38 -05:00
Ed Minnix
ce7690b53f Make imports private 2023-12-11 11:18:38 -05:00
Edward Minnix III
bc0655573f Simplifications
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-12-11 11:18:38 -05:00
Ed Minnix
14fdfa4428 Add new sink kind and change note 2023-12-11 11:18:38 -05:00
Ed Minnix
0313f39229 Cryptographic sinks 2023-12-11 11:18:38 -05:00
Ed Minnix
b713efb711 Add ThreadLocalRandom.current as another source 2023-12-11 11:18:38 -05:00
Ed Minnix
bf0123d6ae Add org.apache.commons.lang.RandomStringUtils as a source 2023-12-11 11:18:38 -05:00
Ed Minnix
1daa83bf46 Add test cases 2023-12-11 11:18:38 -05:00
Ed Minnix
e69ff7b601 Move to library and add docs 2023-12-11 11:18:38 -05:00
Ed Minnix
9f986ca527 Add Weak Randomness Query 2023-12-11 11:18:38 -05:00
Edward Minnix III
8d724acb20 Merge pull request #15026 from egregius313/egregius313/java/dataflow/deprecate-old-dataflow-module-uses
Java: Deprecate or remove imports of dataflow library copies
2023-12-11 11:14:09 -05:00
Jeroen Ketema
8d2c72fc73 C++: Update test for CLI changes 2023-12-11 16:36:51 +01:00
Alexander Eyers-Taylor
c883ce8a5e Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-12-11 13:50:35 +00:00
Anders Schack-Mulligen
3bf6c0fe02 Rangeanalysis: Focus pre-bound calculation. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
c14d917a76 Rangeanalysis: Prune range calculation. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
58d463dd33 Rangeanalysis: Minor refactor for bound steps. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
73671b6da3 Rangeanalysis: Refactor base bounds. 2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
6b178fb64a Rangeanalysis: Preparatory refactor for bounds sharing. 2023-12-11 14:07:10 +01:00
Michael Nebel
7006d00702 Merge pull request #14892 from michaelnebel/csharp/dotnet8
C#: Use .NET 8
2023-12-11 13:53:35 +01:00
Michael Nebel
4b323cd7e0 Merge pull request #15050 from michaelnebel/csharp/defaultparamobject
C#: Default parameters for object using attributes.
2023-12-11 13:11:53 +01:00
Tom Hvitved
866f124a95 C#: Use CODEQL_EXTRACTOR_CSHARP_SCRATCH_DIR instead of Path.GetTempPath 2023-12-11 13:10:46 +01:00
Mathias Vorreiter Pedersen
97fc20cee9 Merge pull request #15064 from MathiasVP/swift-accept-test-changes-to-cleartext-transmission
Swift: Accept test changes
2023-12-11 11:13:38 +00:00
Óscar San José
693de5e6ff Merge pull request #15042 from github/dependabot/github_actions/actions/stale-9
Bump actions/stale from 8 to 9
2023-12-11 11:44:48 +01:00
Mathias Vorreiter Pedersen
2e4fe49d61 Swift: Accept test changes. 2023-12-11 10:41:07 +00:00
Rasmus Wriedt Larsen
419130be21 Merge pull request #15030 from yoff/python/remove-module-entry-definitions
Python: Remove control flow nodes for module entry definitions from the dataflow graph.
2023-12-11 11:40:17 +01:00
Mathias Vorreiter Pedersen
d8f53e5524 Merge pull request #14925 from geoffw0/flows
Swift: Imprecise Taint Flows
2023-12-11 10:06:01 +00:00
Michael Nebel
c8542e972e C#: Fix compiler warnings. 2023-12-11 10:57:44 +01:00
Michael Nebel
d3d594adaf C#: Update C# integration tests expected output. 2023-12-11 10:57:44 +01:00
Michael Nebel
3497b153d2 C#: Update integration tests to .NET 8. 2023-12-11 10:57:44 +01:00
Michael Nebel
1792942ce9 C#: Update tests that depends on .NET framework assemblies. 2023-12-11 10:57:44 +01:00
Michael Nebel
07a5ac31ae C#: Fixup tests. 2023-12-11 10:57:44 +01:00
Michael Nebel
e42afa3d3d C#: Adjustments to test cases. 2023-12-11 10:57:43 +01:00
Michael Nebel
09239ba804 C#: Update NuGet packages. 2023-12-11 10:57:43 +01:00
Michael Nebel
89f0abe3a0 C#: Update the target framework in the create extractor pack script. 2023-12-11 10:57:43 +01:00
Michael Nebel
9ab9f2b0e6 C#: Update all project files to use .NET 8 as target framework. 2023-12-11 10:57:43 +01:00
Michael Nebel
01c65e83a0 C#: Update the stub generator to .NET 8. 2023-12-11 10:57:43 +01:00
Michael Nebel
3e2afda202 C#: Update the create extractor pack action to .NET 8. 2023-12-11 10:57:43 +01:00
Michael Nebel
0df9dcb0fd C#: Update workflow files to also install .NET 8. 2023-12-11 10:57:43 +01:00
Geoffrey White
17cd22f9d0 Merge pull request #14972 from geoffw0/cryptoprimitives
C++: Experimental query for implementation of a cryptographic primitive
2023-12-11 09:47:46 +00:00
Harry Maclean
f877f7dc64 Ruby: Stick to dataflow layer in endpoints query 2023-12-11 09:46:09 +00:00
Mathias Vorreiter Pedersen
c6c487dd90 C++: Fix Code Scanning errors. 2023-12-11 09:35:44 +00:00
Mathias Vorreiter Pedersen
7faf286820 C++: Add more QLDoc to the 'is modifiable' predicates. 2023-12-11 09:29:59 +00:00
Tom Hvitved
cdf59e1e1d Ruby: Cache more predicates 2023-12-11 10:15:17 +01:00
Tom Hvitved
29a1cd110c Merge pull request #15041 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-11 09:04:43 +01:00
github-actions[bot]
da48d81489 Add changed framework coverage reports 2023-12-11 00:16:52 +00:00
amammad
bfa0fb6d74 remove a duplicate test 2023-12-10 22:08:12 +01:00
amammad
cc5416406f added more sinks related to io.Writer of BodyWriter 2023-12-10 22:06:27 +01:00
amammad
b6aaff2e64 use SimpleGlobal with source and sink to find BodyWriter successors globally 2023-12-10 15:45:42 +01:00
Tom Hvitved
f9dbf676a6 Java: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:45 +01:00
Tom Hvitved
2d3f96f201 Swift: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:44 +01:00
Tom Hvitved
35c654aa76 Go: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:44 +01:00
Tom Hvitved
faaa558ed9 Python: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:44 +01:00
Tom Hvitved
a2093c9aa2 C#: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:43 +01:00
Tom Hvitved
28373e0fdf JS: Adapt to changes in shared code 2023-12-10 11:25:43 +01:00
Tom Hvitved
0e81577269 Ruby: Use FlowSummaryImpl from dataflow pack 2023-12-10 11:25:43 +01:00
Tom Hvitved
adc4455f09 Parameterize FlowSummaryImpl.qll 2023-12-10 11:11:05 +01:00
Tom Hvitved
41fa39eb7c Parameterize AccessPathSyntax.qll 2023-12-10 11:11:05 +01:00
Tom Hvitved
fd7e3454d6 Copy FlowSummaryImpl.qll to dataflow pack 2023-12-10 11:11:05 +01:00
Tom Hvitved
4fbd806d70 Copy AccessPathSyntax.qll to dataflow pack 2023-12-10 11:11:05 +01:00
Tom Hvitved
7819dcf0a7 Merge pull request #15043 from hvitved/ql/redundant-import
QL4QL: Improvements to `RedundantImport` query
2023-12-09 12:15:09 +01:00
Owen Mansel-Chan
2e2a82c237 Add change note 2023-12-08 23:33:58 +00:00
Owen Mansel-Chan
ab68c4e341 Update test 2023-12-08 23:29:44 +00:00
Owen Mansel-Chan
40b3598fd0 Also follow jump steps when looking for a callee source
This is needed because capturing a variable is a jump step
and we want to find a callee source for captured functions.
2023-12-08 18:44:14 +00:00
Geoffrey White
0133c659d5 Swift: Change note. 2023-12-08 16:53:38 +00:00
Geoffrey White
c2123f2c9b Swift: More detailed models for pointers. 2023-12-08 16:51:53 +00:00
Rasmus Lerchedahl Petersen
d9c0c8c26d Python: Update comment. 2023-12-08 17:32:23 +01:00
Rasmus Lerchedahl Petersen
2539e2ec1a Python: slightly improve tarslip logic 2023-12-08 17:18:25 +01:00
erik-krogh
e8f9e366d5 remove redundant imports for JS 2023-12-08 16:56:54 +01:00
Ed Minnix
1526da5929 Deprecation change note 2023-12-08 10:50:04 -05:00
Ed Minnix
aebbc7d4ab Add private imports to prevent compile warnings 2023-12-08 10:42:11 -05:00
Ed Minnix
1b8f3f3450 Deprecate or remove imports of dataflow library copies 2023-12-08 10:42:10 -05:00
Michael Nebel
fd12c3a3ba C#: Update expected test output. 2023-12-08 16:10:38 +01:00
Harry Maclean
944fbeb34c Ruby: Update comment
We don't actually generate type models for `extend` relationships yet,
because they are more complex than `include`.
2023-12-08 14:54:21 +00:00
Harry Maclean
ece196cb25 Ruby: Update model editor tests 2023-12-08 14:52:51 +00:00
Anders Schack-Mulligen
0618568cdc Merge pull request #15045 from aschackmull/java/fix-cp
Java: Fix accidental cartesian product.
2023-12-08 15:43:01 +01:00
Anders Schack-Mulligen
1ea2f89e27 Merge pull request #15046 from aschackmull/dataflow/deprecation-changenote
Dataflow: Add change note about deprecation.
2023-12-08 15:42:34 +01:00
Mathias Vorreiter Pedersen
90b06c2046 C++: Switch the source of use-after-free and double-free to be post-update nodes. 2023-12-08 14:41:29 +00:00
Michael Nebel
9aeba5063f C#: Use cast expressions for object defaults. 2023-12-08 15:37:12 +01:00
Harry Maclean
ec24b25c8b Ruby: fix location in model editor query 2023-12-08 14:16:50 +00:00
Harry Maclean
e6df264865 Ruby: Report module declarations to model editor
This allows us to render type relations between modules/classes, not
just methods.
2023-12-08 14:16:49 +00:00
Harry Maclean
c1c258f567 Ruby: Include ancestors in type model generation 2023-12-08 14:16:49 +00:00
Mathias Vorreiter Pedersen
5bb2144c80 C++: Add field-flow through addresses of fields 2023-12-08 14:13:01 +00:00
Michael Nebel
6c30f6a748 C#: Add some test cases and update (incorrect) expected output. 2023-12-08 15:09:35 +01:00
Jeroen Ketema
db6b1e5f5e Merge pull request #14912 from jketema/dep-userinput
C++: Deprecate `isUserInput`, `userInputArgument`, and `userInputReturned`
2023-12-08 15:04:23 +01:00
Ian Lynagh
eab32ea24b Kotlin 2: Accept changes in query-tests/UnderscoreIdentifier 2023-12-08 13:49:25 +00:00
Alex Eyers-Taylor
da5c2d9bad CPP: Use guard libraries to find equalities with zero. 2023-12-08 13:30:30 +00:00
Alexander Eyers-Taylor
df32e9556c Update cpp/ql/src/change-notes/2023-12-04-incorrectly-checked-scanf.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-08 13:29:13 +00:00
Anders Schack-Mulligen
64eb4ff753 Merge pull request #14983 from aschackmull/dataflow/deprecate-old-api
Data Flow: Deprecate old data flow api.
2023-12-08 14:27:25 +01:00
Anders Schack-Mulligen
75d8da9007 Dataflow: Add change note about deprecation. 2023-12-08 14:25:20 +01:00
Jeroen Ketema
c6b0a2363a C++: Add change note 2023-12-08 13:31:32 +01:00
Anders Schack-Mulligen
7ee3068fe7 Java: Fix accidental cartesian product. 2023-12-08 13:27:05 +01:00
Jeroen Ketema
5165999e9e C++: Deprecate isUserInput, userInputArgument, and userInputReturned 2023-12-08 13:21:31 +01:00
Mathias Vorreiter Pedersen
30c67ba6e7 Merge pull request #15040 from MathiasVP/fewer-dataflow-branches
C++: Fix dataflow inconsistencies
2023-12-08 12:14:49 +00:00
Harry Maclean
1dc0a063b0 Merge pull request #14679 from hmac/hmac-model-editor-ruby
Ruby: Experimental model editor support
2023-12-08 11:03:38 +00:00
Mathias Vorreiter Pedersen
90a62b27f5 Merge branch 'main' into fewer-dataflow-branches 2023-12-08 10:35:33 +00:00
Rasmus Wriedt Larsen
dc90411809 Python: Don't include docs/ folder 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
004bb50ef2 Python: Disallow invalid path component 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
6ce8cd38d8 Python: Disallow examples 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
6db3b37ed7 Python: Use separate directory for subclass capture models 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
c4abffe77e Python: Ignore any captured info with tests in it 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
de41f199fc Python: Allow single file processing 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
2c0bed174f Python: Remove suspicious packages 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
0b5c73ae1e Python: Allow any .bqrs file 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
b24e565128 SubclassFinder: don't include site-packages 2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
aa5eee1eac Python: Revert manual pickle modeling
This reverts commit 62910f0cab525ca4d4901c4c27f6e6b22c3375fc.
This reverts commit 75a8197879ec47094d9b18f3dab7bcc1c1cdba28.

We don't find `kombu.serialization.pickle_load` since we respect
`__all__`. I think that was an attempt to not flood the captured
modeling with useless re-exports, but I think we've ended up doing that
anyway... we should consider to remove that restriction!

see 21d7df29c7/kombu/serialization.py (L29)
2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
f74581ad09 Revert "Python: Model owslib.etree.etree directly"
This reverts commit 1213e786519a11142746fd3a725c874181f3a42b.

By fixing a few bugs in the SubclassFinder + manually running Find.ql on the geonode DB from DCA, I found that the installed version of owslib had both: https://github.com/geopython/OWSLib/blob/0.27.2/owslib/etree.py
2023-12-08 11:27:53 +01:00
Rasmus Wriedt Larsen
6ef9a2b11e Python: Fix problem if import is used
I fixed it in both predicates... I think we might still be able to remove
`newDirectAlias` -- but with it being better, it will allow us to better test if `newImportAlias` actually cover everything we need!
2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
fcdc8102e2 Python: Add test highlight problem is import is used :O 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
f1fd9b4c7a Python: Fix underlying problem of not using Alias 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
a956e1f613 Python: Use django View instead of MethodView
Due to the 'only model most specific spec' logic highlighted in previous
commit, I'm changing away from MethodView/View, and use Django view instead.

In practice this shouldn't matter at all, but for writing tests it would
have been a nice fix to only have the "same name but more specific"
logic apply when it's the same _definition_ location. We used to have
this information available, but right now we don't... so instead of
spending a lot of time rewriting the core library, I simply used a
different class :D :O :(
2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
03aa2e27df Python: Explain the funky logic in Find.ql 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
1f8f6dd0ec Python: Ensure no deps visible in FindSubclass tests 2023-12-08 11:27:52 +01:00
Rasmus Wriedt Larsen
af2d783b38 Python: More examples of things to handle in find-subclass 2023-12-08 11:27:52 +01:00
Taus
fa6aec7ae2 Python: Model owslib.etree.etree directly
Somehow, this alias did not get picked up by the tooling.
2023-12-08 11:27:52 +01:00
Taus
6d40e7e0fc Python: Add extensible modelling for lxml.etree 2023-12-08 11:27:52 +01:00
Taus
5b9d56774b Python: Refactor references to ElementTree
This would probably be better as a module, but I wanted to verify
first that this would yield the right results.
2023-12-08 11:27:52 +01:00
Taus
d29879a844 Python: Model kombu.serialization
More `pickle` wrappers.
2023-12-08 11:27:52 +01:00
Taus
a6dc6f3e42 Python: Add model for flask.restful
Not subclass-related -- just an alias.
2023-12-08 11:27:52 +01:00
Taus
6261a94986 Python: Add cloudpickle model
This one didn't seem to fit into the subclass approach, so I just modeled
it manually.
2023-12-08 11:27:52 +01:00
Taus
5920a8fad6 Python: Add meta-query for "interesting" taint sinks 2023-12-08 11:27:52 +01:00
Taus
43fe9ca31d Python: Model rest_framework.exceptions.APIException
Only models the subclasses of `APIException` that share the same interface as
`APIException` itself with regard to the `getBody` predicate.
2023-12-08 11:27:52 +01:00
Taus
1f66659ff2 Python: Add Django FileField model 2023-12-08 11:27:52 +01:00
Taus
aa3f1cf3e1 Python: extend aiohttp model 2023-12-08 11:27:52 +01:00
Taus
b5bffb2220 Python: Add aioch model 2023-12-08 11:27:52 +01:00
Taus
875fa0b8f0 Python: Add Peewee model 2023-12-08 11:27:52 +01:00
Taus
5e3bdb8701 Python: Add Pydantic model 2023-12-08 11:27:51 +01:00
Taus
9d93afe128 Python: Add logging.Logger model 2023-12-08 11:27:51 +01:00
Taus
dea61e14d1 Python: Add Urllib3 model 2023-12-08 11:27:51 +01:00
Taus
1269a98d2b Python: Add Tornado models 2023-12-08 11:27:51 +01:00
Taus
6093bb9fd4 Python: add some stdlib models 2023-12-08 11:27:51 +01:00
Taus
4879a931eb Python: Add starlette.requests.URL model 2023-12-08 11:27:51 +01:00
Taus
a3f7885787 Python: Add SqlAlchemy model 2023-12-08 11:27:51 +01:00
Taus
422733f32a Python: Add rest_framework model 2023-12-08 11:27:51 +01:00
Taus
5afead5896 Python: Add Pycurl model 2023-12-08 11:27:51 +01:00
Taus
f1a72311ed Python: add MultiDict model 2023-12-08 11:27:51 +01:00
Taus
62db8cc633 Python: Add MarkupSafe model 2023-12-08 11:27:51 +01:00
Taus
cdb0ac524d Python: Add invoke model 2023-12-08 11:27:51 +01:00
Taus
699b6b8bef Python: Add httpx model 2023-12-08 11:27:51 +01:00
Taus
6128c89518 Python: Add Flask app and blueprint models 2023-12-08 11:27:51 +01:00
Taus
a81f8ea54d Python: Add Django RawSQL and HttpRequest models 2023-12-08 11:27:51 +01:00
Taus
ff9482f81b Python: Add fabric connection model 2023-12-08 11:27:51 +01:00
Taus
947aa099e0 Python: Add aiohttp.ClientSession model 2023-12-08 11:27:51 +01:00
Taus
f5bed2d955 Python: Add clickhouse_driver model 2023-12-08 11:27:51 +01:00
Taus
83e6e51e95 Python: Add starlette.websocket model 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
f19b672656 Python: Also capture alias with new name 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
e7d55736b0 Python: Add test of find-subclass code 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
7d86a8d7f1 Python: Improve speed of process-mrva-results.py
Same trick as 'generate-code-scanning-query-list.py'
2023-12-08 11:27:50 +01:00
Taus
750f14f859 Python: Add http.client.HTTPResponse model 2023-12-08 11:27:50 +01:00
Taus
1d4b4ee740 Python: Add Requests response model
This required making some of the relevant bits public, but they are marked as internal anyway.
2023-12-08 11:27:50 +01:00
Taus
cb1efa915e Python: Add Flask response model 2023-12-08 11:27:50 +01:00
Taus
7b1c6b0dd6 Python: Add Django response models 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
d622d873d9 Python: Enable auto-model for Django Model 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
bff7ae20e1 Python: Enable auto-model for cgi.FieldStorage 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
1e69762242 Python: More import fixes
:thinkies: turns out that .getASubclass*() had to be applied everywhere...
2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
af6c5ccead Python: Enable auto-model BaseHttpRequestHandler 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
ba19f95d3e Python: Improve SelfRefMixin
This is important to model mixins correctly, for example when they help
handle incoming requests, and therefore need to know that `self.kwargs`
contains data controlled by a user.
2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
dfdb66f723 Python: Allow any results.bqrs file 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
77a4d81a08 Python: Improve import * handling 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
ec384649e8 Python: Automodel for WSGIServer 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
eb97a7989f Python: Automodel for tornado 2023-12-08 11:27:50 +01:00
Rasmus Wriedt Larsen
d6fec9e4a7 Python: Make Django use auto-modeling
Ooops
2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
734dcb156a Python: Sort MaD rows
(makes future diffing much easier)
2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
1c43d11c54 FIXME already fixed 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
5e98ff48ff Python: Add script to process results from MRVA (bqrs files)
Also makes `empty.model.yml` empty once again
2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
451a210916 Python: Remove query predicate annotation 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
b1f5dea70c Python: Add query metadata 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
b66dd23a68 Python: Streamline what modules to allow for now 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
ba0a5b1c23 Python: Adjust test-code predicate 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
bb3ced02e3 Python: Improve docs/names around already modeled classes 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
f06bbd2263 WIP rest of modeling done so far 2023-12-08 11:27:49 +01:00
Rasmus Wriedt Larsen
2f17d2f3ac WIP: Flask View class modeling for restplus
Based on some DBs I had that contained dependencies
2023-12-08 11:27:49 +01:00
Geoffrey White
6a48e6ed5e Merge pull request #15038 from geoffw0/mmmmodels
Swift: Model Manual Memory Management closure functions and withMemoryRebound variants
2023-12-08 10:25:58 +00:00
Mathias Vorreiter Pedersen
7b83947383 Merge branch 'main' into fewer-dataflow-branches 2023-12-08 09:30:01 +00:00
Mathias Vorreiter Pedersen
1c73d43b4f C++: Accept more test changes. 2023-12-08 09:29:48 +00:00
Tom Hvitved
0361b2e6e8 QL4QL: Improvements to RedundantImport query 2023-12-08 10:19:04 +01:00
Harry Maclean
199c6b224d Ruby: fix warnings 2023-12-08 09:16:17 +00:00
Jeroen Ketema
9a555ba16e Merge pull request #14909 from jketema/rm-dtt
C++: Remove `DefaultTaintTracking` library
2023-12-08 10:08:55 +01:00
dependabot[bot]
e822fe975d Bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-08 03:10:16 +00:00
Mathias Vorreiter Pedersen
e648058d30 C++: Accept test changes. 2023-12-07 23:11:28 +00:00
Mathias Vorreiter Pedersen
d6871c7cf9 C++: Merge 'PostUpdateFieldNode' and 'IndirectArgumentOutNode' into a single IPA branch. 2023-12-07 23:11:28 +00:00
amammad
a3fbc3c20c fix ResponseBody Class issues 2023-12-07 19:36:27 +01:00
Geoffrey White
ba6d3484f5 Swift: Add more tests of pointer methods. 2023-12-07 18:09:34 +00:00
Chuan-kai Lin
96b793a877 Merge pull request #15032 from github/post-release-prep/codeql-cli-2.15.4
Post-release preparation for codeql-cli-2.15.4
2023-12-07 09:23:32 -08:00
Geoffrey White
801878bff2 Swift: I believe flow through withUnsafeMutableBytes should always be taint flow, as it changes the type of elements to bytes. 2023-12-07 16:42:35 +00:00
Geoffrey White
ea68af8b7f Swift: Change note. 2023-12-07 16:42:34 +00:00
Geoffrey White
8818b3d22d Swift: Model withMemoryRebound, assumingMemoryRebound, bindMemory. 2023-12-07 16:03:01 +00:00
Geoffrey White
db3dfdc9a0 Swift: Model Manual Memory Management closure functions. 2023-12-07 15:55:00 +00:00
Michael Nebel
2e6e2eabf2 Merge pull request #15036 from michaelnebel/csharp/intptrdefaultssimple
C#: Parameter defaults for `nint` and `nuint` in compiled code.
2023-12-07 16:20:41 +01:00
Geoffrey White
1de9919193 Swift: Test Manual Memory Management closure functions. 2023-12-07 15:10:41 +00:00
Harry Maclean
1b29ed2a81 Ruby: Address review comments 2023-12-07 14:31:27 +00:00
Harry Maclean
79a83ec74b Ruby: elaborate placeholder query 2023-12-07 14:26:15 +00:00
Tamás Vajk
51adcf5e10 Merge pull request #15010 from tamasvajk/fix/stringbuilder-interpolation
C#: Support interpolated strings in `StringBuilder.Append`
2023-12-07 15:25:44 +01:00
Anders Schack-Mulligen
9fafa973d8 C++: Remove irrelevant test. 2023-12-07 14:13:42 +01:00
Tamas Vajk
75fa67726e Fix models to support fluent chaining 2023-12-07 14:10:16 +01:00
Michael Nebel
d9c6d4e6cb C#: Update Parameters expected output. 2023-12-07 13:14:24 +01:00
Michael Nebel
aac3ec81f2 C#: Add generated cast expression for nuint and nint parameter defaults. 2023-12-07 13:14:24 +01:00
Geoffrey White
32fdf4fc9f Merge pull request #15007 from geoffw0/sensitivekeytests
Swift: Add some tests and model SecKeyCopyExternalRepresentation
2023-12-07 10:50:13 +00:00
Tamas Vajk
e0c9be371f Add change note 2023-12-07 10:57:18 +01:00
Tamas Vajk
89df59a083 C#: Add missing models and fix interpolated string flow into StringBuilder 2023-12-07 10:56:59 +01:00
Geoffrey White
028326abad Swift: Correct US spellings. 2023-12-07 09:54:01 +00:00
Tamas Vajk
2c624c23ed Add test cases for missing flow with interpolated strings and StringBuilder 2023-12-07 10:32:01 +01:00
Tamas Vajk
9f24b026fb C#: Move StringBuilder dataflow tests to separate file 2023-12-07 10:31:50 +01:00
Tamás Vajk
3431fcf9af Merge pull request #15025 from tamasvajk/feature/change-stringbuilder-modeling
C#: Change `StringBuilder` flow models to not use `Element` access path
2023-12-07 10:29:54 +01:00
Tamas Vajk
c1db689f2f Fix expected test results 2023-12-07 09:59:33 +01:00
Tamas Vajk
669a0c6827 Fix StringBuilder.ToString summaries 2023-12-07 09:21:27 +01:00
amammad
dbf01a9284 fix an issue in ResponseBody, change isHTMLEscape to isHtmlEscape 2023-12-07 08:52:55 +01:00
Tamás Vajk
a8bd6b8cb1 Merge pull request #15024 from tamasvajk/fix/interpolated-strings-stubs
C#: Add interpolated string handler attributes to generated stubs
2023-12-07 08:18:08 +01:00
dependabot[bot]
3d7ab2e0b0 Bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-07 03:43:13 +00:00
github-actions[bot]
92af5f5386 Post-release preparation for codeql-cli-2.15.4 2023-12-06 22:59:22 +00:00
Rasmus Lerchedahl Petersen
263c0aade7 Python: adjust test expectations
mostly removing of nodes from the graph.
One result lost:
```
check("submodule.submodule_attr", submodule.submodule_attr, "submodule_attr", globals()) #$ MISSING:prints=submodule_attr
```
2023-12-06 23:00:51 +01:00
Mathias Vorreiter Pedersen
04c2ce97fd Merge pull request #15027 from jketema/more-exit
C++: Also support the `__noreturn__` attribute in `exits`
2023-12-06 21:48:26 +00:00
Chuan-kai Lin
ff0c1ca2d6 Merge pull request #15031 from github/release-prep/2.15.4
Release preparation for version 2.15.4
2023-12-06 13:35:26 -08:00
github-actions[bot]
c04457e9e7 Release preparation for version 2.15.4 2023-12-06 21:11:50 +00:00
Chuan-kai Lin
4a7e816a30 Merge pull request #15029 from github/copy-alexdenisov/update-docs
docs: update supported Swift version
2023-12-06 13:08:54 -08:00
Rasmus Lerchedahl Petersen
8c5ca3f564 Python: remove control flow nodes
for module entry definitions from the dataflow graph.
2023-12-06 21:47:03 +01:00
Alex Denisov
7923c33a7b docs: update supported Swift version 2023-12-06 12:25:31 -08:00
Robert Marsh
1087087acb Merge pull request #14570 from rdmarsh2/rdmarsh2/swift/extract-pattern-types
Swift: extract types for patterns
2023-12-06 14:11:53 -05:00
Geoffrey White
366a9f1b7e Swift: Convert unsafepointer.swift test to use labelled sources. 2023-12-06 18:57:30 +00:00
Jeroen Ketema
af1da1e9ae C++: Also support the __noreturn__ attribute in exits
Observed this attribute while working on coding standards test regression
when replacing Guards by IRGuards.
2023-12-06 18:08:39 +01:00
Mathias Vorreiter Pedersen
1bc6f88f58 Merge pull request #14992 from jketema/ir-guards-replacement
C++: replace Guards with IRGuards
2023-12-06 15:55:22 +00:00
amammad
20a3211d06 move sanitizers from sharedxss::sanitizer to EscapeFunction::Range, added proper inline tests 2023-12-06 16:19:34 +01:00
Tamas Vajk
eeabb81973 Adjust expected test files 2023-12-06 16:00:43 +01:00
amammad
3e0ed0090f added BodyWriter Sink, added proper content-type header in tests to comply new changed xss strategy 2023-12-06 16:00:36 +01:00
Tamas Vajk
a705f6dc0d C#: Change StringBuilder flow models to not use Element access path 2023-12-06 15:54:34 +01:00
amammad
d3099ff482 fix tests, move from SharedXss::Sink to Http::* classes 2023-12-06 15:52:50 +01:00
Ian Lynagh
c1cc441da7 Merge pull request #15023 from igfoo/igfoo/df-wrapper
Kotlin: Fix dataflow with Array.set wrappers
2023-12-06 14:48:54 +00:00
Tamas Vajk
50b7ab8448 C#: Add interpolated string handler attributes to generated stubs 2023-12-06 15:40:48 +01:00
Tamás Vajk
faa63dda8b Merge pull request #14994 from tamasvajk/standalone/framework-assembly-reshuffle
C#: Only consider latest version of dotnet framework flavors
2023-12-06 14:54:11 +01:00
Ian Lynagh
fc11a87882 Kotlin: Fix dataflow with Array.set wrappers 2023-12-06 12:19:46 +00:00
Ian Lynagh
7fc7b96ed7 Kotlin: Add a test for dataflow with an Array.set wrapper 2023-12-06 12:19:25 +00:00
Ian Lynagh
49c188e612 Merge pull request #15009 from igfoo/igfoo/qual
Docs: DataFlow: Add a missing qualifier
2023-12-06 12:10:56 +00:00
Jeroen Ketema
edf178696d C++: accept test changes for IR Guards replacement 2023-12-06 12:47:20 +01:00
Robert Marsh
88073a5fb2 C++: change note for IRGuards replacing Guards 2023-12-06 12:47:20 +01:00
Robert Marsh
172445f5e7 C++: replace Guards with IRGuards 2023-12-06 12:47:20 +01:00
Jeroen Ketema
db1dc6fa2c Merge pull request #15021 from jketema/ir-guards-unreached-fix
C++: Fix handling of unreached instructions in IRGuards
2023-12-06 12:46:09 +01:00
Paolo Tranquilli
db0fc3775a Merge pull request #15004 from github/alexdenisov/fix-swift-autobuilder-bug
Swift: fix autobuilder bug when Xcode failure breaks the whole autobuild process
2023-12-06 11:29:26 +01:00
Mathias Vorreiter Pedersen
9fa20f5f39 Merge pull request #14799 from MathiasVP/solve-modify-copy-problem
DataFlow: Add language-specific predicate for ignoring steps in flow-through calculation
2023-12-06 09:55:34 +00:00
Jeroen Ketema
4390e4cad3 C++: Fix handling of unreached instructions in IRGuards 2023-12-06 10:23:27 +01:00
Jeroen Ketema
d6e30cd828 C++: Add test showing unreachable instructions give spurious blocks in IRGuards 2023-12-06 10:23:27 +01:00
Tamas Vajk
efa7408491 C#: Use latest asp.net core/windows desktop framework DLLs from nuget folder 2023-12-06 10:17:02 +01:00
Geoffrey White
ff8b796731 Merge pull request #14692 from geoffw0/webview3
Swift: Simplify AdoptsWkNavigationDelegate in WebView.qll.
2023-12-06 09:11:33 +00:00
Jeroen Ketema
49a4306514 Merge pull request #15015 from jketema/exit
C++: Add `_Exit` to the list of exiting (non-returning) functions
2023-12-06 10:07:55 +01:00
Geoffrey White
4cec14657e Merge pull request #14853 from geoffw0/logsinks
Swift: More sinks for swift/cleartext-logging
2023-12-06 09:00:26 +00:00
Owen Mansel-Chan
aad847497b Merge pull request #14962 from owen-mc/go/improve-tests-incorrect-integer-conversion
Go: Improve tests for Incorrect Integer Conversion
2023-12-06 07:40:00 +00:00
Nora Dimitrijević
6d24eb4814 Merge pull request #14897 from d10c/d10c/relax-cpp-dbscheme
C++: Relax the dbscheme for `link_targets/2`
2023-12-05 23:27:03 +01:00
Nora Dimitrijević
66c0a4af5a Upgrade/downgrade script 2023-12-05 22:03:40 +01:00
Nora Dimitrijević
0307354d6e Relax the C++ dbscheme for link_targets/2 2023-12-05 22:03:40 +01:00
Chuan-kai Lin
5b62c0cb53 Merge pull request #15016 from github/revert-15003-dependabot/github_actions/actions/labeler-5
Revert "Bump actions/labeler from 4 to 5"
2023-12-05 12:43:16 -08:00
Chuan-kai Lin
ba57a0363c Revert "Bump actions/labeler from 4 to 5" 2023-12-05 12:09:56 -08:00
Jeroen Ketema
696cbeae5c C++: Add _Exit to the list of exiting (non-returning) functions 2023-12-05 20:33:43 +01:00
Tom Hvitved
dde83b6415 Merge pull request #14709 from hvitved/ruby/shared-type-tracking
Ruby: Adopt shared type tracking library
2023-12-05 20:12:06 +01:00
Ian Lynagh
2c625e34b5 Merge pull request #15008 from igfoo/igfoo/kot-arr-taint
Kotlin: Track taint through Array.get/set
2023-12-05 18:30:21 +00:00
Geoffrey White
521d98ed8d C++: Make the encryption words a tiny bit more flexible. 2023-12-05 18:03:17 +00:00
Geoffrey White
e95098f61f C++: Add 'experimental' tag. 2023-12-05 18:03:11 +00:00
Geoffrey White
cde975dc24 C++: Add even more test cases. 2023-12-05 18:02:51 +00:00
Geoffrey White
2f0be40f37 C++: Exclude results in some common libraries. 2023-12-05 18:00:00 +00:00
Geoffrey White
965d131b5a C++: Add more test cases. 2023-12-05 17:59:26 +00:00
Geoffrey White
fb02e996d4 C++: Address QL-for-QL comments. 2023-12-05 17:58:35 +00:00
Geoffrey White
c83cfe4936 C++: Make output clearer in cases where the function name is a macro expansion (I've seen this more than once). 2023-12-05 17:58:22 +00:00
Geoffrey White
3c6f318cb2 C++: Add query tests. 2023-12-05 17:54:50 +00:00
Taus
a09078a5ca Merge pull request #14777 from yoff/python/remove-ssa-nodes-from-dataflow-graph
Python: remove EssaNodes
2023-12-05 18:10:27 +01:00
Henti Smith
33a0de07b6 Merge pull request #15002 from github/dependabot/github_actions/actions/setup-dotnet-4
Bump actions/setup-dotnet from 3 to 4
2023-12-05 15:35:00 +00:00
Henti Smith
0232cd032c Merge pull request #15003 from github/dependabot/github_actions/actions/labeler-5
Bump actions/labeler from 4 to 5
2023-12-05 15:34:47 +00:00
Tamas Vajk
1b37c66bf8 C#: Only consider latest version of dotnet framework flavors 2023-12-05 16:33:42 +01:00
Michael Nebel
9390b48228 C#: Add (U)IntPtr parameter default test cases. 2023-12-05 16:29:16 +01:00
Ian Lynagh
27f99acb2e Docs: DataFlow: Add a missing qualifier 2023-12-05 14:51:15 +00:00
Geoffrey White
e60dc9a9ed Swift: Use the PostUpdateNode. 2023-12-05 14:48:46 +00:00
Ian Lynagh
8ea155ef24 Kotlin: Add changenote 2023-12-05 14:48:02 +00:00
Ian Lynagh
babf1d6648 Kotlin: Track Kotlin's Array.set when tracking taint 2023-12-05 14:42:45 +00:00
Ian Lynagh
124487c57c Kotlin: Add more taint tests 2023-12-05 14:42:45 +00:00
Ian Lynagh
821b4c727e Kotlin: Add Array.get(_) support to taint tracking 2023-12-05 14:41:32 +00:00
Ian Lynagh
9953794101 Kotlin: Add an extra test case for Kotlin array taint 2023-12-05 14:41:32 +00:00
Jeroen Ketema
30e5e74a78 Merge pull request #15005 from jketema/ir-guards-ternary-fix
C++: Fix IRGuards ternary behaviour
2023-12-05 15:04:56 +01:00
Henti Smith
f66133e29e Merge branch 'main' into dependabot/github_actions/actions/labeler-5 2023-12-05 14:03:25 +00:00
Henti Smith
1d9cd0a73b Merge branch 'main' into dependabot/github_actions/actions/setup-dotnet-4 2023-12-05 14:03:23 +00:00
Tom Hvitved
c6e805faef Ruby: Add more deprecation comments 2023-12-05 14:57:15 +01:00
Geoffrey White
11d582db51 Swift: Change note. 2023-12-05 13:35:44 +00:00
Geoffrey White
5095031110 Swift: Model SecKeyCopyExternalRepresentation as an explicit sensitive data source. 2023-12-05 13:35:44 +00:00
Geoffrey White
1d903c56ad Swift: Add a test with SecKeyCopyExternalRepresentation. 2023-12-05 13:35:44 +00:00
Michael Nebel
e6a5c50ebc Merge pull request #14953 from rpmrmartin/issue/14952
C#: Fix a URL redirection from remote source false positive
2023-12-05 13:02:56 +01:00
Mathias Vorreiter Pedersen
8ce4bbec33 Merge pull request #14867 from MathiasVP/reduce-duplication-from-operators
C++: Reduce duplication from crement operations
2023-12-05 11:57:48 +00:00
Ian Lynagh
70ff59eee1 Merge pull request #14997 from igfoo/igfoo/locs
Kotlin: Accept some location changes in test-kotlin2/library-tests/vararg
2023-12-05 11:18:27 +00:00
Jeroen Ketema
4d702e2eee C++: Fix IRGuards ternary behaviour 2023-12-05 12:17:46 +01:00
Jeroen Ketema
d84961571b C++: Add IRGuards test that shows that ternary behaviour is not quite correct 2023-12-05 12:16:01 +01:00
Mathias Vorreiter Pedersen
2908acfb52 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-05 11:00:17 +00:00
Mathias Vorreiter Pedersen
db0d203eb4 Merge branch 'main' into solve-modify-copy-problem 2023-12-05 09:43:17 +00:00
Mathias Vorreiter Pedersen
a8020f4f78 C++: Add barrier to prevent duplication. 2023-12-05 09:14:23 +00:00
Tom Hvitved
71d09b75fb Merge pull request #14990 from hvitved/csharp/more-nullness-tests
C#: Add a few more `is (not) null` tests
2023-12-05 10:14:13 +01:00
Michael Nebel
8dcdda6d21 C#: Address review comments. 2023-12-05 10:08:06 +01:00
Alex Denisov
8f3d31818c Swift: fix autobuilder bug when Xcode failure breaks the whole autobuild process 2023-12-05 09:58:33 +01:00
Tony Torralba
07b76ee444 Merge pull request #15000 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-12-05 08:54:20 +01:00
Tamás Vajk
b06113a21e Merge pull request #14991 from tamasvajk/standalone/prefer-assembly-version-over-netcore-version
C#: Prefer assembly version over netcore version in conflict resolution
2023-12-05 08:49:08 +01:00
dependabot[bot]
eb08a508c9 Bump actions/labeler from 4 to 5
Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-05 03:33:07 +00:00
dependabot[bot]
4d68beffe0 Bump actions/setup-dotnet from 3 to 4
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3 to 4.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-05 03:33:03 +00:00
github-actions[bot]
48c15035b9 Add changed framework coverage reports 2023-12-05 00:16:34 +00:00
Robert Marsh
e9507b98ef Swift: remove spurious stats file 2023-12-04 21:30:12 +00:00
Geoffrey White
a5dd4a4e2a Swift: More tests of keys as sensitive data. 2023-12-04 19:05:15 +00:00
Alex Eyers-Taylor
7706ac9f10 CPP: Fix changenote location 2023-12-04 18:50:25 +00:00
Alexander Eyers-Taylor
2e92689810 CPP: Apply suggestions from code review of incorrect scanf check
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-12-04 18:32:03 +00:00
Mathias Vorreiter Pedersen
6dd941ee20 Merge pull request #14996 from jketema/toctou-test
C++: Fix `chmod` prototype in toctou test and additional test
2023-12-04 17:42:52 +00:00
Owen Mansel-Chan
570538b4ec Merge pull request #14938 from owen-mc/go/improve-test-unhandled-close-writable-handle
Go: improve test unhandled close writable handle
2023-12-04 16:56:09 +00:00
Jeroen Ketema
7f1bd499ce C++: Add test annotation 2023-12-04 17:53:08 +01:00
Mathias Vorreiter Pedersen
d9d36ff213 C++: Fix Code Scanning errors. 2023-12-04 16:53:03 +00:00
Rasmus Lerchedahl Petersen
9e1c818db6 Python: address review comments 2023-12-04 17:49:26 +01:00
Ian Lynagh
1aa1698f44 Kotlin: Accept some location changes in test-kotlin2/library-tests/vararg 2023-12-04 16:44:38 +00:00
yoff
f5c176bd12 Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2023-12-04 17:41:00 +01:00
Mathias Vorreiter Pedersen
03b77dbf2a C++: Make 'node.asExpr()' behave as 'node.asDefinition()' in void contexts. 2023-12-04 16:38:13 +00:00
Jami
651653998c Merge pull request #14913 from jcogs33/jcogs33/unsafe-url-forward_path-inj-related_cve-2019-3799
Java: add Spring models
2023-12-04 10:18:50 -05:00
Jeroen Ketema
3e2397a3d1 C++: Fix chmod prototype in toctou test and additional test 2023-12-04 16:15:44 +01:00
Sarita Iyer
5a4ea7781e Merge pull request #14976 from github/saritai/docs-update-12431
Document threat models
2023-12-04 10:10:00 -05:00
Sarita Iyer
c4b6f44dff fix punctuation 2023-12-04 09:47:09 -05:00
Tamas Vajk
267125a65e Adjust comment on OrderAssemblyInfosByPreference method 2023-12-04 15:21:30 +01:00
Sarita Iyer
52a0a8333f Update customizing-library-models-for-java-and-kotlin.rst 2023-12-04 09:21:22 -05:00
Sarita Iyer
5bf93d096b Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-12-04 09:13:33 -05:00
Rasmus Wriedt Larsen
c952f6a648 Python: Update rest of tests to new dataflow lib
I had missed these originally, since I had just fixed the ones that were
highlighted in the actions logs, thinking they had covered everything :(
2023-12-04 14:49:40 +01:00
Tamas Vajk
db22478a47 Fix expected test files 2023-12-04 14:39:20 +01:00
Tony Torralba
649dc9d1d4 Merge pull request #14993 from github/shati-patel/fix-cwe-tags
Update inconsistent CWE tags
2023-12-04 14:30:32 +01:00
Rasmus Lerchedahl Petersen
e091ae84ab Merge branch 'main' of https://github.com/github/codeql into python/remove-ssa-nodes-from-dataflow-graph 2023-12-04 14:05:40 +01:00
Harry Maclean
d630773575 Merge pull request #14627 from alexrford/rb/update_all_sink
Ruby: refine `ActiveRecord` `update_all` as an SQL sink
2023-12-04 13:02:14 +00:00
Chris Smowton
78e0f69d1e Merge pull request #14988 from github/smowton/admin/report-more-files-extracted
Java: report any extracted file as successfully extracted
2023-12-04 12:48:12 +00:00
Chris Smowton
97266c252e Remove mention of TSP 2023-12-04 12:36:04 +00:00
Alex Eyers-Taylor
f3f53570a4 CPP: Fix metadata and add a change-note. 2023-12-04 12:19:31 +00:00
Michael Nebel
2fc7e51a5b C#: Only include source code (and not stubs) in the remote flow source test. 2023-12-04 13:10:10 +01:00
Shati Patel
6284781a9b Update inconsistent CWE tags
Most tags use the "external/cwe/cwe-xxx" format, except for these few queries. Updating them for consistency.
2023-12-04 11:52:31 +00:00
Rasmus Wriedt Larsen
2fed0adde7 Merge pull request #8457 from RasmusWL/add-dataflow-consistency-query
Python: Add dataflow consistency query
2023-12-04 12:50:46 +01:00
Chris Smowton
6d5a493e2d Add change note 2023-12-04 11:48:51 +00:00
Tom Hvitved
46531e653d C#: Deprecate OnAppendCookieTrackingConfig 2023-12-04 12:36:57 +01:00
Rasmus Wriedt Larsen
4dd3ea3798 Python: Update tests to new dataflow lib
Avoids some deprecation warnings :)
2023-12-04 12:36:57 +01:00
Anders Schack-Mulligen
67f0529cda Dataflow: Sync. 2023-12-04 12:36:57 +01:00
Anders Schack-Mulligen
fd920b8585 Java: Deprecate old data flow api. 2023-12-04 12:36:57 +01:00
Mathias Vorreiter Pedersen
359b15bb60 C++: Fix FP by special-casing compound assignments in 'asExprInternal'. 2023-12-04 11:29:51 +00:00
Tom Hvitved
4c8861a60f Merge pull request #14832 from hvitved/csharp/callback-heuristics
C#: Strengthen call-back heuristics by considering body-less methods
2023-12-04 12:27:37 +01:00
Tom Hvitved
84cba21a6c C#: Add a few more is (not) null tests 2023-12-04 12:22:47 +01:00
Mathias Vorreiter Pedersen
ce28c9b485 C++: Add more CWE-119 testcases with compound assignments instead of increments. 2023-12-04 11:22:16 +00:00
Michael Nebel
e028c59a07 Merge pull request #14982 from michaelnebel/csharp/fixmissingpackageprinting
C#: Fix problem with logging unused packages.
2023-12-04 12:10:21 +01:00
Michael Nebel
b9833fc97e C#: Updated expected test output. 2023-12-04 12:02:51 +01:00
Michael Nebel
d160890aca C#: Re-factor to avoid multiple explicit casts. 2023-12-04 12:02:34 +01:00
Michael Nebel
6807fd1569 C#: Add some stubs, a testcase and update the expected output without based on main. 2023-12-04 11:53:09 +01:00
Mathias Vorreiter Pedersen
60204574b6 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:35:07 +00:00
Mathias Vorreiter Pedersen
1198d23b96 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:35:00 +00:00
Mathias Vorreiter Pedersen
5a12a0ad62 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:34:46 +00:00
Mathias Vorreiter Pedersen
09117d3869 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-12-04 10:34:32 +00:00
Tamas Vajk
6f82e63461 C#: Prefer assembly version over netcore version in conflict resolution 2023-12-04 11:08:33 +01:00
Tamás Vajk
44be7dfdd5 Merge pull request #14957 from tamasvajk/standalone/prefer-framework-assemblies
C#: Prefer framework assemblies over arbitrary nuget equivalents
2023-12-04 11:03:03 +01:00
Tom Hvitved
23d09ed7c6 Address review comment 2023-12-04 10:47:52 +01:00
Paolo Tranquilli
d9ca9123e4 Merge pull request #14979 from github/criemen/prepare-bazel-upgrade
Prepare for the bazel 7 upgrade.
2023-12-04 10:24:51 +01:00
Tamas Vajk
31c1caf518 Code quality improvements 2023-12-04 10:20:55 +01:00
Mathias Vorreiter Pedersen
6c7e809187 Merge pull request #14961 from MathiasVP/unique-in-operand
C++: Replace a `strictcount(...)` with `unique(...)`
2023-12-04 09:13:58 +00:00
Jeroen Ketema
71347e4cf1 Merge pull request #14987 from jketema/unneeded-imports
C++: Remove unneeded dataflow imports
2023-12-04 09:15:23 +01:00
Chris Smowton
ad713a7a93 Java: report any extracted file as successfully extracted 2023-12-01 22:35:00 +00:00
Jeroen Ketema
b185efa9e4 C++: Remove unneeded dataflow imports 2023-12-01 21:11:22 +01:00
Sarita Iyer
05c67756ef fix beta note problem 2023-12-01 15:00:44 -05:00
Sarita Iyer
54daf8cacc Apply suggestions from code review
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2023-12-01 12:06:43 -05:00
Sarita Iyer
b5084ccf7f move beta ntoe 2023-12-01 11:59:57 -05:00
Sarita Iyer
6f87b1d622 test 2023-12-01 11:44:06 -05:00
Sarita Iyer
9e69e02d04 fix error 2023-12-01 11:32:13 -05:00
Sarita Iyer
2ab960428a Update customizing-library-models-for-java-and-kotlin.rst 2023-12-01 10:26:42 -05:00
Sarita Iyer
d96d71384d Update customizing-library-models-for-java-and-kotlin.rst 2023-12-01 09:57:11 -05:00
Sarita Iyer
848293470a Update customizing-library-models-for-java-and-kotlin.rst 2023-12-01 09:41:03 -05:00
Michael Nebel
aec070f918 C#: Fix problem with logging unused packages. The dependencies only contains the paths relative to the package directory. 2023-12-01 15:24:33 +01:00
Cornelius Riemenschneider
13acec135d Prepare for the bazel 7 upgrade. 2023-12-01 12:19:53 +01:00
james
7f3ff7f9a5 update threat models section 2023-12-01 11:19:00 +00:00
james
fe126c450b threat model suggestions 2023-12-01 10:54:11 +00:00
Sarita Iyer
e1b5530602 Merge branch 'main' into saritai/docs-update-12431 2023-11-30 17:40:25 -05:00
Sarita Iyer
2bea328a5b Update customizing-library-models-for-java-and-kotlin.rst 2023-11-30 17:39:55 -05:00
Sarita Iyer
849ec72728 Update customizing-library-models-for-java-and-kotlin.rst 2023-11-30 17:21:59 -05:00
Sarita Iyer
48e23e68c1 add info 2023-11-30 17:17:18 -05:00
Taus
4ef1fe49e3 Merge pull request #14918 from github/tausbn/python-support-tarslip-extraction-filters
Python: Add support for extraction filters
2023-11-30 22:55:09 +01:00
Jorge
8abd1d9855 Merge branch 'main' into seclab/dotjs 2023-11-30 19:42:18 +01:00
Jorge
91bc043f30 Add .html.dot to Autobuild.java 2023-11-30 19:38:24 +01:00
Felicity Chapman
30e62d3d28 Merge pull request #14969 from github/felicitymay-patch-1
Remove unwanted period from query name
2023-11-30 17:05:35 +00:00
Felicity Chapman
e9c4ddb399 Merge pull request #14898 from github/fc-codeql-vs-code-12574
Update CodeQL model editor info for revised UI
2023-11-30 16:21:51 +00:00
Mathias Vorreiter Pedersen
175a8a6fb5 Merge pull request #14865 from rdmarsh2/rdmarsh2/swift/correct-keypath-node-steps
Swift: move keypath dataflow writes to fix types
2023-11-30 15:09:55 +00:00
Geoffrey White
b0514de094 C++: Add cpp/crypto-primitive query to experimental. 2023-11-30 15:03:03 +00:00
Robert Marsh
ba250140a8 Swift: fix an incorrect merge conflict resolution 2023-11-30 14:55:14 +00:00
Mathias Vorreiter Pedersen
3a61dd095c C++: Add change note. 2023-11-30 14:39:57 +00:00
Felicity Chapman
4cb2f53223 Remove unwanted period from query name
Our style guide states that names should not end in a period. I'm updating this now to allow us to automate a process for GitHub docs, see: https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#query-name-name
2023-11-30 14:31:17 +00:00
Mathias Vorreiter Pedersen
c1561e8675 Merge branch 'main' into reduce-duplication-from-operators 2023-11-30 14:30:50 +00:00
Mathias Vorreiter Pedersen
43932b61a8 C++: Add more comments. 2023-11-30 14:20:00 +00:00
Chris Smowton
971ced09ad Merge pull request #14671 from smowton/smowton/feature/jdk21-switch-pattern-matching
Java: Add support for Java 21 language features
2023-11-30 14:11:28 +00:00
Jeroen Ketema
eccc373a2b Merge pull request #14958 from jketema/dialects
Add documentation note on not supporting Objective-C(++), C++/CLI, and C++/CX
2023-11-30 13:03:59 +01:00
Owen Mansel-Chan
d52b23db8e Improve tests for Incorrect Integer Conversion
We changed the test query when the query was changed so that the
comments in the test file would stay the same.
I've reverted the test query and updated the comments in the test file.
This avoids problems in the branch switching to use-use flow.
2023-11-30 11:58:10 +00:00
Owen Mansel-Chan
e958a75223 Add comments indicating whether results are expected at new calls 2023-11-30 11:48:10 +00:00
Chris Smowton
aa8f798853 Move condition into isNonFallThroughPredecessor 2023-11-30 11:24:07 +00:00
Chris Smowton
94819e37c4 More StmtParent -> SwitchBlock 2023-11-30 11:24:07 +00:00
Chris Smowton
e93fe8d614 Update change note 2023-11-30 11:24:07 +00:00
Chris Smowton
53ca8e5fe9 autoformat 2023-11-30 11:24:07 +00:00
Chris Smowton
633b92da62 Introduce and use SwitchBlock instead of StmtParent for switch-statement-or-expression 2023-11-30 11:24:07 +00:00
Chris Smowton
e50a0eee59 Remove duplicate of expr exception propagation logic 2023-11-30 11:24:07 +00:00
Chris Smowton
6f3bff19cc Expose getFirstPatternCase, not getPatternCase/2 2023-11-30 11:24:07 +00:00
Chris Smowton
40464ed1f9 Eliminate duplicate predicate 2023-11-30 11:24:07 +00:00
Chris Smowton
3971817c92 Fix: ensure is a switch block 2023-11-30 11:24:07 +00:00
Chris Smowton
cc68169f43 Update test expectations re: record-pattern type accesses 2023-11-30 11:24:07 +00:00
Chris Smowton
b1cea1d91e autoformat 2023-11-30 11:24:07 +00:00
Chris Smowton
561f06a4bd Remove unused predicate 2023-11-30 11:24:06 +00:00
Chris Smowton
e9603f0aba Factor out isNonFallThroughPredecessor 2023-11-30 11:24:06 +00:00
Chris Smowton
84ec453a80 Explicitly rule out switchCaseControls for PatternCase 2023-11-30 11:24:06 +00:00
Chris Smowton
77b1721542 Move TypeTestGuard's logic into Guard.appliesTypeTest 2023-11-30 11:24:06 +00:00
Chris Smowton
b33dc38a65 Fix hasBranchEdge for switch exprs with an internal CFG and incoming edges from a passing case guard 2023-11-30 11:24:06 +00:00
Chris Smowton
9b5b496462 Avoid quadratic switch case intermediate 2023-11-30 11:24:06 +00:00
Chris Smowton
d1e16ada4c Tidy up pattern case CFG logic 2023-11-30 11:24:06 +00:00
Chris Smowton
beb827b1d0 Remove unused predicate 2023-11-30 11:24:06 +00:00
Chris Smowton
1cb5efa1ec Simplify last nodes of rule cases 2023-11-30 11:24:06 +00:00
Chris Smowton
aa5f7352e2 Remove fall-through CFG edge for exhaustive switch statements 2023-11-30 11:24:06 +00:00
Chris Smowton
1047a89613 Improve complexity class of getASuccessorSwitchCase 2023-11-30 11:24:06 +00:00
Chris Smowton
d99a005b42 Fix pretty-printing case null, default 2023-11-30 11:24:06 +00:00
Chris Smowton
4bff7953fc Fix record pattern and pretty-printing 2023-11-30 11:24:05 +00:00
Chris Smowton
419d530a06 Add test ensuring read steps via record patterns lead to type filtering 2023-11-30 11:24:05 +00:00
Chris Smowton
087be2cca8 Adjust test expectations 2023-11-30 11:24:05 +00:00
Chris Smowton
a11c5c7257 Fixup pretty-printer and add test 2023-11-30 11:24:05 +00:00
Chris Smowton
3bde66adfb Pretty-print 'var' statements 2023-11-30 11:24:05 +00:00
Chris Smowton
07d2ce7a41 Change pretty-printing of PatternCase 2023-11-30 11:24:05 +00:00
Chris Smowton
5511955b60 Simplify getCaseIndex 2023-11-30 11:24:05 +00:00
Chris Smowton
bbc0f29f16 Restrict getCheckedType to unrestricted records, introduce getSyntacticCheckedType and use that where appropriate 2023-11-30 11:24:05 +00:00
Chris Smowton
29fdd04eb0 Include switch and instanceof binding in Variable.getAnAssignedValue, and test via endsInQuote 2023-11-30 11:24:05 +00:00
Chris Smowton
ef6ea71e43 Revert unnecessary exists statement 2023-11-30 11:24:05 +00:00
Chris Smowton
47e3d7d8a5 Cast back to Object in advance of returning, to ensure the test doesn't mask a shortcoming of type pruning by pruning at the return site 2023-11-30 11:24:05 +00:00
Chris Smowton
f0144d6a3d Expose that case guard test controls its case body 2023-11-30 11:24:04 +00:00
Chris Smowton
da62a04653 Note that binding variables may be casting nodes 2023-11-30 11:24:04 +00:00
Chris Smowton
c11a260369 Note we can't prove certain unreachable callables when 'case null' is present 2023-11-30 11:24:04 +00:00
Chris Smowton
89f7e7f76a autoformat 2023-11-30 11:24:04 +00:00
Chris Smowton
dd41f50fbf Fix uses of ConditionBlock that require a condition expression (not a switch case statement) 2023-11-30 11:24:04 +00:00
Chris Smowton
68fe7efd9e autoformat 2023-11-30 11:24:04 +00:00
Chris Smowton
6b3080ae92 Allow case null, default to be the first switch case
This is consistent with existing treatment of `case null: default:`
2023-11-30 11:24:04 +00:00
Chris Smowton
0b08507033 Document testedBranch 2023-11-30 11:24:04 +00:00
Chris Smowton
ba0a05c804 Add pretty-printing for patterns 2023-11-30 11:24:04 +00:00
Chris Smowton
668f445fb4 Fix switchCaseControls and hasBranchEdge to account for mixed patterns and constant cases 2023-11-30 11:24:04 +00:00
Chris Smowton
c1814408f0 Fix guard basic block for switch cases 2023-11-30 11:24:04 +00:00
Chris Smowton
6583c72c5d Restrict pattern type guards to account for nested record matching failures 2023-11-30 11:24:03 +00:00
Chris Smowton
d40311efe9 Spelling 2023-11-30 11:24:03 +00:00
Chris Smowton
6e868d21bd Make DefaultCase include NullDefaultCase 2023-11-30 11:24:03 +00:00
Chris Smowton
d2ff1baff0 Replace getDefaultOrNullDefaultCase with getDefaultCase 2023-11-30 11:24:03 +00:00
Chris Smowton
0bb051e08c First stab at implementing negative type-test logic for pattern-case 2023-11-30 11:24:03 +00:00
Chris Smowton
8fd4f99a39 Fix autoformat comment translocation 2023-11-30 11:24:03 +00:00
Chris Smowton
b11a17db21 Improve change note 2023-11-30 11:24:03 +00:00
Chris Smowton
d7a517a989 Remove needless test options 2023-11-30 11:24:03 +00:00
Chris Smowton
ab9f2a77e4 Move comments 2023-11-30 11:24:03 +00:00
Chris Smowton
cc373e322f Engineer join order for getLexicallyOrderedRecordField 2023-11-30 11:24:03 +00:00
Chris Smowton
6fb33e0bde Re-re-factor instanceOfGuarded et al 2023-11-30 11:24:03 +00:00
Chris Smowton
06d5233523 Use SwitchCase.getSelectorExpr 2023-11-30 11:24:03 +00:00
Chris Smowton
b731b8d30a Simplify PatternExpr definition 2023-11-30 11:24:02 +00:00
Chris Smowton
3d980b1684 Switch to using VariableAssign for instanceof and switch dataflow 2023-11-30 11:24:02 +00:00
Chris Smowton
176adf4376 Move PatternExpr to correct file 2023-11-30 11:24:02 +00:00
Chris Smowton
8f10d29f68 Typo 2023-11-30 11:24:02 +00:00
Chris Smowton
de2b98f4a1 Fix hasNullCase 2023-11-30 11:24:02 +00:00
Chris Smowton
480781b049 autoformat 2023-11-30 11:24:02 +00:00
Chris Smowton
158f4bff7a Note specific switch bugfix 2023-11-30 11:24:02 +00:00
Chris Smowton
011eb2201e Add test for ObjFlow over binding patterns 2023-11-30 11:24:02 +00:00
Chris Smowton
4cf511e26a Add test for virtual-dispatch flow through binding patterns 2023-11-30 11:24:02 +00:00
Chris Smowton
43c935024a Add test for typeflow propagation through instanceof and pattern-case 2023-11-30 11:24:02 +00:00
Chris Smowton
fa09be0459 Ensure pattern-case and binding-instanceof are covered in all of type, dispatch and object flow 2023-11-30 11:24:02 +00:00
Chris Smowton
88d9caff8c Unused local query: exclude mandatory declarations 2023-11-30 11:24:02 +00:00
Chris Smowton
91774099fa Write-only container query: account for implicitly-initialised variables 2023-11-30 11:24:01 +00:00
Chris Smowton
bb6e04456a Boxed variable query: account for implicit-init variables 2023-11-30 11:24:01 +00:00
Chris Smowton
0e3f6f7873 autoformat 2023-11-30 11:24:01 +00:00
Chris Smowton
9035ba1f30 Fix isImplicitInit; use it in empty-container query 2023-11-30 11:24:01 +00:00
Chris Smowton
7106ec77bc Fix change note 2023-11-30 11:24:01 +00:00
Chris Smowton
2a6e86633d Improve qldoc 2023-11-30 11:24:01 +00:00
Chris Smowton
e5fdf4dd50 Update test expectation 2023-11-30 11:24:01 +00:00
Chris Smowton
a335109a20 Note that instanceof with a record pattern doesn't have a type access 2023-11-30 11:24:01 +00:00
Chris Smowton
11444a3ae7 Rename Pattern to PatternExpr to avoid clashing with Regex::Pattern 2023-11-30 11:24:01 +00:00
Chris Smowton
023615386b Add change note 2023-11-30 11:24:01 +00:00
Chris Smowton
ded8deceaa Add missing qldoc 2023-11-30 11:24:01 +00:00
Chris Smowton
db5979f1ac Autoformat upgrade/downgrade scripts 2023-11-30 11:24:01 +00:00
Chris Smowton
1d82756dc8 Fix downgrade script 2023-11-30 11:24:00 +00:00
Chris Smowton
04c9f60d96 Make up some stats for new expressions, setting canonical constructors as common as records and new expression kinds initially rare 2023-11-30 11:24:00 +00:00
Chris Smowton
3cdb1d29f1 Add upgrade and downgrade scripts for latest dbscheme 2023-11-30 11:24:00 +00:00
Chris Smowton
330a5b8c6c autoformat ql 2023-11-30 11:24:00 +00:00
Chris Smowton
32416f0fdc Add test for record-pattern instanceof 2023-11-30 11:24:00 +00:00
Chris Smowton
e41da3b10a Add missing test Java files 2023-11-30 11:24:00 +00:00
Chris Smowton
5b734fe937 Pretty-print AST: handle instanceof with record pattern 2023-11-30 11:24:00 +00:00
Chris Smowton
f037030c26 Adapt instanceof CFG and DFG to general patterns 2023-11-30 11:24:00 +00:00
Chris Smowton
20b97af02f Implement dataflow for record patterns
Strategy: there is now a regular flow step from an instance-of LHS / switch expr to the pattern, 0 or more read steps corresponding to record pattern destructors, and then finally a normal SSA def/use step connecting the binding patterns to their first uses.
2023-11-30 11:24:00 +00:00
Chris Smowton
05addde957 Adapt control-flow graph to record patterns 2023-11-30 11:24:00 +00:00
Chris Smowton
556feb31f0 Autoformat 2023-11-30 11:24:00 +00:00
Chris Smowton
936c0206ea Adapt ancillary analyses to record patterns 2023-11-30 11:23:59 +00:00
Chris Smowton
daccd04087 Basic extraction of record patterns 2023-11-30 11:23:59 +00:00
Chris Smowton
293cc67494 Fix stringifying record fields 2023-11-30 11:23:59 +00:00
Chris Smowton
3cb01002dc Add test for usage of qualified enum constants in switch 2023-11-30 11:23:59 +00:00
Chris Smowton
8406ee7ed5 Add test for a pattern-switch guard acting as a data-flow guard 2023-11-30 11:23:59 +00:00
Chris Smowton
144218e2f7 Implement switch CFG when there are mixed constant and pattern cases 2023-11-30 11:23:59 +00:00
Chris Smowton
54a89d6fef Handle 'case null, default:' 2023-11-30 11:23:59 +00:00
Chris Smowton
9a450b09be Account for pattern-cases in more places 2023-11-30 11:23:59 +00:00
Chris Smowton
2b16121638 CFG: Support guarded patterns 2023-11-30 11:23:59 +00:00
Chris Smowton
ba0f3cf718 Add basic support for case guards 2023-11-30 11:23:59 +00:00
Chris Smowton
e94c5a772c Check nullness pass knows pattern case variables can't be null 2023-11-30 11:23:59 +00:00
Chris Smowton
ca43b9603a Fixup typeflow test 2023-11-30 11:23:59 +00:00
Chris Smowton
6b9aed21df Nullness library: recognise switches with null checks 2023-11-30 11:23:58 +00:00
Chris Smowton
79b77ae805 Add AST test for switch with null case 2023-11-30 11:23:58 +00:00
Chris Smowton
05caffc189 Update printast expectation 2023-11-30 11:23:58 +00:00
Chris Smowton
30c5885966 Fix constant cases relating to enum types 2023-11-30 11:23:58 +00:00
Chris Smowton
b21aaa75bc Type-flow: treat pattern-switch on an array index similar to instanceof 2023-11-30 11:23:58 +00:00
Chris Smowton
7dd4030f51 Pattern cases: support type-flow 2023-11-30 11:23:58 +00:00
Chris Smowton
a06ac42512 PrintAst: report pattern-cases similar to pattern-instanceof 2023-11-30 11:23:58 +00:00
Chris Smowton
b6622d2f5b usesType: support pattern cases 2023-11-30 11:23:58 +00:00
Chris Smowton
0f434e7f08 Add test for dataflow vs. pattern-switch 2023-11-30 11:23:58 +00:00
Chris Smowton
6c990c2cf6 Add pattern-case support and generally debug switch CFGs
These were reasonably broken beforehand, due to not taking switch rules into account in enough places, and confusing the expression/statement switch rule distinction with the distinction between switch statements and expressions.

(For example, `switch(x) { 1 -> System.out.println("Hello world") ... }` is a statement, but has a rule expression).
2023-11-30 11:23:58 +00:00
Chris Smowton
f4b45fa511 Support switch cases with binding patterns 2023-11-30 11:23:58 +00:00
Mathias Vorreiter Pedersen
a7ef84f2d1 C++: Replace 'strictcount(...) = 1' with 'unique(...)'. 2023-11-30 11:20:00 +00:00
Jeroen Ketema
6d74743915 Add documentation note on not supporting Objective-C(++), C++/CLI, and C++/CX 2023-11-30 10:57:47 +01:00
Tamas Vajk
0cc94b3a46 C#: Prefer framework assemblies over arbitrary nuget equivalents 2023-11-30 10:54:19 +01:00
masterofnow
57d897d40f Merge branch 'main' into LoadClassNoSignatureCheck 2023-11-30 10:05:00 +08:00
Jami Cogswell
7e869b9cd1 Java: add change note 2023-11-29 16:48:57 -05:00
Robert Marsh
9ac46d4f9c Swift: autoformat 2023-11-29 21:07:06 +00:00
Robert Marsh
0dc4a68ffb Swift: fix typo in change note
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-11-29 21:04:09 +00:00
Robert Marsh
81d2780adb Swift: changenote for pattern types 2023-11-29 21:04:09 +00:00
Robert Marsh
30caf2130e Swift: autoformat a test 2023-11-29 21:04:09 +00:00
Robert Marsh
16e6e8845c Swift: tests for pattern types 2023-11-29 21:04:08 +00:00
Robert Marsh
ade4809d9b Swift: upgrade/downgrade for pattern types 2023-11-29 21:04:05 +00:00
Benjamin Rodes
94a0420040 Updated getResultExpr to getResultNode. Added strlcat. Added tests. 2023-11-29 16:03:41 -05:00
Robert Marsh
3492b4820a Swift: extract types for patterns 2023-11-29 20:54:50 +00:00
Robert Martin
66b456d3c6 C#: Fix a URL redirection from remote source false positive
When guarding the redirect with `HttpRequestBase.IsUrlLocalToHost()`
2023-11-29 13:46:47 -07:00
Robert Marsh
f7e4fb0c65 Swift: respond to comments on keypath reordering 2023-11-29 20:31:48 +00:00
Jami Cogswell
d5fd2db1bd Java update UrlPathHelper tests 2023-11-29 15:23:11 -05:00
Jami Cogswell
ba3548b317 Java: switch to createRelative sink and add UrlPathHelper sources 2023-11-29 14:46:28 -05:00
Jami Cogswell
efa5ab18c1 Java: add taint steps for getResource sink 2023-11-29 14:46:27 -05:00
Benjamin Rodes
4919c4a424 Added StringConcatenation.qll 2023-11-29 13:00:57 -05:00
Chris Smowton
fefc02d650 Merge pull request #14950 from smowton/smowton/admin/empty-argfile-test
Java: Add test for empty argfile
2023-11-29 14:05:39 +00:00
Taus
754deda03e Merge pull request #14946 from github/RasmusWL/list-python-3.12
Docs: List Python 3.12 as supported
2023-11-29 15:05:11 +01:00
Chris Smowton
e110db58f8 Add test for empty argfile 2023-11-29 12:51:22 +00:00
Rasmus Wriedt Larsen
76a6fb563d Docs: List Python 3.12 as supported
Support was added in https://github.com/github/codeql/pull/14636
2023-11-29 11:22:27 +01:00
Mathias Vorreiter Pedersen
1f9e2c71ce Merge pull request #14928 from MathiasVP/surprising-lifetimes-c_str
C++: Add a new query for calling `c_str` on temporary objects
2023-11-29 10:15:11 +00:00
Erik Krogh Kristensen
399872b719 Merge pull request #14943 from rafaelurben/patch-1
JS: Add django template urls as "save urls"
2023-11-29 11:10:16 +01:00
Mathias Vorreiter Pedersen
351caaccfe C++: Add GOOD and BAD comments to qhelp examples. 2023-11-29 09:44:54 +00:00
Mathias Vorreiter Pedersen
8afd9288cb Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-11-29 09:36:29 +00:00
Rafael
1a05c2e704 Added Django test 2023-11-29 08:26:49 +01:00
Rafael
0a74a3a765 Update javascript/ql/src/change-notes/2023-11-28-django-urls.md
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-11-29 08:23:02 +01:00
Rafael
0b0c9e3e48 Create 2023-11-28-django-urls.md 2023-11-28 22:29:53 +01:00
Rafael
286e3951bf Detect Django template URLs
Django URLs are currently not detected, but flask and nunjucks URL are. (See https://github.com/github/codeql/issues/12267)
2023-11-28 22:22:07 +01:00
Felicity Chapman
d299ade765 Merge branch 'main' into fc-codeql-vs-code-12574 2023-11-28 20:42:20 +00:00
Felicity Chapman
298c6b5295 Merge pull request #14942 from github/codeql-cli-2.15.3
Mergeback post release changes from the `codeql-cli-2.15.3` branch to `main`
2023-11-28 20:41:43 +00:00
Felicity Chapman
47d00d1311 Update multiple models section for feedback 2023-11-28 19:59:31 +00:00
Felicity Chapman
9e74f64c5a Update screenshot for feedback 2023-11-28 19:59:31 +00:00
Felicity Chapman
a041a508ac Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-11-28 19:59:31 +00:00
Felicity Chapman
2ede709308 Add a few missing details 2023-11-28 19:59:31 +00:00
Felicity Chapman
824fd75d74 Update after self-review 2023-11-28 19:59:31 +00:00
Pierre
568bcfd038 Fix changelog docs based on latest generator version 2023-11-28 19:59:31 +00:00
Felicity Chapman
ed5e28162f Draft docs for revised UI 2023-11-28 19:59:31 +00:00
Pierre
cedb91ba0d Add combined changelogs for 2.15.3 and backfill historic versions 2023-11-28 19:59:31 +00:00
Jeroen Ketema
483f4c3ce9 Merge pull request #14921 from jketema/kr-style-function-parameters
C++: Expose whether a function was prototyped or not
2023-11-28 17:43:22 +01:00
Robert Marsh
4df25f4f7f Merge pull request #14797 from geoffw0/sqlsinks
Swift: Heuristic sinks for swift/sql-injection
2023-11-28 11:18:10 -05:00
Ian Lynagh
429c550151 Kotlin 2: Accept some location changes 2023-11-28 15:57:48 +00:00
Mathias Vorreiter Pedersen
911f1543e0 DataFlow: Adjust QLDoc. 2023-11-28 15:26:48 +00:00
Tom Hvitved
e79ad3b738 Merge pull request #14937 from hvitved/csharp/stubvisitor-recursion-guard
C#: Prevent infinite recursion in `EqualsModuloTupleElementNames`
2023-11-28 16:25:52 +01:00
Mathias Vorreiter Pedersen
339bf1363a DataFlow: s/flowThroughStepAllowed/validParameterAliasStep. 2023-11-28 14:32:23 +00:00
Mathias Vorreiter Pedersen
e47ad274ea C++: Add Schack's tests. 2023-11-28 14:32:21 +00:00
Mathias Vorreiter Pedersen
fb6329fbc1 C++: Fix test annotation 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
1771d77c23 C++: Accept test changes. 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
9049932f42 C++: Implement the new predicate. 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
064f68fdca DataFlow: Add a predicate for modifying which dataflow steps participate in flow-through summaries. 2023-11-28 14:27:15 +00:00
Mathias Vorreiter Pedersen
1753a7e146 C++: Add tests. 2023-11-28 14:27:15 +00:00
Owen Mansel-Chan
de87dd5dee Test no result if deferred function returns error 2023-11-28 14:23:37 +00:00
Owen Mansel-Chan
57dafd3732 Improve test for UnhandledCloseWritableHandle
Now the different paths won't have the same two sources.
2023-11-28 14:21:43 +00:00
Jeroen Ketema
28ac46a73f C++: Add change note 2023-11-28 14:57:02 +01:00
Taus
6e279183d9 Python: Remove unused unsafeFilter predicates 2023-11-28 13:54:17 +00:00
Taus
91643ad08f Python: Update hasUnsafeFilter to use API graph
This will probably break the tests in the short run. I'll fix the remaining issues in a follow-up commit.

Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com>
2023-11-28 14:48:26 +01:00
Rasmus Wriedt Larsen
2c10160ad4 Python: Highlight we actually want post-update nodes for *args and **kwargs arguments 2023-11-28 14:07:03 +01:00
Rasmus Wriedt Larsen
02f2031239 Python: Ensure other call for super().foo 2023-11-28 14:04:51 +01:00
Mathias Vorreiter Pedersen
2b36ba33f0 C++: Add support for 'data' in the query. 2023-11-28 12:57:59 +00:00
Michael B. Gale
e349611f86 Merge pull request #14932 from github/dependabot/go_modules/go/extractor/extractor-dependencies-29c4186f99
Bump the extractor-dependencies group in /go/extractor with 1 update
2023-11-28 12:57:24 +00:00
Alex Eyers-Taylor
3e9aeac004 CPP: Fix sscanf false positives in older linux repos 2023-11-28 12:07:05 +00:00
Geoffrey White
68a9154106 Swift: Merge the two PrintfFormat implementations. 2023-11-28 12:03:05 +00:00
Mathias Vorreiter Pedersen
7b8d164692 C++: Add more good test cases. 2023-11-28 11:58:33 +00:00
Mathias Vorreiter Pedersen
62c432f3c7 C++: Tabs -> Spaces. 2023-11-28 11:52:17 +00:00
Geoffrey White
5f4213004b Merge branch 'main' into logsinks 2023-11-28 11:51:56 +00:00
Tom Hvitved
fea2bf9217 C#: Prevent infinite recursion in EqualsModuloTupleElementNames 2023-11-28 11:45:09 +01:00
Rasmus Wriedt Larsen
c12053287e Merge pull request #14936 from RasmusWL/star-args-kwargs-missing-flow
Python: Highlight missing post-update flow for `*args` and `**kwargs`
2023-11-28 11:34:51 +01:00
Rasmus Wriedt Larsen
3c82653b63 Python: Highlight missing post-update flow for *args and **kwargs 2023-11-28 10:59:48 +01:00
Jeroen Ketema
7dec819151 C++: Expose whether a function was prototyped or not 2023-11-28 10:24:43 +01:00
Mathias Vorreiter Pedersen
ff4c63f696 C++: Add change note. 2023-11-28 09:16:49 +00:00
Mathias Vorreiter Pedersen
e10caa68f6 C++: Add tests. 2023-11-28 09:06:24 +00:00
Mathias Vorreiter Pedersen
e94cde9b4b C++: Move the use-after-free tests to subdirectory. 2023-11-28 09:06:24 +00:00
Mathias Vorreiter Pedersen
71ad7696c3 C++: Add qhelp. 2023-11-28 09:06:24 +00:00
Mathias Vorreiter Pedersen
204acbacc5 C++: Add a new query for detecting calls to 'c_str' on temporary objects. 2023-11-28 09:06:24 +00:00
dependabot[bot]
d2cad03e28 Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/tools](https://github.com/golang/tools).

- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 03:58:15 +00:00
Mathias Vorreiter Pedersen
22a91d18b8 C++: Make the sequence container classes public. 2023-11-27 21:32:49 +00:00
Eric Bickle
aab7ff919e Java: Improve Gson parse, get, and stream models 2023-11-27 12:26:28 -08:00
Tom Hvitved
ccb9d9b8fa C#: Strengthen call-back heuristics by considering body-less methods 2023-11-27 21:15:06 +01:00
Geoffrey White
09998a9f35 Swift: Formatting. 2023-11-27 19:53:32 +00:00
Geoffrey White
f1f5745ed1 Swift: Change note. 2023-11-27 19:43:15 +00:00
Geoffrey White
f19c6f337d Swift: Add imprecise append/insert models. 2023-11-27 19:43:15 +00:00
Geoffrey White
6e5c285346 Swift: Add imprecise init(data:) model. 2023-11-27 19:23:40 +00:00
Geoffrey White
99aa754b50 Swift: Add tests for UIImage. 2023-11-27 19:19:12 +00:00
Geoffrey White
da648b1014 Swift: Convert ui.swift test to use source labels. 2023-11-27 19:06:52 +00:00
Geoffrey White
4b87dd54fb Swift: Add tests for custom append/insert. 2023-11-27 19:02:45 +00:00
Alex Eyers-Taylor
9eb5b23f54 CPP: Fix query formatting 2023-11-27 15:55:44 +00:00
Taus
ad1a86879e Python: Add change note 2023-11-27 14:39:32 +00:00
Harry Maclean
bd575db254 Ruby: Add test for FrameworkModeEndpoints query 2023-11-27 14:18:18 +00:00
Taus
95e9284d08 Python: Add support for extraction filters
Adds support for extraction filters as defined in
https://peps.python.org/pep-0706/
and implemented in Python 3.12.

By my reading, setting the filter to `'data'` or `'tar'` is probably
safe, whereas `'fully_trusted'` or the default (which is the same as
`None`) is not.

For now, I have just added this modelling to the tarslip query. We could
also share it with the modelling of `shutil.unpack_archive` (which has also
gained a `filter` argument), but it was unclear to me where we should put
this modelling in that case. Perhaps the best solution would be to merge
the experimental `py/tarslip-extended` query into the existing query (in
which case the current location is perhaps not too bad).
2023-11-27 14:11:17 +00:00
Michael Nebel
f05c86239f Merge pull request #14878 from michaelnebel/csharp/pindotnetinintegrationtests
C#: Pin integration tests to a specific .NET version.
2023-11-27 13:22:02 +01:00
Ian Lynagh
7560573b89 Merge pull request #14906 from igfoo/igfoo/locs
Kotlin 2: Accept some location changes in test-kotlin2/library-tests/stmts
2023-11-27 11:42:47 +00:00
Harry Maclean
f40f2db3ab Ruby: Fix name of url-redirection sink model 2023-11-27 11:25:37 +00:00
Mathias Vorreiter Pedersen
70e0b33ce6 Merge pull request #14807 from geoffw0/formatsinks
Swift: More sinks for swift/uncontrolled-format-string
2023-11-27 11:10:04 +00:00
Harry Maclean
6a38223127 Ruby: QL4QL fix 2023-11-27 10:17:31 +00:00
Michael Nebel
d1c4e772f0 C#: Pin integration tests to a specific .NET version. 2023-11-27 10:51:04 +01:00
Harry Maclean
e9277a56a9 Ruby: Add sinks from external models 2023-11-27 09:18:00 +00:00
Harry Maclean
ad608341ab Ruby: Handle alternative gemspec names
Gemspecs are sometimes named via the first argument to
`Gem::Specification.new`:

```rb
Gem::Specification.new 'sinatra' do |s|
  # ...
end
```
2023-11-27 09:18:00 +00:00
Harry Maclean
9b998a39b4 Ruby: Add tags to GenerateModel query
This allows the model editor to find this query in a more robust way
than by file path.
2023-11-27 09:18:00 +00:00
Harry Maclean
b9d15bacba Ruby: Don't classify our test files as test files
For model editing purposes.
2023-11-27 09:17:59 +00:00
Harry Maclean
064b10a5cb Ruby: Handle missing gemspec in model query 2023-11-27 09:17:59 +00:00
Harry Maclean
9dcc424f8c Ruby: Include keyword parameters endpoint query 2023-11-27 09:17:59 +00:00
Harry Maclean
5dcc3d43ca Ruby: Recognise modeled source/sink methods 2023-11-27 09:17:59 +00:00
Harry Maclean
766e68aa36 Ruby: Handle multiple gemspecs in endpoints query 2023-11-27 09:17:59 +00:00
Harry Maclean
c54743c3fd Ruby: Include class methods in model editor query 2023-11-27 09:17:59 +00:00
Harry Maclean
78125a701d Ruby: Model Editor support
Add experimental support for the CodeQL Model Editor.
2023-11-27 09:17:59 +00:00
Stephan Brandauer
68a7734e08 Merge pull request #14849 from github/kaeluka/automodel-extraction-skip-primitive-types-candidates
Java Automodel extraction: remove primitives in framework mode
2023-11-27 09:52:48 +01:00
AlexDenisov
59ee3e16b4 Merge pull request #14800 from github/alexdenisov/more-extractions
Swift: final 5.8/5.9 extractions
2023-11-27 08:41:37 +01:00
amammad
ffe2e398c9 fix tests, add support for Response.BodyWriter() Thanks to @owen-mc 2023-11-25 15:36:37 +01:00
amammad
accc09fd8c Lists of strings should be in alphabetical order. In a QLDoc, there should be a full stop at the end of each sentence. shorter model summary. change target from getACall() to getACall().getResult(.). better tests 2023-11-25 13:36:06 +01:00
Mathias Vorreiter Pedersen
865cbab242 Merge pull request #14911 from MathiasVP/remove-duplication-workaround-in-sources 2023-11-24 20:00:57 +00:00
Geoffrey White
dfdc502525 Merge pull request #14908 from geoffw0/setmodels
Swift: Flow models for Set
2023-11-24 19:16:16 +00:00
Geoffrey White
4c2a6231e9 Swift: Add tests for array append/insert. 2023-11-24 18:33:25 +00:00
Geoffrey White
2e93c1d7b6 Merge pull request #14879 from geoffw0/contentsof
Swift: "contentsOf" sources
2023-11-24 17:47:57 +00:00
Jeroen Ketema
c02a732632 C++: Remove DefaultTaintTracking library 2023-11-24 18:35:19 +01:00
Mathias Vorreiter Pedersen
73138f1913 C++: No need to exclude ExprNodes as sources now that #14903 is merged. 2023-11-24 16:58:30 +00:00
Alex Eyers-Taylor
1c012548d4 CPP: Add tests for incorrect check scanf 2023-11-24 16:58:11 +00:00
Alex Eyers-Taylor
12e24a2b44 CPP: Exclude incorrect scanf checks from missing scanf checks 2023-11-24 16:57:59 +00:00
Mathias Vorreiter Pedersen
e89d8e2967 Merge pull request #14907 from MathiasVP/remove-workaround-in-authentication-bypass
C++: Remove workaround for negated conditions in `cpp/user-controlled-bypass`
2023-11-24 16:54:37 +00:00
Jeroen Ketema
04338215cd Merge pull request #14903 from jketema/ret-val
C++: Do not use `isReturnValue` in `getenv`, `gets`, and `fgets` models
2023-11-24 17:51:11 +01:00
Geoffrey White
06ae374206 Swift: Add a predicate for common code. 2023-11-24 16:06:35 +00:00
Geoffrey White
1638796173 Swift: Add change note. 2023-11-24 15:41:49 +00:00
Geoffrey White
2b481bbb48 Swift: Model Sequence.enumerated() as well. 2023-11-24 15:41:49 +00:00
Jeroen Ketema
ee35bfb290 C++: Do not use isReturnValue in getenv, gets, and fgets models 2023-11-24 16:38:15 +01:00
Mathias Vorreiter Pedersen
a7d820ce62 C++: Remove workaround for negated conditions in 'cpp/user-controlled-bypass'. 2023-11-24 15:17:45 +00:00
Geoffrey White
14031bf351 Swift: Model Sequence.forEach as well. 2023-11-24 14:58:13 +00:00
Alex Eyers-Taylor
f48e8b6062 CPP: Add query for detecteing incorrect error checking for scanf 2023-11-24 14:53:10 +00:00
Geoffrey White
60b27a4e69 Swift: Expand and improve models of Set and Sequence. 2023-11-24 14:43:19 +00:00
Mathias Vorreiter Pedersen
e438671846 Merge pull request #14896 from MathiasVP/no-dtt-in-user-controlled-bypass
C++: Rewrite `cpp/user-controlled-bypass` away from `DefaultTaintTracking`
2023-11-24 14:43:10 +00:00
Mathias Vorreiter Pedersen
631dc98d72 Merge pull request #14904 from MathiasVP/taint-through-int-to-bool-casts
C++: Add Taint through int -> bool casts
2023-11-24 14:30:19 +00:00
Stephan Brandauer
2e5971bb57 Java automodel: also drop boxed types and number types from endpoints 2023-11-24 15:04:13 +01:00
Tom Hvitved
9eaebfcf60 Merge pull request #14859 from hvitved/ruby/missing-flow-tests
Ruby: Add tests illustrating missing flow
2023-11-24 14:57:15 +01:00
Harry Maclean
d239a30866 Merge pull request #14874 from hmac/hmac-missing-flow-test
Ruby: Add test for missing block flow
2023-11-24 13:44:55 +00:00
Ian Lynagh
fc2142feb4 Merge pull request #14887 from igfoo/igfoo/kloc
Kotlin: Add LighterAST support to numlines extraction
2023-11-24 13:43:34 +00:00
Geoffrey White
04c90a684c Swift: Add taint tests for 'Set'. 2023-11-24 13:38:31 +00:00
Ian Lynagh
b33fcf3719 Kotlin: Accept some location changes in test-kotlin2/library-tests/stmts 2023-11-24 13:34:44 +00:00
Tom Hvitved
8ccce5891d Ruby: Add tests illustrating missing flow 2023-11-24 14:28:04 +01:00
Mathias Vorreiter Pedersen
6b48b3643e Merge branch 'main' into no-dtt-in-user-controlled-bypass 2023-11-24 12:50:45 +00:00
Mathias Vorreiter Pedersen
2681617f28 C++: Undo the workaround in 'cpp/tainted-permissions-check'. 2023-11-24 10:56:11 +00:00
Mathias Vorreiter Pedersen
0c924c2b27 C++: Taint-flow through integer to boolean casts. 2023-11-24 10:55:50 +00:00
Mathias Vorreiter Pedersen
e1c326642c Merge pull request #14894 from MathiasVP/dont-short-circuit-negation-in-conditions
C++: Don't short circuit logical negation in conditions
2023-11-24 10:50:42 +00:00
Owen Mansel-Chan
6f9a70475d Merge pull request #14882 from owen-mc/go/minor-fixes
Go: improve CallNode documentation
2023-11-24 10:36:07 +00:00
Erik Krogh Kristensen
22bdcad0c6 Merge pull request #14302 from amammad/amammad-js-SQLI
JS: extend DatabaseAccess by `TypeORM` and `sqlite` and `better-sqlite3` packages
2023-11-24 11:18:47 +01:00
Alex Denisov
2783c6dcd0 Swift: add change note 2023-11-24 10:11:51 +01:00
Alex Denisov
7676ad316c Swift: database downgrade script 2023-11-24 10:08:16 +01:00
Alex Denisov
a4da1a0748 Swift: database upgrade script 2023-11-24 10:08:16 +01:00
Alex Denisov
20e95137f4 Swift: remove MaterizliePackExpr tests as they are only working on macOS 14 2023-11-24 09:55:10 +01:00
Alex Denisov
d7d546e97f Swift: skip TypeJoinExpr 2023-11-24 09:46:04 +01:00
Alex Denisov
6a673e700b Swift: extract DiscardStmt 2023-11-24 09:46:01 +01:00
Alex Denisov
5cd74213cc Swift: extract MaterizliePackExpr 2023-11-24 09:45:01 +01:00
AlexDenisov
cca05e0a82 Merge pull request #14902 from github/redsun82/swift-qldocs
Codegen: allow marking properties as internal
2023-11-24 09:26:50 +01:00
Paolo Tranquilli
ba098c3b1b Swift: make kind and macro_syntax in MacroRole internal 2023-11-24 07:04:03 +01:00
Paolo Tranquilli
6045f59721 Merge branch 'main' into redsun82/swift-qldocs 2023-11-24 07:02:49 +01:00
Paolo Tranquilli
b514bd8d1c Merge pull request #14796 from github/alexdenisov/macros
Swift: extract `MacroDecl`
2023-11-24 07:02:28 +01:00
Paolo Tranquilli
cc6da2829c Swift: make PoundDiagnostics::getKind internal 2023-11-24 06:56:55 +01:00
Paolo Tranquilli
0b57ecf0c7 Codegen: add internal QLdoc to property templates 2023-11-24 06:56:55 +01:00
Paolo Tranquilli
2d34fec0a2 Codegen: remove unneeded has_description property 2023-11-24 06:56:55 +01:00
Paolo Tranquilli
9264b2a6d6 Codegen: add internal to properties, rename ql_internal->internal 2023-11-24 06:56:55 +01:00
erik-krogh
abb8d65483 Merge branch 'main' into amammad-js-SQLI 2023-11-23 21:17:58 +01:00
erik-krogh
43c76468c9 add change-note 2023-11-23 21:17:33 +01:00
Alex Denisov
0d0152f892 Swift: fix docs again 2023-11-23 19:06:32 +01:00
Alex Denisov
1b615e25d8 Merge branch 'main' into alexdenisov/macros 2023-11-23 19:05:12 +01:00
AlexDenisov
a8fcfd154f Merge pull request #14893 from github/redsun82/swift-qldocs
Codegen: fix bug where stub rewriting globbles too much code
2023-11-23 19:04:49 +01:00
Mathias Vorreiter Pedersen
5604fd7d80 C++: Rewrite 'cpp/user-controlled-bypass' away from 'DefaultTaintTracking'. 2023-11-23 17:35:54 +00:00
Mathias Vorreiter Pedersen
97319854e2 C++: Accept test changes. 2023-11-23 16:53:57 +00:00
Mathias Vorreiter Pedersen
6f5cfca84c C++: Sync identical files. 2023-11-23 16:53:57 +00:00
Mathias Vorreiter Pedersen
cc261bfabb C++: Recurse through 'LogicalNotInstruction' in 'getConstantValue'. 2023-11-23 16:53:57 +00:00
Mathias Vorreiter Pedersen
98bf748e64 C++: Accept test changes. 2023-11-23 16:53:57 +00:00
Mathias Vorreiter Pedersen
7364634a6b C++: No need to special-case negations in IRGuards. 2023-11-23 16:53:57 +00:00
Mathias Vorreiter Pedersen
3af3a72161 C++: Don't short-circuit negations in conditions. 2023-11-23 16:53:57 +00:00
Mathias Vorreiter Pedersen
257d94be20 Merge pull request #14886 from jketema/rewrite-tainted-condition
C++: Rewrite `cpp/tainted-permissions-check` to not use `DefaultTaintTracking`
2023-11-23 16:18:03 +00:00
Paolo Tranquilli
a18f1ef7cd Codegen: fix bug where stub rewriting globbles too much code 2023-11-23 17:14:32 +01:00
Alex Denisov
f5ea133067 Swift: trick codegen into not breaking my code 2023-11-23 16:37:09 +01:00
Alex Denisov
f6f6c98306 Swift: use multiline comments for docs 2023-11-23 16:33:15 +01:00
Alex Denisov
f77fd812a9 Swift: add predicates to MacroRole 2023-11-23 16:23:25 +01:00
Pierre
6e4ad58a80 Merge pull request #14889 from github/changedocs/2.15.3
Fix changelog docs based on latest generator version
2023-11-23 15:43:02 +01:00
Mathias Vorreiter Pedersen
149fb7bbc2 Merge pull request #14881 from MathiasVP/no-dtt-in-user-controlled-null-termination-tainted
C++: Rewrite `cpp/user-controlled-null-termination-tainted` away from `DefaultTaintTracking`
2023-11-23 14:41:33 +00:00
Ian Lynagh
c4d3d505ca Kotlin: Accept changes in Kotlin2 ExtractorInformation test 2023-11-23 14:30:50 +00:00
Owen Mansel-Chan
2c99e70e2b Merge pull request #14890 from owen-mc/go/fix-change-note-query-reference
Go: Change how we refer to a query in a change note
2023-11-23 14:15:05 +00:00
Mathias Vorreiter Pedersen
401a378598 C++: Accept test changes. 2023-11-23 14:12:16 +00:00
Mathias Vorreiter Pedersen
b774ae07c8 Update cpp/ql/src/Security/CWE/CWE-170/ImproperNullTerminationTainted.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-11-23 14:10:57 +00:00
Jeroen Ketema
7834626e26 C++: Rewrite cpp/tainted-permissions-check to not use DefaultTaintTracking 2023-11-23 14:52:53 +01:00
Owen Mansel-Chan
436fd9e736 Merge pull request #14775 from aydinnyunus/main
Golang: Web Cache Deception Vulnerability
2023-11-23 13:50:10 +00:00
Alex Denisov
197e5d0267 Swift: regenerate QL after merging main 2023-11-23 14:44:39 +01:00
Owen Mansel-Chan
25a2aef623 Update library name in change note 2023-11-23 13:42:21 +00:00
Alex Denisov
79adc9bfe9 Merge branch 'main' into alexdenisov/macros 2023-11-23 14:42:07 +01:00
Owen Mansel-Chan
25d5104468 Change how we refer to a query in a change note 2023-11-23 13:22:05 +00:00
Joe Farebrother
561b769a79 Merge pull request #14343 from joefarebrother/csharp-xss-flow-step
C#: Add flow steps for View calls refering to Razor pages
2023-11-23 13:05:02 +00:00
Rasmus Wriedt Larsen
4e0cca9a41 Merge pull request #14353 from GeekMasher/py-restframework
Python: support `*args` and `**kwargs` in request handlers
2023-11-23 14:04:36 +01:00
amammad
60b422a35c fix second round of code review. improve documents, fix better-sqlite3 method 2023-11-23 14:01:38 +01:00
Pierre
bff86ed210 Fix changelog docs based on latest generator version 2023-11-23 13:53:14 +01:00
Paolo Tranquilli
7588813864 Merge pull request #14864 from github/redsun82/swift-qldocs
Swift: generate more QLdocs
2023-11-23 13:42:46 +01:00
Ian Lynagh
69cfc79561 Kotlin: Add LighterAST support to numlines extraction 2023-11-23 12:02:27 +00:00
Joe Farebrother
befb1ccd84 Fix integration tests for windows 2023-11-23 10:56:45 +00:00
Joe Farebrother
e4edb19f43 Update to hasFullyQualifiedName 2023-11-23 10:56:45 +00:00
Joe Farebrother
f24c042d04 Rename Razor Page class to Razor View class 2023-11-23 10:56:45 +00:00
Joe Farebrother
aa3fd6add0 Fix standalone tests 2023-11-23 10:56:45 +00:00
Joe Farebrother
33186ac797 Add integration tests 2023-11-23 10:56:45 +00:00
Joe Farebrother
82fbae3e5a Handle standalone extraction case in which generated files list absolute paths 2023-11-23 10:56:45 +00:00
Joe Farebrother
26c048a650 Minor refactoring 2023-11-23 10:56:44 +00:00
Joe Farebrother
e2e4642037 Remove redundant import 2023-11-23 10:56:44 +00:00
Joe Farebrother
7a098dde50 Remove AdditionalTaintStep (redundant with NonLocalJumpNode) 2023-11-23 10:56:44 +00:00
Joe Farebrother
9af44ed0a2 Convert flow steps to value steps 2023-11-23 10:56:44 +00:00
Joe Farebrother
052166f17e Fix issue in genfiles.py + add help text 2023-11-23 10:56:44 +00:00
Joe Farebrother
96bddde7c1 Review suggestions - Remove unneeded import in tests, rename RazorPage to RazorPageClass 2023-11-23 10:56:44 +00:00
Joe Farebrother
ef15980bb6 Remove unnecessary check for the name parameter as parameter 1 2023-11-23 10:56:43 +00:00
Joe Farebrother
2416040854 Review suggestions - make import private and update change note 2023-11-23 10:56:43 +00:00
Joe Farebrother
047f8e485a Make the additional flow steps generally applicible to all queries 2023-11-23 10:56:43 +00:00
Joe Farebrother
0ed7b3c3ad Update qldoc 2023-11-23 10:56:43 +00:00
Joe Farebrother
7371751801 Add change note 2023-11-23 10:56:43 +00:00
Joe Farebrother
826111dc08 Separate area view discovery list for increased precision 2023-11-23 10:56:42 +00:00
Joe Farebrother
f2c3d83d9e Add tests for area cases 2023-11-23 10:56:42 +00:00
Joe Farebrother
7bd7cc5dbe Fix tests 2023-11-23 10:56:42 +00:00
Joe Farebrother
f1b0f1a35d Use shared filepath normalization libary 2023-11-23 10:56:42 +00:00
Joe Farebrother
7194113a64 Add areas 2023-11-23 10:56:42 +00:00
Joe Farebrother
7691cbce87 Add additional test cases 2023-11-23 10:56:42 +00:00
Joe Farebrother
f84b2a96af Add support for view locations defined in code through RazoeViewEngineOptions 2023-11-23 10:56:42 +00:00
Joe Farebrother
4f5ecb899b Add unit tests + fix issue in stubs 2023-11-23 10:56:41 +00:00
Joe Farebrother
ac3f642b45 Unit tests - Write script to aid generating necessary code from .cshtml files. 2023-11-23 10:56:41 +00:00
Joe Farebrother
12a579e0aa Add relative filepath lookup 2023-11-23 10:56:41 +00:00
Joe Farebrother
40a7223620 Implement xss flow step for absolute filepath case 2023-11-23 10:56:41 +00:00
Rasmus Wriedt Larsen
d056706af5 Merge pull request #14725 from RasmusWL/re-modeling
Python: Add taint-flow modeling for `re` module
2023-11-23 11:35:36 +01:00
Erik Krogh Kristensen
ef8d38e9e0 Merge pull request #14885 from erik-krogh/update-changenotes
JS: update the JS change notes to mention security severity instead of just severity
2023-11-23 11:17:53 +01:00
Rasmus Wriedt Larsen
3d46129bbf Python: Remove intermediary steps from taint-test
These were leftovers from old way of propagating taint
2023-11-23 10:40:25 +01:00
erik-krogh
dd1e71ace9 update the JS change notes to mention security severity instead of just severity 2023-11-23 10:28:22 +01:00
Paolo Tranquilli
ff529c34b4 Codegen: use re.escape 2023-11-23 09:37:44 +01:00
Yunus AYDIN
ca56b0157d Merge branch 'github:main' into main 2023-11-22 22:56:23 +03:00
Jeroen Ketema
257fe1ad6b Merge pull request #14801 from jketema/rewrite-tainted-format-string
C++: Rewrite `cpp/tainted-format-string` away from `DefaultTaintTracking`
2023-11-22 17:55:36 +01:00
Owen Mansel-Chan
a130c0f6b3 Merge branch 'main' into main 2023-11-22 16:50:41 +00:00
Owen Mansel-Chan
dd8fb29a65 Improve QLDocs of CallNode and MethodCallNode
When a function is assigned to a variable and called through that
variable then we can't always tell it was a method.
2023-11-22 16:32:10 +00:00
Pierre
98ddbe0d83 Merge pull request #14880 from github/geoffw0-patch-2 2023-11-22 17:31:44 +01:00
Geoffrey White
bcf76b1ac0 Update change note 0.3.3.md
Update original change note in line with the change here: https://github.com/github/codeql/pull/14876#discussion_r1402142306
2023-11-22 16:20:05 +00:00
Jeroen Ketema
1fbe23228e C++: Update test to reflect updated test results 2023-11-22 16:49:13 +01:00
Jeroen Ketema
bb1945f899 C++: Rewrite cpp/tainted-format-string away from DefaultTaintTracking 2023-11-22 16:49:13 +01:00
Mathias Vorreiter Pedersen
640e2f56d5 C++: Accept test changes. 2023-11-22 15:43:24 +00:00
Mathias Vorreiter Pedersen
306440ce6e C++: Convert 'cpp/user-controlled-null-termination-tainted' away from 'DefaultTaintTracking'. 2023-11-22 15:43:24 +00:00
Arthur Baars
29c950035d Merge pull request #14877 from github/post-release-prep/codeql-cli-2.15.3
Post-release preparation for codeql-cli-2.15.3
2023-11-22 16:39:09 +01:00
Geoffrey White
012dc59bf3 Swift: Change note. 2023-11-22 15:24:19 +00:00
Geoffrey White
5723a75f3c Swift: Add heuristic model for init(contentsOfFile) and similar. 2023-11-22 15:24:19 +00:00
Pierre
60ebe3b179 Merge pull request #14876 from github/changedocs/2.15.3
Add combined changelogs for 2.15.3 and backfill historic versions
2023-11-22 16:22:56 +01:00
Ian Lynagh
1f2d9dc95c Merge pull request #14862 from igfoo/igfoo/test-kotlin1
Kotlin: Move tests from test/kotlin to test-kotlin1
2023-11-22 14:45:13 +00:00
github-actions[bot]
0783758bd1 Post-release preparation for codeql-cli-2.15.3 2023-11-22 14:20:26 +00:00
Pierre
9b9a78851d Add combined changelogs for 2.15.3 and backfill historic versions 2023-11-22 15:05:17 +01:00
Rasmus Wriedt Larsen
4a98ed903e Python: Fix consistency for bound-methods used in list-comp 2023-11-22 14:07:40 +01:00
Tom Hvitved
979bcf4ef3 Merge pull request #14868 from hvitved/ssa/locations
SSA: Add locations to ease debugging
2023-11-22 13:26:41 +01:00
Geoffrey White
94cb09e539 Swift: Add test cases. 2023-11-22 11:39:27 +00:00
Ian Lynagh
3dee16c50c Merge pull request #14860 from igfoo/igfoo/isFake
Kotlin 2: isFake is currently broken, so assume not fake for now
2023-11-22 11:07:04 +00:00
Rasmus Wriedt Larsen
67b1414177 Python: Highlight even more cases for multipleArgumentCallExclude 2023-11-22 11:25:23 +01:00
Harry Maclean
288fbfd2ec Ruby: Add test for missing block flow 2023-11-22 09:59:55 +00:00
Paolo Tranquilli
369431125e Codegen: insert doc explaining _patch_class_qldoc 2023-11-22 10:26:04 +01:00
Paolo Tranquilli
f5633be837 Codegen: rename has_doc to has_qldoc 2023-11-22 10:19:36 +01:00
Paolo Tranquilli
418118fc89 Codegen: use more robust regex to patch qldocs 2023-11-22 10:11:05 +01:00
Rasmus Wriedt Larsen
30891ca4aa Merge pull request #14861 from yoff/python/demonstrate-def-use-explosion
Python: test demonstrating the need for phi nodes
2023-11-22 09:57:10 +01:00
yoff
4785048076 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-11-22 09:29:07 +01:00
Tamás Vajk
ace633cb1d Merge pull request #14855 from tamasvajk/standalone/logMessageSink
C#: Tolerate missing call targets in LogMessageSink
2023-11-22 08:37:53 +01:00
Tom Hvitved
1a6886cf99 SSA: Add locations to ease debugging 2023-11-22 08:37:02 +01:00
amammad
eb552b7c93 add failingPositiveTests to inlinetests 2023-11-22 08:00:38 +01:00
Owen Mansel-Chan
b147bacd48 Merge branch 'main' into amammad-go-fastHttp 2023-11-21 21:36:11 +00:00
amammad
0328a2986d move TypeORM library file and tests to experimental
add inline tests :)
Fix TypeORM fuzzy method according to Review
2023-11-21 19:59:06 +01:00
amammad
999ec7053e fix Query class docstring 2023-11-21 18:56:05 +01:00
Mathias Vorreiter Pedersen
a80dbc5200 C++: Accept test changes. 2023-11-21 17:50:11 +00:00
Mathias Vorreiter Pedersen
976adc3c7c C++: Fixup queries to keep the old results. 2023-11-21 17:50:08 +00:00
Mathias Vorreiter Pedersen
ef2caa3944 C++: Add a new API for mapping a dataflow node to a definition. This means we can reduce duplication from 'asExpr'. 2023-11-21 17:49:02 +00:00
amammad
2ad59a5403 fix SSRF sinks 2023-11-21 18:46:35 +01:00
Ian Lynagh
45bbcccd1a Kotlin: Copy TestUtilities into the kotlin testsuites 2023-11-21 17:16:54 +00:00
Robert Marsh
396b9e38c5 Swift: move keypath dataflow writes to fix types 2023-11-21 17:06:21 +00:00
Paolo Tranquilli
30161b0f12 Codegen: patch customized stubs with QLdoc 2023-11-21 17:51:27 +01:00
Paolo Tranquilli
d659709695 Codegen: add render_str 2023-11-21 17:28:12 +01:00
Paolo Tranquilli
e40c53a340 Swift: add full docs to stub classes 2023-11-21 17:27:30 +01:00
Ian Lynagh
7ba199a8c3 Kotlin: Update CODEOWNERS 2023-11-21 16:19:09 +00:00
Rasmus Lerchedahl Petersen
d288c4a709 Python: rename folder 2023-11-21 16:48:41 +01:00
yoff
4f7fde7b87 Merge pull request #14858 from yoff/python/demonstrate-use-use-explosion
Python: Test demonstrating the need for phi-read-nodes
2023-11-21 16:44:11 +01:00
Ian Lynagh
1fb19191ba Kotlin: Add a qlpack.yml to the test-kotlin1 tests 2023-11-21 15:31:18 +00:00
Ian Lynagh
f48cc1a526 Kotlin: Move tests from test/kotlin to test-kotlin1
Matches test-kotlin2
2023-11-21 15:28:12 +00:00
Paolo Tranquilli
b4fd95bd6a Swift: move stub QLdocs to separate templates 2023-11-21 16:25:21 +01:00
Paolo Tranquilli
5b724a7aaf Swift: add QLdoc for Generated modules 2023-11-21 16:18:28 +01:00
Alex Denisov
dd6c5ba383 Swift: update docs 2023-11-21 16:03:18 +01:00
Alex Denisov
7b74478e47 Swift: update tests 2023-11-21 16:03:06 +01:00
Rasmus Wriedt Larsen
63fcaca82f Python: add change-note 2023-11-21 16:02:41 +01:00
Rasmus Wriedt Larsen
a0867b4f66 Python: More HTTP request handler *args/**kwargs modeling
I looked through all `override Parameter getARoutedParameter() {` in our
codebase, and we now modeling *args/**kwargs for all of them 👍
2023-11-21 16:02:40 +01:00
Rasmus Wriedt Larsen
f9d7becd04 Python: Make multipleArgumentCallExclude more specific 2023-11-21 15:57:12 +01:00
Rasmus Lerchedahl Petersen
c552bc5eb1 Python: fix test output 2023-11-21 15:48:22 +01:00
Rasmus Lerchedahl Petersen
077e51c6c6 Python: fix test output 2023-11-21 15:47:18 +01:00
Rasmus Lerchedahl Petersen
4857960f72 Python: test demonstrating the need for phi nodes
or a dataflow node playing that role, at least.
2023-11-21 15:40:05 +01:00
Ian Lynagh
1998e29639 Kotlin 2: isFake is currently broken, so assume not fake for now
We'll want to find a Kotlin-2-compatible replacement for this.
2023-11-21 14:37:53 +00:00
Ian Lynagh
6bd269502f Kotlin: Pull out a tryIsHiddenToOvercomeSignatureClash method 2023-11-21 14:36:10 +00:00
Stephan Brandauer
f2de449ce4 Merge branch 'main' into kaeluka/automodel-extraction-skip-primitive-types-candidates 2023-11-21 14:57:24 +01:00
Alex Denisov
b9952618ff Swift: fix and update change note date 2023-11-21 14:52:28 +01:00
Alex Denisov
b269b79bb3 Merge branch 'main' into alexdenisov/macros 2023-11-21 14:51:00 +01:00
Max Schaefer
2c5ce3216e Merge pull request #14846 from github/max-schaefer/js/path-injection
Update qhelp for js/path-injection.
2023-11-21 13:50:41 +00:00
Alex Denisov
dde2ad1290 Swift: do not print MacroRole as part of AST 2023-11-21 14:49:55 +01:00
Geoffrey White
c89be6a1de Swift: Refine the heuristic (mostly narrower). 2023-11-21 13:49:53 +00:00
Rasmus Lerchedahl Petersen
f138fc0d2d Python: Test demonstrating need for phi-read-nodes
Or for a data flow node filling that role, at least.
2023-11-21 13:54:02 +01:00
Rasmus Wriedt Larsen
37d03ee0f3 Python: Accept .expected changes
Note that in this case, since there is a known `django.urls.path`
route-setup, we know that the request-handler will only be passed
keyword arguments, so it is not a mistake that `*args` is not considered
a routed-parameter here (although it certainly wouldn't have hurt us if
we did consider it a routed-parameter either).
2023-11-21 13:46:55 +01:00
Rasmus Wriedt Larsen
1bc8a6de61 Python: Fixup mistaken modelling 2023-11-21 13:46:23 +01:00
Ian Lynagh
08383eaea5 Merge pull request #14837 from igfoo/igfoo/owners
Kotlin: Add more CODEOWNERS entries
2023-11-21 12:25:17 +00:00
Ian Lynagh
2c2dccabe9 Merge pull request #14833 from igfoo/igfoo/kot2tests
Kotlin: Add a kotlin2 copy of the testsuite
2023-11-21 12:24:49 +00:00
Rasmus Wriedt Larsen
36a846ee32 Python: Fix django regex path handling 2023-11-21 13:08:45 +01:00
Rasmus Wriedt Larsen
c51c15ae74 Python: Add test of routed parameters to *args
Also move the **kwargs and *args test to a more appropriate file
2023-11-21 13:01:01 +01:00
Owen Mansel-Chan
d26dc68baa Merge pull request #14798 from owen-mc/go/improve-value-flow-through-slice-exprs
Go: model value flow with array content through slice expressions
2023-11-21 11:50:08 +00:00
Rasmus Wriedt Larsen
2ec1822e9c Python: Accept consistency-errors in django-orm 2023-11-21 12:44:42 +01:00
Geoffrey White
5bbc61e83c Swift: Add a few more test cases. 2023-11-21 11:32:40 +00:00
Rasmus Wriedt Larsen
5f26790b90 Merge branch 'main' into py-restframework 2023-11-21 11:57:48 +01:00
Rasmus Wriedt Larsen
df9fb141b8 Python: Remove old manual consistency query tests 2023-11-21 11:50:23 +01:00
Tom Hvitved
12359ba733 Add change note 2023-11-21 11:46:15 +01:00
Ian Lynagh
0668b71538 Merge pull request #14831 from igfoo/igfoo/kot2
Kotlin: Add 2.0.0-Beta1
2023-11-21 10:35:12 +00:00
Rasmus Wriedt Larsen
b6df6b7c99 Python: Add dataflow consistency query 2023-11-21 11:33:28 +01:00
Max Schaefer
dfffa1e237 Apply suggestions from code review
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
2023-11-21 10:07:11 +00:00
Michael Nebel
d8e7c9c986 Merge pull request #14767 from michaelnebel/csharp/projectframeworkassets
C#: Framework dependency detection.
2023-11-21 10:55:30 +01:00
Tamas Vajk
253c658ad2 C#: Tolerate missing call targets in LogMessageSink 2023-11-21 10:13:18 +01:00
Tamas Vajk
f0e20fa69e C#: Add test case for missing log message sinks with ambiguous types 2023-11-21 10:09:05 +01:00
Rasmus Wriedt Larsen
71c017f053 Python: Apply suggestions from code review
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-11-21 10:07:42 +01:00
Geoffrey White
57a1becd22 Swift: Add missing QLDoc. 2023-11-21 08:55:52 +00:00
Erik Krogh Kristensen
7263d4d650 Merge pull request #14510 from aibaars/ts53-ts
JS: update typescript extractor to use 5.3 .
2023-11-21 09:10:43 +01:00
Rasmus Lerchedahl Petersen
c8b87f71c5 Python: add change note 2023-11-20 21:44:16 +01:00
Rasmus Lerchedahl Petersen
421d4f3497 Python: filter more sinks in stdlib
Rename variable to reflect larger scope

We had test results inside `os.py`, I suppose we have found a little extra flow.
2023-11-20 21:35:52 +01:00
Rasmus Lerchedahl Petersen
11c71fdd18 Python: remove EssaNodes
This commit removes SSA nodes from the data flow graph. Specifically, for a definition and use such as
```python
  x = expr
  y = x + 2
```
we used to have flow from `expr` to an SSA variable representing x and from that SSA variable to the use of `x` in the definition of `y`. Now we instead have flow from `expr` to the control flow node for `x` at line 1 and from there to the control flow node for `x` at line 2.

Specific changes:
- `EssaNode` from the data flow layer no longer exists.
- Several glue steps between `EssaNode`s and `CfgNode`s have been deleted.
- Entry nodes are now admitted as `CfgNodes` in the data flow layer (they were filtered out before).
- Entry nodes now have a new `toString` taking into account that the module name may be ambigous.
- Some tests have been rewritten to accomodate the changes, but only `python/ql/test/experimental/dataflow/basic/maximalFlowsConfig.qll` should have semantic changes.
- Comments have been updated
- Test output has been updated, but apart from `python/ql/test/experimental/dataflow/basic/maximalFlows.expected` only `python/ql/test/experimental/dataflow/typetracking-summaries/summaries.py` should have a semantic change. This is a bonus fix, probably meaning that something was never connected up correctly.
2023-11-20 21:35:32 +01:00
erik-krogh
5611a3e417 use exact version 2023-11-20 20:48:51 +01:00
erik-krogh
10b3efa667 update to the stable version of TypeScript 5.3 2023-11-20 20:32:24 +01:00
erik-krogh
dde9a7cd7e Merge branch 'main' into ts53-ts 2023-11-20 20:31:00 +01:00
Geoffrey White
b4b78a1bce Swift: Minor corrections. 2023-11-20 19:29:35 +00:00
Geoffrey White
50120f65a3 Swift: Change note. 2023-11-20 18:43:48 +00:00
Geoffrey White
3cecf69818 Swift: Fix spurious results for 'login' functions. 2023-11-20 18:38:47 +00:00
Geoffrey White
aa93165d24 Swift: Add heuristic sinks. 2023-11-20 18:38:47 +00:00
Geoffrey White
d91c5c0486 Swift: Model NSException sinks. 2023-11-20 18:38:46 +00:00
Geoffrey White
7e02c05164 Swift: Address the sprintf case. 2023-11-20 18:38:46 +00:00
Geoffrey White
835967a33e Swift: Fix for autoclosure sinks. 2023-11-20 18:15:16 +00:00
Geoffrey White
795f16ba56 Swift: Model 'printf' variants as cleartext logging sinks. 2023-11-20 18:15:06 +00:00
Geoffrey White
06c2c423b3 Swift: Clean up the test logic slightly. 2023-11-20 18:12:15 +00:00
Geoffrey White
b348dc2a32 Swift: Extend cleartext logging tests (test cases). 2023-11-20 18:11:52 +00:00
Geoffrey White
2a69b03092 Swift: Extend cleartext logging tests (stubs). 2023-11-20 18:11:41 +00:00
Mathias Vorreiter Pedersen
75f860595a Merge pull request #14838 from MathiasVP/no-dtt-in-arithmetic-with-extreme-values
C++: Convert `cpp/arithmetic-with-extreme-values` away from `DefaultTaintTracking`
2023-11-20 16:39:58 +00:00
Rasmus Wriedt Larsen
c8301fc5f0 Merge pull request #14851 from RasmusWL/variable-caputre-list-comprehension
Python: Add test for variable reference in list comprehension
2023-11-20 17:10:34 +01:00
Ian Lynagh
95de7495d1 Kotlin: Fix build with 2.0.0-Beta1 2023-11-20 16:08:02 +00:00
Ian Lynagh
72bafd86df Kotlin: Tweak the regex we use to find the installed Kotlin version 2023-11-20 16:08:02 +00:00
Ian Lynagh
452b68c0ca Kotlin: Add 2.0.0-Beta1 to versions 2023-11-20 16:08:02 +00:00
Rasmus Wriedt Larsen
db1499d5b0 Python: Add test for variable reference in list comprehension 2023-11-20 16:41:34 +01:00
Max Schaefer
b5c92408f4 Merge pull request #14845 from github/max-schaefer/minor
Automodel: Fix a few nits.
2023-11-20 15:24:45 +00:00
Tom Hvitved
6ce8e0510f Ruby: Adopt shared type tracking library 2023-11-20 16:03:24 +01:00
Tom Hvitved
620e8dcb37 Merge pull request #14787 from hvitved/ruby/prune-dataflow-nodes
Ruby: Prune irrelevant data flow nodes and edges
2023-11-20 16:03:00 +01:00
Taus
5b4a8884b4 Merge pull request #14636 from github/tausbn/python-add-support-for-python-3.12-type-syntax
Python: Add support for Python 3.12 type syntax
2023-11-20 15:52:48 +01:00
Stephan Brandauer
737aab66f5 Java automodel: drop primitive parameters from endpoints 2023-11-20 15:09:05 +01:00
Mathias Vorreiter Pedersen
ab6260600e Merge pull request #14822 from MathiasVP/fix-global-variable-flow-for-arrays
C++: Fix global-variable flow for array types
2023-11-20 13:46:05 +00:00
Taus
10b72a0c39 Python: Fix scope of type parameters
This takes care of scoping for type parameters on functions, but not
type aliases or classes.

For classes, the _type parameters_ now have the correct `Class` as scope,
but all their child nodes do not (e.g. the `Name` inside a `TypeParameter`).
This has to do with how the `py_scopes` relation is emitted by the extractor,
since `Name`s are expressions.
2023-11-20 13:31:21 +00:00
Taus
36201105b9 Merge branch 'main' into tausbn/python-add-support-for-python-3.12-type-syntax 2023-11-20 13:27:54 +00:00
Stephan Brandauer
e34a9de008 Java Automodel: drop return values of primitive return type methods from consideration for extraction in framework mode 2023-11-20 14:11:14 +01:00
Rasmus Wriedt Larsen
9bdc2d1c02 Merge pull request #14847 from ctcampbell/main
Update cryptography bill of materials queries
2023-11-20 14:08:11 +01:00
Stephan Brandauer
212a515fa9 Java Automodel: drop return values void methods other than ctors from consideration for extraction in framework mode 2023-11-20 14:00:59 +01:00
Stephan Brandauer
d84501d65c Java automodel extraction: test case for framework mode extraction showing how primitives are currently candidates 2023-11-20 13:36:41 +01:00
Mathias Vorreiter Pedersen
dcba8e5408 C++: Fix global variable flow for array types. 2023-11-20 12:15:55 +00:00
Mathias Vorreiter Pedersen
8039e117ba C++: Add more global-variable flow tests. 2023-11-20 12:15:52 +00:00
Chris Campbell
27a2781954 Merge branch 'github:main' into main 2023-11-20 12:15:45 +00:00
Ian Lynagh
b8a2716ced Merge pull request #14835 from igfoo/igfoo/findTopLevelFunctionOrWarn
Kotlin: Fix findTopLevelFunctionOrWarn for Kotlin 2
2023-11-20 12:11:58 +00:00
Max Schaefer
d147faba4e Update qhelp for js/path-injection. 2023-11-20 11:58:00 +00:00
Max Schaefer
1bed9f9003 Automodel: Fix a few nits. 2023-11-20 11:06:02 +00:00
Tom Hvitved
fab6813a49 Merge pull request #14815 from hvitved/type-tracking/param-consistency-checks
Type tracking: Parameterize consistency checks
2023-11-20 11:05:06 +01:00
Michael Nebel
cf696f2639 Merge pull request #14843 from michaelnebel/csharp/postreviewcomments
C#: In Assets parser let TryReadAllText return null on read error.
2023-11-20 10:18:34 +01:00
Michael Nebel
a9a55dfcd6 C#: In Assets parser let TryReadAllText return null on read error. 2023-11-20 08:35:50 +01:00
Michael Nebel
d3e047f078 Merge pull request #14834 from michaelnebel/csharp/robustassetsfileread
C#: Make assets file reading more robust.
2023-11-20 08:28:07 +01:00
Arthur Baars
db180d9872 Merge pull request #14823 from github/post-release-prep/codeql-cli-2.15.3
Post-release preparation for codeql-cli-2.15.3
2023-11-19 12:13:42 +01:00
masterofnow
2952d8f65a Updated query to cover broader detection. 2023-11-18 18:52:47 +08:00
Mathias Vorreiter Pedersen
c65c2489cf C++: Rewrite 'cpp/arithmetic-with-extreme-values' away from 'DefaultTaintTracking'. 2023-11-17 16:38:35 +00:00
Ian Lynagh
db76681744 Kotlin: Add more CODEOWNERS entries 2023-11-17 16:05:30 +00:00
Ian Lynagh
5c36e63dfe Kotlin: Fix findTopLevelFunctionOrWarn for Kotlin 2
The AST when the parent class is a file class is different in
Kotlin 2 mode.
2023-11-17 15:25:53 +00:00
Michael Nebel
7531852ea6 C#: Log information about asset file read errors. 2023-11-17 15:40:58 +01:00
Michael Nebel
cd9786a952 C#: Assets paths should contain at least one character. 2023-11-17 15:36:15 +01:00
github-actions[bot]
bad499e360 Post-release preparation for codeql-cli-2.15.3 2023-11-17 14:35:41 +00:00
Tamás Vajk
7c3122aade Merge pull request #14828 from tamasvajk/docs/insecure-randomness
C#: Update insecure randomness query description to match implementation
2023-11-17 15:31:33 +01:00
Ian Lynagh
007f181ff5 K2: library-tests/properties: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
90ba3812fe K2: library-tests/private-anonymous-types: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
e63ddd2071 K2: library-tests/operator-overloads: Accept changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
8f8f5f8826 K2: library-tests/methods-mixed-java-and-kotlin: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
584ba80ec7 K2: library-tests/literals: Accept changes
Some literals that were negative are now unaryMiunus applied to a
positive literal.
2023-11-17 14:07:15 +00:00
Ian Lynagh
4ad874a089 K2: library-tests/lateinit: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
a3ed965032 K2: library-tests/jvmstatic-annotation: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
2bd18ab41d K2: library-tests/jvmoverloads_flow: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
713695f8f9 K2: library-tests/jvmoverloads-annotation: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
bb1d5d3c8c K2: library-tests/java_and_kotlin_internal: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
737e9d8844 K2: library-tests/java-lang-number-conversions: Accept changes
With
    fun f(b: kotlin.Byte) {
        val x = b.describeConstable()
    }
and -language-version 1.9 we get
    test.kt:2:15: warning: 'describeConstable(): Optional<DynamicConstantDesc<Byte!>!>!' is deprecated. This member is not fully supported by Kotlin compiler, so it may be absent or have different signature in next major version
and with 2.0
    test.kt:2:15: error: unresolved reference 'describeConstable'.
2023-11-17 14:07:15 +00:00
Ian Lynagh
02ed6e03e2 K2: library-tests/internal-public-alias: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
0a4ba8e8c7 K2: library-tests/interface-delegate: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
081a4ad021 K2: library-tests/inherited-default-value: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
23d881baa4 K2: library-tests/generics: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
91a48856c5 K2: library-tests/generic-instance-methods: Accept loc changes 2023-11-17 14:07:15 +00:00
Ian Lynagh
b97f4401c0 K2: library-tests/exprs_typeaccess: Accept changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
11a664d707 K2: library-tests/dataflow/notnullexpr: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
46e155d327 K2: library-tests/controlflow/dominance: Accept changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
5ab2e30ba3 K2: library-tests/controlflow/basic: Accept changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
b4534fe9ff K2: library-tests/classes: Accept changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
8099a8c851 K2: library-tests/annotations/jvmName: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
0f9afca2ab K2: library-tests/annotation_classes: Accept changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
2151b6d8c5 K2: library-tests/extensions: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
ad1906e871 K2: library-tests/companion_objects: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
400f892376 K2: library-tests/no-when-branch-found: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
5db6afa84a K2: library-tests/trap: Accept location changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
da606dd77b K2: library-tests/underscore-parameters: Accept p0 -> _ parameter name change 2023-11-17 14:07:14 +00:00
Ian Lynagh
fc59b7f3a7 K2: library-tests/generic-inner-classes: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
4fafed2542 K2: library-tests/generic-selective-extraction: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
366b919107 K2: library-tests/methods/methods: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
2b24298d7f K2: library-tests/methods/parameters: Accept loc changes 2023-11-17 14:07:14 +00:00
Ian Lynagh
7a49d6e9bd K2: query-tests/UselessNullCheck: Accept location changes 2023-11-17 14:07:13 +00:00
Ian Lynagh
cb088c3ee1 K2: library-tests/variables: Accept location changes 2023-11-17 14:07:13 +00:00
Ian Lynagh
3a0c4c4d6f K2: library-tests/jvmoverloads_generics: Accept location changes 2023-11-17 14:07:13 +00:00
Ian Lynagh
d52f2e510b K2: library-tests/lazy-val-multiple-constructors: Accept location changes 2023-11-17 14:07:13 +00:00
Ian Lynagh
ed8e105452 K2: library-tests/java_and_kotlin: Accept location changes 2023-11-17 14:07:13 +00:00
Ian Lynagh
f1cfc5d1b8 K2: library-tests/properties: Accept location changes 2023-11-17 14:07:13 +00:00
Ian Lynagh
e3f4bb84d4 K2: library-tests/modifiers: Accept location changes 2023-11-17 14:07:13 +00:00
Ian Lynagh
905583e00a Kotlin: Add a Kotlin 2 copy of the testsuite 2023-11-17 14:07:13 +00:00
Ian Lynagh
e6f31c965e Kotlin: Add qlpack for the Kotlin 2 tests 2023-11-17 14:07:12 +00:00
Tamás Vajk
b2c8049a77 Merge branch 'main' into docs/insecure-randomness 2023-11-17 13:37:27 +01:00
Yunus AYDIN
9e5a80ac59 update select clause and expected file 2023-11-17 13:37:17 +03:00
Arthur Baars
ff65ffafb0 Merge pull request #14830 from aibaars/csharp/fixintegrationtests
C# fix integration tests
2023-11-17 11:17:31 +01:00
Yunus AYDIN
7bf7e59017 update expected file 2023-11-17 13:06:46 +03:00
Michael B. Gale
97402fdf36 C#: Fix dotnet_test_mstest 2023-11-17 10:35:14 +01:00
Michael Nebel
2662a4c651 C#: Fix the dotnet pack integration test. 2023-11-17 10:35:14 +01:00
Ian Lynagh
8a8031df0e Merge pull request #14814 from igfoo/igfoo/build_ver
Kotlin: Build: Refactor version handling
2023-11-17 09:32:06 +00:00
Michael Nebel
b7b10ce549 C#: Address review comments. 2023-11-17 09:47:36 +01:00
Michael Nebel
49b2209c62 C#: Update and more assets unit tests. 2023-11-17 09:39:51 +01:00
Michael Nebel
890cba6e95 C#: Disregard _._ dependencies and only default to use an entire framework in case the compile section is empty. 2023-11-17 09:39:51 +01:00
Michael Nebel
e89fe8ddde C#: Re-factor the hardcoded package names into a separate class. 2023-11-17 09:39:51 +01:00
Michael Nebel
98dbbe907e C#: Update unit tests. 2023-11-17 09:39:51 +01:00
Michael Nebel
7b75a30851 C#: Add framework detection to the assets.json parser. 2023-11-17 09:39:51 +01:00
Michael Nebel
20b31d0b4e Merge pull request #14825 from michaelnebel/csharp/fixintegrationtests
C#: Fix integration test failures after dotnet upgrade on runners.
2023-11-17 08:53:42 +01:00
Yunus AYDIN
4f6421946c update the rule and select clause 2023-11-17 10:49:02 +03:00
Tamas Vajk
9a8ad7d590 C#: Update insecure randomness query description to match implementation 2023-11-17 08:48:38 +01:00
Yunus AYDIN
43f100fd69 Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-11-17 10:40:42 +03:00
Yunus AYDIN
96646abab9 Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-11-17 10:40:32 +03:00
Yunus AYDIN
0091b83258 Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-11-17 10:40:18 +03:00
Yunus AYDIN
8ff38321a3 update rule and expected file 2023-11-17 00:08:01 +03:00
Michael B. Gale
d7760de4c6 C#: Fix dotnet_test_mstest 2023-11-16 19:56:01 +00:00
Michael Nebel
cca78ca190 C#: Fix the dotnet pack integration test. 2023-11-16 19:05:59 +01:00
Arthur Baars
dce03569e5 Merge pull request #14813 from github/release-prep/2.15.3
Release preparation for version 2.15.3
2023-11-16 18:42:17 +01:00
Arthur Baars
93eaeaec75 Merge pull request #14816 from github/post-release-prep/codeql-cli-2.15.3
Post-release preparation for codeql-cli-2.15.3
2023-11-16 18:20:48 +01:00
Paolo Tranquilli
9b840aa20c Merge pull request #14820 from github/redsun82/rename-cc_binary_add_features
Bazel/CMake: small compatibility fix
2023-11-16 17:47:27 +01:00
Shati Patel
8b6a9180dc Merge pull request #14819 from p-/p--fix-doc-vscode-ext-property
Doc: Fix name of VS Code settings property to use extension packs
2023-11-16 16:23:54 +00:00
Stephan Brandauer
cb7213d87a Merge pull request #14818 from github/kaeluka/application-mode-erase-type-signatures-of-generic-types
Java Automodel extraction: fix extracted meta information by using Object for the type of generic parameters
2023-11-16 17:17:47 +01:00
Paolo Tranquilli
9a4b56162e Bazel/CMake: small compatibility fix 2023-11-16 17:16:14 +01:00
Paolo Tranquilli
f3482684a6 Merge pull request #14805 from github/redsun82/rename-cc_binary_add_features
Bazel/CMake: support new internal transition rules
2023-11-16 17:10:40 +01:00
Mathias Vorreiter Pedersen
a10f94af81 Merge pull request #14810 from MathiasVP/fix-ref-deref-duplication
C++: Fix dataflow duplication from `ReferenceDereference` expressions
2023-11-16 16:10:07 +00:00
Peter Stöckli
de3d15b277 Doc: Fix name of VS Code settings property to use extension packs 2023-11-16 16:53:12 +01:00
Chris Campbell
114b694553 Remove @precision values, correct missing tags 2023-11-16 15:50:41 +00:00
Taus
216cd88225 Merge branch 'main' into tausbn/python-add-support-for-python-3.12-type-syntax 2023-11-16 15:25:06 +00:00
Mathias Vorreiter Pedersen
c5d2866948 Merge pull request #14812 from MathiasVP/no-dtt-in-Integer-overflow-tainted
C++: Convert `cpp/integer-overflow-tainted` away from DefaultTaintTracking
2023-11-16 15:24:13 +00:00
Taus
635bcd4fa2 Python: Add change note 2023-11-16 15:14:30 +00:00
Stephan Brandauer
74a195b4f4 Java Automodel extraction: fix extracted meta information by using Object for the type of generic parameters 2023-11-16 16:08:04 +01:00
Ian Lynagh
e9800d11b6 Kotlin: Build: Refactor version handling
We now have a proper class to represent versions, rather than using
tuples. The version is passed deeper down, so we can now have
version-dependent compilation flags.
2023-11-16 14:25:41 +00:00
Tom Hvitved
40a07de566 Type tracking: Parameterize consistency checks 2023-11-16 15:23:23 +01:00
Max Schaefer
ca334021ad Merge pull request #14793 from github/max-schaefer/tainted-path-qhelp
Java: Improve QHelp for `java/path-injection` to mention less disruptive fixes.
2023-11-16 14:09:55 +00:00
Stephan Brandauer
69ab389d9f Merge pull request #14795 from github/kaeluka/skip-this-qualifier-ctor-candidates
Java: Automodel Extraction: Remove Qualifier Endpoints of Constructors
2023-11-16 14:54:19 +01:00
Mathias Vorreiter Pedersen
da2215e7e5 C++: Accept test changes. 2023-11-16 13:54:13 +00:00
Mathias Vorreiter Pedersen
30f0b8ab2b Merge pull request #14808 from jketema/jketema/del-fmt-global
C++: Delete `cpp/tainted-format-string-through-global`
2023-11-16 13:44:21 +00:00
github-actions[bot]
6ec9b95072 Release preparation for version 2.15.3 2023-11-16 13:07:16 +00:00
Arthur Baars
641646ac08 Rename change note 2023-11-16 14:04:25 +01:00
Tom Hvitved
b2f1022e5c Ruby: Prune irrelevant data flow nodes and edges 2023-11-16 13:52:07 +01:00
Tom Hvitved
75f42f4614 Merge pull request #14783 from hvitved/ruby/hash-array-literal
Ruby: Include more nodes in `{Hash,Array}LiteralCfgNode`
2023-11-16 13:51:35 +01:00
Henry Mercer
0c1fb8c881 Merge pull request #14811 from github/henrymercer/remove-lines-of-non-user-code-from-summary
Remove LoC metrics from the analysis summary
2023-11-16 12:30:55 +00:00
Rasmus Wriedt Larsen
4f9303eb02 Merge pull request #14790 from RasmusWL/clean-tests
Python: Accept new ordering of query predicates in `.expected`
2023-11-16 13:23:35 +01:00
Mathias Vorreiter Pedersen
078f223052 C++: Rewrite 'cpp/cpp/integer-overflow-tainted' away from DefaultTaintTracking. 2023-11-16 12:01:38 +00:00
Tom Hvitved
2c23dacca1 Ruby: Add more hash/array literal tests 2023-11-16 12:58:53 +01:00
Max Schaefer
a5e7ef424e Revert "Add additional example."
This reverts commit 947b094387.
2023-11-16 11:54:16 +00:00
Stephan Brandauer
84e58b77aa Java Automodel: remove Qualifiers of constructors from endpoints 2023-11-16 12:44:53 +01:00
Stephan Brandauer
3092640115 Java Automodel: make test case for Argument[this] sink candidates in ctors in framework mode 2023-11-16 12:42:50 +01:00
Max Schaefer
143e1680bd Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-11-16 11:42:35 +00:00
Henry Mercer
de83929a60 Remove LoC metrics from the analysis summary 2023-11-16 11:36:44 +00:00
Stephan Brandauer
d7c97d9d92 Java Automodel: remove constructor instance arguments from endpoints and update test expectations 2023-11-16 12:27:23 +01:00
Stephan Brandauer
30925da7d9 Java Automodel: tests that demonstrate that there is no sink candidate of an object being constructed in app mode 2023-11-16 12:24:41 +01:00
Mathias Vorreiter Pedersen
d25c24b64d C++: Reduce code duplication by moving shared code into a module. 2023-11-16 10:52:46 +00:00
Mathias Vorreiter Pedersen
5a7cb8f25a C++: Fix duplication on reference dereference expressions. 2023-11-16 10:52:35 +00:00
Mathias Vorreiter Pedersen
799873113f C++: Add a test that demonstrates reference dereference duplication. 2023-11-16 10:52:14 +00:00
Mathias Vorreiter Pedersen
f8feb84958 C++: Accept test changes from refactoring QL files. 2023-11-16 10:52:10 +00:00
Mathias Vorreiter Pedersen
6a1504b91c C++: Slightly refactor test QL files so that we can add a test which tests the nodes being selected. 2023-11-16 10:50:56 +00:00
Stephan Brandauer
f1001374fd Merge pull request #14642 from github/kaeluka/publish-automodel-querypack-007
Java: Publish Automodel query pack 0.0.7
2023-11-16 11:50:32 +01:00
Rasmus Wriedt Larsen
25d3af9236 Merge branch 'main' into clean-tests 2023-11-16 11:21:01 +01:00
Jeroen Ketema
1f3f1b5ec4 Merge pull request #14809 from MathiasVP/move-change-note
C++: Move change note
2023-11-16 11:14:14 +01:00
Max Schaefer
947b094387 Add additional example. 2023-11-16 10:06:19 +00:00
Max Schaefer
009d58034f Address suggestions from review. 2023-11-16 10:05:54 +00:00
Taus
fd750a3bf0 Merge branch 'main' into tausbn/python-add-support-for-python-3.12-type-syntax 2023-11-16 09:59:44 +00:00
Mathias Vorreiter Pedersen
5c0fb2030d C++: Move change note. 2023-11-16 09:57:08 +00:00
Jeroen Ketema
2eb67549e6 C++: Tweak change note slightly 2023-11-16 10:56:47 +01:00
Jeroen Ketema
afe318edbe C++: Delete cpp/tainted-format-string-through-global 2023-11-16 10:52:05 +01:00
Rasmus Wriedt Larsen
71ef98584d Merge pull request #14791 from RasmusWL/python-3.12
Python: Update `.expected` to support Python 3.12
2023-11-16 10:42:48 +01:00
Tom Hvitved
6bba191407 Merge pull request #14710 from hvitved/type-tracking/prepare-ruby
Prepare shared type tracking library for adoption by Ruby
2023-11-16 10:34:32 +01:00
Rasmus Wriedt Larsen
df144f3a1e Merge pull request #14406 from amammad/amammad-python-FileSystemAccess
Python: New FileSystem Access
2023-11-16 10:25:34 +01:00
Geoffrey White
8b628e3ad3 Swift: Change note. 2023-11-16 09:04:52 +00:00
Geoffrey White
c49f05aa2b Swift: Fix false positive / result overlap. 2023-11-16 09:00:35 +00:00
Geoffrey White
96b4a12af7 Swift: Add heuristic sinks. 2023-11-16 09:00:35 +00:00
Geoffrey White
697c3df74a Swift: Model C printf variants. 2023-11-16 09:00:34 +00:00
Geoffrey White
1040561ec1 Swift: Model formatting append methods. 2023-11-16 09:00:34 +00:00
Rasmus Wriedt Larsen
a46dc55e84 Merge branch 'main' into python-3.12 2023-11-16 09:34:06 +01:00
Paolo Tranquilli
615a128770 Bazel/CMake: support new internal transition rules 2023-11-16 09:04:58 +01:00
Tamás Vajk
14268f3c63 Merge pull request #14792 from tamasvajk/standalone/assembly-attribute
C#: Fix assembly attribute extraction in standalone mode
2023-11-16 08:09:14 +01:00
Sam Browning
408ba517e5 Merge pull request #14776 from github/sabrowning1/queries-panel-language-selector
Add content for the queries panel and language selector
2023-11-15 17:30:21 -05:00
Mathias Vorreiter Pedersen
4d4ca6b948 Merge pull request #14794 from MathiasVP/catch-more-return-stack-allocated-memory
C++: Catch more returns of stack-allocated memory
2023-11-15 19:23:24 +00:00
Geoffrey White
a6fe620bcb Swift: Fix Swift warnings in the test. 2023-11-15 18:06:38 +00:00
Geoffrey White
3a38f3b947 Swift: Add test cases. 2023-11-15 18:06:37 +00:00
Geoffrey White
0ae04de7f0 Swift: Test stubs / classes. 2023-11-15 17:23:22 +00:00
Yunus AYDIN
8a24daf293 modify tests and rule 2023-11-15 19:38:16 +03:00
Sam Browning
d443354651 Apply feedback and fix syntax 2023-11-15 11:35:33 -05:00
Ian Lynagh
72af41b196 Kotlin: Prepare for a Kotlin2 copy of the testsuite 2023-11-15 16:14:34 +00:00
Tom Hvitved
57f6859ddc Shared: Update type tracking consistency checks 2023-11-15 17:08:05 +01:00
Tom Hvitved
5f087f0084 Shared: Port features from Ruby's type tracking library to the shared library
- Cache relevant predicates.
- Expose some predicates and classes (only exposed internally).
- Make some top-level `inline_late` predicates member predicates.
- Actually eliminate type check in `flowsTo`.
- Fix bug in `getACompatibleTypeTracker`.
- Adopt the `CallGraphConstruction` module.
2023-11-15 17:08:05 +01:00
Tom Hvitved
f66f7ce8d7 Shared: Split up TypeTracking.qll into two files 2023-11-15 17:07:27 +01:00
Owen Mansel-Chan
64bf6cc62b Update existing test (extra nodes, no extra alerts) 2023-11-15 15:33:09 +00:00
Owen Mansel-Chan
1ac3a9e8d3 Add change note 2023-11-15 15:12:58 +00:00
Owen Mansel-Chan
e0879969c9 Update tests 2023-11-15 15:08:48 +00:00
Jeroen Ketema
f22979f4b6 Merge pull request #14561 from jketema/rewrite-uncontrolled-process-operation
C++: Rewrite `cpp/uncontrolled-process-operation` to not use `DefaultTaintTracking`
2023-11-15 16:03:58 +01:00
Owen Mansel-Chan
aaa8f9c41f Add read and store steps for SliceElementNode 2023-11-15 14:58:23 +00:00
Owen Mansel-Chan
2b897a9825 Add synthetic SliceElementNode 2023-11-15 14:58:21 +00:00
Owen Mansel-Chan
5af3e119a6 Test value flow through SliceExpr with array content 2023-11-15 14:57:53 +00:00
Geoffrey White
0b82f8a6e6 Swift: Make QL-for-QL happy. 2023-11-15 14:32:07 +00:00
Jeroen Ketema
46e6e72593 C++: Address review comments 2023-11-15 14:57:53 +01:00
Jeroen Ketema
92c18960c5 C++: Rewrite cpp/uncontrolled-process-operation to not use DefaultTaintTracking 2023-11-15 14:57:53 +01:00
Geoffrey White
4afcbb1bc4 Swift: Autoformat. 2023-11-15 13:38:07 +00:00
Rasmus Wriedt Larsen
e349891cff Python: Apply suggestions from code review 2023-11-15 14:35:52 +01:00
Geoffrey White
3a13759f10 Swift: Clean up the test. 2023-11-15 13:35:18 +00:00
Rasmus Wriedt Larsen
e02c32f3d4 Python: options file was not enough, split into 2/3
I reckon this is due to the Python 3 version used by the Python 2 tests
is different from 3.12, so even with --lang=3 the tests are still using
an incompatible version :(
2023-11-15 14:24:11 +01:00
Geoffrey White
17dd119545 Swift: Fix performance. 2023-11-15 13:18:09 +00:00
Yunus AYDIN
7877082869 fix tests code issues and expected file 2023-11-15 16:08:20 +03:00
Alex Denisov
7129ffc199 Swift: add database migration scripts 2023-11-15 14:07:45 +01:00
Alex Denisov
1f5be03137 Swift: add change note 2023-11-15 14:07:45 +01:00
Alex Denisov
423c85377b Swift: skip MacroExpansionExpr/MacroExpansionDecl
They only appear in an intermediate AST and disappear as soon as the
macro is expanded.
The only way to get these in is to construct an "incorrect" AST, e.g.:

```
let x = #does_not_exist() // MacroExpansionExpr
struct S {
  #does_not_exist() // MacroExpansionDecl
}
```
2023-11-15 14:07:45 +01:00
Alex Denisov
8b126fe51a Swift: extract MacroDecl 2023-11-15 14:07:45 +01:00
Yunus AYDIN
1ed4d2ada7 remove database 2023-11-15 15:49:31 +03:00
Yunus AYDIN
1e915720e9 fix the rule issues 2023-11-15 15:49:09 +03:00
Rasmus Wriedt Larsen
0f1dc9b2d9 Python: Add missing options file 2023-11-15 13:24:08 +01:00
Rasmus Wriedt Larsen
ae6c95ff95 Python: Fix asyncio.coroutine deprecation
Was removed in 3.11, see https://docs.python.org/3.10/library/asyncio-task.html#asyncio.coroutine

I couldn't make the __awwait__ actually give the result to the agen function...

I also tried looking into
https://docs.python.org/3/library/types.html#types.coroutine, but also
failed to make that work.

Without the Future, such as doing `yield SOURCE` inside `__await__` it
complains `RuntimeError: Task got bad yield: 'source'`
2023-11-15 13:24:08 +01:00
Yunus AYDIN
d5f254781e Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-11-15 15:11:02 +03:00
Yunus AYDIN
fa1fa0d19d Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-11-15 15:08:29 +03:00
Yunus AYDIN
74f1344ac5 Update go/ql/src/experimental/CWE-525/WebCacheDeception.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-11-15 15:08:14 +03:00
Mathias Vorreiter Pedersen
bae7e10e46 C++: Also add MSVC-related 'alloca'-like functions. 2023-11-15 12:07:17 +00:00
Mathias Vorreiter Pedersen
ec63099c54 C++: Add change note. 2023-11-15 11:57:09 +00:00
Mathias Vorreiter Pedersen
2b8b5cf1b8 C++: Accept test changes. 2023-11-15 11:52:14 +00:00
Mathias Vorreiter Pedersen
6730f57d5c C++: Also flag up 'alloca' and friends. 2023-11-15 11:51:57 +00:00
Mathias Vorreiter Pedersen
118d50236f C++: Add failing tests. 2023-11-15 11:48:37 +00:00
Max Schaefer
a46a7fadb2 Java: Improve QHelp for java/path-injection to mention less disruptive fixes. 2023-11-15 11:25:13 +00:00
Tamas Vajk
7a001f4905 C#: Fix assembly attribute extraction in standalone mode 2023-11-15 12:21:03 +01:00
Owen Mansel-Chan
803ed20962 Merge pull request #14778 from owen-mc/go/improve-value-flow-through-arrays
Go: improve value flow through arrays
2023-11-15 11:13:15 +00:00
Rasmus Wriedt Larsen
4256fbf11a Python: Accept changes from Python 3.12 2023-11-15 11:42:38 +01:00
Rasmus Wriedt Larsen
f3dd002ba9 Python: Copy tests to Python 3 2023-11-15 11:42:38 +01:00
Rasmus Wriedt Larsen
f9e9ae91f7 Python: Move tests that would change under Python 3.12 to lang specific directory
This moves the tests to Python 2, next we copy them to Python 3.
2023-11-15 11:42:38 +01:00
Rasmus Wriedt Larsen
23419ee634 Python: Update .expected to support Python 3.12
You might wonder why the number of lines changed, but it's due to `tty`
module receiving its' first update since 2001, so the actual number of
lines DID change :phew:

https://github.com/python/cpython/commits/3.12/Lib/tty.py

Since there is now a difference between Python 2 and Python 3, we need to restrict the lines of code test to only run as Python 3.
2023-11-15 11:42:38 +01:00
Mathias Vorreiter Pedersen
b8f0f85840 Merge pull request #14784 from MathiasVP/no-dtt-in-tainted-arithmetic
C++: Rewrite `cpp/tainted-arithmetic` away from `DefaultTaintTracking`
2023-11-15 10:19:25 +00:00
Rasmus Wriedt Larsen
69453aa144 Python: Fix missing newline in .expected 2023-11-15 10:10:23 +01:00
Rasmus Wriedt Larsen
55f5b26ba6 Python: Accept new ordering of query predicates in .expected 2023-11-15 10:09:54 +01:00
Rasmus Wriedt Larsen
721bde1ce8 Python: Delete orphaned .expected files 2023-11-15 09:59:26 +01:00
Rasmus Wriedt Larsen
2e9d548083 Merge pull request #14706 from RasmusWL/class-attribute-flow
Python: Add basic flow for class attributes
2023-11-15 09:06:25 +01:00
Yunus AYDIN
fdefcd6a84 Merge branch 'main' of github.com:aydinnyunus/codeql 2023-11-15 09:34:06 +03:00
Yunus AYDIN
9178cec0e6 fix test errors 2023-11-15 09:33:52 +03:00
Owen Mansel-Chan
83d1fc33e1 Add change note 2023-11-14 23:16:32 +00:00
Erik Krogh Kristensen
14e51627c5 Merge pull request #14419 from rvermeulen/rvermeulen/javascript-adjust-security-severity
JavaScript: Adjust XSS and log injection query severities
2023-11-14 21:34:25 +01:00
Yunus AYDIN
b1702ab87e Merge branch 'main' into main 2023-11-14 23:17:49 +03:00
Remco Vermeulen
52540b42fc Merge branch 'main' into rvermeulen/javascript-adjust-security-severity 2023-11-14 11:21:38 -08:00
Remco Vermeulen
6bd7047e41 Restore XssThroughDom.ql's severity 2023-11-14 11:20:51 -08:00
AlexDenisov
57f1f5b829 Merge pull request #14768 from github/alexdenisov/move-semantics
Swift: extract AST nodes related to move semantics
2023-11-14 19:13:27 +01:00
Yunus AYDIN
9548a0e8fb Merge branch 'main' into main 2023-11-14 20:25:28 +03:00
Yunus AYDIN
ba672e5b35 Merge branch 'main' of github.com:aydinnyunus/codeql 2023-11-14 20:20:28 +03:00
Yunus AYDIN
2cea720f6e remove wcd directory 2023-11-14 20:19:49 +03:00
Yunus AYDIN
dbdf9e1a4f remove change-notes and fix build error 2023-11-14 20:19:28 +03:00
Mathias Vorreiter Pedersen
bff93c4484 Merge branch 'main' into no-dtt-in-tainted-arithmetic 2023-11-14 17:12:34 +00:00
Geoffrey White
0342b3eba2 Merge pull request #14772 from geoffw0/webview
Swift: Use TaintInheritingContent in WebView.qll
2023-11-14 16:29:32 +00:00
Geoffrey White
d28e7920b3 Merge pull request #14773 from geoffw0/fixmodel
Swift: Fix odds and ends
2023-11-14 16:28:33 +00:00
Yunus AYDIN
ec7309c735 Merge branch 'main' into main 2023-11-14 19:19:09 +03:00
Tamás Vajk
331ca61be9 Merge pull request #14789 from tamasvajk/autobuild/arm-nuget-restore
C#: Do not call nuget.exe on Apple Silicon
2023-11-14 17:13:42 +01:00
Alex Denisov
559b965e74 Swift: add change note 2023-11-14 16:11:28 +01:00
Yunus AYDIN
9f63613cf8 Merge branch 'main' into main 2023-11-14 17:29:57 +03:00
Yunus AYDIN
e576650293 remove qhelp file and add qlref 2023-11-14 17:23:42 +03:00
Felicity Chapman
6299b844f8 Merge pull request #14785 from github/felicitymay-security-severity
Update metadata-for-codeql-queries.rst
2023-11-14 14:13:53 +00:00
Sam Browning
4385b316c0 Apply feedback from code review 2023-11-14 09:10:07 -05:00
Sam Browning
b1dc6099ff Apply feedback from code review 2023-11-14 09:01:54 -05:00
Sam Browning
15099b3db0 Update docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-11-14 08:57:52 -05:00
Tamas Vajk
8334c6db91 C#: Do not call nuget.exe on Apple Silicon 2023-11-14 14:50:29 +01:00
Alex Denisov
1c75e5b2a6 Swift: add database migration scripts for move semantics 2023-11-14 14:35:58 +01:00
Mathias Vorreiter Pedersen
1623bba18a Merge branch 'main' into no-dtt-in-tainted-arithmetic 2023-11-14 13:35:15 +00:00
Tom Hvitved
475d8da342 Ruby: Include more nodes in {Hash,Array}LiteralCfgNode 2023-11-14 13:50:46 +01:00
Tom Hvitved
ae09499905 Merge pull request #14781 from hvitved/ruby/ssa-unitialized-to-string
Ruby: Include name of variable in `UninitializedDefinition.toString`
2023-11-14 13:49:27 +01:00
Mathias Vorreiter Pedersen
c950e26b3e C++: Rewrite 'cpp/cpp/tainted-arithmetic' away from DefaultTaintTracking. 2023-11-14 12:19:12 +00:00
Felicity Chapman
f75c062949 Update metadata-for-codeql-queries.rst
Replace link to blog with trackable GH.io link
2023-11-14 12:06:44 +00:00
Mathias Vorreiter Pedersen
f22d87b7c7 Merge pull request #14771 from MathiasVP/fix-missing-unbounded-write-results
C++: Fix missing results in `cpp/unbounded-write`
2023-11-14 12:03:13 +00:00
Tamás Vajk
e11a68803e Merge pull request #14782 from github/criemen/disable-int-test
Disable the nuget standalone dependencies test on ARM-osx.
2023-11-14 12:32:48 +01:00
Owen Mansel-Chan
45faed057c Improve SliceExpr documentation 2023-11-14 11:25:16 +00:00
Tom Hvitved
f1b67ade9b Ruby: Include name of variable in UninitializedDefinition.toString 2023-11-14 11:33:59 +01:00
Cornelius Riemenschneider
f9ae7c5454 Disable the nuget standalone dependencies test on ARM-osx.
The test is failing currently, and that needs further investigation.
This is a temporary workaround to allow us to continue to work on
some necessary infrastructure investments around these tests.
2023-11-14 11:13:55 +01:00
Geoffrey White
4bfdb769a0 Swift: Change note. 2023-11-14 10:10:04 +00:00
Geoffrey White
6783707e2c Swift: Add heuristic sink. We don't catch everything, but the simple heuristic was better than anything else I tried. 2023-11-14 10:07:12 +00:00
Geoffrey White
80cfb934ce Swift: Add some tests. 2023-11-14 09:52:53 +00:00
Geoffrey White
296dee90dd Merge remote-tracking branch 'upstream/main' into fixmodel 2023-11-14 09:38:14 +00:00
Mathias Vorreiter Pedersen
967bbbc1a7 C++: Block flow out of sinks that are qualifiers. This removes the new result duplication and keeps the new result. 2023-11-14 09:29:47 +00:00
Tamás Vajk
28a5a1d507 Merge pull request #14760 from tamasvajk/apple-silicon-check
C#: Change IsARM to Apple silicon check
2023-11-14 10:27:42 +01:00
Tamas Vajk
5b38ba87df Code quality improvement 2023-11-14 08:08:46 +01:00
Erik Krogh Kristensen
db42b60015 Merge pull request #14779 from github/dependabot/cargo/ql/tracing-subscriber-0.3.18
Bump tracing-subscriber from 0.3.17 to 0.3.18 in /ql
2023-11-14 07:57:55 +01:00
Yunus AYDIN
47ef123601 Fix Pull Requests Problems 2023-11-14 09:26:37 +03:00
dependabot[bot]
f8c8d59cb5 Bump tracing-subscriber from 0.3.17 to 0.3.18 in /ql
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.17 to 0.3.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.17...tracing-subscriber-0.3.18)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-14 03:56:51 +00:00
masterofnow
7d774f1a51 Merge branch 'main' into LoadClassNoSignatureCheck 2023-11-14 09:22:30 +08:00
Owen Mansel-Chan
c8779d0d0b Fix another test
No change in alerts, just 3 extra nodes.
2023-11-13 23:56:25 +00:00
Owen Mansel-Chan
28160e418c Update tests 2023-11-13 23:26:30 +00:00
Owen Mansel-Chan
ed349f7d6b Improve value flow through arrays 2023-11-13 23:26:16 +00:00
Sam Browning
fa569dcef4 Delete requirements.txt 2023-11-13 17:28:14 -05:00
Sam Browning
040d971588 Merge branch 'main' into sabrowning1/queries-panel-language-selector 2023-11-13 17:27:35 -05:00
Sam Browning
e95bfc816e Clarify that queries run against selected database 2023-11-13 17:15:41 -05:00
Sam Browning
44935cef63 Tweak for style 2023-11-13 17:08:31 -05:00
Sam Browning
190050f577 Tweak formatting and styling 2023-11-13 16:52:33 -05:00
Yunus AYDIN
bf59c94d24 fix changelog pipeline error 2023-11-14 00:11:27 +03:00
Yunus AYDIN
2f50618e62 Merge branch 'main' of github.com:aydinnyunus/codeql 2023-11-14 00:09:36 +03:00
Yunus AYDIN
5468767fa0 fix changelog pipeline error 2023-11-14 00:09:05 +03:00
Yunus AYDIN
a007d6edb0 Merge branch 'github:main' into main 2023-11-14 00:03:25 +03:00
Yunus AYDIN
1c0aa679a6 Add Changelog for the Pull Request 2023-11-14 00:02:56 +03:00
Sam Browning
458baeff32 Add content on queries panel and language selector 2023-11-13 15:59:51 -05:00
Yunus AYDIN
4317e58414 Add Web Cache Deception QHelp and Example Code Snippet for Vulnerable and Fixed Version 2023-11-13 23:54:29 +03:00
Yunus AYDIN
78a6522190 Rename Folder 2023-11-13 23:40:51 +03:00
Yunus AYDIN
95395322a8 Format Document 2023-11-13 23:39:58 +03:00
Yunus AYDIN
1eb1293230 Add Web Cache Deception Query and Example Code Snippet 2023-11-13 23:35:17 +03:00
Geoffrey White
c14d4042e0 Merge pull request #14748 from geoffw0/pathinjectionsinks
Swift: Add more path injection sinks
2023-11-13 20:15:16 +00:00
Geoffrey White
5a451e964d Swift: Model mainDocumentURL. 2023-11-13 19:51:51 +00:00
Geoffrey White
b157d73c10 Swift: Make the URLRequest test more accurate. 2023-11-13 19:36:03 +00:00
Geoffrey White
985d1990eb Swift: Fix typo. 2023-11-13 18:55:11 +00:00
Geoffrey White
463096e4be Swift: Modernize tainted content in WebView.qll. 2023-11-13 18:30:40 +00:00
Geoffrey White
892beeab6d Swift: Add test case. 2023-11-13 18:25:59 +00:00
Geoffrey White
9ec2f9204b Swift: Correct components(separatedBy:) models. 2023-11-13 17:43:21 +00:00
Mathias Vorreiter Pedersen
c73e6f1fa8 C++: Accept more test changes. 2023-11-13 16:51:07 +00:00
Mathias Vorreiter Pedersen
9aafbfce13 C++: Fix test annotation. 2023-11-13 16:17:18 +00:00
Mathias Vorreiter Pedersen
cc6268339b C++: Fix failing test and accept test cases. 2023-11-13 15:57:22 +00:00
Mathias Vorreiter Pedersen
834b07e6ad C++: Add failing tests. 2023-11-13 15:54:41 +00:00
Mathias Vorreiter Pedersen
8be6aeda3e Merge pull request #14769 from MathiasVP/fix-nonterminating-test
C++: Fix nonterminating test
2023-11-13 15:49:39 +00:00
Owen Mansel-Chan
359dcf37e9 Merge pull request #14649 from Kwstubbs/go-cors
Go: Add Cors Gin Support
2023-11-13 15:46:59 +00:00
Mathias Vorreiter Pedersen
eb263e747f C++: Make sure the test terminates. 2023-11-13 15:25:48 +00:00
Mathias Vorreiter Pedersen
bc576f658e C++: Add a test that fails because of a non-terminating test that dominates this one. 2023-11-13 15:24:56 +00:00
Taus
cfdeb0edf5 Python: Define getScope and getAChildNode for new nodes 2023-11-13 15:19:54 +00:00
Geoffrey White
6f56a656e4 Merge pull request #14761 from geoffw0/moderntest
Swift: Update the inline dataflow tests
2023-11-13 14:59:08 +00:00
Alex Denisov
031f453af8 Swift: CFG for Copy/Consume expressions 2023-11-13 15:55:37 +01:00
Alex Denisov
002f2a0985 Swift: extract BorrowExpr 2023-11-13 15:55:37 +01:00
Alex Denisov
d21e27c717 Swift: extract ConsumeExpr 2023-11-13 15:55:37 +01:00
Alex Denisov
30e4822fb7 Swift: extract CopyExpr 2023-11-13 15:55:37 +01:00
Owen Mansel-Chan
d931ade182 Merge pull request #13366 from maikypedia/maikypedia/go-ldap-improper-auth
Go: Add Improper LDAP Authentication query (CWE-287)
2023-11-13 14:48:19 +00:00
Sam Browning
ed9a0ea155 Merge branch 'main' of https://github.com/github/codeql 2023-11-13 08:40:42 -05:00
Geoffrey White
c3577b34d3 Swift: Clean up logic. 2023-11-13 12:37:35 +00:00
Geoffrey White
e4da8da5d9 Swift: Update the example code. 2023-11-13 12:33:20 +00:00
Tamas Vajk
b455b2c1a6 C#: Change IsARM to Apple silicon check 2023-11-13 13:20:13 +01:00
Anders Schack-Mulligen
dc4dda1dbc Merge pull request #14757 from aschackmull/rangeanalysis/simplify
Rangeanalysis: Misc simplifications
2023-11-13 13:16:04 +01:00
Geoffrey White
098ea50068 Swift: Repair non-inline dataflow test. 2023-11-13 12:09:08 +00:00
Geoffrey White
6e291711ac Swift: Update just enough tests to prove that that source labels are working. 2023-11-13 11:47:24 +00:00
Geoffrey White
fca6ccd2f1 Swift: Remove more unused code. 2023-11-13 11:47:22 +00:00
AlexDenisov
291bb2210c Merge pull request #14759 from github/alexdenisov/experimental-tuple
Swift: mark BuiltinTuple as experimental
2023-11-13 12:24:06 +01:00
Geoffrey White
4bf717c3e4 Swift: Use InlineFlowTest.qll in the data flow inline tests, so that we have less code duplication and can use flow labels. 2023-11-13 11:06:05 +00:00
Geoffrey White
d15c46836b Swift: Add features tom InlineFlowTest.qll: extended source/sink names, custom flow tags, use of line-numbers as a fallback value. 2023-11-13 10:55:17 +00:00
Alex Denisov
c0fce80b7d Swift: mark BuiltinTuple as experimental 2023-11-13 11:34:51 +01:00
Cornelius Riemenschneider
1b7e3814b0 Merge pull request #14719 from github/criemen/java-int-tests
Java integration tests: More preparations to be executed on GH M1 machines
2023-11-13 11:16:51 +01:00
Rasmus Wriedt Larsen
e1c47f5584 Python: Reorganize taint tests of re
Mostly to highlight that with flow-summary modeling, we don't expect
taint for a lot of these.

I aslo opted to make `finditer()` tainted for consistency.
2023-11-13 10:56:29 +01:00
Rasmus Wriedt Larsen
ffc27b5301 Python: Solve problems with missing TTupleElementContent
Ruby uses 10 as their number. I considered doing the same, but didn't
really care _too_ much about it 🤷

14cfb82a8c/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll (L636)
2023-11-13 10:48:51 +01:00
Rasmus Wriedt Larsen
c3fa3f26a7 Python: Fix problems with missing TAttributeContent 2023-11-13 10:46:40 +01:00
Rasmus Wriedt Larsen
943b2a2ed1 Python: Highlight problem with flow summaries and TAttributeContent 2023-11-13 10:42:13 +01:00
Anders Schack-Mulligen
bf6cfd3bef Rangeanalysis: Simplify api. 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
30aefabb2a Rangeanalysis: Rename predicate. 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
f05b75e04f Rangeanalysis: RIP standard order. 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
c28f54a78b Rangeanalysis: Remove superfluous pragmas. These appear useless after the abolishment of the different delta orders. 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
66b03bfb12 Java: Remove unused import 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
71e25521cf Rangeanalysis: Use SsaReadPositionBlock.getAnSsaRead. 2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
27e6173bb7 C++: Remove SemSsaExplicitUpdate.getSourceExpr. 2023-11-13 10:35:43 +01:00
Anders Schack-Mulligen
3a73faf061 Rangeanalysis: Remove unused getAlternateType predicates. 2023-11-13 10:35:43 +01:00
AlexDenisov
352ec91a08 Merge pull request #14756 from github/alexdenisov/do-not-extract-non-ast-types
Swift: do not extract non-AST types, NFC
2023-11-13 10:35:00 +01:00
Anders Schack-Mulligen
00549e36ed Merge pull request #14742 from aschackmull/rangeanalysis/share-util-3
Java/C++/Rangeanalysis: Share more range analysis utility predicates.
2023-11-13 10:19:41 +01:00
Alex Denisov
b385ddbab1 Swift: do not extract non-AST types 2023-11-13 09:12:22 +01:00
AlexDenisov
f599c6d8a9 Merge pull request #14734 from github/alexdenisov/parameter-packs
Swift: extract parameter packs
2023-11-13 08:44:39 +01:00
Paolo Tranquilli
df967ce43f Merge pull request #14750 from github/alexdenisov/update-wordings
Swift: update wordings in a downgrade script
2023-11-13 07:00:39 +01:00
masterofnow
532f6a5b0c Removed @kind path-problem in comment. Added text message in select. 2023-11-13 08:27:07 +08:00
Maiky
6e533c6284 Import PathGraph 2023-11-12 18:22:14 +01:00
Maiky
2b1b4cd85d Remove unused LdapConn 2023-11-12 18:18:43 +01:00
Maiky
5280d69500 Change to DataFlow::ConfigSig 2023-11-12 18:17:09 +01:00
Maiky
39ed7876c3 Merge branch 'github:main' into maikypedia/go-ldap-improper-auth 2023-11-12 18:14:05 +01:00
Maiky
882280309f equalityAsSanitizerGuard and add empty string comment 2023-11-12 17:42:56 +01:00
masterofnow
20592352d0 Updated text in LoadClassNoSignatureCheck.qhelp 2023-11-12 20:48:49 +08:00
masterofnow
fd66f47d82 Added LoadClassNoSignatureCheck.ql 2023-11-12 20:27:49 +08:00
Mathias Vorreiter Pedersen
01a074c146 Merge pull request #14749 from MathiasVP/less-code-duplication 2023-11-10 19:45:56 +00:00
Geoffrey White
d56625cb8b Swift: Rename the capture test to look more like the others. 2023-11-10 17:59:44 +00:00
Alex Denisov
8f10667ee1 Swift: update wordings in a downgrade script 2023-11-10 18:10:43 +01:00
AlexDenisov
837cdc8301 Merge pull request #14745 from github/alexdenisov/parameter-packs-db-upgrade
Swift: parameter packs migration scripts
2023-11-10 18:07:10 +01:00
Jeroen Ketema
3a62628938 Merge pull request #14735 from jketema/strl
C++: Add models for `strlcpy` and `strlcat`
2023-11-10 17:51:59 +01:00
Mathias Vorreiter Pedersen
9062fb666a C++: Move a couple of predicates to 'Node0Impl'. 2023-11-10 16:26:03 +00:00
Jeroen Ketema
b48d483eba C++: Add change note 2023-11-10 17:25:19 +01:00
Geoffrey White
c327f0f0a7 Merge branch 'main' into pathinjectionsinks 2023-11-10 16:04:56 +00:00
Rasmus Wriedt Larsen
c85d99d949 Merge branch 'main' into re-modeling 2023-11-10 16:32:50 +01:00
Alex Denisov
393aad5935 Swift: downgrade parameter packs 2023-11-10 16:22:09 +01:00
Geoffrey White
8f141cb157 Swift: Change note. 2023-11-10 15:13:51 +00:00
Geoffrey White
5a09a325f2 Swift: Add heuristic path injection sinks. 2023-11-10 15:13:51 +00:00
Mathias Vorreiter Pedersen
18c0bcec0b Merge pull request #14669 from MathiasVP/no-dtt-in-unbounded-write
C++: Rewrite `cpp/unbounded-write` away from `DefaultTaintTracking`
2023-11-10 15:08:42 +00:00
Rasmus Wriedt Larsen
5fc8a00487 Python: Rename test function 2023-11-10 15:58:20 +01:00
Rasmus Wriedt Larsen
b3feb4d7e9 Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-11-10 15:57:00 +01:00
Mathias Vorreiter Pedersen
2ceb4cffbc Merge pull request #14736 from MathiasVP/fix-global-indirect-flow
C++: Fix indirect global-variable flow
2023-11-10 14:25:23 +00:00
Anders Schack-Mulligen
0d8986cfad Java: Accept test changes. 2023-11-10 14:04:45 +01:00
Jeroen Ketema
c71bdce2d0 Merge pull request #14744 from jketema/fgets
C++: Fix `hasRemoteFlowSource` for `fgets`
2023-11-10 14:03:40 +01:00
Mathias Vorreiter Pedersen
4f6b6b4a6f Merge branch 'main' into no-dtt-in-unbounded-write 2023-11-10 12:57:42 +00:00
Jeroen Ketema
617d950a25 Apply suggestions from code review
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-11-10 13:55:39 +01:00
Tamás Vajk
340b20f93d Merge pull request #14743 from tamasvajk/standalone/adjust-nuget-test
C#: Adjust standalone integration test to not reference mono assemblies
2023-11-10 13:43:54 +01:00
Tom Hvitved
9f0b0733a6 Merge pull request #14589 from hvitved/csharp/fqn-backticks
C#: Use `C'X` fully-qualified-name format instead of `C<,...,>`
2023-11-10 13:33:36 +01:00
Jeroen Ketema
1c87875049 C++: Drop the size return value of strlcat from hasTaintFlow 2023-11-10 13:15:57 +01:00
Jeroen Ketema
5e21a5d284 C++: Fix flow for return values of strlcat and strlcpy 2023-11-10 12:28:48 +01:00
Jeroen Ketema
ba51b65d84 C++: Fix hasRemoteFlowSource for fgets
Also add the test that exposed this. Note that the test would only have started
failing after `cpp/uncontrolled-process-operation` with the rewrite of the
query away from default taint tracking, which has not happened yet.
2023-11-10 11:56:23 +01:00
Tamas Vajk
334fb1fc95 C#: Adjust standalone integration test to not reference mono assemblies 2023-11-10 11:47:28 +01:00
Alex Denisov
0fb439b54d Swift: test ElementArchetypeType via PackType 2023-11-10 11:44:45 +01:00
Alex Denisov
e865c3cbd3 Swift: extract parameter packs 2023-11-10 10:20:14 +01:00
Jeroen Ketema
e4c8406365 C++: Split strlcat off in a separate model 2023-11-10 10:11:57 +01:00
Tony Torralba
1f0d9e50c5 Merge pull request #14739 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-11-10 09:25:02 +01:00
Tom Hvitved
ae3d98fd6f C#: Add change note 2023-11-10 08:57:13 +01:00
Tom Hvitved
57ec0948cf C#: Update expected test output 2023-11-10 08:46:15 +01:00
Tom Hvitved
2971a20760 C#: Update MaD rows 2023-11-10 08:46:15 +01:00
Tom Hvitved
b72f34591d C#: Use {get,has}FullyQualifiedName throughout 2023-11-10 08:46:15 +01:00
Tom Hvitved
66dc5501e8 C#: Deprecate {get,has}QualifiedName and replace with {get,has}FullyQualifiedName 2023-11-10 08:46:01 +01:00
Paolo Tranquilli
b611e7cebf Merge pull request #14715 from github/redsun82/gen-file-docs
Swift: add more doc strings to generated things
2023-11-10 07:41:41 +01:00
github-actions[bot]
01a1b4aa50 Add changed framework coverage reports 2023-11-10 00:15:57 +00:00
Maiky
2d387a98ce Add go.mod 2023-11-10 01:00:01 +01:00
Maiky
78a65a7787 Remove import 2023-11-09 23:35:33 +01:00
Maiky
6d7598115e Undo changes in modules 2023-11-09 23:26:38 +01:00
Maiky
a7264c2b5c Requested Changes 2023-11-09 23:17:45 +01:00
Maiky
dc265e7542 Requested Changes 2023-11-09 23:17:15 +01:00
Mathias Vorreiter Pedersen
b858a284c9 Merge pull request #14726 from microsoft/28-strsafe-library-updates2 2023-11-09 21:39:10 +00:00
Cornelius Riemenschneider
246c169540 Merge pull request #14738 from github/criemen/fix-path
Take our node, not the one that comes first on the PATH.
2023-11-09 22:20:44 +01:00
Cornelius Riemenschneider
97fd2033f1 Take our node, not the one that comes first on the PATH. 2023-11-09 22:00:00 +01:00
Mathias Vorreiter Pedersen
39b9d2ea83 C++: Accept test changes. 2023-11-09 20:28:55 +00:00
Mathias Vorreiter Pedersen
eb1024c79b C++: Improve (and simplify) 'toString's. 2023-11-09 20:27:23 +00:00
Mathias Vorreiter Pedersen
86e791980c C++: Simplify 'isGlobalUse' and 'isGlobalDefImpl'. 2023-11-09 20:27:23 +00:00
Mathias Vorreiter Pedersen
9762313500 C++: Implement jumpStep using the indirection instead of index. 2023-11-09 20:27:23 +00:00
Mathias Vorreiter Pedersen
95bb70f577 C++: Also add a 'getIndirection' on 'GlobalDef' as well. This will be useful in the next commit. 2023-11-09 20:25:29 +00:00
Benjamin Rodes
5e140021fb Removed non-ascii characters. 2023-11-09 15:24:58 -05:00
Mathias Vorreiter Pedersen
fd26ae18bf C++: Obtain the SSA variable of a 'GlobalUse' using the indirection instead of the index (like we do for non-global uses as well). 2023-11-09 20:20:27 +00:00
Mathias Vorreiter Pedersen
bb5a78d3f1 C++: Factor the IPA body of 'TGlobalUse' and 'TGlobalDef' out into predicates. 2023-11-09 20:17:47 +00:00
Tamás Vajk
7112409d27 Merge pull request #14723 from tamasvajk/standalone/include-nuget-restored-folders
C#: Include all (legacy) nuget restored folders in standalone references
2023-11-09 20:27:44 +01:00
Anders Schack-Mulligen
657c29f409 Java/C++: Share valueFlowStep. 2023-11-09 20:24:28 +01:00
Tom Hvitved
94d08aa443 Merge pull request #14662 from hvitved/csharp/mad-generics
C#: Include type parameters in MaD format for generics
2023-11-09 19:46:01 +01:00
Benjamin Rodes
8674139de6 Change log file name change 2023-11-09 13:24:14 -05:00
Geoffrey White
ebf7231be7 Swift: Make the 'completePath' models work. 2023-11-09 18:21:12 +00:00
Geoffrey White
9b5556e245 Swift: Test 'completePath' more carefully. 2023-11-09 18:21:12 +00:00
Geoffrey White
2d313ef4c7 Swift: Add some path injection sink models. 2023-11-09 18:21:12 +00:00
Mathias Vorreiter Pedersen
0963af2ee7 C++: Add failing tests. 2023-11-09 18:01:22 +00:00
Jeroen Ketema
a051a57e00 Update cpp/ql/lib/semmle/code/cpp/models/implementations/Strcat.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-11-09 17:48:45 +01:00
Jeroen Ketema
0b91310357 C++: Add models for strlcpy and strlcat 2023-11-09 17:21:37 +01:00
Anders Schack-Mulligen
b8e7e1d15e Java/C++: Share ssaUpdateStep. 2023-11-09 16:02:44 +01:00
Anders Schack-Mulligen
daffae020b Java/C++: Share eqFlowCond. 2023-11-09 16:00:46 +01:00
Anders Schack-Mulligen
cad003a39e Merge pull request #14732 from aschackmull/cpp/range-ssa
C++: Fix operand ssa variables for range analysis.
2023-11-09 15:17:47 +01:00
Chris Smowton
c060827a5d Merge pull request #14699 from smowton/smowton/feature/jdk21-sequenced-collections-models
Java: model JDK21 SequencedCollection, Set and Map
2023-11-09 14:15:08 +00:00
Mathias Vorreiter Pedersen
7048190929 Update cpp/ql/src/Security/CWE/CWE-120/UnboundedWrite.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-11-09 12:39:10 +00:00
Owen Mansel-Chan
e16647fc87 Merge pull request #14731 from owen-mc/docs/dataflow-never-skip
Docs: document dataflow `neverSkip` (and expand section on hidden nodes)
2023-11-09 12:08:00 +00:00
Michael Nebel
4cc75c5bd6 Merge pull request #14564 from michaelnebel/csharp/cildefaultfalse
C#: Disable CIL extraction by default.
2023-11-09 13:06:54 +01:00
Owen Mansel-Chan
38766c497a Document neverSkip to show nodes in paths 2023-11-09 11:59:04 +00:00
Geoffrey White
cd147038cd Swift: Fill some gaps in the URL, NSURL models. 2023-11-09 11:51:18 +00:00
Geoffrey White
a86862d578 Swift: Add test cases (heuristic). 2023-11-09 11:33:10 +00:00
Geoffrey White
04016ebd20 Swift: Add test cases (more library functions). 2023-11-09 11:31:58 +00:00
Geoffrey White
f99df55e94 Swift: Add test stubs. 2023-11-09 11:28:33 +00:00
Anders Schack-Mulligen
abe0bb70ac C++: Fix operand ssa variables for range analysis. 2023-11-09 12:26:53 +01:00
Paolo Tranquilli
331fbf3251 Merge branch 'main' into redsun82/gen-file-docs 2023-11-09 12:14:10 +01:00
Paolo Tranquilli
dcb2117b31 Swift: tweak generated doc comments 2023-11-09 12:12:07 +01:00
Owen Mansel-Chan
5eaf682b77 Expand documentation of hidden nodes 2023-11-09 10:37:21 +00:00
Tom Hvitved
f58ff6ac6f C#: Manually update two more MaD rows 2023-11-09 11:25:09 +01:00
Anders Schack-Mulligen
ff6b8c4eb1 Merge pull request #14721 from aschackmull/shared/ssareadpos-share
Java/C++/RangeAnalysis: Move SsaReadPosition to shared qlpack.
2023-11-09 11:22:20 +01:00
Tamas Vajk
5c05a4c752 Restore nuget.exe and dotnet restore packages to separate folders 2023-11-09 11:20:00 +01:00
Cornelius Riemenschneider
3dcb039c76 Merge branch 'main' into criemen/java-int-tests 2023-11-09 11:19:04 +01:00
Tamas Vajk
d44d980003 C#: Exclude tools folders in legacy nuget packages 2023-11-09 11:19:02 +01:00
Cornelius Riemenschneider
cfa47a6d8e Merge pull request #14677 from github/criemen/js-bazel
JS: Move the language pack build and tests to Bazel
2023-11-09 11:15:42 +01:00
Chris Smowton
db045e0d9e Merge pull request #14729 from github/dependabot/go_modules/go/extractor/extractor-dependencies-479a80dd5e
Bump the extractor-dependencies group in /go/extractor with 1 update
2023-11-09 09:40:13 +00:00
Tamas Vajk
fd99e1f6a5 C#: Add test case with nuget package containing tools 2023-11-09 10:33:34 +01:00
Cornelius Riemenschneider
b4ec13235d Address review. 2023-11-09 09:40:29 +01:00
Tom Hvitved
5ae025f39a C#: Add change note 2023-11-09 08:45:25 +01:00
Tom Hvitved
76e6f81075 C#: Allow for explicit interface names in MaD consistency check 2023-11-09 08:34:36 +01:00
Tom Hvitved
136adb2df2 C#: Regenerate dotnet/runtime models 2023-11-09 08:34:36 +01:00
Tom Hvitved
f920bc164a C#: Update model generator to output one file per namespace 2023-11-09 08:34:36 +01:00
Tom Hvitved
7aed6f9233 C#: Manually update some MaD rows 2023-11-09 08:34:36 +01:00
Tom Hvitved
11c113bbd5 C#: Use new format for generics when parsing MaD rows 2023-11-09 08:34:36 +01:00
Tom Hvitved
84773fcde4 C#: Convert existing models using model converter 2023-11-09 08:34:35 +01:00
Tom Hvitved
74f483a6f5 C#: Update model conversion queries 2023-11-09 08:34:35 +01:00
Tom Hvitved
6f4311d656 C#: Include type parameters when printing MaD rows with generics 2023-11-09 08:34:06 +01:00
dependabot[bot]
8a3f29a6bf Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/tools](https://github.com/golang/tools).

- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-09 03:49:54 +00:00
Ben Rodes
79dcb4b48c Update cpp/ql/lib/change-notes/2023-11-8-strsafe-models.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-11-08 12:37:55 -05:00
Benjamin Rodes
bdae2af0e2 Adding missing strsafe sprintf variants. 2023-11-08 12:20:53 -05:00
Benjamin Rodes
c3ff181198 Adding change log 2023-11-08 12:20:04 -05:00
Rasmus Wriedt Larsen
3023d3b8c0 Python: Add change-note 2023-11-08 17:20:05 +01:00
Rasmus Wriedt Larsen
4943fc5a57 Python: Model taint from re.<func> calls 2023-11-08 17:18:40 +01:00
Rasmus Wriedt Larsen
851c30e797 Python: Add taint modeling of re.Match objects 2023-11-08 17:18:09 +01:00
Mathias Vorreiter Pedersen
68e7f84c23 Merge pull request #14661 from geoffw0/commandinject4
Swift: Fix defaultImplicitTaintRead on fields
2023-11-08 15:52:18 +00:00
Geoffrey White
6b434d10ce Merge pull request #14701 from geoffw0/promotecmdline
Swift: Promote the command injection query out of experimental
2023-11-08 15:46:29 +00:00
Paolo Tranquilli
e68826bf99 Merge pull request #14261 from github/alexdenisov/upgrade-to-swift-5.9
Swift: upgrade to 5.9
2023-11-08 16:15:41 +01:00
Cornelius Riemenschneider
6b37d2009b Merge branch 'main' into criemen/js-bazel 2023-11-08 16:11:47 +01:00
Mathias Vorreiter Pedersen
38bd893c81 Merge branch 'main' into no-dtt-in-unbounded-write 2023-11-08 15:06:59 +00:00
Rasmus Wriedt Larsen
ea4761d3b6 Python: Add tests of taint-flow for re module 2023-11-08 16:05:22 +01:00
Mathias Vorreiter Pedersen
e90803a81c C++: Rewrite 'cpp/unbounded-write' away from DefaultTaintTracking. 2023-11-08 14:57:04 +00:00
Cornelius Riemenschneider
512c6a59c5 Merge pull request #14718 from github/criemen/go-ub
Restructure go Makefile: Build the per-platform target.
2023-11-08 15:30:57 +01:00
Mathias Vorreiter Pedersen
d8e75e66d7 Merge pull request #14717 from github/alexdenisov/fix-cfg-for-single-value-stmt-expr
Swlft: fix CFG for SingleValueStmtExpr
2023-11-08 14:26:00 +00:00
Rasmus Wriedt Larsen
9b0ad8295e Python: Add test of nested classes 2023-11-08 14:58:40 +01:00
Shati Patel
3586231e7d Merge pull request #14668 from github/shati-patel/docs-databases
VS Code extension docs: Changes to database downloads
2023-11-08 13:55:43 +00:00
Rasmus Wriedt Larsen
9d5cf0b331 Merge branch 'main' into class-attribute-flow 2023-11-08 14:30:53 +01:00
Rasmus Wriedt Larsen
6d4e000c7c Merge pull request #14590 from RasmusWL/fix-dataflow-class-scope
Python: Fix dataflow consistency error due to missing class scope
2023-11-08 14:30:34 +01:00
Rasmus Wriedt Larsen
43d9d2ceb7 Merge pull request #14603 from github/max-schaefer/broken-crypto-algorithm-link
JavaScript/Python/Ruby: Improve alert message for `*/weak-cryptographic-algorithm`.
2023-11-08 14:29:24 +01:00
amammad
c361caf0b0 fix tests for FileSystemAccess, add comments for adding some functions in future, remove old comments 2023-11-08 14:15:26 +01:00
Anders Schack-Mulligen
f9132c5ff0 Java: Duplicate a bit more code to postpone Java-C# cleanup. 2023-11-08 14:04:34 +01:00
Tamas Vajk
2273bb13b8 C#: Include all (legacy) nuget restored folders in standalone references 2023-11-08 14:02:41 +01:00
Tamas Vajk
b782e5bf44 C#: Add test case with legacy nuget restore 2023-11-08 14:01:10 +01:00
Tamás Vajk
4ae35d179e Merge pull request #14707 from tamasvajk/standalone/framework-nuget-1
C#: Keep only one framework reference nuget package in standalone
2023-11-08 12:52:52 +01:00
Alex Denisov
d510739ca2 Swift: add 5.9 chagenote 2023-11-08 12:20:33 +01:00
Anders Schack-Mulligen
1f4cd74a1c Java/C++: Move SsaReadPosition to shared qlpack. 2023-11-08 12:11:17 +01:00
Michael Nebel
795e32c681 Merge pull request #14693 from michaelnebel/csharp/fixcompilerwarning
C#: Fix compiler warning of possible null de-reference.
2023-11-08 12:04:41 +01:00
Michael Nebel
b1c3915fd9 Merge pull request #14712 from michaelnebel/csharp/tracerdotnettest
C#: Tracer improvement for `dotnet test`
2023-11-08 12:03:19 +01:00
Geoffrey White
d78a7b9d94 Swift: Add credit to change note. 2023-11-08 10:46:57 +00:00
Michael Nebel
0cf00ebb5d C#: Re-introduce null check in cached entity hash code calculation. 2023-11-08 10:59:06 +01:00
Cornelius Riemenschneider
f12310cb86 The java-version-too-old relies on a Java 8 installation.
We don't have a Java 8 build on the M1 machines, therefore skip this test.
2023-11-08 10:36:47 +01:00
Cornelius Riemenschneider
137403f649 Java: Move more tests to use the try_use_java11() helper.
This is in preparation of executing these tests on GH-hosted M1 runners,
where we need to have architecture-specific path handling.
It's nicer to fix all of this in one place (the helper), than to run around
fixing individual tests.
2023-11-08 10:33:50 +01:00
Mathias Vorreiter Pedersen
ab64d9a9d6 Merge pull request #14713 from MathiasVP/no-gvn-as-ssa-in-range-analysis
C++: Don't use GVN as SSAVariable in new range analysis
2023-11-08 09:28:15 +00:00
Michael Nebel
69e8621062 C#: Fix compiler warning of possible null de-reference. 2023-11-08 10:21:26 +01:00
Paolo Tranquilli
ac838d72de Codegen: mark all generated files and classes as INTERNAL 2023-11-08 10:02:17 +01:00
Paolo Tranquilli
b7543f5dc7 Codegen: pass ql_internal to Stub 2023-11-08 09:54:21 +01:00
Michael Nebel
cd4a546763 C#: Add CIL extraction change note. 2023-11-08 09:40:01 +01:00
Michael Nebel
8f23ba83be C#: Update Options unit tests to reflect the new default. 2023-11-08 09:40:01 +01:00
Michael Nebel
9b56e83745 C#: Set CIL extraction default to false. 2023-11-08 09:40:01 +01:00
Tony Torralba
5442cdb49c Merge pull request #14610 from atorralba/atorralba/java/jms-deserialization
Java: Add JMS sink to java/unsafe-deserialization
2023-11-08 09:10:20 +01:00
Erik Krogh Kristensen
f643fd7d74 Merge pull request #14716 from erik-krogh/invalid-main
JS: catch when the main: path is invalid on Windows
2023-11-08 08:33:58 +01:00
Anders Schack-Mulligen
45ae4ed362 Merge pull request #14711 from aschackmull/shared/rangeutil-share2
Java/C++/RangeAnalysis: Move a couple of utility predicates to shared qlpack
2023-11-08 08:33:12 +01:00
Mathias Vorreiter Pedersen
a8eed6bd7e Merge pull request #14704 from MathiasVP/fix-uninitialized-local
C++: IR'ify `cpp/uninitialized-local` and fix FPs
2023-11-07 22:45:34 +00:00
Cornelius Riemenschneider
3f95dd6916 Restructure go Makefile: Build the per-platform target.
This changes the default build target we use to build the go extractor
to use th per-platform targets (requires internal change to follow up).
This also builds the macos target as universal binary.
2023-11-07 20:21:10 +01:00
Geoffrey White
b63294764b Merge pull request #14705 from geoffw0/qhelplink
Fix a dead ReDoS link in docs
2023-11-07 17:40:19 +00:00
Mathias Vorreiter Pedersen
69502d0c31 C++: Add some more tests. 2023-11-07 17:31:01 +00:00
Alex Denisov
12f9e3a1dd Swlft: fix CFG for SingleValueStmtExpr 2023-11-07 18:12:39 +01:00
erik-krogh
ae577d1e44 catch when the main: path is invalid on Windows 2023-11-07 17:42:21 +01:00
Alex Denisov
dd20a9b009 Swlft: fix wording in the comment 2023-11-07 17:28:37 +01:00
Alex Denisov
df256e601a Swlft: add explicit SingleValueStmtExpr test 2023-11-07 17:26:44 +01:00
Mathias Vorreiter Pedersen
5a9867c5b0 Merge pull request #14714 from MathiasVP/geoffw0-follow-up-comment
C++: Add comment to testcase
2023-11-07 15:33:15 +00:00
Paolo Tranquilli
10afa4381a Swift: add more doc strings to generated things 2023-11-07 16:29:03 +01:00
Mathias Vorreiter Pedersen
1c8f474848 C++: Add comment as suggested in the PR review for #14708. 2023-11-07 15:16:38 +00:00
Mathias Vorreiter Pedersen
2787f0a0fc Merge pull request #14708 from MathiasVP/add-testcase-for-range-analysis
C++: Add range analysis testcase
2023-11-07 15:15:45 +00:00
Mathias Vorreiter Pedersen
2d43eec3c3 C++: Accept test changes. 2023-11-07 14:57:30 +00:00
Mathias Vorreiter Pedersen
91b29eee53 C++: Don't use GVN as an SSAVariable in range analysis. 2023-11-07 14:52:50 +00:00
Mathias Vorreiter Pedersen
a04830b8b2 Merge pull request #14697 from MathiasVP/range-analysis-simplify-conversions
C++: Simplify the definition of `SemExpr` for range analysis
2023-11-07 14:52:09 +00:00
Rasmus Wriedt Larsen
5433907c33 Python: Accept more test changes
All are for the better 🎉
2023-11-07 15:49:14 +01:00
Michael Nebel
21cb4909cf C#: Add integration test. 2023-11-07 15:26:55 +01:00
Anders Schack-Mulligen
12cba7909b Java/C++: Move range util guard-controls predicates to shared pack. 2023-11-07 15:14:34 +01:00
Anders Schack-Mulligen
f2ca52d951 Java/C++: Move range util backEdge predicate to shared pack. 2023-11-07 15:14:34 +01:00
Tom Hvitved
b2512eb212 Merge pull request #14678 from hvitved/csharp/mad-operator-fix
C#: Correctly parse operator names in MaD
2023-11-07 15:11:01 +01:00
Rasmus Wriedt Larsen
dc8ca70ab5 Merge pull request #14694 from RasmusWL/python-validtest-success
Python: Misc: show that all tests passed in validTest
2023-11-07 14:56:57 +01:00
Michael Nebel
7ea8f88d47 C#: Allow exe and dll files for dotnet test to start with any character. 2023-11-07 14:52:37 +01:00
Cornelius Riemenschneider
9c8e2321be Merge branch 'main' into criemen/js-bazel 2023-11-07 14:36:45 +01:00
Cornelius Riemenschneider
697a7b8a60 Merge pull request #14702 from github/criemen/java-int-test
Java: Make integration test more robust wrt recent Java versions.
2023-11-07 14:00:40 +01:00
Alex Denisov
2b7ce23653 Swlft: add database upgrade scripts 2023-11-07 13:40:42 +01:00
Alex Denisov
33de177fea Swift: extract SingleValueStmtExpr 2023-11-07 13:40:35 +01:00
Alex Denisov
bbde709b3f Swift: upgrade to 5.9.1 2023-11-07 13:40:28 +01:00
Tamas Vajk
a70d9691da C#: Add standalone test with multiple targets 2023-11-07 13:39:43 +01:00
Tom Hvitved
af7b295c59 Address review comments 2023-11-07 13:01:19 +01:00
Mathias Vorreiter Pedersen
9dca6697fb C++: Add a testcase that fails to terminate in modulus analysis when we don't have IR operands as SSA variables. 2023-11-07 11:52:35 +00:00
Tamas Vajk
0f31fc7cbe C#: Keep only one framework reference nuget package in standalone 2023-11-07 12:12:59 +01:00
Rasmus Wriedt Larsen
5220a8d3f8 Update python/ql/test/experimental/dataflow/validTest.py
Co-authored-by: Taus <tausbn@github.com>
2023-11-07 11:30:13 +01:00
Rasmus Wriedt Larsen
9f43108ba8 Python: Fix DataFlowCall.getEnclosingCallable
Now it is aligned with the implementation of DataFlow::Node

See 4bc4e0845d/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll (L134-L138)
2023-11-07 11:29:23 +01:00
Rasmus Wriedt Larsen
904a8b1ea9 Python: Add consistency tests for class scope 2023-11-07 11:29:23 +01:00
Rasmus Wriedt Larsen
5bee44dcfe Python: add change-note 2023-11-07 11:27:11 +01:00
Rasmus Wriedt Larsen
6568332e3d Python: Add basic flow for class attributes 2023-11-07 11:23:42 +01:00
Rasmus Wriedt Larsen
6c50c2bfe6 Python: Highlight missing flow for class attributes 2023-11-07 11:23:42 +01:00
Cornelius Riemenschneider
ccaa792343 Address on-slack review. 2023-11-07 11:07:37 +01:00
Mathias Vorreiter Pedersen
6669cf805f C++: Add change note. 2023-11-07 09:32:07 +00:00
Mathias Vorreiter Pedersen
0fd4d4a114 C++: Add QLDoc. 2023-11-07 09:29:34 +00:00
Geoffrey White
e8a466a02c Update dead link. 2023-11-07 09:26:07 +00:00
Mathias Vorreiter Pedersen
022c9eb3cd C++: Add a barrier feature to 'MustFlow'. 2023-11-07 09:23:42 +00:00
Mathias Vorreiter Pedersen
6bf2d47321 C++: Allow source = sink in 'MustFlow'. 2023-11-07 09:23:42 +00:00
Mathias Vorreiter Pedersen
1dc08941f8 C++: Use 'MustFlow' in 'cpp/uninitialized-local'. 2023-11-07 09:23:41 +00:00
AlexDenisov
a0e73eaab0 Merge pull request #14696 from github/alexdenisov/force-canonical-types
Swlft: force canonical type computation before using the type
2023-11-07 10:23:16 +01:00
Mathias Vorreiter Pedersen
a17cd9bc1c Merge pull request #14667 from MathiasVP/more-function-input-and-output-ipa-numbers
C++: Allocate more `FunctionInput` and `FunctionOutput`s
2023-11-07 08:57:31 +00:00
Geoffrey White
4ce8d953d2 Merge pull request #14698 from geoffw0/realmswift
Swift: Fix an issue with Realm sinks for swift/cleartext-storage-database
2023-11-07 08:37:27 +00:00
amammad
f58462bee9 fix tests 2023-11-07 06:32:15 +01:00
Cornelius Riemenschneider
cff9bcfabc Revert "Revert "Java: Make integration test more robust wrt recent Java versions.""
This reverts commit 4e70e674fd.
2023-11-06 23:29:33 +01:00
Cornelius Riemenschneider
4e70e674fd Revert "Java: Make integration test more robust wrt recent Java versions."
This reverts commit ae21bbf0b2.
2023-11-06 23:26:21 +01:00
Cornelius Riemenschneider
ae21bbf0b2 Java: Make integration test more robust wrt recent Java versions.
I've been investigating moving the Java integration tests to a
GH-hosted macos runner, instead of a self-hosted one.
This test is not compatible with a GH-hosted runners Java setup.
It is also not compatible to being exposed to JAVA_21_HOME_X64 variable yet.

This PR fixes both issues.
2023-11-06 23:22:05 +01:00
Jorge
b08d57a85f Add {{! to TEMPLATE_EXPR_OPENING_TAG 2023-11-06 20:40:00 +00:00
Geoffrey White
3465c34cb6 Merge pull request #14680 from geoffw0/dataclosure
Swift: Generalize flow through subscript writes / test and fix some closure methods of Data
2023-11-06 19:39:08 +00:00
amammad
e8eff78799 fix tests because of error in Frameworks.qll 2023-11-06 19:19:36 +01:00
amammad
ad756d59c8 put new frameworks in Frameworks.qll and fix some mistakes of Baize 2023-11-06 19:17:50 +01:00
amammad
315bdc2b48 add tests for new frameworks 2023-11-06 19:13:57 +01:00
amammad
637c52d10a separate each new FileSystemAccess packages. 2023-11-06 19:03:55 +01:00
Geoffrey White
c85bdcd5ab Swift: Change note. 2023-11-06 17:36:58 +00:00
Mathias Vorreiter Pedersen
4455ed982d C++: Accept query test changes. 2023-11-06 17:33:46 +00:00
Geoffrey White
1c6a4b8cbf Swift: Update the test .qlref. 2023-11-06 17:32:25 +00:00
Mathias Vorreiter Pedersen
84594e66bc Merge pull request #14682 from geoffw0/filepathclosure
Swift: Correct a couple of FilePath models.
2023-11-06 17:31:17 +00:00
Geoffrey White
127f819762 Swift: Move command injection query out from experimental. 2023-11-06 17:23:28 +00:00
Ian Lynagh
e0c89a700f Merge pull request #14695 from igfoo/igfoo/order
Docs: Put lists in supported-frameworks.rst in more alphabetical order
2023-11-06 17:00:39 +00:00
Cornelius Riemenschneider
be02512dfe Add a build system for the junit tests.
This is a bit more complicated than our usual setup, as we both need to
unzip the typescript parser wrapper, and make node accessible on the path.
2023-11-06 17:58:28 +01:00
Chris Smowton
24b4b05be8 Add models for new Collections methods 2023-11-06 16:44:40 +00:00
Chris Smowton
d30d71e048 Add change note 2023-11-06 16:38:44 +00:00
Geoffrey White
426bdc0011 Swift: Add test cases. Before the changes, we don't catch the cases for return values from the closures. 2023-11-06 16:32:23 +00:00
Mathias Vorreiter Pedersen
d38fa13299 C++: Remove more uses of 'getConverted' and 'getUnconverted'. 2023-11-06 16:11:55 +00:00
Chris Smowton
5b72aee3ae Java: model JDK21 SequencedCollection, Set and Map 2023-11-06 16:04:13 +00:00
Mathias Vorreiter Pedersen
e91987b1a9 C++: Accept test changes. 2023-11-06 16:02:06 +00:00
Mathias Vorreiter Pedersen
d544f47746 C++: Simplify the definition of 'SemExpr' by instead making non-overflowing conversions copy value expressions. 2023-11-06 16:01:59 +00:00
Geoffrey White
e4f6b1ac27 Swift: Change note. 2023-11-06 16:00:22 +00:00
Geoffrey White
77e48f72ec Swift: Detect Realm sinks more reliably. 2023-11-06 15:54:17 +00:00
Geoffrey White
9ec5e6e35e Swift: Re-organize the RealmStore constructor. 2023-11-06 15:54:17 +00:00
Geoffrey White
424046d238 Swift: Add test case. 2023-11-06 15:54:17 +00:00
Alex Denisov
80c4b7357a Swlft: force canonical type computation before using the type
`getCanonicalType` will force computation of the canonical type.
Without canonical type computed. `getString` may cause crashes in
certain cases.
2023-11-06 16:53:38 +01:00
Mathias Vorreiter Pedersen
31c2a3be98 C++: Don't redefine the meaning of the single-parameter 'isParameterDeref' and accept test changes. 2023-11-06 15:52:58 +00:00
Ian Lynagh
decbaa9dc7 Docs: Put lists in supported-frameworks.rst in more alphabetical order
They were almost alphabetical, but not quite.

Python was ordered by category first, and by name within each catogory.
I've left it like that, but it would probably be better to be
consistent between languages, one way or the other.
2023-11-06 15:49:16 +00:00
Michael Nebel
3f0be47c7b Merge pull request #14655 from michaelnebel/csharp/projectassetspackages
C#: Use `project.assets.json` for package dependencies.
2023-11-06 16:26:38 +01:00
amammad
36f0a78450 fix typeorm test.ts according to Review 2023-11-06 16:23:35 +01:00
Robert Marsh
49428c4585 Merge pull request #14683 from geoffw0/nsstringclosure
Swift: Model NSString.enumerate*
2023-11-06 10:19:25 -05:00
Rasmus Wriedt Larsen
43f1d092f1 Python: Misc: show that all tests passed in validTest 2023-11-06 16:04:58 +01:00
Tom Hvitved
d86293f9b4 Merge pull request #14690 from hvitved/csharp/gvn-unbound-type 2023-11-06 15:30:53 +01:00
amammad
d7f1e19d40 fix sqlite.js test according to Review 2023-11-06 15:22:36 +01:00
amammad
cc5dd3180a fix better-sqlite3 tests according to Review 2023-11-06 15:18:55 +01:00
amammad
c858e4974d fix Sqlite and BetterSqlite3 issues according to Review 2023-11-06 14:57:40 +01:00
Mathias Vorreiter Pedersen
ff30308a2b C++: Only the first indirection of the argument should be the remote flow sink. 2023-11-06 13:57:14 +00:00
Taus
75e6de8311 Python: Add test 2023-11-06 13:50:55 +00:00
Taus
f67c68da9a Python: Make TypeParameter extend AstNode
With `AstNode` defined as a union of other classes, we don't get this for free.

(Compare with `DictItem`, which is in a similar situation.)
2023-11-06 13:50:55 +00:00
Taus
878299823c Python: Add up-/downgrade scripts
In the upgrade direction, we simply do nothing.

In the downgrade direction, we remove the two new relations, and
also any `Stmt` nodes corresponding to `TypeAlias` nodes.
2023-11-06 13:50:55 +00:00
Taus
9cd1e0e546 Python: Add stats for new relations 2023-11-06 13:50:55 +00:00
Taus
e8209a6a10 Python: Fix missing override compilation error 2023-11-06 13:50:55 +00:00
Taus
2e77b8d3c2 Python: Add wrapper classes around the newly added AST nodes 2023-11-06 13:50:55 +00:00
Taus
c397f707a1 Python: Add automatically generated files
For these, I opted for a placement that would cause as few changes to the
dbscheme as possible. This puts the new `type_parameters` fields as the
last field on function and class definitions.
2023-11-06 13:50:55 +00:00
Tom Hvitved
4b9430d59e Merge pull request #14688 from hvitved/csharp/deprecate-get-instance-type
C#: Deprecate `UnboundGenericType::getInstanceType/0`
2023-11-06 14:32:54 +01:00
Mathias Vorreiter Pedersen
cd2eec0aa0 C++: Also override the single-parameter 'isParameterDeref' in 'InParameterDeref'. 2023-11-06 13:23:31 +00:00
Cornelius Riemenschneider
52fcc5f435 Export test data directories. 2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
63854e36b4 Use the TestPaths helper to lookup files. 2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
a773532d07 Refactor JS test suite to be more in line with other Java projects.
Therefore, we move the test suite out of the `src` directory.
2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
6c7ea86a12 Introduce a bazel-based build for the entire JS pack. 2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
465eb00228 More fine-grained dependency on internal extractors. 2023-11-06 13:44:28 +01:00
Arthur Baars
01e7d57dba Add changenote 2023-11-06 13:38:33 +01:00
Arthur Baars
7f4bcdfa64 Rename test files 2023-11-06 13:38:33 +01:00
Arthur Baars
eecf32db4d Add tests for deprecated 'assert' syntax 2023-11-06 13:38:33 +01:00
Arthur Baars
4192d09e5c Add tests for deprecated 'assert' syntax 2023-11-06 13:38:33 +01:00
Arthur Baars
b4d89f7554 Replace 'assert' with 'with' in QL test files 2023-11-06 13:38:33 +01:00
Arthur Baars
3d45944649 Rename 'assertions' to 'attributes' in JS extractor 2023-11-06 13:38:32 +01:00
Arthur Baars
bd62ec294e Support TS 5.3 import attributes (previously import assertions) 2023-11-06 13:38:32 +01:00
Arthur Baars
1067dd9dd3 Auto-format 2023-11-06 13:38:32 +01:00
Arthur Baars
ec075f8fbe Upgrade typescript to 5.3.1-rc 2023-11-06 13:38:24 +01:00
Geoffrey White
b926090f0d Swift: Simplify AdoptsWkNavigationDelegate in WebView.qll. 2023-11-06 12:29:32 +00:00
Rasmus Wriedt Larsen
f6ae7523b5 Merge pull request #14591 from RasmusWL/minor-stringpool-improvement
Python: Minor cleanup for string pool interaction
2023-11-06 13:13:27 +01:00
Tom Hvitved
12cd1c1011 C#: Deprecate UnboundGenericType::getInstanceType/0 2023-11-06 13:01:57 +01:00
Geoffrey White
4e214e1c7c Merge pull request #14691 from geoffw0/webview2
Swift: Add a webview test case
2023-11-06 11:08:09 +00:00
shati-patel
68da5e2bbe Fix some names + a spurious quotation mark 2023-11-06 10:56:03 +00:00
Rasmus Wriedt Larsen
92b13c4259 Merge branch 'main' into amammad-python-FileSystemAccess 2023-11-06 11:30:09 +01:00
Rasmus Wriedt Larsen
3d8a7e0ee3 Python: Add change-note 2023-11-06 11:29:52 +01:00
Chris Smowton
c6193ebc0c Merge pull request #14687 from github/dependabot/go_modules/go/extractor/extractor-dependencies-a562808574
Bump the extractor-dependencies group in /go/extractor with 1 update
2023-11-06 10:05:44 +00:00
Geoffrey White
838a00bbc9 Swift: Add a webview test case from a branch that didn't make it. 2023-11-06 09:44:53 +00:00
amammad
0d670f81fb fix type assertion errors and create more source()s for better tests 2023-11-06 10:39:30 +01:00
amammad
ea40081204 Merge branch 'amammad-go-fastHttp' of https://github.com/amammad/codeql into amammad-go-fastHttp 2023-11-06 10:38:18 +01:00
Erik Krogh Kristensen
2abdf7dbbd Merge pull request #14686 from erik-krogh/delete-yarn
JS: remove the remaining yarn files
2023-11-06 10:37:06 +01:00
Tom Hvitved
602d16d73f C#: Add another data flow test 2023-11-06 10:18:32 +01:00
Geoffrey White
b99e44c3ca Swift: Fix the Data test. 2023-11-06 09:18:27 +00:00
Michael Nebel
4bcf9e50a0 C#: Address review comments. 2023-11-06 10:02:53 +01:00
Tom Hvitved
467854ba4b C#: Convert a data flow test to use inline test expectations 2023-11-06 09:54:34 +01:00
Kevin Stubbings
57c645bd24 Added support for same struct and added new test 2023-11-05 22:34:35 -08:00
dependabot[bot]
2d9ff85753 Bump the extractor-dependencies group in /go/extractor with 1 update
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/mod](https://github.com/golang/mod).

- [Commits](https://github.com/golang/mod/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 03:19:42 +00:00
Kevin Stubbings
1f2e8d898d Address Feedback 2023-11-05 14:28:34 -08:00
Tom Hvitved
3e3ea51e69 C#: Correctly parse operator names in MaD 2023-11-05 20:58:47 +01:00
Tom Hvitved
2a33a86c9d C#: Merge ExternalFlow.qll and ExternalFlowExtensions.qll, and move to internal 2023-11-05 20:58:47 +01:00
Tom Hvitved
aa521ecd59 C#: Include more libraries in flow summaries test 2023-11-05 20:23:10 +01:00
erik-krogh
abcb5a7a95 remove the remaining yarn files 2023-11-05 19:24:59 +01:00
amammad
2624f365c3 update inline flow tests of AddittionalTaintSteps 2023-11-05 17:49:32 +03:30
amammad
88e75a6ec8 add flow summary instead of additional flow steps 2023-11-05 17:49:32 +03:30
amammad
23f7f9a24a fix some grammer mistakes, an unnecessary import, put blank like after go generate 2023-11-05 17:49:32 +03:30
amammad
2f86c2588b fix autoformatting 2023-11-05 17:49:32 +03:30
amammad
56bcbf3a41 add additional taint steps to SSRF query 2023-11-05 17:49:32 +03:30
amammad
e38cb0f36e fix a issue in fasthttp library, add SSRF inline queires 2023-11-05 17:49:32 +03:30
amammad
7bc07d959b add additional taint steps inline tests 2023-11-05 17:49:32 +03:30
amammad
3bc24c3534 add inline tests for open redirect,xss, fix some issues in fasthttp.qll 2023-11-05 17:49:32 +03:30
amammad
29219922ac add inline tests for UntrustedFlowSource, and fix some not necessarily flow sources 2023-11-05 17:49:32 +03:30
amammad
defe964f3a update tests 2023-11-05 17:49:32 +03:30
amammad
5232d28617 fix a mistake: replaces tests after gofmt 2023-11-05 17:49:32 +03:30
amammad
c6acb1012c perfomed gofmt on fasthttp.go 2023-11-05 17:49:32 +03:30
amammad
1ff1c5cfe0 fix two bugs, make package path more neat 2023-11-05 17:49:32 +03:30
amammad
345fdf12e5 added the go generate commands for depstubber 2023-11-05 17:49:32 +03:30
amammad
2048d8945b fix qldoc and tests 2023-11-05 17:49:32 +03:30
amammad
8aba71f678 upgrade tests 2023-11-05 17:49:32 +03:30
amammad
1c657a62c1 fix stub 2023-11-05 17:49:32 +03:30
amammad
de391ffa4d fix qlDOC one missed mistake 2023-11-05 17:49:32 +03:30
amammad
b7ef215504 fix change notes 2023-11-05 17:49:32 +03:30
amammad
693539a604 fix qhelps 2023-11-05 17:49:32 +03:30
amammad
2ac906395f fix tests 2023-11-05 17:49:32 +03:30
amammad
1fc7758dfb add change note 2023-11-05 17:49:32 +03:30
amammad
80e5fb81bc fix library-tests 2023-11-05 17:49:32 +03:30
amammad
2ee2ac383d fix some mistakes:( 2023-11-05 17:49:32 +03:30
amammad
377d1f55be add proper test cases 2023-11-05 17:49:32 +03:30
amammad
543684904f fix go.mod 2023-11-05 17:49:32 +03:30
amammad
c25bb3cde0 remove tmp test 2023-11-05 17:49:32 +03:30
amammad
3226184547 add tests 2023-11-05 17:49:32 +03:30
amammad
cddd27c5f8 V1 2023-11-05 17:49:32 +03:30
amammad
d1926f9061 update inline flow tests of AddittionalTaintSteps 2023-11-05 15:17:06 +01:00
Geoffrey White
e621d208e4 Merge branch 'main' into nsstringclosure 2023-11-03 20:54:53 +00:00
Geoffrey White
55ec27f47f Merge branch 'main' into filepathclosure 2023-11-03 20:54:16 +00:00
Geoffrey White
e90b630c9b Merge branch 'main' into dataclosure 2023-11-03 20:50:20 +00:00
Geoffrey White
c6bc1a3f3a Merge pull request #14684 from geoffw0/testsfix
Swift: Fix failing tests
2023-11-03 19:24:03 +00:00
Geoffrey White
07eba4e3b1 Swift: Fix some failing tests, looks like this could be the result of some recently merged PRs interacting (positively!) 2023-11-03 17:08:05 +00:00
Geoffrey White
041dc19055 Swift: Change note. 2023-11-03 16:22:46 +00:00
Geoffrey White
989a546796 Swift: Model the NSString.enumerate* methods. 2023-11-03 16:22:45 +00:00
Geoffrey White
d0ca7045d4 Swift: Fix some NSString models. 2023-11-03 16:07:34 +00:00
Geoffrey White
a59ed5bc49 Swift: Add test cases. 2023-11-03 15:45:45 +00:00
Geoffrey White
06191922c3 Swift: Correct a couple of FilePath models. 2023-11-03 15:12:31 +00:00
Geoffrey White
71ad6a8262 Swift: Change note. 2023-11-03 14:53:37 +00:00
Geoffrey White
0d7943031c Swift: Generalize subscript assignment storeStep. 2023-11-03 14:53:37 +00:00
yoff
f969274a29 Merge pull request #14644 from yoff/python/filter-local-self-loops
Python: filter local self loops
2023-11-03 15:45:09 +01:00
Sam Browning
225c96ec9f Merge branch 'main' of https://github.com/github/codeql 2023-11-03 09:42:55 -04:00
Geoffrey White
245f475fdb Swift: Remove duplicate model. 2023-11-03 12:55:36 +00:00
Michael Nebel
df4f2a367b C#: Update unit tests. 2023-11-03 13:42:32 +01:00
Michael Nebel
31f602cd47 C#: Make path concatenation OS invariant. 2023-11-03 13:35:06 +01:00
Michael Nebel
4689bdb468 C#: Log unused downloaded packages. 2023-11-03 13:27:51 +01:00
Michael Nebel
1054e7a4ee C#: Update assets unit tests. 2023-11-03 13:27:51 +01:00
Michael Nebel
003166af13 C#: Collect information about used dependencies in a Dependencies object. 2023-11-03 13:27:51 +01:00
Geoffrey White
e7e6529df6 Swift: Add tests. 2023-11-03 12:21:32 +00:00
yoff
8d3ed68b68 Merge pull request #14653 from yoff/python/add-aws-to-supported-frameworks
Python: Add AWS Lambda as a supported framework
2023-11-03 13:14:30 +01:00
Geoffrey White
49add7d8ce Swift: Add stubs to test. 2023-11-03 12:07:15 +00:00
Michael Nebel
eb228b6e68 C#: Address some review comments. 2023-11-03 11:32:53 +01:00
Michael Nebel
62dd86bacb C#: Update standalone integration tests expected output. 2023-11-03 11:32:48 +01:00
Michael Nebel
7b91be6c52 C#: Allways add Windows Desktop App dlls if the NuGet package is downloaded. 2023-11-03 11:31:28 +01:00
Michael Nebel
11505d6842 C#: Make the assembly cache more robust against non-existing paths. 2023-11-03 11:31:27 +01:00
Michael Nebel
56a70da28f C#: Remove package cleanup in the dependency manager. 2023-11-03 11:31:27 +01:00
Michael Nebel
70996a4c7e C#: Rename dllDirNames to dllPaths. 2023-11-03 11:31:27 +01:00
Michael Nebel
576eda3ec6 C#: Add missing package directory to included dlls. 2023-11-03 11:31:27 +01:00
Michael Nebel
4cebb7e848 C#: Integrate the assets parsing and fetching in the dependency manager. 2023-11-03 11:31:27 +01:00
Michael Nebel
f8d427336e C#: Add assets parsing unit test. 2023-11-03 11:31:27 +01:00
Michael Nebel
7bbf1a24d4 C#: Add assets.json parser. 2023-11-03 11:31:27 +01:00
Michael Nebel
c6c00e7179 C#: Add tests cases for parsing dotnet restore output to find assets.json files. 2023-11-03 11:31:27 +01:00
Michael Nebel
3a7df994cb C#: The dependency manager should find assets.json files when doing a project or solution restore. 2023-11-03 11:31:27 +01:00
Michael Nebel
387a241efd C#: Set output verbosity to normal for both solution and project restore (needed to identify where assets file are located). 2023-11-03 11:31:27 +01:00
Paolo Tranquilli
506b911767 Merge pull request #14629 from github/redsun82/rework-resource-dir
Swift: rework resource dir
2023-11-03 11:14:49 +01:00
Michael Nebel
4009f03087 Merge pull request #14665 from michaelnebel/csharp/projectreference
C#: Update DependencyManager logic to exclude commented out references.
2023-11-03 10:30:03 +01:00
Tom Hvitved
9807a8e1d3 Merge pull request #14675 from hvitved/csharp/split-generated-mad-files-take2
C#: Split `generated/dotnet_runtime.yml` into separate files (take 2)
2023-11-03 10:24:38 +01:00
Tom Hvitved
af524f0043 Revert "C#: Temporary changes to model generator"
This reverts commit 0f6cea6bd6ecd61139dc09e7b68bf0b8ebc009fe.
2023-11-03 09:51:40 +01:00
Tom Hvitved
894f9ab8fa C#: Split generated/dotnet_runtime.yml into separate files 2023-11-03 09:51:40 +01:00
Tom Hvitved
7082efa037 C#: Temporary changes to model generator 2023-11-03 09:51:40 +01:00
Tom Hvitved
c34ad25cf9 Merge pull request #14674 from github/revert-14663-csharp/split-generated-mad-files
Revert "C#: Split `generated/dotnet_runtime.yml` into separate files"
2023-11-03 09:51:22 +01:00
Tom Hvitved
13e60d7b11 Revert "C#: Split generated/dotnet_runtime.yml into separate files" 2023-11-03 09:07:54 +01:00
Anders Schack-Mulligen
132cc03e3b Merge pull request #14664 from aschackmull/shared/modulus-step
RangeAnalysis: Improve bounds that rely on relative modulus.
2023-11-03 08:16:48 +01:00
Mathias Vorreiter Pedersen
679d64f0e8 Merge pull request #14647 from microsoft/24-odbc-model-instantiation-upstream2
C++: Adding a model implementation for ODBC.
2023-11-02 19:42:27 +00:00
amammad
9f8871746b add flow summary instead of additional flow steps 2023-11-02 20:12:50 +01:00
Benjamin Rodes
30a512c96b Formatting 2023-11-02 15:01:15 -04:00
Robert Marsh
81d77bf37c Merge pull request #14578 from geoffw0/stringwith
Swift: Models for String methods involving closures.
2023-11-02 13:53:22 -04:00
Benjamin Rodes
947e0274c7 Adding sql injection test for ODBC. 2023-11-02 13:27:42 -04:00
shati-patel
ac0fd93cb3 Update docs for customizing settings 2023-11-02 17:17:02 +00:00
shati-patel
2f4eea5a0d Update docs for exploring ASTs 2023-11-02 17:16:47 +00:00
Benjamin Rodes
f404d7a5f8 Changes to address pr comments. 2023-11-02 13:11:23 -04:00
Mathias Vorreiter Pedersen
392b2af923 C++: Only the second indirection of the argument should be the remote flow source. 2023-11-02 16:51:24 +00:00
Mathias Vorreiter Pedersen
b82dfa9a21 C++: Fix failing test by allocating 'TFunctionInput's and 'TFunctionOutput's for more indirections. Note that we now mark two output nodes coming out of 'getaddrinfo' as a remote flow source (the first indirection and the second indirection). We'll fix that in the next commit. 2023-11-02 16:45:50 +00:00
Mathias Vorreiter Pedersen
5487b404ed C++: Add failing test. 2023-11-02 16:41:19 +00:00
amammad
fc3b90915b fix some grammer mistakes, an unnecessary import, put blank like after go generate 2023-11-02 17:29:11 +01:00
Michael Nebel
0bf2d77a7e C#: Update integration tests. 2023-11-02 15:46:54 +01:00
Michael Nebel
a161d6e666 C#: Update unit tests. 2023-11-02 15:46:39 +01:00
Michael Nebel
9ea6ef06ef C#: Commented out references in project files should not be used. 2023-11-02 15:45:30 +01:00
Anders Schack-Mulligen
f2b52650d5 Rangeanalysis: Filter useless modulo results. 2023-11-02 15:29:56 +01:00
Tom Hvitved
a35bda2946 Merge pull request #14663 from hvitved/csharp/split-generated-mad-files
C#: Split `generated/dotnet_runtime.yml` into separate files
2023-11-02 14:36:48 +01:00
Tom Hvitved
f82f1df5d6 Merge pull request #14657 from hvitved/csharp/qualified-name
C#: Move qualified name computation into `QualifiedName.qll`
2023-11-02 14:36:13 +01:00
Anders Schack-Mulligen
7bf271fb6c RangeAnalysis: Improve bounds that rely on relative modulus. 2023-11-02 12:51:48 +01:00
Tom Hvitved
a9e2f55b61 C#: Split generated/dotnet_runtime.yml into separate files 2023-11-02 12:45:47 +01:00
Anders Schack-Mulligen
484d0fe4cd Merge pull request #14659 from aschackmull/shared/modulus-analysis
Java/C++: Share modulus analysis
2023-11-02 12:45:35 +01:00
Tom Hvitved
12d856737a Address review comments 2023-11-02 12:38:35 +01:00
Tony Torralba
8f4509f434 Merge pull request #14651 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-11-02 10:48:32 +01:00
Geoffrey White
431d9d58f1 Merge pull request #14639 from geoffw0/anchorquery
Swift: New query for Missing Regular Expression Anchor
2023-11-02 09:20:19 +00:00
Geoffrey White
242399817a Swift: Remove 'only'. 2023-11-02 08:32:36 +00:00
yoff
fd757b0089 Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-11-02 09:31:28 +01:00
Rasmus Lerchedahl Petersen
58bf70d61b Python: filter self steps from use-use flow
Factor out use-use flow in order to do this.
Also improve names and comments.

I also wanted to change the types in `difinitionFlowStep`, but
that broke the module instantiation.
2023-11-02 09:31:28 +01:00
Rasmus Lerchedahl Petersen
613831b2e1 Python: add test for post-update loop flow 2023-11-02 09:31:28 +01:00
Geoffrey White
c937230f1a Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-11-02 08:30:53 +00:00
yoff
c26c68c286 Merge pull request #14617 from yoff/python/module-for-import-time-flow
Python: module for import time flow
2023-11-02 09:28:51 +01:00
Anders Schack-Mulligen
7c3684dbb7 RangeAnalysis: Rename semExprModulus to exprModulus. 2023-11-02 08:19:23 +01:00
Anders Schack-Mulligen
400910e4d3 C++: Fix modulus analysis test. 2023-11-02 08:19:23 +01:00
github-actions[bot]
155073c498 Add changed framework coverage reports 2023-11-02 00:16:04 +00:00
Geoffrey White
48c3db2290 Swift: Change note. 2023-11-01 18:49:45 +00:00
Geoffrey White
206acea41c Swift: Fix defaultImplicitTaintRead for sinks that are field accesses on a subclass of the type containing the field. 2023-11-01 17:49:25 +00:00
Geoffrey White
727a7e804c Update swift/ql/src/queries/Security/CWE-020/MissingRegexAnchor.qhelp
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-11-01 16:32:25 +00:00
Sam Browning
37361d9f79 Merge branch 'main' of https://github.com/github/codeql 2023-11-01 11:43:33 -04:00
Anders Schack-Mulligen
f8ab64dff0 Java: Switch to shared modulus analysis. 2023-11-01 16:34:28 +01:00
Tom Hvitved
c717e346fb C#: Move qualified name computation into QualifiedName.qll 2023-11-01 16:21:55 +01:00
Anders Schack-Mulligen
ac115e0a6f Rangeanalysis: Reshuffle perf fix. This should result in the same join-order, but with less materialisation. 2023-11-01 15:59:24 +01:00
Anders Schack-Mulligen
bb2bbd2d4d Rangeanalysis: Remove useless pragma. 2023-11-01 15:59:24 +01:00
Anders Schack-Mulligen
f6794fe859 Rangeanalysis: Adjust modulo analysis comment. 2023-11-01 15:59:24 +01:00
Anders Schack-Mulligen
8e9aa5b560 C++: Switch to shared modulus analysis. 2023-11-01 15:59:24 +01:00
Anders Schack-Mulligen
a7f3ef1a6c Rangeanalysis: Parameterise shared modulus analysis. 2023-11-01 15:59:24 +01:00
Anders Schack-Mulligen
8e2b17cd86 Rangeanalysis: Copy C++ ModulusAnalysis file verbatim. 2023-11-01 15:59:24 +01:00
Anders Schack-Mulligen
6d859daf3d Merge pull request #14656 from aschackmull/shared/range-utils
Rangeanalysis: Share ssaRead predicate
2023-11-01 15:57:52 +01:00
Mathias Vorreiter Pedersen
b54b5ae0a9 Merge pull request #14648 from MathiasVP/simplify-invalid-ptr-deref
C++: Remove one use of range analysis in `cpp/invalid-pointer-deref`
2023-11-01 14:42:20 +00:00
Geoffrey White
b3fa59d94b Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-11-01 13:15:06 +00:00
Tom Hvitved
3c86aad16d Merge pull request #14628 from hvitved/ruby/type-tracking-store-post-update
Ruby: Summarized type-tracking stores should target post-update nodes
2023-11-01 13:54:21 +01:00
yoff
4ce1b680c2 Merge pull request #14654 from yoff/python/update-partial-flow-debug-query
Python: Update debug query to changed API
2023-11-01 13:32:09 +01:00
Anders Schack-Mulligen
048a7c4e42 Rangeanalysis: Rename SsaBound.getAVariable to getVariable. 2023-11-01 11:58:06 +01:00
Anders Schack-Mulligen
48291dd32d Rangeanalysis: Remove superfluous ignoreZeroLowerBound. 2023-11-01 11:51:46 +01:00
Rasmus Lerchedahl Petersen
0b45b63bd2 Python: Update debug query to changed API
The change is commented out by default
which is why no compilation tests failed
when the API changed.
2023-11-01 11:39:51 +01:00
Tom Hvitved
0c5b528d54 Address review comments 2023-11-01 11:32:57 +01:00
Rasmus Lerchedahl Petersen
1366247f4c Python: Add AWS Lambda as a supported framework 2023-11-01 10:51:35 +01:00
Rasmus Lerchedahl Petersen
f7a8a8ae19 Python: Fix QL alert 2023-11-01 09:24:59 +01:00
Mathias Vorreiter Pedersen
9736936e54 Merge pull request #14635 from MathiasVP/assign-pointer-add-and-sub-is-not-bitwise 2023-11-01 00:40:39 +01:00
Erik Krogh Kristensen
ddb145f15f Merge pull request #14645 from erik-krogh/rerun-tests
JS: re-order expected test output of all JS tests
2023-10-31 21:52:52 +01:00
Rasmus Lerchedahl Petersen
38b811b050 Python: Separate -> PhaseDependentFlow 2023-10-31 21:50:33 +01:00
Edward Minnix III
1ec1dd368d Merge pull request #13978 from egregius313/egregius313/java/mad/convert-sensitive-api-to-mad
Java: Convert `SensitiveApi.qll` to use Models-as-Data
2023-10-31 15:25:42 -04:00
Kevin Stubbings
3697ef72c4 Small changes 2023-10-31 12:23:18 -07:00
Mathias Vorreiter Pedersen
6e385cabd8 C++: Add change note. 2023-10-31 19:16:36 +00:00
Mathias Vorreiter Pedersen
37a536baf9 Merge pull request #14650 from jketema/invalid-experimental
C++: Drop `experimental` tag from `cpp/invalid-pointer-deref`
2023-10-31 20:14:25 +01:00
Kevin Stubbings
5cab25662c Address issues 2023-10-31 11:50:51 -07:00
Jeroen Ketema
3478890090 C++: Drop experimental tag from cpp/invalid-pointer-deref 2023-10-31 19:46:22 +01:00
Kevin Stubbings
8ed10317bd Test comment changes 2023-10-31 11:07:41 -07:00
Kevin Stubbings
dd9a2db137 Minor name changes 2023-10-31 11:03:54 -07:00
Kevin Stubbings
020b4becfd Finish up 2023-10-31 11:00:00 -07:00
Mathias Vorreiter Pedersen
b79a5fee14 Merge pull request #14637 from MathiasVP/dataflow-for-realloc
C++: Add a taint model for `realloc`
2023-10-31 18:24:04 +01:00
Geoffrey White
554007b305 Swift: Add a couple more test cases close to the failures. 2023-10-31 17:19:28 +00:00
Geoffrey White
c82eb4dff3 Swift: Test spacing. 2023-10-31 17:18:08 +00:00
Benjamin Rodes
b9ac038de2 Moving change log. 2023-10-31 09:21:01 -07:00
Ian Lynagh
ceb3d14fe0 Merge pull request #14614 from igfoo/igfoo/enum
Kotlin: Make the enum test more precise
2023-10-31 16:18:12 +00:00
Benjamin Rodes
07ded4278f Change log 2023-10-31 09:14:47 -07:00
Paolo Tranquilli
051a77fd79 Merge pull request #14537 from github/alexdenisov/remove-outdated-cli-arg
Swift: remove outdated CLI argument
2023-10-31 17:06:52 +01:00
Benjamin Rodes
18c8d90a1a Adding a model implementation for ODBC.
(cherry picked from commit 04147f8d91cdf018ec03cbfdb953253e23687944)
2023-10-31 08:52:05 -07:00
Tony Torralba
107a05af71 Update MaD Declarations after Triage 2023-10-31 16:52:02 +01:00
erik-krogh
688afddaf2 Re-order expected test output of all JS tests 2023-10-31 16:38:22 +01:00
Erik Krogh Kristensen
8f58685b38 Merge pull request #14643 from aibaars/express-req-path
Javascript: add `req.path` as remote flow source
2023-10-31 16:36:48 +01:00
Paolo Tranquilli
567aa1102a Swift: fix toolchain SHAs 2023-10-31 16:20:58 +01:00
Paolo Tranquilli
bc34374075 Swift: switch to downloading the 20.04 toolchain 2023-10-31 16:20:58 +01:00
Paolo Tranquilli
e25a655509 Swift: fix Linux compatibility problem and fetch resource dir from toolchain
This fetches the resource directory directly from the released
toolchains, allowing us to stop prebuilding and assembling them.
Moreover insertion of our resource directory is moved to the lua
tracing configuration (solving a `TODO`) and enhanced. Now all options
that start with the original resource directory (either explicit or
implied) are redirected to our resource directory.

This solves a problem where `-I <original resource dir>/some/path` was
passed to the extractor and did not work.

This works around the 5.9 linux compatibility problem by including the
`PackageDescription` swift modules in the in-dist toolchain. Copying the
toolchain and fixing the `-I` flag was not enough as for some reason
compilation of `PackageDescription.swiftinterface`  was causing a crash
in the SIL pass. We work around that by pre-compiling those modules
during the build and  including `.swiftmodule` files in the resource
directory.

TODO (apart from testing):
* the libraries included in the macOS toolchain are now fat (they were
  intel only before), occupying more space. We should see if we need to
  trim them down.
* there might be other swiftinterface files causing problems on linux
  lurking around...
* if we go with this, we can simplify and trim down the prebuilding we
  do leaving out the resource directory.
2023-10-31 16:20:58 +01:00
Mathias Vorreiter Pedersen
b9dfeb3aac Merge pull request #14444 from alexet/range-cases
CPP: Add some range analysis cases
2023-10-31 15:55:41 +01:00
Anders Schack-Mulligen
34b9791e46 Rangeanalysis: Remove superfluous ignoreSsaReadCopy. 2023-10-31 15:32:25 +01:00
Anders Schack-Mulligen
322e6c91be Rangeanalysis: Remove superfluous specificSsaRead. 2023-10-31 15:30:36 +01:00
Anders Schack-Mulligen
8b6c940e76 Rangeanalysis: Remove superfluous ignoreSsaReadAssignment. 2023-10-31 15:28:37 +01:00
Anders Schack-Mulligen
6d6f89e71e Rangeanalysis: Remove superfluous ignoreSsaReadArithmeticExpr. 2023-10-31 15:25:28 +01:00
Anders Schack-Mulligen
a39a94ca8e Rangeanalysis: Switch to shared ssaRead predicate. 2023-10-31 15:23:05 +01:00
Anders Schack-Mulligen
19644a8f07 Rangeanalysis: Implement shared ssaRead predicate 2023-10-31 15:07:11 +01:00
Rasmus Lerchedahl Petersen
7f6ae8b2ab Python: improve readability 2023-10-31 14:52:37 +01:00
Alexander Eyers-Taylor
11152deeb5 Update cpp/ql/test/library-tests/ir/range-analysis/SimpleRangeAnalysis_tests.cpp
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-10-31 13:52:33 +00:00
yoff
f76cde36bb Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2023-10-31 14:12:24 +01:00
Ian Lynagh
e1f7f3cbd4 Kotlin: Add more info to enum test 2023-10-31 12:17:44 +00:00
Mathias Vorreiter Pedersen
e75562e508 Merge pull request #14633 from github/redsun82/capture-list-vars
Swift: add `VarDecl` children to `CaptureListExpr`
2023-10-31 12:48:14 +01:00
Arthur Baars
5cc94e1105 Express.js: add req.path as remote input source 2023-10-31 12:44:26 +01:00
Arthur Baars
21b7a51d0a Add test case for req.path 2023-10-31 12:44:25 +01:00
Arthur Baars
1479509d93 Re-order expected test ouput 2023-10-31 12:44:25 +01:00
Mathias Vorreiter Pedersen
377da9fa66 C++: Accept test changes. 2023-10-31 11:18:35 +00:00
Mathias Vorreiter Pedersen
4a1bf95a87 C++: Expose a public memset model and use it in the exposure queries. 2023-10-31 11:17:51 +00:00
Mathias Vorreiter Pedersen
e8c18a3883 C++: Add FP in query test. 2023-10-31 11:17:51 +00:00
Chris Smowton
98032d58b8 Merge pull request #14640 from github/smowton/admin/make-go-tests-serial
Go: mark all integration tests non-parallelisable
2023-10-31 10:58:41 +00:00
Stephan Brandauer
5385cc3aaa Merge branch 'main' into kaeluka/publish-automodel-querypack-007 2023-10-31 11:48:22 +01:00
Mathias Vorreiter Pedersen
5b17066e6c Merge pull request #14638 from geoffw0/jsevaltest
Swift: Clean up the swift/unsafe-js-eval test
2023-10-31 11:43:41 +01:00
Paolo Tranquilli
ea04b500a3 Swift: tweak dataflow test 2023-10-31 11:39:25 +01:00
Ian Lynagh
b841d5f923 Merge pull request #14622 from igfoo/igfoo/JavaBinarySourceElement
Kotlin: Add support for JavaBinarySourceElement sources
2023-10-31 10:33:48 +00:00
Tamás Vajk
81b3ff2bb8 Merge pull request #14545 from tamasvajk/standalone/remove-netstandard.library.ref
C#: Handle `netstandard` references in standalone extraction
2023-10-31 11:32:42 +01:00
Chris Smowton
79e1aa0498 Merge pull request #14634 from github/post-release-prep/codeql-cli-2.15.2
Post-release preparation for codeql-cli-2.15.2
2023-10-31 10:24:53 +00:00
Chris Smowton
05a4c7fdc1 Add non-comment lines specifying serialisation group 2023-10-31 10:21:55 +00:00
Mathias Vorreiter Pedersen
66f4eccc30 Merge pull request #14632 from MathiasVP/share-ipa-numbering-for-indirect-nodes
C++: Share IPA numbering for indirect nodes
2023-10-31 11:20:41 +01:00
Stephan Brandauer
9087259b1b Java: add instructions to automodel query publish script 2023-10-31 11:11:22 +01:00
Stephan Brandauer
968127eaa3 Java: release automodel extraction queries 0.0.7 2023-10-31 11:09:02 +01:00
Paolo Tranquilli
5407b57261 Swift: add change note 2023-10-31 10:57:02 +01:00
Paolo Tranquilli
aac6cf60ee Swift: add explicative comment 2023-10-31 10:46:12 +01:00
Paolo Tranquilli
ffff10a7e8 Swift: synthesize CaptureListExpr::getVariable in QL instead of extracting it 2023-10-31 10:44:50 +01:00
Paolo Tranquilli
7bae2d9192 Swift: fix tests 2023-10-31 10:44:41 +01:00
Geoffrey White
6b031a4623 Swift: Fix the example links properly. 2023-10-31 08:52:24 +00:00
Geoffrey White
785175e77f Swift: Fix QL-for-QL warning. 2023-10-31 08:49:48 +00:00
Geoffrey White
bfd852aacd Swift: Fix the example links. 2023-10-31 08:48:56 +00:00
Chris Smowton
ec72150893 Go: mark all integration tests non-parallelisable 2023-10-30 22:16:26 +00:00
Tom Hvitved
435b7df764 Merge pull request #14607 from hvitved/csharp/type-ref-dedup
C#: Only use `getTypeRef` when there is not already a type available
2023-10-30 19:52:58 +01:00
Geoffrey White
8913638b25 Swift: I'm happy with 'high' precision for this query (as the Go version already is). 2023-10-30 18:45:19 +00:00
Geoffrey White
b259a0ff6a Swift: get rid of getRemoteData() in the tests, it's obfuscating results. 2023-10-30 17:48:51 +00:00
Geoffrey White
c8706e2ad7 Swift: Add some annotations to the clarify UnsafeJSEval.swift test. 2023-10-30 17:43:37 +00:00
Mathias Vorreiter Pedersen
65081a9a1f C++: Add change note. 2023-10-30 17:11:44 +00:00
Mathias Vorreiter Pedersen
08b528b5c4 C++: Add a taint-model for 'realloc' and accept test changes. 2023-10-30 17:08:01 +00:00
Mathias Vorreiter Pedersen
0837e400a2 C++: Add failing test. 2023-10-30 17:05:43 +00:00
Mathias Vorreiter Pedersen
efe064284b C++: Add up and downgrade scripts. 2023-10-30 16:07:57 +00:00
Mathias Vorreiter Pedersen
86fe5b47db C++: Remove 'assignpaddexpr' and 'assignpsubexpr' from the 'assign_bitwise_expr' type. 2023-10-30 16:06:53 +00:00
github-actions[bot]
2b939fdf08 Post-release preparation for codeql-cli-2.15.2 2023-10-30 16:06:51 +00:00
Paolo Tranquilli
f81a3ec464 Swift: add VarDecl children to CaptureListExpr 2023-10-30 17:04:53 +01:00
Mathias Vorreiter Pedersen
375f0ea8b6 C++: Update documentation. 2023-10-30 15:57:30 +00:00
Mathias Vorreiter Pedersen
1e699ec0e5 C++: Simplify 'InvalidPointerToDereference.qll' now that the difference between 'derefSource' and 'pai' is always 0. 2023-10-30 15:53:48 +00:00
Mathias Vorreiter Pedersen
c8edf3151b C++: Remove the use of range analysis in 'invalidPointerToDerefSource'. 2023-10-30 15:47:47 +00:00
Tony Torralba
45cf50c2af Apply JMS sink only when there isn't an implementation available 2023-10-30 15:56:24 +01:00
Geoffrey White
c233094846 Swift: Change note. 2023-10-30 14:33:43 +00:00
Geoffrey White
fa3d401226 Swift: Update the qhelp. 2023-10-30 14:33:43 +00:00
Geoffrey White
7cf5210063 Swift: Port the qhelp examples to Swift. 2023-10-30 14:33:43 +00:00
Geoffrey White
9a95b9bcda Swift: Enable the isLineAnchoredHostnameRegExp case (not working). 2023-10-30 14:33:42 +00:00
Geoffrey White
c09df2e3f1 Swift: Add test cases for the isLineAnchoredHostnameRegExp query case. 2023-10-30 14:33:42 +00:00
Geoffrey White
8f115bfd06 Swift: Implement 'isUsedAsReplace'. 2023-10-30 14:33:42 +00:00
Mathias Vorreiter Pedersen
91d224eea5 Merge pull request #14623 from alexet/dataflow-fps
CPP: Add dataflow FP with output arguments
2023-10-30 14:30:51 +00:00
Alex Eyers-Taylor
fb0f9ec601 CPP: Add missing rnage analysis ranges in test. 2023-10-30 14:17:03 +00:00
Alexander Eyers-Taylor
b8d45ae927 Update cpp/ql/test/library-tests/dataflow/dataflow-tests/flowOut.cpp
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-10-30 14:04:45 +00:00
Ian Lynagh
e2ef0dc71d Merge pull request #14621 from igfoo/igfoo/getFileClassFqName_IrField
Kotlin: Fix getFileClassFqName for IrField
2023-10-30 13:54:08 +00:00
Ian Lynagh
d46442245b Merge pull request #14518 from igfoo/igfoo/trap_files
Kotlin: Log when we start and finish writing to TRAP files
2023-10-30 13:53:04 +00:00
Geoffrey White
435638a5bb Swift: Port the JS tests to Swift. 2023-10-30 13:08:11 +00:00
Geoffrey White
954b0612d5 Swift: Initial state of the existing test. 2023-10-30 13:08:10 +00:00
Geoffrey White
14db0dfcc7 Swift: Fairly minimal fix to get the query and test working for Swift. 2023-10-30 13:08:10 +00:00
Geoffrey White
c040d4847b Swift: Copy MissingRegexAnchor query from JS. 2023-10-30 13:08:10 +00:00
Harry Maclean
dc9f171ee6 Merge pull request #14631 from hmac/hmac-dynamic-neutral-model
JS/Ruby/Python: Add neutralModel extensible predicate
2023-10-30 12:50:09 +00:00
Mathias Vorreiter Pedersen
b4958e7d58 C++: Accept path changes. 2023-10-30 12:44:30 +00:00
Mathias Vorreiter Pedersen
a077b70d66 C++: Accept test changes. 2023-10-30 11:54:24 +00:00
Mathias Vorreiter Pedersen
535d1e2565 C++: Define indirect instructions (and operands) using a 'Node0Impl' column instead of an instruction (or operand). 2023-10-30 11:54:24 +00:00
Ian Lynagh
55df481e5c Kotlin: Add support for JavaBinarySourceElement sources 2023-10-30 11:43:36 +00:00
Harry Maclean
083be305e1 Shared: Add neutralModel extensible predicate
The neutralModel extensible predicate already exists in Java and C#, so
this change brings the dynamic languages more in line with static
languages. The Model Editor uses this predicate to mark endpoints as
"not interesting" from a data flow perspective.
2023-10-30 11:31:57 +00:00
Harry Maclean
38ecde0cc1 Shared: Include data extensions in workspace
This change allows codeql to see data extensions stored in the .github
directory inside the codeql repo. This is useful when using the CodeQL
Model Editor whilst working inside the codeql repo.
2023-10-30 11:31:56 +00:00
Chris Smowton
78fcbd07d6 Merge pull request #14630 from github/release-prep/2.15.2
Release preparation for version 2.15.2
2023-10-30 11:26:32 +00:00
Mathias Vorreiter Pedersen
3a9ffe189e Merge pull request #14567 from github/redsun82/swift-case-variables
Swift: clean up `VarDecl`, `NamedPattern` and `SwitchStmt` interactions
2023-10-30 11:23:38 +00:00
github-actions[bot]
4641990021 Release preparation for version 2.15.2 2023-10-30 11:05:53 +00:00
Mathias Vorreiter Pedersen
9e2f0b5ed0 Merge branch 'main' into redsun82/swift-case-variables 2023-10-30 10:14:45 +00:00
Mathias Vorreiter Pedersen
c4521a30aa Merge pull request #14113 from geoffw0/implicitflow
Swift: Flow through OpenExistentialExpr
2023-10-30 10:08:29 +00:00
Mathias Vorreiter Pedersen
4e08ba6820 Merge pull request #14618 from geoffw0/qldoc
Swift: QLDoc and test for getCanonicalType
2023-10-30 10:06:26 +00:00
Tom Hvitved
bf3fb685ad Python: Sync in changes to SummaryTypeTracker.qll 2023-10-30 10:52:07 +01:00
Tamás Vajk
b9c89750b9 Merge pull request #14493 from tamasvajk/fix/params-attribute-argument
C#: Fix params attribute argument extraction
2023-10-30 10:50:02 +01:00
Tom Hvitved
14cfb82a8c Ruby: Summarized type-tracking stores should target post-update nodes 2023-10-30 10:47:29 +01:00
Alex Ford
8db23dc775 Ruby: refine ActiveRecord update_all as an SQL sink 2023-10-30 09:47:16 +00:00
Mathias Vorreiter Pedersen
342b3d7733 Merge pull request #14619 from MathiasVP/fix-strtol-model
C++: Fix `strtol` model
2023-10-30 09:41:23 +00:00
Alex Ford
013e7aae97 Ruby: test whitespace changes 2023-10-30 09:32:44 +00:00
Kevin Stubbings
e0782683eb Added gin cors framework 2023-10-27 17:50:43 -07:00
Geoffrey White
1929dead39 Merge branch 'main' into implicitflow 2023-10-27 23:35:54 +01:00
Owen Mansel-Chan
c1ecd5a0da Merge pull request #14608 from Kwstubbs/golang-cookie-reflectedxss-sanitizer
Go: GoAdd Cookie Sanitizer to Reflected XSS
2023-10-27 21:47:39 +01:00
Kevin Stubbings
57cbacb495 test.go change 2023-10-27 12:07:51 -07:00
Kevin Stubbings
ce0104799a Fix minor issues 2023-10-27 11:42:22 -07:00
Alex Eyers-Taylor
60f3598da9 CPP: Add dataflow FP with output arguments 2023-10-27 19:07:10 +01:00
Ian Lynagh
e25c0498d4 Kotlin: Fix getFileClassFqName for IrField 2023-10-27 18:00:33 +01:00
Geoffrey White
8937e0b313 Swift: == -> = 2023-10-27 17:18:09 +01:00
Alex Ford
cb1cd5ed2a Merge pull request #14560 from alexrford/rb/modgen
Ruby: add a query and script for autogenerating typeModel and summaryModel data extensions entries
2023-10-27 16:43:42 +01:00
Mathias Vorreiter Pedersen
28eb2caacb Swift: Accept test changes. 2023-10-27 16:30:01 +01:00
Mathias Vorreiter Pedersen
33494fe9e1 C++: Extend the taint model and accept test changes. 2023-10-27 16:26:37 +01:00
Mathias Vorreiter Pedersen
e4683449cb C++: Add failing test. 2023-10-27 16:26:37 +01:00
Mathias Vorreiter Pedersen
8bf8888c24 C++: Simplify 'parameterNeverEscapes' and add a comment. 2023-10-27 16:26:37 +01:00
Mathias Vorreiter Pedersen
6538a7645d Swift: Add up and downgrade scripts. 2023-10-27 15:55:12 +01:00
Mathias Vorreiter Pedersen
6062fbb475 Merge pull request #14383 from geoffw0/nsstringregex
Swift: Add regular expression evaluation models for StringProtocol and NSString methods
2023-10-27 15:49:23 +01:00
Mathias Vorreiter Pedersen
572cec2c55 C++: Accept test changes. 2023-10-27 15:00:25 +01:00
Mathias Vorreiter Pedersen
43e8b900bf C++: Fix 'strtol' model. 2023-10-27 14:59:11 +01:00
Geoffrey White
2a552d9721 Swift: Address QL-for-QL warning. 2023-10-27 14:56:19 +01:00
Mathias Vorreiter Pedersen
d6b6c432d9 C++: Add test with incorrect IR due to wrong model. 2023-10-27 14:53:06 +01:00
Owen Mansel-Chan
d534c93ff1 Merge pull request #14606 from owen-mc/go/incorrect-integer-conversion-fixes
Go: Two fixes to upper bound checks in "incorrect integer conversion" query
2023-10-27 14:50:11 +01:00
Alex Ford
f6ac63b259 Ruby: modgen - use FeatureEqualSourceSinkCallContext feature rather than late filtering for method context 2023-10-27 14:48:50 +01:00
Geoffrey White
12201d2e8e Swift: Codegen. 2023-10-27 14:37:06 +01:00
Geoffrey White
6ad5c9542b Swift: Add getCanonicalType to the NominalType test as well. 2023-10-27 14:37:06 +01:00
Dave Bartolomeo
b18a6d5e0b Merge pull request #14582 from github/dbartol/threat-models-2
Java: Threat model implementation with priorities.
2023-10-27 09:33:53 -04:00
Geoffrey White
ce471105e2 Swift: QLDoc getCanonicalType. 2023-10-27 14:23:51 +01:00
Mathias Vorreiter Pedersen
4aed638066 Merge pull request #14577 from MathiasVP/capture-flow-swift
Swift: Add variable-capture flow
2023-10-27 14:09:04 +01:00
Rasmus Lerchedahl Petersen
1f8a51cffe Python: add module for post-update flow
The logic for adding flow out of post-update-nodes
was also duplicated, so I added a module for that also.

The two modules are now only used together. I did not
fuse them, though, as I think they may not be used
together in the case of use-use-flow.
2023-10-27 15:07:49 +02:00
Rasmus Lerchedahl Petersen
e745df6478 Python: module for import time flow
The logic for separating local flow into _import time_
and _runtime_ was duplicated a few times.
Create a module for it instead, and add a good qldoc.
2023-10-27 15:07:49 +02:00
Erik Krogh Kristensen
c1a1ebfb60 Merge pull request #14616 from erik-krogh/identity-severity
JS: lower the severity of js/identity-replacement to medium
2023-10-27 14:27:05 +02:00
Anders Schack-Mulligen
e9cb272396 Merge pull request #14615 from aschackmull/dataflow/stage-alias
Dataflow: simplify using stage aliases.
2023-10-27 14:17:30 +02:00
Tom Hvitved
6ad8a4db1c C#: Only use getTypeRef when there is not already a type available 2023-10-27 14:11:55 +02:00
erik-krogh
cf958f0828 lower the severity of js/identity-replacement to medium 2023-10-27 13:54:17 +02:00
Anders Schack-Mulligen
10c657bc23 Dataflow: simplify using stage aliases. 2023-10-27 13:40:21 +02:00
Ian Lynagh
0cf702a74f Kotlin: Tweak the logs test to not be confused by the new logs 2023-10-27 12:04:43 +01:00
Alex Ford
0818354ad7 Ruby: modgen - fix unbound variable 2023-10-27 11:46:09 +01:00
Owen Mansel-Chan
00ba7e42b1 Merge pull request #14613 from owen-mc/change-note-check-on-shared
Update `Change-note-check` workflow to detect changes in shared folder
2023-10-27 11:45:03 +01:00
Anders Schack-Mulligen
c7be5ac527 Merge pull request #14602 from aschackmull/java/split-dispatch-cached-stages
Java: Split the different layers of virtual dispatch into separate cached stages.
2023-10-27 12:36:29 +02:00
Owen Mansel-Chan
1db622e740 Make check-change-note workflow include shared 2023-10-27 11:26:13 +01:00
Mathias Vorreiter Pedersen
68999f3cef Swift: Fix test by including the 'allowParameterReturnInSelf' hook from the variable capture library. 2023-10-27 11:25:19 +01:00
Mathias Vorreiter Pedersen
9b150e4ea9 Swift: Add failing test. 2023-10-27 11:22:56 +01:00
Mathias Vorreiter Pedersen
a5a7d27c4b Swift: Add change note. 2023-10-27 11:16:32 +01:00
Ian Lynagh
3c5b9ce0cd Kotlin: Make the enum test more precise
In Kotlin 2 mode, there are more library classes matching Enum%, so the
output was spuriously different.
2023-10-27 11:15:12 +01:00
Owen Mansel-Chan
3c9783c7c9 Add change note 2023-10-27 11:12:37 +01:00
Mathias Vorreiter Pedersen
b41ec37993 Swift: Remove the code related to constructor capture (and the related TODO). This cannot happen in Swift. 2023-10-27 11:05:48 +01:00
Tom Hvitved
ee5c014382 Merge pull request #14609 from hvitved/csharp/stub-gen-attribute-usage
C#: Include `AttributeUsages` in stub generator
2023-10-27 12:05:34 +02:00
Owen Mansel-Chan
581305b234 Improve QLDoc for UpperBoundCheckGuard 2023-10-27 10:59:20 +01:00
Owen Mansel-Chan
8beacb8d4a Change predicate name from getX to getOrder 2023-10-27 10:44:42 +01:00
Mathias Vorreiter Pedersen
9cae488ef4 Merge pull request #14612 from aschackmull/dataflow/type-doc
Dataflow: Improve qldoc on the type system.
2023-10-27 10:39:57 +01:00
Mathias Vorreiter Pedersen
65e13aa5ed Swift: Add simple version of the 'captureList' test that works. 2023-10-27 10:27:35 +01:00
Mathias Vorreiter Pedersen
93234c0b5c Swift: Add model for 'withVaList' and accept test changes. 2023-10-27 10:21:12 +01:00
Mathias Vorreiter Pedersen
9e2dd09ddc Swift: Accept test regression (caused by no model for 'withVaList'). 2023-10-27 10:20:07 +01:00
Max Schaefer
104700f6d3 Address review comment. 2023-10-27 10:19:28 +01:00
Anders Schack-Mulligen
0f4ea10638 Merge pull request #14611 from aschackmull/dataflow/partialflow-changenote
Dataflow: Add change note for partial flow api change.
2023-10-27 10:57:17 +02:00
Anders Schack-Mulligen
776e35279d Dataflow: Improve qldoc on the type system. 2023-10-27 10:43:54 +02:00
Michael Nebel
e4276f7adb Java: Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-10-27 10:34:20 +02:00
Anders Schack-Mulligen
b106db6fda Dataflow: Add change note for partial flow api change. 2023-10-27 09:46:46 +02:00
Anders Schack-Mulligen
9769953669 Java: Split the different layers of virtual dispatch into separate cached stages. 2023-10-27 09:40:20 +02:00
Kevin Stubbings
52a0fdabcf formatting 2023-10-27 00:03:30 -07:00
Tom Hvitved
08d6379563 C#: Regenerate stubs for (Asp)NetCore.App 2023-10-27 08:34:55 +02:00
Tom Hvitved
abc16abf6f C#: Include AttributeUsages in stub generator 2023-10-27 08:34:20 +02:00
Kevin Stubbings
135923c9c1 Change XNetHtmltest 2023-10-26 20:48:38 -07:00
Mathias Vorreiter Pedersen
63525a9d9e Swift: Delete one TODO (it has been converted to an internal issue) and fix another. 2023-10-26 21:48:41 +01:00
Kevin Stubbings
e6e87a44a3 Add change note 2023-10-26 12:36:35 -07:00
Dave Bartolomeo
d2afb20f3f Merge remote-tracking branch 'origin/main' into dbartol/threat-models-2 2023-10-26 14:05:40 -04:00
Erik Krogh Kristensen
a5bfeb68a8 Merge pull request #14604 from erik-krogh/fix-thistype
JS: fix `TypeExprKinds` crashing on a `ThisExpression`
2023-10-26 20:05:26 +02:00
Dave Bartolomeo
9800458467 Update shared/threat-models/codeql/threatmodels/ThreatModels.qll
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2023-10-26 13:46:55 -04:00
Dave Bartolomeo
927eb8424d Update shared/threat-models/codeql/threatmodels/ThreatModels.qll
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2023-10-26 13:46:37 -04:00
Dave Bartolomeo
8d9e4d391f Update shared/threat-models/codeql/threatmodels/ThreatModels.qll
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2023-10-26 13:46:28 -04:00
Alexander Eyers-Taylor
55ec9d0a91 Merge pull request #14601 from aschackmull/java/fix-tests
Java: Update tests to new partial flow api
2023-10-26 17:52:01 +01:00
Alex Ford
5a1a3f0727 Ruby: modgen - deduplicate getAnyParameter logic 2023-10-26 17:45:47 +01:00
Alex Ford
86ba75cadf Ruby: modgen - support self arguments 2023-10-26 17:42:46 +01:00
Alex Ford
6203887645 fixup 2023-10-26 17:38:43 +01:00
Mathias Vorreiter Pedersen
784bb72b33 Swift: Add some more tests. 2023-10-26 17:29:26 +01:00
Owen Mansel-Chan
b451adabfc Two small QLDoc improvements 2023-10-26 17:10:12 +01:00
Owen Mansel-Chan
896a3c65be Avoid doing float arithmetic with large integers
There is the possibility of overflow.
2023-10-26 17:09:53 +01:00
Owen Mansel-Chan
570ca3b6fe Fix upper bound check to make test pass 2023-10-26 17:08:19 +01:00
Alex Ford
24946c0dfd Ruby: modgen - restrict flow summaries to public methods 2023-10-26 17:05:31 +01:00
Alex Ford
fef2932f56 Apply suggestions from code review
Co-authored-by: Harry Maclean <hmac@github.com>
2023-10-26 17:04:51 +01:00
Owen Mansel-Chan
773f46d3b4 Add failing test for upper bound checks 2023-10-26 16:58:36 +01:00
Mathias Vorreiter Pedersen
30ecb4b0c8 Merge pull request #14588 from aschackmull/shared/rangeanalysis
C++/Java: Share core range analysis
2023-10-26 16:32:46 +01:00
yoff
867a39083e Merge pull request #14114 from yoff/python/allow-namespace-packages
Python: Allow namespace packages
2023-10-26 16:56:05 +02:00
Tony Torralba
7af3d239ab Java: Add JMS sink to java/unsafe-deserialization 2023-10-26 16:46:19 +02:00
Max Schaefer
08cc8b8e80 Autoformat. 2023-10-26 15:36:06 +01:00
erik-krogh
302199a74a fix TypeExprKinds crashing on a ThisExpression 2023-10-26 16:33:54 +02:00
Max Schaefer
abef8483bd Merge pull request #14600 from github/max-schaefer/express-rate-limit
JavaScript: Add support for importing `express-rate-limit` using a named import.
2023-10-26 15:15:22 +01:00
Max Schaefer
f42bd28ca9 Port changes to Ruby. 2023-10-26 15:06:45 +01:00
Mathias Vorreiter Pedersen
96a37f3a3c Swift: Simplify more tests. 2023-10-26 14:55:17 +01:00
Max Schaefer
741735cc83 Port changes to JavaScript. 2023-10-26 14:47:24 +01:00
Mathias Vorreiter Pedersen
2ad121a8a5 Swift: Simplify test. 2023-10-26 14:46:59 +01:00
Rasmus Lerchedahl Petersen
dcc778520a Python: refactor code
Also add explanatory comment.

Co-authored-by: Taus <tausbn@github.com>
2023-10-26 15:00:02 +02:00
Rasmus Lerchedahl Petersen
50041f07a3 Python: fix comment 2023-10-26 14:28:00 +02:00
Anders Schack-Mulligen
35f6e6ebb4 Java: Update tests to new partial flow api 2023-10-26 14:09:03 +02:00
Max Schaefer
aff848b038 Update javascript/ql/lib/semmle/javascript/security/dataflow/MissingRateLimiting.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-10-26 13:06:52 +01:00
Jeroen Ketema
dbb4167f80 Merge pull request #14579 from jketema/ir-backwards
C++: Define an extractor version table and use in IR generation
2023-10-26 13:36:15 +02:00
Owen Mansel-Chan
0ed01453b9 Fix getMaxIntValue to accept bitSize 64 2023-10-26 12:27:43 +01:00
Max Schaefer
2c7291336d Move test files into right directory. 2023-10-26 12:16:52 +01:00
Max Schaefer
bb146a1758 JavaScript: Add support for rateLimit export from express-rate-limit package. 2023-10-26 12:14:57 +01:00
Mathias Vorreiter Pedersen
2465cc20f0 Swift: Don't define 'ClosureSelfParameterNode' as the expression node of the closure. 2023-10-26 11:56:27 +01:00
Max Schaefer
3939167ba2 Include more details in the message for py/weak-cryptographic-algorithm.
Specifically, we add a link to the location where the cryptographic algorithm is configured, which can be far away from its use.
2023-10-26 11:28:09 +01:00
Jeroen Ketema
64004926bc C++: Use a more declarative predicate name 2023-10-26 12:07:19 +02:00
Jeroen Ketema
903f376620 C++: Define an extractor version table and use in IR generation 2023-10-26 12:07:19 +02:00
Mathias Vorreiter Pedersen
b1d4ca505d Merge pull request #14599 from aschackmull/dataflow/partialflow-separate
Dataflow: Restrict partial flow to either forward or reverse flow.
2023-10-26 11:01:03 +01:00
Anders Schack-Mulligen
bbc3cfba6f Dataflow: Fix documentation. 2023-10-26 11:29:16 +02:00
Anders Schack-Mulligen
a2e3b37847 Dataflow: Fix accidental visibility. 2023-10-26 11:28:52 +02:00
Chris Smowton
8198898d73 Merge pull request #14583 from smowton/smowton/admin/really-deprecate-old-java-names
Java: Deprecate MethodAccess and SuperMethodAccess
2023-10-26 10:25:05 +01:00
Owen Mansel-Chan
39eeed9238 Add failing test showcasing problem 2023-10-26 10:20:27 +01:00
Stephan Brandauer
5fe6a5a730 Merge pull request #14487 from github/kaeluka/extraction-query-docs
Java: basic version of automodel extraction query docs
2023-10-26 11:10:01 +02:00
Anders Schack-Mulligen
4dca4a7389 Dataflow: Restrict partial flow to either forward or reverse flow. 2023-10-26 10:33:03 +02:00
Anders Schack-Mulligen
ec58b209e3 Merge pull request #14584 from Marcono1234/kotlin-Literal-getLiteral
Kotlin: Mention `Literal::getLiteral()` difference from source code
2023-10-26 10:03:57 +02:00
Kevin Stubbings
21e4a5b2d5 Add Cookie Sanitizer 2023-10-25 22:07:08 -07:00
Kevin Stubbings
dafcd5ec98 Added support for Gin CORS 2023-10-25 17:23:10 -07:00
Maiky
a1e38c3444 Remove unnecessary imports and add returns 2023-10-26 01:16:43 +02:00
Chris Smowton
29d57d82b7 Deprecate MethodAccess and SuperMethodAccess 2023-10-25 22:26:38 +01:00
Ed Minnix
9d90c24006 Refactor to using MethodCall instead of MethodAccess 2023-10-25 14:31:56 -04:00
Ed Minnix
f288ddc3d5 Add signature back to trilead ssh2 model 2023-10-25 14:31:56 -04:00
Ed Minnix
d923784ae4 Add signatures to models 2023-10-25 14:31:56 -04:00
Ed Minnix
90c63ab6b0 Remove additional net.schmizz.sshj models 2023-10-25 14:31:56 -04:00
Edward Minnix III
2fb4dfeb90 TrustType should be nested in sun.security.pkcs11.Secmod models
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-10-25 14:31:55 -04:00
Ed Minnix
665b140a8a Make SaltAndParams be nested 2023-10-25 14:31:55 -04:00
Edward Minnix III
700201556c Remove extra model
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-10-25 14:31:55 -04:00
Ed Minnix
58dae6d1c6 Set provenance of models from otherApiCallableCredentialParam to manual and remove extra models 2023-10-25 14:31:55 -04:00
Edward Minnix III
2a91743477 Re-add IvParameterSpec constructor to otherApiCallableCredentialParam
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-10-25 14:31:55 -04:00
Ed Minnix
a28f19c857 Remove initialization vectors from SensitiveApi 2023-10-25 14:31:55 -04:00
Ed Minnix
c689065f83 Experiment: Remove IVs from credentials 2023-10-25 14:31:55 -04:00
Ed Minnix
855d96db66 Remove extra models 2023-10-25 14:31:55 -04:00
Ed Minnix
d85284da55 Update change note file date 2023-10-25 14:31:55 -04:00
Ed Minnix
02c98fae5f Use hq-generated provenance 2023-10-25 14:31:55 -04:00
Ed Minnix
1ad06f3293 Add missing GaloisCounterMode model 2023-10-25 14:31:55 -04:00
Ed Minnix
9c15cf18e8 Refactor deprecated predicates to use new classes
Modified the predicates in `SensitiveApi` to rely on the new classes
which are using models as data. This allows us to remove the old
predicates containing the pre-MaD versions of the models.
2023-10-25 14:31:55 -04:00
Ed Minnix
3b0b5e403c Replace crypto-parameter with credentials-key 2023-10-25 14:31:55 -04:00
Ed Minnix
a2bcc97a74 Remove CipherBlockChaining#init 2023-10-25 14:31:55 -04:00
Ed Minnix
743814a234 Delete private methods 2023-10-25 14:31:55 -04:00
Ed Minnix
c2d072e3f8 Remove redundant Cipher init methods
Remove redundant `init` methods which are overriding `FeedbackCipher`
and `SymmetricCipher`.
2023-10-25 14:31:54 -04:00
Ed Minnix
22d968fba3 Delete private methods 2023-10-25 14:31:54 -04:00
Ed Minnix
31b069041f Initialization vector models 2023-10-25 14:31:54 -04:00
Ed Minnix
a8eb95a688 Remove redundant engineUnwrap method models
Most implementations of `engineUnwrap` are overriding the method from
`javax.crypto.CipherSpi`. Therefore, these models can be compressed into
a single model.
2023-10-25 14:31:54 -04:00
Ed Minnix
64d23d4f9b Delete private methods 2023-10-25 14:31:54 -04:00
Ed Minnix
5b2d226c35 Remove unneeded models 2023-10-25 14:31:54 -04:00
Ed Minnix
1edca19419 Remove redundant KeyStoreSpi models
`java.security.KeyStoreSpi` is an abstract class. This removes its
subclasses' models, and instead uses model-as-data's capability to use
subclasses.
2023-10-25 14:31:54 -04:00
Ed Minnix
24c809b3b5 Move credentials-% sink kinds to "shared" status 2023-10-25 14:31:54 -04:00
Edward Minnix III
72a1289eba Rename class to CredentialsSinkNode to better align with naming convention
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-10-25 14:31:54 -04:00
Ed Minnix
c6641dfbf3 fix model validator to credentials-password 2023-10-25 14:31:54 -04:00
Ed Minnix
a85df81b67 Rename sink kind to "credentials-username" to match naming convention 2023-10-25 14:31:54 -04:00
Ed Minnix
0612b3795a Rename sink kind to "credentials-password" to match naming convention 2023-10-25 14:31:54 -04:00
Ed Minnix
3ee0fa9bc4 Add deprecation messages 2023-10-25 14:31:54 -04:00
Ed Minnix
b77b3763be Fix com.amazonaws.auth models 2023-10-25 14:31:54 -04:00
Ed Minnix
8eeb861963 ch.ethz.ssh2 fixes 2023-10-25 14:31:54 -04:00
Edward Minnix III
2f53adf2c2 Fix typo
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-10-25 14:31:54 -04:00
Ed Minnix
dbb5aa9aad Change note 2023-10-25 14:31:54 -04:00
Ed Minnix
083a5068c3 Remove unnecessary models 2023-10-25 14:31:53 -04:00
Ed Minnix
886c85ddc1 Fix net.schmizz.sshj models 2023-10-25 14:31:53 -04:00
Ed Minnix
958c6ff289 Remove credential-other 2023-10-25 14:31:53 -04:00
Ed Minnix
ee6cb96d07 Add a superclass for credential nodes 2023-10-25 14:31:53 -04:00
Ed Minnix
3219edc603 Change credential-other to more appropriate sink kinds 2023-10-25 14:31:53 -04:00
Ed Minnix
6b94b77a0a Remove spaces in sig field of models 2023-10-25 14:31:53 -04:00
Ed Minnix
f8c3b2977a Fix credential-other 2023-10-25 14:31:53 -04:00
Ed Minnix
f783ca7940 Fix credential-username 2023-10-25 14:31:53 -04:00
Ed Minnix
96d6ecb108 Fix crypto parameters 2023-10-25 14:31:53 -04:00
Ed Minnix
35e19eac96 Fix password models 2023-10-25 14:31:53 -04:00
Ed Minnix
4f8908106b Refactor HardcodedCredentials to use new SensitiveApi api 2023-10-25 14:31:53 -04:00
Ed Minnix
f7c07d55ed Credential-other sinks 2023-10-25 14:31:53 -04:00
Ed Minnix
49218cdbfb Credential-username models 2023-10-25 14:31:53 -04:00
Ed Minnix
18661eee77 Crypto-parameter models 2023-10-25 14:31:53 -04:00
Ed Minnix
66486b08dc Password models 2023-10-25 14:31:53 -04:00
Ed Minnix
4aec302fb7 Create new sink kinds 2023-10-25 14:31:53 -04:00
Jami
c7b9e405b7 Merge pull request #14517 from jcogs33/jcogs33/update-framework-cov-diff-workflow
CI: Update framework coverage difference commenter
2023-10-25 14:31:00 -04:00
Geoffrey White
2cfca032de Swift: Fix use of deprecated predicate. 2023-10-25 17:32:55 +01:00
Maiky
eccde3f4f1 Add Tests 2023-10-25 18:31:51 +02:00
Geoffrey White
82b92c38f9 Swift: Change method types to DataFlow::Node / go ahead with planned deprecations. 2023-10-25 17:11:21 +01:00
Geoffrey White
bfd150a1d3 Swift: Clarify comment. 2023-10-25 16:38:59 +01:00
Geoffrey White
ff15b73250 Swift: Update the change note. 2023-10-25 16:32:59 +01:00
Geoffrey White
4a08ca39d6 Swift: Replace PotentialRegexEval with a more specialized solution. 2023-10-25 16:26:46 +01:00
Alex Ford
16c5edd3ca Ruby: add a query and script for autogenerating typeModel and summaryModel data extensions entries 2023-10-25 15:52:02 +01:00
Mathias Vorreiter Pedersen
11194e574c Swift: Get rid of the unnecessary parameter/argument position for the closure. Instead, we can just reuse the 'this' parameter and argument. 2023-10-25 15:46:10 +01:00
Geoffrey White
354983087e Swift: this.(PotentialRegexEval) -> super. or this. . 2023-10-25 15:25:12 +01:00
Rasmus Wriedt Larsen
be494b73d4 Python: Minor cleanup for string pool interaction
This doesn't really seem to impact performance, is just a bit cleaner way to write the QL code.

In the worst case, since we do string concat with empty string, we would need to load string + attempt to store new string in string pool, which is useless since we can surely just reuse the integer ID.

-- Previously

Evaluated non-recursive predicate ImportResolution#f829f0f0::ImportResolution::getImmediateModuleReference#1#ff#reorder_1_0#join_rhs#CSE@5fdc6eia in 1ms (size: 2).
Evaluated relational algebra for predicate ImportResolution#f829f0f0::ImportResolution::getImmediateModuleReference#1#ff#reorder_1_0#join_rhs#CSE@5fdc6eia with tuple counts:
         1   ~0%    {1} r1 = CONSTANT(unique string)[""]

         1   ~0%    {1} r2 = CONSTANT(unique string)[".__init__"]

         2   ~0%    {1} r3 = r1 UNION r2
                    return r3

Evaluated recursive predicate ImportResolution#f829f0f0::ImportResolution::getImmediateModuleReference#1#ff#reorder_1_0@b4f54xlv in 72ms on iteration 1 (delta size: 26339).
Evaluated relational algebra for predicate ImportResolution#f829f0f0::ImportResolution::getImmediateModuleReference#1#ff#reorder_1_0@b4f54xlv on iteration 1 running pipeline base with tuple counts:
         6382   ~0%    {3} r1 = JOIN ImportResolution#f829f0f0::ImportResolution::getImmediateModuleReference#1#ff#reorder_1_0#join_rhs#CSE WITH Module#68efc075::Module::getFile#0#dispred#ff CARTESIAN PRODUCT OUTPUT Rhs.1, Lhs.0, Rhs.0
         6066   ~2%    {4} r2 = JOIN r1 WITH Module#68efc075::isPreferredModuleForName#2#ff ON FIRST 1 OUTPUT Lhs.2, _, Lhs.1, Rhs.1
                       {2} r3 = REWRITE r2 WITH Tmp.1 := "", Out.1 := InverseAppend(Tmp.1,In.2,In.3) KEEPING 2
         3721   ~0%    {2} r4 = SCAN r3 OUTPUT In.1, In.0
        25945   ~2%    {2} r5 = JOIN r4 WITH ImportResolution#f829f0f0::ImportResolution::getReferenceToModuleName#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1

           38   ~4%    {3} r6 = SCAN SsaDefinitions#9197156e::SsaSource::init_module_submodule_defn#2#ff OUTPUT In.1, _, In.0
           38   ~1%    {3} r7 = REWRITE r6 WITH Out.1 := -1
           38   ~1%    {2} r8 = JOIN r7 WITH py_scope_flow_021#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2
           38   ~0%    {2} r9 = JOIN r8 WITH Module#68efc075::Module::getPackageName#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
          394   ~2%    {2} r10 = JOIN r9 WITH Essa#24e22a14::EssaVariable::getSourceVariable#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          394   ~0%    {3} r11 = JOIN r10 WITH DataFlowPublic#c4b6ce7e::EssaNode#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Rhs.1

          394   ~0%    {5} r12 = JOIN r11 WITH Essa#24e22a14::EssaVariable::getName#0#dispred#ff ON FIRST 1 OUTPUT _, Lhs.2, Lhs.1, Rhs.1, _
          394   ~0%    {2} r13 = REWRITE r12 WITH Tmp.0 := ".", Tmp.4 := "", Out.0 := (In.2 ++ Tmp.0 ++ In.3 ++ Tmp.4) KEEPING 2

          394   ~0%    {5} r14 = JOIN r11 WITH Essa#24e22a14::EssaVariable::getName#0#dispred#ff ON FIRST 1 OUTPUT _, Lhs.2, Lhs.1, Rhs.1, _
          394   ~1%    {2} r15 = REWRITE r14 WITH Tmp.0 := ".", Tmp.4 := ".__init__", Out.0 := (In.2 ++ Tmp.0 ++ In.3 ++ Tmp.4) KEEPING 2

          788   ~3%    {2} r16 = r13 UNION r15
          401   ~2%    {2} r17 = JOIN r16 WITH Module#68efc075::isPreferredModuleForName#2#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          394   ~1%    {2} r18 = JOIN r17 WITH Module#68efc075::Module::getFile#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1

        26339   ~1%    {2} r19 = r5 UNION r18
                       return r19

-- Now

Evaluated recursive predicate ImportResolution#f829f0f0::ImportResolution::getImmediateModuleReference#1#ff#reorder_1_0@409a0xhe in 8ms on iteration 1 (delta size: 26339).
Evaluated relational algebra for predicate ImportResolution#f829f0f0::ImportResolution::getImmediateModuleReference#1#ff#reorder_1_0@409a0xhe on iteration 1 running pipeline base with tuple counts:
         3033   ~0%    {2} r1 = JOIN Module#68efc075::Module::getFile#0#dispred#ff_10#join_rhs WITH Module#68efc075::isPreferredModuleForName#2#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1

         3033   ~0%    {4} r2 = JOIN Module#68efc075::Module::getFile#0#dispred#ff_10#join_rhs WITH Module#68efc075::isPreferredModuleForName#2#ff ON FIRST 1 OUTPUT Lhs.1, _, Rhs.1, _
                       {2} r3 = REWRITE r2 WITH Tmp.1 := "", Tmp.3 := ".__init__", Out.1 := InverseAppend(Tmp.1,Tmp.3,In.2) KEEPING 2
          688   ~0%    {2} r4 = SCAN r3 OUTPUT In.1, In.0

         3721   ~0%    {2} r5 = r1 UNION r4
        25945   ~2%    {2} r6 = JOIN r5 WITH ImportResolution#f829f0f0::ImportResolution::getReferenceToModuleName#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1

           38   ~4%    {3} r7 = SCAN SsaDefinitions#9197156e::SsaSource::init_module_submodule_defn#2#ff OUTPUT In.1, _, In.0
           38   ~1%    {3} r8 = REWRITE r7 WITH Out.1 := -1
           38   ~1%    {2} r9 = JOIN r8 WITH py_scope_flow_021#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2
           38   ~0%    {2} r10 = JOIN r9 WITH Module#68efc075::Module::getPackageName#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
          394   ~2%    {2} r11 = JOIN r10 WITH Essa#24e22a14::EssaVariable::getSourceVariable#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          394   ~0%    {3} r12 = JOIN r11 WITH DataFlowPublic#c4b6ce7e::EssaNode#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Rhs.1

          394   ~2%    {4} r13 = JOIN r12 WITH Essa#24e22a14::EssaVariable::getName#0#dispred#ff ON FIRST 1 OUTPUT _, Lhs.2, Lhs.1, Rhs.1
          394   ~0%    {2} r14 = REWRITE r13 WITH Tmp.0 := ".", Out.0 := (In.2 ++ Tmp.0 ++ In.3) KEEPING 2

          394   ~0%    {5} r15 = JOIN r12 WITH Essa#24e22a14::EssaVariable::getName#0#dispred#ff ON FIRST 1 OUTPUT _, Lhs.2, Lhs.1, Rhs.1, _
          394   ~5%    {2} r16 = REWRITE r15 WITH Tmp.0 := ".", Tmp.0 := (In.2 ++ Tmp.0 ++ In.3), Tmp.4 := ".__init__", Out.0 := (Tmp.0 ++ Tmp.4) KEEPING 2

          788   ~0%    {2} r17 = r14 UNION r16
          401   ~1%    {2} r18 = JOIN r17 WITH Module#68efc075::isPreferredModuleForName#2#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          394   ~1%    {2} r19 = JOIN r18 WITH Module#68efc075::Module::getFile#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1

        26339   ~0%    {2} r20 = r6 UNION r19
                       return r20
2023-10-25 14:53:51 +01:00
Mathias Vorreiter Pedersen
951b6beeb1 Swift: Untangle the confusion between 'getParameter' and 'asParameter'. 2023-10-25 14:44:09 +01:00
Jeroen Ketema
990d7161b2 Merge pull request #14337 from aschackmull/cpp/container-not-locatable
C++: Remove getLocation from Container.
2023-10-25 15:37:57 +02:00
Mathias Vorreiter Pedersen
78e08cf63c Swift: Remove irrelevant TODO. 2023-10-25 13:55:07 +01:00
Anders Schack-Mulligen
6882504397 C#: Fix compilation 2023-10-25 14:31:49 +02:00
Anders Schack-Mulligen
5ded55cd9f C#: Sync Bound.qll 2023-10-25 14:08:48 +02:00
Anders Schack-Mulligen
283d6efdf8 Rangeanalysis/Java/C++: Address some ql4ql findings. 2023-10-25 14:06:35 +02:00
Jeroen Ketema
75a1173d63 C++: Add change note 2023-10-25 14:05:38 +02:00
Jeroen Ketema
dc512728fa C++: Make File extend Locatable 2023-10-25 14:05:38 +02:00
Jeroen Ketema
4ea5c13390 C++: Add back getLocation in File 2023-10-25 14:05:38 +02:00
Anders Schack-Mulligen
7124a53c9c C++: Remove getLocation from Container. 2023-10-25 14:05:38 +02:00
Jami
53d92d58fc Merge pull request #14581 from jcogs33/jcogs33/add-internal-to-model-exclusions
Java: exclude internal packages globally from MaD models
2023-10-25 08:04:03 -04:00
Michael Nebel
b3e5b86f0a Java: Cleanup threat models tests. 2023-10-25 14:02:31 +02:00
Mathias Vorreiter Pedersen
05385eb704 Merge pull request #14587 from MathiasVP/fix-indirect-strtok-model
C++: Fix `strtok` model for indirections
2023-10-25 12:09:13 +01:00
Owen Mansel-Chan
27646ce971 Merge pull request #14547 from owen-mc/go/enable-data-flow-consistency-checks
Go: make data flow consistency checks available (and fix some)
2023-10-25 11:15:44 +01:00
Paolo Tranquilli
fb470e4140 Swift: remove useless commented-out line 2023-10-25 12:15:25 +02:00
Geoffrey White
bf503849ea Swift: Fixup line numbers after merge. 2023-10-25 11:09:13 +01:00
Geoffrey White
bf6e6a1e68 Merge branch 'main' into stringwith 2023-10-25 10:58:25 +01:00
Geoffrey White
a3d53ba9ec Merge pull request #14574 from github/geoffw0-patch-2
Swift: Update README.md
2023-10-25 10:56:01 +01:00
Geoffrey White
7029f14651 Merge pull request #14511 from geoffw0/substring
Swift: Model Substring
2023-10-25 10:46:47 +01:00
Anders Schack-Mulligen
2592c94c54 Java: Replace range analysis with shared version. 2023-10-25 11:29:55 +02:00
Anders Schack-Mulligen
36082808d3 Java: Implement shared range analysis signatures. 2023-10-25 11:29:55 +02:00
Anders Schack-Mulligen
c1c4a5bfcf Rangeanalysis: Copy qldoc and simplification from Java. 2023-10-25 11:17:02 +02:00
Anders Schack-Mulligen
cd44d67529 Rangeanalysis: Add temporary Java compatibility flag. 2023-10-25 11:17:02 +02:00
Anders Schack-Mulligen
06fe10bbe9 Rangeanalysis: Bugfix division with float representation. 2023-10-25 11:17:02 +02:00
Anders Schack-Mulligen
7b214a24df C++: Add division test 2023-10-25 11:17:02 +02:00
Anders Schack-Mulligen
232c147f6b Rangeanalysis: Port join-order fix from Java version. 2023-10-25 11:17:02 +02:00
Anders Schack-Mulligen
ec39de20d8 C++: Convert to qlpack version of core range analysis. 2023-10-25 11:17:01 +02:00
Anders Schack-Mulligen
38274db205 Rangeanalysis: Parameterise library. 2023-10-25 11:17:01 +02:00
Anders Schack-Mulligen
169ba03778 Rangeanalysis: Copy C++ version verbatim. 2023-10-25 11:17:01 +02:00
Anders Schack-Mulligen
aed830cf1b Rangeanalysis: Make new qlpack 2023-10-25 11:17:01 +02:00
Paolo Tranquilli
a245d0019e Swift: tiny cosmetic tweak 2023-10-25 10:56:21 +02:00
Mathias Vorreiter Pedersen
032572b924 C++: Fix 'strtok' model. 2023-10-25 09:39:36 +01:00
Mathias Vorreiter Pedersen
f54379d096 C++: Add failing test. 2023-10-25 09:38:49 +01:00
Paolo Tranquilli
9196939384 Swift: canonicalize all VarDecls 2023-10-25 10:38:17 +02:00
Tony Torralba
4920c7f8b0 Merge pull request #14585 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-10-25 10:02:50 +02:00
Stephan Brandauer
cffcc7334d Java: automodel extraction docs: add two intro sentences 2023-10-25 09:45:00 +02:00
Stephan Brandauer
0f2db1bcdb Java: automodel extraction docs: use markdown footnote 2023-10-25 09:32:59 +02:00
Stephan Brandauer
3eeb6ffec4 Java: automodel extraction docs: spell out positive and negative 2023-10-25 09:05:22 +02:00
Stephan Brandauer
44c87561b3 Java: review suggestion from adityasharad
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-10-25 09:00:28 +02:00
Stephan Brandauer
c240c1b3f5 Java: review suggestions from aeisenberg
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2023-10-25 08:59:21 +02:00
github-actions[bot]
6cbadece0e Add changed framework coverage reports 2023-10-25 00:15:35 +00:00
Marcono1234
bf20b8e5a5 Kotlin: Mention Literal::getLiteral() difference from source code
It appears the Kotlin extractor does not have access to the actual
string representation in the source code, and for most literal types
uses simply the represented value also as `getLiteral` result, see
https://github.com/github/codeql/blob/codeql-cli/v2.15.1/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt#L4443
2023-10-25 02:04:54 +02:00
Geoffrey White
8a5f3e4825 Swift: Fix an issue with RegexTracking.qll using PotentialRegexEval rather than RegexEval. 2023-10-24 22:49:19 +01:00
Jami
7c053ed428 CI: add .strip() to comment/ID file read
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-10-24 17:48:38 -04:00
Geoffrey White
021ed88a0a Swift: Add a test revealing unevaluated regexs. 2023-10-24 22:42:15 +01:00
Chris Smowton
12d0f1a84b Merge pull request #14575 from github/smowton/feature/more-intuitive-java-class-names
Java: Replace MethodAccess, LValue, RValue with more intuitive names. Introduce NewClassExpr.
2023-10-24 19:01:37 +01:00
Dave Bartolomeo
33f10d8d19 Better handling of all threat model without too many binding sets 2023-10-24 13:59:15 -04:00
Cornelius Riemenschneider
790615fbc2 Merge pull request #14552 from github/criemen/bazel-js
Javascript extractor: Bazel-based build
2023-10-24 19:36:39 +02:00
Dave Bartolomeo
5fd56ce866 Alternate threat model implementation 2023-10-24 13:12:37 -04:00
Jami Cogswell
121fd0896b Java: exclude internal packages in general from models 2023-10-24 12:49:49 -04:00
Geoffrey White
42a2ec9891 Merge branch 'main' into substring 2023-10-24 17:03:00 +01:00
Tony Torralba
9f7a8aa18c Update MaD Declarations after Triage 2023-10-24 17:42:03 +02:00
Geoffrey White
06b1cd939c Merge pull request #14502 from geoffw0/xmlquery
Swift: Model RawRepresentable
2023-10-24 16:25:15 +01:00
Geoffrey White
d2d70cc782 Swift: Change note. 2023-10-24 16:17:21 +01:00
Geoffrey White
79f675cdb7 Swift: Fix a model. 2023-10-24 16:17:21 +01:00
Geoffrey White
a5206028b0 Swift: Expand a test to explore why it fails (lack of pointer models and closure capture flow). 2023-10-24 16:17:21 +01:00
Chris Smowton
30610c9a3f Temporarily de-deprecate SuperMethodAccess to accommodate private tests 2023-10-24 16:05:52 +01:00
Geoffrey White
3bcee63980 Update README.md
Change the Warning to a Note and rephrase.
2023-10-24 15:46:32 +01:00
Mathias Vorreiter Pedersen
862de152a1 Swift: Add required qldoc. 2023-10-24 15:45:17 +01:00
Mathias Vorreiter Pedersen
6f37d7c374 Swift: Accept changes in paths. 2023-10-24 15:39:19 +01:00
Mathias Vorreiter Pedersen
9652679c6f Merge pull request #14568 from alexet/alexet/add-fn-tests
CPP: Add test demonstrating use-after-free false negatives.
2023-10-24 15:38:01 +01:00
Stephan Brandauer
e97456f5fc Java: automodel extraction docs: note on packaging and backwards compatibility 2023-10-24 16:30:59 +02:00
Mathias Vorreiter Pedersen
56b49a4de3 Swift: Add a closure flow step from the right-hand side of variable declarations to the underlying pattern. 2023-10-24 15:28:28 +01:00
Mathias Vorreiter Pedersen
3d5098aaeb Swift: Add failing test. 2023-10-24 15:28:25 +01:00
Mathias Vorreiter Pedersen
1c298e6001 Swift: Fix 'parameter' -> 'argument' flow into closures. 2023-10-24 15:28:01 +01:00
Mathias Vorreiter Pedersen
310ebe47b3 Swift: Clean up test file. 2023-10-24 15:27:59 +01:00
Cornelius Riemenschneider
42c343e820 Address review 2023-10-24 16:03:35 +02:00
Chris Smowton
92d3d9d83f Update integration test expectations 2023-10-24 14:47:19 +01:00
Chris Smowton
4205f1bd03 Temporarily un-deprecate MethodAccess to decouple from private tests 2023-10-24 14:03:26 +01:00
Chris Smowton
b849a66c97 Update test expectations 2023-10-24 14:02:30 +01:00
Nora Dimitrijević
9dbf7e818d Swift: align definition of InputSig slightly closer to Java version
Though there is a regression in the tests, so more work is needed.
2023-10-24 13:56:31 +01:00
Nora Dimitrijević
9de3cc703a Swift: add CapturePostUpdateNode
However, this doesn't change any of the test results.
2023-10-24 13:56:31 +01:00
Nora Dimitrijević
5418d39a0d Swift: add and accept a few new simple test cases 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
af49a3aa64 Swift: accept new results in old tests 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
8115774a7a Swift: Add the capture flow step as part of the normal data flow relation
TODO: see if we need to exclude duplicate SSA steps
2023-10-24 13:56:31 +01:00
Nora Dimitrijević
4e1b44a059 Swift: port simpleAstFlowStep/hasAliasedAccess 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
21a369de13 Swift: Add closure content read-write steps 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
c04654d8f9 Swift: getImmediateBasicBlockDominator/2 should use immediatelyDominates/0. 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
95a7d6559c Swift: initial version of a swift port of most of the java code 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
3253c0425c Swift: s/getName/getShortName/ in InlineFlowTest.qll 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
050b8e682f Swift: add failing inline expectation test based on closure AST tests. 2023-10-24 13:56:31 +01:00
Jeroen Ketema
ba67217b44 Merge pull request #14571 from MathiasVP/fix-indirect-taint
C++: Fix indirect taint
2023-10-24 14:47:43 +02:00
Chris Smowton
06238dd5f6 Improve reflective class names 2023-10-24 13:29:32 +01:00
Chris Smowton
011666b48c Fix description and improve predicate name of VarWrite. 2023-10-24 12:59:57 +01:00
Geoffrey White
d3063e849e Swift: Model string closure methods. 2023-10-24 12:58:38 +01:00
Chris Smowton
ede17585a6 Amend NewClassExpr description
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-10-24 12:51:42 +01:00
Chris Smowton
e3edea2a5f Apply simple suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-10-24 12:51:03 +01:00
Stephan Brandauer
eb97ce3294 Java: automodel extraction query docs, candidate examples 2023-10-24 13:49:38 +02:00
Chris Smowton
efb63aada3 Add change note 2023-10-24 11:45:41 +01:00
Chris Smowton
3627eb2bcf Add missing qldoc 2023-10-24 11:15:08 +01:00
Chris Smowton
e8c9708282 Autoformat 2023-10-24 11:06:19 +01:00
Chris Smowton
09e83d1173 Fix isEnclosingMethodAccess wrapper 2023-10-24 11:03:57 +01:00
Chris Smowton
ac38d4c9c6 Mass rename L/RValue -> VarWrite/Read 2023-10-24 10:58:29 +01:00
Chris Smowton
59a49eef0b Add aliases for public, importable renamed classes and predicates.
Also rename and aliases a couple of uses of Access noted along the way.
2023-10-24 10:54:35 +01:00
Chris Smowton
f552a15aae Mass-rename MethodAccess -> MethodCall 2023-10-24 10:30:26 +01:00
Geoffrey White
f597f0272a Update README.md
Turned the warning at the top into a warning box.

Made the section headers consistent.

I was going to add a section, but I realized it belongs somewhere else.  :)
2023-10-24 10:12:20 +01:00
Michael Nebel
26f767073d Merge pull request #14363 from michaelnebel/csharp/sunsetqlstubgen
C#: Sunset QL based stub generator.
2023-10-24 11:05:56 +02:00
Chris Smowton
a10731c591 Java: introduce more-intuitive names for ClassInstanceExpr, L/RValue and MethodAccess. 2023-10-24 09:38:49 +01:00
Mathias Vorreiter Pedersen
1fce26534f C++: Remove implied conjunct. 2023-10-24 09:25:32 +01:00
Tony Torralba
4e823b4306 Merge pull request #14566 from atorralba/atorralba/java/springframework-6-models
Java: Added up to date models for Spring's ResponseEntity
2023-10-24 09:11:37 +02:00
Geoffrey White
4cf40ed259 Swift: Add a test case for withMutableCharacters. 2023-10-23 23:30:19 +01:00
Mathias Vorreiter Pedersen
67ed12c916 C++: Correctly model that 'operator->', and 'get'
on smart pointers perform a load.
2023-10-23 20:11:23 +01:00
Mathias Vorreiter Pedersen
b107c4c641 C++: Fix missing result in 'ModelUtil'. The problem was that 'n.asInstruction()' on line 81 wasn't necessarily a 'CallInstruction' (it could be a conversion). 2023-10-23 19:34:25 +01:00
Mathias Vorreiter Pedersen
c0b04eac7c C++: Add failing test. 2023-10-23 19:29:28 +01:00
Alex Eyers-Taylor
26b0363707 CPP: Add test demonstrating use-after-free false negatives. 2023-10-23 17:01:52 +01:00
Paolo Tranquilli
2f0ee12584 Swift: fix patterns/bound_and_unbound.ql test 2023-10-23 17:36:42 +02:00
Paolo Tranquilli
f22d60f011 Swift: clean up VarDecl, NamedPattern and SwitchStmt interactions
* `variables` under `CaseStmt` are now AST children, which solves
  orphan `VarDecl`s in that case
* reordered `CaseStmt` AST children to be `labels > variables > body`
  (was `body > labels`)
* made `NamedPattern::getVarDecl` an extracted property instead of
  `getName`
* The above led to duplicate DB entities because of a quirk in the
  Swift compiler code. This is solved by tweaking the extraction of
  `variables` under `CaseStmt` to not use `getCaseBodyVariables`.
2023-10-23 17:36:42 +02:00
Paolo Tranquilli
140ff723e4 Merge pull request #14563 from github/redsun82/codegen-test-with
Codegen: add `@qltest.test_with`
2023-10-23 17:35:31 +02:00
Rasmus Wriedt Larsen
e8f548ab52 Python: Model routed parameter flow to *args and **kwargs in Django + rest framework 2023-10-23 17:18:22 +02:00
Joe Farebrother
3f11d83b7b Merge pull request #14500 from joefarebrother/shared-filepath-normalize
Shared: Add library for filepath normalization
2023-10-23 16:09:44 +01:00
Paolo Tranquilli
02a2debe94 Codegen: fix python compatibility problem 2023-10-23 16:56:44 +02:00
Rasmus Wriedt Larsen
24687b4156 Python: Add test highlighting missing routed parameter flow to **kwargs parameter of request handler function 2023-10-23 16:49:43 +02:00
Rasmus Wriedt Larsen
8b23140a08 Python: Remove trailing , 2023-10-23 16:45:08 +02:00
Rasmus Wriedt Larsen
60e7786b04 Python: Use explicit keyword parameter 2023-10-23 16:44:54 +02:00
Rasmus Wriedt Larsen
46e44a0036 Python: Fix import 2023-10-23 16:42:55 +02:00
Tony Torralba
cd10dc8a27 Java: Added up to date models for Spring's ResponseEntity 2023-10-23 16:06:11 +02:00
Chris Smowton
e301223644 Merge pull request #14541 from JarLob/patch-3
fix CWE number
2023-10-23 15:05:02 +01:00
Michael Nebel
743be92624 C#: Adjust workflow to point to the new location for the script. 2023-10-23 15:10:20 +02:00
Michael Nebel
5ba0e0ffce C#: Adjust the relative path to the stub generator project file. 2023-10-23 15:09:38 +02:00
Michael Nebel
d4af05cbf9 C#: Move stub generator script. 2023-10-23 15:09:38 +02:00
Michael Nebel
ed6a068ebc C#: Update the stub generator readme. 2023-10-23 15:09:38 +02:00
Michael Nebel
4e99266b65 C#: Sunset the QL based stub generator. 2023-10-23 15:09:38 +02:00
Paolo Tranquilli
7cc20587ad Codegen: add @qltest.test_with
This allows to group together related AST classes to reuse the same
test source and extraction. For example this is useful for
`EnumDecl/EnumCaseDecl/EnumElementDecl`, where this is applied to.
2023-10-23 14:51:22 +02:00
Ian Lynagh
b89088737a Merge pull request #14551 from igfoo/igfoo/loc
Java/Kotlin: Reshuffle our LoC queries
2023-10-23 11:50:03 +01:00
Stephan Brandauer
319b799f95 Merge pull request #14553 from github/kaeluka/fix-positive-example-query
Java: Automodel Framework Mode Extraction Bug
2023-10-23 09:48:49 +02:00
amammad
e3dbdc3887 add custom query builder and active record querybuilder support 2023-10-22 21:39:59 +02:00
Jami Cogswell
687ecffe71 CI: don't upload comment/ID artifact if no existing comment 2023-10-22 15:28:07 -04:00
amammad
a0e2e1ef21 add to Frameworks.qll 2023-10-21 19:49:27 +02:00
amammad
1fe565a46f cherrypy framework file system access Sinks are added 2023-10-21 19:47:30 +02:00
Maiky
d8aa0e2d7e Remove unnecessary import 2023-10-21 17:29:08 +02:00
Maiky
35d390ad06 Add Insecure Randomness Query (CWE-338) 2023-10-21 17:23:41 +02:00
Owen Mansel-Chan
b46174f464 Merge pull request #14536 from owen-mc/go/amend-library-coverage
Go: Add Go frameworks for automated coverage reports
2023-10-20 21:28:30 +01:00
Dave Bartolomeo
76a9b71231 Merge branch 'main' into dbartol/threat-models 2023-10-20 14:05:17 -04:00
Stephan Brandauer
1d7c2f4799 Java: format 2023-10-20 16:37:46 +02:00
Stephan Brandauer
f0c0bbf4c8 remove bug: needless restriction to sink examples in framework mode +examples 2023-10-20 16:34:29 +02:00
Mathias Vorreiter Pedersen
6c10ba2fb1 Merge pull request #14495 from github/calumgrant/comp-generated-this
C++: Fix ImplicitThisFieldAccess
2023-10-20 15:25:26 +01:00
Cornelius Riemenschneider
9ba32a0440 Add bazel-based build for the Javascript extractor. 2023-10-20 16:23:50 +02:00
Cornelius Riemenschneider
de85f2bbf8 Fix errorprone violations. 2023-10-20 16:23:35 +02:00
Calum Grant
8054a5d086 C++: Add changenote 2023-10-20 14:48:20 +01:00
Tamas Vajk
3f1e145d2c C#: Rework .net framework reference removal 2023-10-20 14:40:13 +02:00
Owen Mansel-Chan
0ba0063e6d Update go/ql/lib/change-notes/2023-10-20-enclosing-callable-for-external-files.md
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-10-20 13:37:44 +01:00
Erik Krogh Kristensen
f562d5319f Merge pull request #14539 from flyboss/main
fix typo ('Configration' to ‘Configuration’)
2023-10-20 14:10:42 +02:00
Ian Lynagh
26634a3266 Java/Kotlin: Add a changenote for the lines-of-code changes 2023-10-20 13:04:39 +01:00
Ian Lynagh
d816035da6 Java/Kotlin: Tweak LoC message 2023-10-20 13:02:11 +01:00
Ian Lynagh
13a9e83e6a Java/Kotlin: Reshuffle our LoC queries
There's now a single lines-of-code query that gives the total number of
lines of code over both languages.

Per-language LoC queries are now just summaries.
2023-10-20 12:43:41 +01:00
Mathew Payne
a24e168ec0 Merge branch 'main' into py-restframework 2023-10-20 11:39:07 +01:00
Paolo Tranquilli
c92519ed6b Merge pull request #14538 from github/redsun82/add-unspecified-element-children
Swift: add children to `UnspecifiedElement`
2023-10-20 12:27:05 +02:00
Owen Mansel-Chan
da68153a96 Fix change note name and location 2023-10-20 11:24:25 +01:00
Owen Mansel-Chan
5d729616cd Add change note 2023-10-20 11:20:10 +01:00
Michael B. Gale
58fe66f5a8 Merge pull request #14550 from github/mbg/docs/bump-to-go1.21
Bump to Go 1.21 in supported compilers docs
2023-10-20 11:09:59 +01:00
flyboss
ee813c1e61 Update UnsafeHtmlConstructionQuery.qll
add a deprecated alias in case anyone depends on the misspelled name.
2023-10-20 17:57:23 +08:00
Michael B. Gale
46aa712c28 Bump to Go 1.21 in supported compilers docs 2023-10-20 10:49:02 +01:00
Esben Sparre Andreasen
1b9b6ae5b5 Merge pull request #14542 from github/esbena/proper-check-change-note
Improve change note checking
2023-10-20 11:47:53 +02:00
Ian Lynagh
a4ef183a2e Merge pull request #14529 from igfoo/igfoo/classid_fqname
Kotlin: Don't convert back and forth between ClassId and FqName
2023-10-20 10:28:25 +01:00
Tamas Vajk
36f1070b93 Adjust expected test files 2023-10-20 09:42:00 +02:00
Tamas Vajk
fc1fc05d16 C#: Rework .net framework reference removal 2023-10-20 09:22:14 +02:00
Jami Cogswell
ee4a9c3f8d CI: remove extraneous quotes that were causing 'get_previous_run_id' to always fail with a 'list index out of bounds' error 2023-10-19 19:23:14 -04:00
Jami Cogswell
6e29b70100 CI: update comment (if it exists) 2023-10-19 19:19:25 -04:00
Jami Cogswell
9263cfdf56 CI: save and upload comment id (if it exists) 2023-10-19 19:14:23 -04:00
Dave Bartolomeo
15e9838f16 Add a readme file 2023-10-19 17:27:21 -04:00
Dave Bartolomeo
fb1b41b649 Fix formatting 2023-10-19 17:20:38 -04:00
Dave Bartolomeo
c268163804 warnOnImplicitThis 2023-10-19 17:18:47 -04:00
Dave Bartolomeo
910b2a98f1 Merge remote-tracking branch 'origin/main' into dbartol/threat-models 2023-10-19 17:07:38 -04:00
Dave Bartolomeo
bd7de83aab Use extension packs for threat models 2023-10-19 17:07:26 -04:00
Dave Bartolomeo
07eb60d044 Merge pull request #14531 from github/post-release-prep/codeql-cli-2.15.1
Post-release preparation for codeql-cli-2.15.1
2023-10-19 13:32:33 -04:00
Dave Bartolomeo
712f7758cf Merge branch 'main' into post-release-prep/codeql-cli-2.15.1 2023-10-19 12:14:07 -04:00
Owen Mansel-Chan
e19ebf9ca8 Add external file scope 2023-10-19 16:48:38 +01:00
Owen Mansel-Chan
563805ff0c Fix nodeGetEnclosingCallable
It wasn't updated when MkImplicitVarargsSlice was added as a branch of
TNode. This meant that it gave no result for `ImplicitVarargsSlice`s
in function calls used to initialise variables declared at file level.
2023-10-19 16:48:37 +01:00
Owen Mansel-Chan
a3cecd178f Add consistency query
This can be run on an existing database to check for any assumptions
of the data flow library which do not hold.
2023-10-19 16:47:56 +01:00
Tamas Vajk
fbfafbfdd4 C#: Remove netstandard.library.ref from the references 2023-10-19 15:49:16 +02:00
Erik Krogh Kristensen
2a1ca637fd Merge pull request #14543 from erik-krogh/string-not-int
move the documentation of codePointAt and codePointCount to the string type instead of the int type
2023-10-19 14:39:10 +02:00
Peter Stöckli
09cf76a880 Ruby: additional unsafe deserialization sinks for ox, oj 2023-10-19 14:04:48 +02:00
erik-krogh
5cd732b3c6 move the documentation of codePointAt and codePointCount to the string type instead of the int type 2023-10-19 12:57:06 +02:00
Owen Mansel-Chan
67601b5312 Add DataFlowImplConsistency.qll for Go library 2023-10-19 11:43:00 +01:00
Mathias Vorreiter Pedersen
0ab159f803 Merge pull request #14135 from github/sashabu/frontend-update
C++: Update for changes in frontend.
2023-10-19 11:40:24 +01:00
Esben Sparre Andreasen
2c99e2f3d5 improve change note file name checks 2023-10-19 12:16:27 +02:00
Esben Sparre Andreasen
836bb6006c improve env var usage in check-change-note.yml 2023-10-19 12:05:29 +02:00
Mathias Vorreiter Pedersen
0bfa53cfd6 Merge pull request #14524 from MathiasVP/add-more-dataflow-documentation
C++: Add more documentation about dataflow through indirections
2023-10-19 10:32:12 +01:00
Mathias Vorreiter Pedersen
4feda50add Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-19 11:00:42 +02:00
Mathias Vorreiter Pedersen
b5cbd909f7 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-19 11:00:33 +02:00
Mathias Vorreiter Pedersen
35702a9fdf Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-19 11:00:18 +02:00
Jeroen Ketema
a972d0943a C++: Accept test changes after changes in IR generation 2023-10-19 10:45:14 +02:00
Jeroen Ketema
2a64552979 C++: Add support for C23/C++23 floating-point types 2023-10-19 10:45:14 +02:00
Jeroen Ketema
7e71d9e619 C++: Update expected test results after outputting less loads from the extractor 2023-10-19 10:45:14 +02:00
Jeroen Ketema
bec3e62771 C++: Update cpp/constant-array-overflow test results after frontend update 2023-10-19 10:45:14 +02:00
Jeroen Ketema
23c6027386 C++: Update expected test changes after frontend update 2023-10-19 10:45:13 +02:00
Jeroen Ketema
8b8a2726d4 C++: Accept semantic range analysis test changes due to extra loads in the IR 2023-10-19 10:45:13 +02:00
Jeroen Ketema
554087161b C++: Accept sign analysis test changes
The IR now contains extra loads that need to be accounted for.
2023-10-19 10:45:13 +02:00
Jeroen Ketema
5036135f01 C++: Fix IR generation for the comma operator 2023-10-19 10:45:13 +02:00
Jeroen Ketema
0fceecee6d C++: Fix extractor options for deprecated_with_msg test
The previous extractor options no longer work, because the default assumed
compiler versions have changed in the frontend.
2023-10-19 10:45:13 +02:00
Jeroen Ketema
e271c7e5e7 C++: Accept IR GVN test changes a CopyValue is now Load due to IR changes 2023-10-19 10:45:13 +02:00
Jeroen Ketema
91a98f3512 C++: Accept new dataflow IR inconsistencies
These are due to additional loads being generated on fields, and should not
cause any problems. Ideally, we should tune the definition of
`TPostFieldUpdateNode` to make these go away.
2023-10-19 10:45:13 +02:00
Jeroen Ketema
231e9ef098 C++: Accept PrintAST value category changes after frontend update 2023-10-19 10:45:13 +02:00
Jeroen Ketema
a6dae91215 C++: Accept IR test changes after value category updates 2023-10-19 10:45:12 +02:00
Jeroen Ketema
3202bcce70 C++: Handle ternary operators whose value category is a prvalue with a load 2023-10-19 10:45:12 +02:00
Jeroen Ketema
c60cb136bb C++: Do not generate loads for ParenthesisExprs 2023-10-19 10:45:12 +02:00
Jeroen Ketema
4339e18ed6 C++: Update IR generation for changes in frontend 2023-10-19 10:45:12 +02:00
Jaroslav Lobačevski
2b541b78ac fix CWE number 2023-10-19 09:36:25 +02:00
Tony Torralba
049ba54948 Merge pull request #14533 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-10-19 08:56:36 +02:00
Erik Krogh Kristensen
daca5121f6 Merge pull request #14540 from github/dependabot/cargo/ql/tracing-0.1.40
Bump tracing from 0.1.39 to 0.1.40 in /ql
2023-10-19 08:47:56 +02:00
dependabot[bot]
2af1302a4a Bump tracing from 0.1.39 to 0.1.40 in /ql
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.39 to 0.1.40.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.39...tracing-0.1.40)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 03:33:14 +00:00
flyboss
86336565eb fix typo 2023-10-19 02:34:31 +00:00
github-actions[bot]
065353667f Add changed framework coverage reports 2023-10-19 00:15:51 +00:00
Tony Torralba
da44b13fd4 Merge pull request #14515 from atorralba/atorralba/java/spring-csrf-improv
Java: Improve java/spring-disabled-csrf-protection
2023-10-18 17:49:10 +02:00
Paolo Tranquilli
d55289bf68 Swift: add children to UnspecifiedElement
This will allow better downgrade scripts in the future.
2023-10-18 16:42:04 +02:00
Michael B. Gale
4246ebf9e0 Merge pull request #14535 from github/mbg/go/dependabot-ignore-tests
Go: Add Dependabot config for `go/ql/test` which ignores all dependencies
2023-10-18 14:40:16 +01:00
Michael B. Gale
771b5eca47 No allow, only ignore 2023-10-18 14:25:38 +01:00
Michael B. Gale
10e9c6defd Update .github/dependabot.yml
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-10-18 14:23:32 +01:00
Michael B. Gale
df191e4b6d Update .github/dependabot.yml
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-10-18 14:22:06 +01:00
Mathias Vorreiter Pedersen
7f97492580 C++: Make sphinx happy. 2023-10-18 14:15:55 +01:00
Mathias Vorreiter Pedersen
a36d432184 C++: Simplify a paragraph and use line numbers in CPP code. 2023-10-18 14:15:01 +01:00
Mathias Vorreiter Pedersen
c04546da98 C++: Use named code blocks. 2023-10-18 14:03:09 +01:00
Mathias Vorreiter Pedersen
308d027d1e C++: Fix typo. 2023-10-18 14:02:05 +01:00
Mathias Vorreiter Pedersen
44e214b933 C++: Stick to the pointer vs. indirection terminology. 2023-10-18 13:47:09 +01:00
Alex Denisov
eb3e140008 Swift: remove outdated CLI argument 2023-10-18 14:44:47 +02:00
Mathias Vorreiter Pedersen
f6b1d66167 C++: Convert another paragraph to a numbered list. 2023-10-18 13:38:50 +01:00
Mathias Vorreiter Pedersen
1b1a78bf04 C++: Convert a paragraph to a numbered list. 2023-10-18 13:34:32 +01:00
Mathias Vorreiter Pedersen
342f4f867b Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst 2023-10-18 14:30:46 +02:00
Mathias Vorreiter Pedersen
9d2e21e470 C++: Move the note in the beginning of the document into a reusable file. 2023-10-18 13:29:52 +01:00
Mathias Vorreiter Pedersen
ff3d4b8b40 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:18:23 +02:00
Mathias Vorreiter Pedersen
3b6c43c9a1 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:18:05 +02:00
Mathias Vorreiter Pedersen
8812567c69 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:15:11 +02:00
Mathias Vorreiter Pedersen
0d36d918c9 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:11:58 +02:00
Mathias Vorreiter Pedersen
d4cbb8cb22 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:11:24 +02:00
Mathias Vorreiter Pedersen
9a91145d7e Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:09:39 +02:00
Mathias Vorreiter Pedersen
efe7153ac2 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:09:05 +02:00
Mathias Vorreiter Pedersen
9ad461daa0 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:08:40 +02:00
Mathias Vorreiter Pedersen
59b26c0dad Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst 2023-10-18 14:08:20 +02:00
Mathias Vorreiter Pedersen
b71248face Update docs/codeql/codeql-language-guides/codeql-for-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:06:14 +02:00
Mathias Vorreiter Pedersen
dc77614bd1 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:05:59 +02:00
Mathias Vorreiter Pedersen
56a1a7cc4d Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:05:45 +02:00
Mathias Vorreiter Pedersen
f3dd2ebe7d Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:05:19 +02:00
Mathias Vorreiter Pedersen
16fbffe47b Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:05:05 +02:00
Mathias Vorreiter Pedersen
51cf400669 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:04:39 +02:00
Mathias Vorreiter Pedersen
02e3d2704c Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:03:50 +02:00
Mathias Vorreiter Pedersen
e6ae3ffe7a Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:03:41 +02:00
Mathias Vorreiter Pedersen
d21943137f Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-10-18 14:03:28 +02:00
Owen Mansel-Chan
bddd448fdf Add Go frameworks for automated coverage reports
Note that the space at the beginning of the package patterns for the
standard library is deliberate, because builtin functions use the empty
string as their package and we want to attribute them to the standard
library.
2023-10-18 12:49:31 +01:00
Calum Grant
6472ed7fe0 C++: Fix GVN for ImplicitThisFieldAccess 2023-10-18 12:40:55 +01:00
Calum Grant
c51efb1477 C++: Tighten up definitions of field accesses 2023-10-18 11:39:09 +01:00
Michael B. Gale
bd811f25da Add Dependabot config for go/ql/test 2023-10-18 11:06:02 +01:00
github-actions[bot]
8dcd8b9e5b Post-release preparation for codeql-cli-2.15.1 2023-10-17 20:24:00 +00:00
Chris Smowton
70aa490bbd Merge pull request #14503 from smowton/smowton/admin/adapt-tests-to-jdk21
Java: Adapt tests to JDK21
2023-10-17 20:07:47 +01:00
Edward Minnix III
15afc3ed64 Merge pull request #14491 from egregius313/egregius313/java/mad/convert-iv
Java: Refactor `java/static-initialization-vector` to use Models as Data
2023-10-17 13:15:45 -04:00
Geoffrey White
b93442a2b6 Merge pull request #14523 from geoffw0/appendingformat
Swift: Model StringProtocol.appendingformat and String.decodecstring
2023-10-17 18:04:29 +01:00
Ian Lynagh
ab891465a4 Kotlin: Don't convert back and forth between ClassId and FqName
This showed up as a bug in Kotlin 2 mode:

We were starting with the Class Id "java/util/Map.Entry", which we then
converted to the FqName "java.util.Map.Entry", and then back to a
Class Id with ClassId.topLevel. This gave us a Class Id that
referenceClass wasn't able to resolve.

Now we just stick with the Class Id that we started with, and the class
can be resolved by Kotlin 2.
2023-10-17 17:01:53 +01:00
Robert Marsh
53e80e0f27 Merge pull request #14398 from rdmarsh2/rdmarsh2/swift/autoclosure-cfg
Swift: add CFG for normal autoclosures
2023-10-17 11:50:24 -04:00
Mathias Vorreiter Pedersen
c8e8ac0b55 C++: Make sphinx happy. 2023-10-17 16:15:59 +01:00
Mathias Vorreiter Pedersen
9a6fc967db Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-10-17 17:05:27 +02:00
Mathias Vorreiter Pedersen
17ee7c2352 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-10-17 17:04:33 +02:00
Mathias Vorreiter Pedersen
c4075b3ec7 C++: Make an explanation of 'allowImplicitRead' slightly more explicit. 2023-10-17 16:02:48 +01:00
Mathias Vorreiter Pedersen
d390b6235b C++: Delete 'we assume'. 2023-10-17 16:00:09 +01:00
Ed Minnix
8ed5bfb27d Remove reference to DataFlow2 2023-10-17 10:59:36 -04:00
Mathias Vorreiter Pedersen
0a71705dfe C++: Add a small note about performance. 2023-10-17 15:57:37 +01:00
Mathias Vorreiter Pedersen
2fcf0abb7f C++: Fix phinx syntax. 2023-10-17 15:45:16 +01:00
Mathias Vorreiter Pedersen
c5307bed2b C++: Replace 'use_data' with 'read_data'. 2023-10-17 15:36:14 +01:00
Mathias Vorreiter Pedersen
d6ccd63ed2 C++: Reorganize the setup in the 'Flow from a qualifier to a field access' section. 2023-10-17 15:33:25 +01:00
Mathias Vorreiter Pedersen
3de32e813b C++: Simplify introductory text and code. 2023-10-17 15:19:59 +01:00
Mathias Vorreiter Pedersen
bbf9bcde2a Merge pull request #14482 from MathiasVP/additional-call-targets-for-cpp
C++: Add an abstract class that can be used to extend `viableCallable`
2023-10-17 14:57:21 +01:00
Mathias Vorreiter Pedersen
e264bddb25 Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-10-17 15:51:20 +02:00
Mathias Vorreiter Pedersen
fa3053f7fa Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-10-17 15:50:55 +02:00
AlexDenisov
401639e10b Merge pull request #14528 from github/alexdenisov/debug-notes-on-db-upgrades
Docs: add a note on db migration scripts debugging
2023-10-17 15:49:39 +02:00
Alex Denisov
057172c391 Docs: add a note on db migration scripts debugging 2023-10-17 14:55:35 +02:00
Rasmus Wriedt Larsen
28bedda5ea Merge pull request #14513 from RasmusWL/yield-modeling
Python: Improve `yield` modeling
2023-10-17 14:15:01 +02:00
Stephan Brandauer
9d719aa44e Merge pull request #13444 from github/java/update-mad-decls-after-triage-2023-06-13T14-50-57
Java: Update MaD Declarations after Triage
2023-10-17 13:54:10 +02:00
Joe Farebrother
aa418dc7d0 Add more line breaks in qldoc 2023-10-17 12:51:22 +01:00
Mathias Vorreiter Pedersen
68f2501bf0 Merge pull request #14496 from geoffw0/memberinittest
Swift: Add data flow tests for member initialization.
2023-10-17 12:35:07 +01:00
Mathias Vorreiter Pedersen
9a2c1daebe C++: Add tests for 'AdditionalCallTarget'. 2023-10-17 11:48:44 +01:00
Geoffrey White
5ffb773568 Swift: Explore instantiated / not instantiated classes. 2023-10-17 11:30:03 +01:00
Mathias Vorreiter Pedersen
0ad338f04a Merge pull request #14521 from geoffw0/defaultstep
Swift: Add CollectionContent to defaultImplicitTaintRead
2023-10-17 11:07:10 +01:00
Tony Torralba
96d6e8e3f2 Update change note 2023-10-17 11:57:53 +02:00
Tony Torralba
3cd06b0026 More review suggestions 2023-10-17 11:54:32 +02:00
Tony Torralba
62a9ffd277 Apply suggestions from code review 2023-10-17 11:51:55 +02:00
Mathias Vorreiter Pedersen
75a8f01f65 C++: Add more documentation about dataflow through indirections. 2023-10-17 09:53:40 +01:00
Tony Torralba
4ecda9cccd Add consistency check exception 2023-10-17 10:18:19 +02:00
Rasmus Wriedt Larsen
80506f1028 Python: Accept .expected changes 2023-10-17 10:11:39 +02:00
Rasmus Wriedt Larsen
62a992473f Python: Update QLDoc 2023-10-17 10:09:19 +02:00
Rasmus Wriedt Larsen
2bf4c32433 Python: Add syntactic support for yield in contextlib.contextmanager 2023-10-17 09:51:20 +02:00
Rasmus Wriedt Larsen
2399793c8a Python: Expand contextmanager test even more 2023-10-17 09:41:30 +02:00
amammad
9d4a16750c fix autoformatting 2023-10-17 01:02:16 +02:00
amammad
b3be2a4929 add additional taint steps to SSRF query 2023-10-17 01:00:25 +02:00
Chris Smowton
3145c53a19 Accept test changes for JDK21 2023-10-16 22:00:41 +01:00
Chris Smowton
bd77f572f1 Compile collections test for Java 11 2023-10-16 21:54:09 +01:00
Geoffrey White
0a96eb0a40 Swift: Change note. 2023-10-16 21:43:55 +01:00
Geoffrey White
2679d1fdb5 Swift: Add models. 2023-10-16 21:40:38 +01:00
Erik Krogh Kristensen
24e779b826 Merge pull request #14520 from github/dependabot/cargo/ql/regex-1.10.2
Bump regex from 1.10.0 to 1.10.2 in /ql
2023-10-16 22:27:50 +02:00
Geoffrey White
451d779f4a Swift: Test String.decodeCString. 2023-10-16 21:22:03 +01:00
Geoffrey White
459b006244 Swift: Test StringProtocol.appendingFormat. 2023-10-16 21:22:03 +01:00
Dave Bartolomeo
8e890571ed Merge pull request #14519 from github/release-prep/2.15.1
Release preparation for version 2.15.1
2023-10-16 13:55:45 -04:00
dependabot[bot]
cf0173acad Bump regex from 1.10.0 to 1.10.2 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.0 to 1.10.2.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.0...1.10.2)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 17:49:47 +00:00
github-actions[bot]
3b3c036626 Release preparation for version 2.15.1 2023-10-16 17:49:39 +00:00
Michael B. Gale
d15c60ba76 Merge pull request #14516 from github/mbg/go/fix-dependabot-yml-again 2023-10-16 18:48:26 +01:00
Geoffrey White
c6ff42986d Swift: Change note. 2023-10-16 18:43:03 +01:00
Geoffrey White
990c40c8c8 Swift: Barrier for duplicate results in constant queries, resulting from sources like [1, 2, 3]. 2023-10-16 18:28:51 +01:00
Geoffrey White
6108f787dd Swift: Effect on query tests. 2023-10-16 18:28:51 +01:00
Geoffrey White
0509c0fdf3 Swift: Effect on dataflow tests. 2023-10-16 18:28:50 +01:00
Geoffrey White
89867d6214 Swift: Default content read step. 2023-10-16 18:28:50 +01:00
Robert Marsh
efb04f6db4 Swift: update generated files list 2023-10-16 17:22:52 +00:00
Robert Marsh
d0ec2fd643 Swift: fix QLDoc typos
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-10-16 13:20:41 -04:00
Dave Bartolomeo
e4e472ee74 Merge pull request #14512 from MathiasVP/fix-size-in-invalid-ptr-deref
C++: Fix size deduction in `cpp/invalid-pointer-deref`
2023-10-16 11:22:41 -04:00
Ian Lynagh
0a0ce1f202 Kotlin: Log when we start and finish writing to TRAP files 2023-10-16 16:14:23 +01:00
Alex Ford
25c416ec8a Merge pull request #14061 from maikypedia/maikypedia/ruby-jwt
Ruby: JWT Security Queries (CWE-347)
2023-10-16 15:42:31 +01:00
Edward Minnix III
21bea38ec8 Merge pull request #14472 from egregius313/egregius313/sync-local-and-remote-queries
Java: Synchronize `*Local` versions of queries with their remote counterpart
2023-10-16 10:31:40 -04:00
Ed Minnix
c65d407937 Remove old DataFlow2 import 2023-10-16 10:30:00 -04:00
Tony Torralba
d08ee76b16 Java: Improve java/spring-disabled-csrf-protection 2023-10-16 16:01:14 +02:00
Michael B. Gale
8c818a8657 group => groups 2023-10-16 14:53:03 +01:00
Mathias Vorreiter Pedersen
26a665369b C++: Add QLDoc. 2023-10-16 14:15:55 +01:00
Michael B. Gale
822f37156e Merge pull request #14483 from github/mbg/go/dependabot
Go: Improve Dependabot configuration
2023-10-16 14:05:36 +01:00
Joe Farebrother
05162c68ec Fix typo 2023-10-16 13:43:06 +01:00
Alex Ford
22850b28df Ruby: update alert message test output 2023-10-16 13:08:49 +01:00
Joe Farebrother
aade79f723 Improve qldoc and fix changenote 2023-10-16 13:02:28 +01:00
Alex Ford
66d230a207 ruby: qlformat 2023-10-16 12:45:46 +01:00
Alex Ford
3dd042c38a Merge remote-tracking branch 'origin/main' into maikypedia/ruby-jwt 2023-10-16 12:42:19 +01:00
Mathias Vorreiter Pedersen
79947956bc Merge pull request #14509 from MathiasVP/tag-redundant-null-check-simple-as-security
C++: Mark `cpp/redundant-null-check-simple` as a security query
2023-10-16 11:58:21 +01:00
Mathias Vorreiter Pedersen
ba27a0d515 Update cpp/ql/src/change-notes/2023-10-16-redundant-null-check-simple.md
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-10-16 12:48:53 +02:00
Geoffrey White
1f92267786 Swift: Sort out identical files situation. 2023-10-16 11:26:12 +01:00
Geoffrey White
890b9d59ed Swift: Fix line numbers. 2023-10-16 11:09:54 +01:00
Rasmus Wriedt Larsen
883bd9f3b3 Python: Add test for type-tracking with yield 2023-10-16 12:09:07 +02:00
Mathias Vorreiter Pedersen
32d82380f1 C++: Add change note. 2023-10-16 11:08:27 +01:00
Geoffrey White
225a9fe2d8 Merge branch 'main' into implicitflow 2023-10-16 11:02:34 +01:00
Mathias Vorreiter Pedersen
d8a049f5cc C++: Accept test changes. 2023-10-16 10:51:47 +01:00
Geoffrey White
0e1da37379 Revert "Swift: Hide OpenExistentialExpr from the AST instead."
This reverts commit 9ad1749957.
2023-10-16 10:49:39 +01:00
Mathias Vorreiter Pedersen
7e6857d36b C++: Make 'hasSize' slightly smarter when handling ternary operators. 2023-10-16 10:48:28 +01:00
Mathias Vorreiter Pedersen
6a7b2e4aa4 C++: Add failing test. 2023-10-16 10:47:45 +01:00
Joe Farebrother
fe2468e7d0 Merge pull request #14498 from joefarebrother/csharp-missing-access-control
C#: Fix FP in Missing Function Level Access Control and Insecure Direct Object Reference
2023-10-16 10:46:19 +01:00
Geoffrey White
39a6375606 Swift: Change note. 2023-10-16 10:17:32 +01:00
Geoffrey White
613c7b24b5 Swift: Model .base, withUTF8(_:). 2023-10-16 10:17:32 +01:00
Geoffrey White
0bc24b8641 Swift: Model replaceSubrange more generally. 2023-10-16 10:17:32 +01:00
Geoffrey White
c6f2a2936b Swift: Widen the StringProtocol model. 2023-10-16 10:14:43 +01:00
Geoffrey White
dcba1b9913 Swift: Tests for Substring. 2023-10-16 10:14:42 +01:00
Mathias Vorreiter Pedersen
20c3984872 C++: Add the 'security' tag and add a 'security-severity' rating to 'cpp/redundant-null-check-simple'. 2023-10-16 09:54:36 +01:00
Arthur Baars
0e3369f93f Merge pull request #14484 from aibaars/ts53-js
JS: Support import attributes
2023-10-16 10:47:49 +02:00
Erik Krogh Kristensen
80c5e1ea77 Merge pull request #14497 from erik-krogh/jsp
JS: add support for extracting `.jsp` files
2023-10-16 09:27:46 +02:00
Erik Krogh Kristensen
c30e004506 Merge pull request #14506 from github/dependabot/cargo/ql/tracing-0.1.39
Bump tracing from 0.1.38 to 0.1.39 in /ql
2023-10-16 09:24:12 +02:00
Tony Torralba
ae8e237f2c Merge pull request #14494 from atorralba/atorralba/remove-library
Java/C/C#: Remove library annotations
2023-10-16 09:01:40 +02:00
Tamás Vajk
d723905035 Merge pull request #14368 from tamasvajk/standalone/use-legacy-framework-dlls
C#: Choose between .NET framework or core DLLs in standalone
2023-10-16 08:53:55 +02:00
dependabot[bot]
7700210ed2 Bump tracing from 0.1.38 to 0.1.39 in /ql
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.38 to 0.1.39.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.38...tracing-0.1.39)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 03:21:13 +00:00
Owen Mansel-Chan
53561008a1 Merge pull request #14445 from owen-mc/go/automated-mad-coverage-report
Go: automated mad coverage report
2023-10-15 21:49:47 +01:00
Owen Mansel-Chan
39bca2d4bb Merge pull request #14276 from tunnelshade/enable-gokit-by-default
Go: Enable GoKit module into the default list
2023-10-15 21:44:27 +01:00
Maiky
20bf3c7f67 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-10-15 15:47:19 +02:00
Maiky
e204100701 Resolve conflict in Concepts.qll 2023-10-15 10:37:10 +02:00
Maiky
17210c76a5 change-note edition
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-10-15 10:25:58 +02:00
BD
0ef83b3c74 Merge branch 'main' into enable-gokit-by-default 2023-10-15 10:22:27 +05:30
Chris Smowton
7fbba3a659 Java: adapt stub to ExecutorService change in JDK19 2023-10-13 20:30:28 +01:00
Chris Smowton
8f985e0045 Java: restrict test to source classes 2023-10-13 20:30:28 +01:00
Chris Smowton
0510b0c825 Java: restrict test to source methods
Otherwise it finds standard library methods that depend on stdlib internals as to what happens to get extracted. In particular the extractor bump to JDK21 led to MethodHandles being in scope and a new method being found; seems better to avoid considering the standard library at all.
2023-10-13 20:30:28 +01:00
Geoffrey White
cea87a53e0 Swift: Fix LocalTaint.expected. 2023-10-13 18:19:26 +01:00
Ed Minnix
3356261031 Static IV refactor to MaD 2023-10-13 12:50:49 -04:00
Geoffrey White
e2ac3769bc Swift: Change note. 2023-10-13 17:42:14 +01:00
Geoffrey White
aa0db1426d Swift: Simplify the QL a bit further. 2023-10-13 17:42:14 +01:00
Geoffrey White
d0f214a9a7 Swift: Widen the model to include things that are not strictly RawRepresentable but which appear similar. This fixes the XXE test cases. Unclear whether xmlParserOption in the test should in fact extend RawRepresentable, or not. 2023-10-13 17:35:05 +01:00
Joe Farebrother
9097d93ac7 Add shared library for filepath normalization 2023-10-13 17:07:47 +01:00
Jeroen Ketema
d56a9f0781 Merge pull request #14424 from jketema/rewrite-cgi-xss
C++: Rewrite `cpp/cgi-xss` to not use default taint tracking
2023-10-13 17:57:04 +02:00
Mathias Vorreiter Pedersen
fb0016e4f6 Merge pull request #14485 from geoffw0/logging
Swift: Add more sinks to `swift/cleartext-logging`
2023-10-13 16:09:19 +01:00
Mathias Vorreiter Pedersen
9a2ac65f53 Merge pull request #14394 from geoffw0/sqlpathinject3
Swift: Add sinks for sqlite3 and SQLite.swift to swift/hardcoded-key
2023-10-13 16:07:09 +01:00
Robert Marsh
b832fc8e32 Swift: additional QLDoc around closures 2023-10-13 14:54:38 +00:00
Mathias Vorreiter Pedersen
140ff537c0 C++: Split 'defaultViableCallable' and 'viableCallable'. 2023-10-13 15:47:02 +01:00
Geoffrey White
4e29ed5ff0 Swift: Model RawRepresentable. 2023-10-13 15:00:49 +01:00
Geoffrey White
228aaee0bf Swift: Add data flow tests for RawRepresentable, OptionSet. 2023-10-13 14:34:05 +01:00
Joe Farebrother
915352861d Check for generic base types in Missing Function Level Access Control and Insecure Direct Object Reference. 2023-10-13 14:22:45 +01:00
erik-krogh
69c3e62965 add change-note 2023-10-13 15:16:39 +02:00
Geoffrey White
9e473ebda4 Swift: Remove the 'rawValue' step as well. 2023-10-13 14:02:15 +01:00
Geoffrey White
da14f428e2 Swift: Remove now redundant additional taint step. from the XXE query. 2023-10-13 13:57:54 +01:00
Tamas Vajk
15ec0a10c9 Code quality improvements 2023-10-13 14:09:58 +02:00
Calum Grant
192c16bbb3 C++: Format QL and delete note 2023-10-13 13:07:43 +01:00
Jeroen Ketema
61676277e8 C++: Fix barrier in cpp/cgi-xss 2023-10-13 14:05:47 +02:00
Geoffrey White
33f83a2089 Swift: Add some failing data flow test cases. 2023-10-13 12:24:43 +01:00
Calum Grant
552221868f C++: Expand ImplicitThisFieldAccess 2023-10-13 12:05:20 +01:00
Tony Torralba
0cea3f8531 Remove library annotations 2023-10-13 12:46:56 +02:00
Harry Maclean
1297acf5b1 Merge pull request #14216 from hmac/hmac-graphql-enum
Ruby: Restrict GraphQL remote flow sources
2023-10-13 11:31:50 +01:00
erik-krogh
9080e84fc9 add support for extracting .jsp files 2023-10-13 12:09:27 +02:00
Tamas Vajk
791a6422b3 C#: Fix params attribute argument extraction 2023-10-13 11:30:02 +02:00
Tamas Vajk
e730815f41 C#: Add test case for params arguments in attributes 2023-10-13 11:29:32 +02:00
Tony Torralba
5e921784fb Merge pull request #14399 from ebickle/fix/thread-resource-arithmetic
Java: Flow taint through arithmetic expressions for java/thread-resource-abuse experimental query
2023-10-13 10:06:33 +02:00
Erik Krogh Kristensen
b1ad61e27d Merge pull request #14481 from erik-krogh/proper-codepoints
ReDoS: use the new codePointAt and codePointCount methods instead of regex hacks
2023-10-13 09:35:55 +02:00
Felicity Chapman
2ddcd1d9cc Merge pull request #14489 from github/felicitymay-typo-fix
Fix typo in link
2023-10-12 21:45:30 +01:00
Felicity Chapman
8f70b55158 Fix typo in link 2023-10-12 20:53:44 +01:00
Ian Lynagh
2edc70da79 Merge pull request #14390 from igfoo/igfoo/compr
Kotlin: Improve support for TRAP compression options
2023-10-12 20:22:10 +01:00
Robert Marsh
dd71204128 Swift: update test expectations for for-in locations 2023-10-12 18:59:36 +00:00
Geoffrey White
fe57cd0784 Merge pull request #14488 from geoffw0/strlentest
Swift: Additional test cases for `swift\string-length-conflation`
2023-10-12 19:39:43 +01:00
AlexDenisov
6ab2de10e3 Merge pull request #14437 from github/alexdenisov/ignore-unavailable-declarations
Swift: skip declarations marked as unavailable
2023-10-12 20:08:18 +02:00
Ian Lynagh
ed9502fd0b Kotlin: Enhance the TRAP compression test 2023-10-12 18:13:07 +01:00
Ian Lynagh
adb47399c7 Kotlin: Improve support for TRAP compression options
While you could control compression with
    CODEQL_EXTRACTOR_JAVA_OPTION_TRAP_COMPRESSION
before, most TRAP files used gzip regardless for compatibility with the
Java extractor. Now Java understands the option too we can use it for
shared TRAP files.
2023-10-12 18:13:06 +01:00
Mathias Vorreiter Pedersen
3c34638438 Merge pull request #14486 from MathiasVP/simplify-overrun-write
C++: Remove unnecessary `FlowState` from `cpp/overrun-write`
2023-10-12 17:48:52 +01:00
Geoffrey White
9f683b8630 Swift: Remove duplicate results. 2023-10-12 17:38:58 +01:00
Geoffrey White
cf7f355fc4 Swift: Additional test cases. 2023-10-12 17:11:56 +01:00
Stephan Brandauer
bcde466d6c use of characteristics 2023-10-12 17:22:05 +02:00
Stephan Brandauer
1bbf88f208 Java: basic version of automodel extraction queries 2023-10-12 17:07:46 +02:00
Ed Minnix
31c04b50f7 Change note 2023-10-12 09:58:09 -04:00
Ed Minnix
4eeaf84133 Sync NumericCastTaintedQuery 2023-10-12 09:58:08 -04:00
Ed Minnix
ec84f072eb Sync ArithmeticTaintedLocalQuery 2023-10-12 09:58:08 -04:00
Ed Minnix
da933fb77a Sync ExternallyControlledFormatStringLocalQuery 2023-10-12 09:58:08 -04:00
Ed Minnix
f1886320e5 Sync ImproperValidationOfArrayIndexLocalQuery 2023-10-12 09:58:08 -04:00
Ed Minnix
69531b9f7c Sync ResponseSplittingLocalQuery 2023-10-12 09:58:08 -04:00
Ed Minnix
ef282955fd Sync SqlTaintedLocalQuery with SqlInjectionQuery 2023-10-12 09:58:08 -04:00
Ed Minnix
e4f567979a Sync XSS Local 2023-10-12 09:58:08 -04:00
Mathias Vorreiter Pedersen
64fa6c8bbd C++: Remove the hacky flow state since this is no longer needed after #13717. 2023-10-12 13:58:36 +01:00
Geoffrey White
5c0085880f Swift: Change note. 2023-10-12 13:24:10 +01:00
Geoffrey White
e2a8569940 Swift: Clean up indentation. 2023-10-12 13:05:20 +01:00
Geoffrey White
8f852f2e7d Swift: Turn sink models into flow summary models, where appropriate. 2023-10-12 12:57:05 +01:00
erik-krogh
fa1e8ee426 add getACodepoint to the shared Strings library, and use it in NfaUtils 2023-10-12 13:38:19 +02:00
erik-krogh
822ba2ae59 add documentation for the new string methods in ql-language-specification.rst 2023-10-12 13:38:19 +02:00
erik-krogh
116025c569 use the new codePointAt and codePointCount methods instead of regex hacks 2023-10-12 13:38:19 +02:00
Arthur Baars
a4d0ef6350 Add changenote 2023-10-12 13:04:00 +02:00
Arthur Baars
a9a21aa313 Rename DynamicImportExpr::getImport{Attributes => Options} 2023-10-12 13:00:39 +02:00
Arthur Baars
1f4fcf1f31 Rename test files 2023-10-12 13:00:39 +02:00
Arthur Baars
a1c1f7b910 Add tests for deprecated 'assert' syntax 2023-10-12 13:00:39 +02:00
Arthur Baars
f38d2e1b89 Replace 'assert' with 'with' in QL test files 2023-10-12 13:00:39 +02:00
Arthur Baars
c28004f2a6 Rename 'getImportAssertion()' to 'getImportAttributes()' in QL library 2023-10-12 13:00:39 +02:00
Arthur Baars
07172da1bc Add tests for deprecated 'assert' syntax 2023-10-12 12:51:13 +02:00
Arthur Baars
f7b02c01dd Rename getAssertion() to getAttributes() in the extractor 2023-10-12 12:51:13 +02:00
Arthur Baars
1d9ee5da3c Rename 'assertions' to 'attributes' in JS extractor 2023-10-12 12:49:25 +02:00
Erik Krogh Kristensen
59c43c7904 Merge pull request #14410 from erik-krogh/bigger-compilation-cache
use a bigger compilation cache in the compile-queries workflow
2023-10-12 12:35:44 +02:00
Mathias Vorreiter Pedersen
782ecd77b7 C++: Add change notes. 2023-10-12 11:15:41 +01:00
Mathias Vorreiter Pedersen
02f73145d6 Merge pull request #14354 from geoffw0/conversions2
Swift: Improve models for Numeric, RangeReplaceableCollection
2023-10-12 11:13:50 +01:00
Michael B. Gale
75900f05c9 Go: group golang.org dependencies 2023-10-12 10:55:45 +01:00
Michael B. Gale
114a875f3d Go: re-add Dependabot allow list 2023-10-12 10:55:31 +01:00
Arthur Baars
b936e91fe9 Support JS import attributes (previously import assertions) 2023-10-12 11:43:42 +02:00
Mathias Vorreiter Pedersen
6865ce56bc C++: Add an abstract class that can be used to extend 'viableCallable'. 2023-10-12 10:35:36 +01:00
Michael B. Gale
f6570710e7 Merge pull request #14441 from github/dependabot/go_modules/go/extractor/golang.org/x/tools-0.14.0
Bump golang.org/x/tools from 0.13.0 to 0.14.0 in /go/extractor
2023-10-12 10:19:34 +01:00
Tamas Vajk
3b4ea27caf Be more explicit about expected assembly loading exceptions 2023-10-12 11:10:30 +02:00
Tamas Vajk
09c1c715a3 Filter analyzer assemblies from nuget packages 2023-10-12 11:10:30 +02:00
Geoffrey White
7916bd39b4 Swift: Generalize 'write' models. 2023-10-12 09:21:33 +01:00
Geoffrey White
09974b5176 Swift: Extend sink models. 2023-10-12 09:17:04 +01:00
amammad
cc1b8b2e02 fix a issue in fasthttp library, add SSRF inline queires 2023-10-12 09:55:14 +02:00
amammad
b5c4b5e482 add additional taint steps inline tests 2023-10-12 09:45:25 +02:00
Tamas Vajk
8a0dc31ab0 Revert "Add source generators to framework stubs"
This reverts commit 2e8a91efda.
2023-10-12 09:35:08 +02:00
amammad
acee50c9df add inline tests for open redirect,xss, fix some issues in fasthttp.qll 2023-10-12 09:10:16 +02:00
Tamas Vajk
2e8a91efda Add source generators to framework stubs 2023-10-12 08:51:06 +02:00
Tamas Vajk
534ea3ecac Adjust stub generator test to fix the nuget package version 2023-10-12 08:50:32 +02:00
amammad
720565f442 add inline tests for UntrustedFlowSource, and fix some not necessarily flow sources 2023-10-12 08:32:33 +02:00
Owen Mansel-Chan
5fcdb9e112 Merge pull request #14442 from owen-mc/go/test-qldoc-coverage
Fix module name
2023-10-11 23:45:53 +01:00
Owen Mansel-Chan
286271340e Merge branch 'main' into go/automated-mad-coverage-report 2023-10-11 21:31:25 +01:00
Tamas Vajk
e82076d558 Lock SDK version in standalone test 2023-10-11 22:28:47 +02:00
Owen Mansel-Chan
e300440a8b Delete redundant import 2023-10-11 21:28:31 +01:00
Owen Mansel-Chan
dfcdb4ace8 Update CSV to MaD in description for java and C# 2023-10-11 21:09:59 +01:00
Eric Bickle
ee2d8f84de Merge branch 'main' into fix/thread-resource-arithmetic 2023-10-11 13:09:57 -07:00
Owen Mansel-Chan
e5e9c33005 Generated reports 2023-10-11 21:09:55 +01:00
Owen Mansel-Chan
06a600c7fb Set up automated coverage reports for Go
Copied from https://github.com/github/codeql/pull/6148
2023-10-11 21:09:54 +01:00
Eric Bickle
f018d83951 Merge branch 'fix/thread-resource-arithmetic' of https://github.com/ebickle/codeql into fix/thread-resource-arithmetic 2023-10-11 13:09:39 -07:00
Eric Bickle
4cb78ab3c7 Remove change notes 2023-10-11 13:08:56 -07:00
Tamas Vajk
da096553a2 Do not throw exception when working directory cleanup fails 2023-10-11 20:48:17 +02:00
Geoffrey White
0e4cd7f52f Swift: Additional test cases. 2023-10-11 18:37:24 +01:00
amammad
3926fd7333 update tests 2023-10-11 19:27:57 +02:00
Henry Mercer
1a370bfbbe Merge pull request #14443 from github/post-release-prep/codeql-cli-2.15.0
Post-release preparation for codeql-cli-2.15.0
2023-10-11 17:39:04 +01:00
Tamas Vajk
4f31b5a214 C#: Fix stub generator to use framework references from nuget packages 2023-10-11 16:40:09 +02:00
Rasmus Lerchedahl Petersen
a4117538ab Python: update test expectations
This update looks different locally for me,
so this is slightly sketchy..
2023-10-11 16:31:56 +02:00
Tamas Vajk
ada5dcced4 Adjust expected test result in windows standalone test 2023-10-11 16:25:35 +02:00
Tamas Vajk
e718796f23 Separate standalone dependency integration tests by platform 2023-10-11 16:25:35 +02:00
Tamas Vajk
e1b283c14a Exclude nuget packages with prefix runtime. from the references 2023-10-11 16:25:34 +02:00
Tamas Vajk
93380f8cbb Force the nuget download of dotnet framework reference assemblies 2023-10-11 16:25:34 +02:00
Tamas Vajk
12fdb3427b Add integration test targetting .NET 4.8 2023-10-11 16:25:34 +02:00
Tamas Vajk
b8effa3a1c Add integration test listing standalone extracted assemblies 2023-10-11 16:25:34 +02:00
Tamas Vajk
4e2c6ff8d7 C#: Consider possibly restored reference assemblies 2023-10-11 16:25:34 +02:00
Tamas Vajk
4887c697c9 C#: Choose between .NET framework or core DLLs in standalone 2023-10-11 16:25:34 +02:00
github-actions[bot]
ae6af17c74 Post-release preparation for codeql-cli-2.15.0 2023-10-11 14:19:20 +00:00
Tamás Vajk
a31f946d6f Merge pull request #14436 from tamasvajk/void-type-value-type
C#: Include the `void` type in value types
2023-10-11 16:16:06 +02:00
Asger F
7780fe9472 Merge pull request #14435 from asgerf/ruby/port-synced-queries
JS/Ruby: desync two queries and port the Ruby version to ConfigSig-style
2023-10-11 15:50:58 +02:00
Owen Mansel-Chan
b6bf4d04ff Fix module name 2023-10-11 14:47:46 +01:00
dependabot[bot]
442a4fe9cf Bump golang.org/x/tools from 0.13.0 to 0.14.0 in /go/extractor
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 13:12:49 +00:00
Michael B. Gale
7a98afe6ec Merge pull request #14439 from github/mbg/go/workspace-experiments
Go: Move `go.mod` into `extractor` subdirectory
2023-10-11 14:11:07 +01:00
Jean Helie
a4eb3fd997 Merge pull request #14438 from github/jhelie/fix-automodel-extraction-queries
Automodel: Fix automodel extraction queries
2023-10-11 14:30:01 +02:00
Michael B. Gale
7d7d90e7e0 Update expected test output 2023-10-11 13:18:27 +01:00
Michael B. Gale
94b0bc1e35 Move go.mod into extractor directory 2023-10-11 13:10:20 +01:00
Jean Helie
6260768e6a update query message to incoude extensibleType 2023-10-11 14:02:24 +02:00
Jean Helie
c41676a21a update query message to incoude extensibleType 2023-10-11 14:02:12 +02:00
Owen Mansel-Chan
477d8f8b9a Merge pull request #14064 from amammad/amammad-go-NewFileSystemAccess
Go: New File System Access Sinks
2023-10-11 12:58:38 +01:00
Owen Mansel-Chan
96543b8337 Merge pull request #14075 from amammad/amammad-go-JWT
Go: Improved JWT query, JWT decoding without verification
2023-10-11 12:31:43 +01:00
Mathias Vorreiter Pedersen
02915582eb Merge pull request #14432 from MathiasVP/select-the-right-node-for-flow-sources
C++: Use fully converted instructions as the target of modelled functions
2023-10-11 13:04:16 +02:00
Owen Mansel-Chan
8a3aa2c767 Fix formatting 2023-10-11 11:46:31 +01:00
Tamas Vajk
267fd23b26 C#: Include the void type in value types 2023-10-11 12:01:17 +02:00
Tamás Vajk
304d7a4395 Merge pull request #14429 from tamasvajk/relax-metadata_handle-keyset
C#: Remove `keyset` from `metadata_handle` relation
2023-10-11 12:00:11 +02:00
Erik Krogh Kristensen
85bb14f04f Merge pull request #14405 from erik-krogh/tagCall
JS: recognize tagged template literals as `DataFlow::CallNode`
2023-10-11 11:25:34 +02:00
Mathias Vorreiter Pedersen
d54ab640c7 Merge branch 'main' into select-the-right-node-for-flow-sources 2023-10-11 10:17:10 +01:00
Alex Denisov
4133284bc8 Swift: skip declarations marked as unavailable 2023-10-11 10:55:49 +02:00
Tamás Vajk
aa7a667919 Merge pull request #14421 from tamasvajk/csharp/autobuilder-test
C#: Add autobuilder test with global.json
2023-10-11 10:35:53 +02:00
amammad
5e273238ca fix qldoc 2023-10-11 10:33:44 +02:00
Asger F
89bd00a4ec Ruby: port queries to ConfigSig-style 2023-10-11 10:06:19 +02:00
Asger F
6df919a917 JS/Ruby: remove sync between two queries 2023-10-11 10:06:11 +02:00
Rasmus Wriedt Larsen
68d00a829e Merge pull request #14430 from RasmusWL/api-graph-import-star
Python: Better allow `import *` to work with API graphs
2023-10-11 10:03:46 +02:00
Erik Krogh Kristensen
6377e92067 Update javascript/ql/lib/semmle/javascript/dataflow/DataFlow.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-10-11 09:52:48 +02:00
Erik Krogh Kristensen
e99b1598d1 Merge pull request #14433 from erik-krogh/delete-expected
JS: delete an .expected file outside the test directories
2023-10-11 09:44:04 +02:00
Tamás Vajk
c587dbb72a Merge pull request #14428 from tamasvajk/feature/deterministic-conflict-resolution
C#: Make conflicting assembly selection deterministic in standalone
2023-10-11 08:40:50 +02:00
amammad
4499048d8e better query quality thanks to owen 2023-10-10 23:41:45 +02:00
amammad
877605d31b change c to C for fixing the qhelp error :) 2023-10-10 23:35:05 +02:00
amammad
b6968d9260 fix beego tests 2023-10-10 23:30:26 +02:00
amammad
8d6f985aea fix afero additional step and tests 2023-10-10 23:24:04 +02:00
amammad
db9f74bc78 fix tests 2023-10-10 23:15:07 +02:00
amammad
82483a206e fix tests 2023-10-10 23:14:11 +02:00
amammad
38b0ed8176 fix issues according to codereview 2023-10-10 23:12:30 +02:00
erik-krogh
ccd06c78b9 delete an .expected file outside the test directories 2023-10-10 21:35:19 +02:00
Alex Eyers-Taylor
3ac3169278 CPP: Add some range analysis cases 2023-10-10 20:01:14 +01:00
Robert Marsh
484d020c39 Merge branch 'main' into rdmarsh2/swift/autoclosure-cfg 2023-10-10 18:47:13 +00:00
Eric Bickle
7a4382fb69 Merge branch 'main' into fix/thread-resource-arithmetic 2023-10-10 09:38:16 -07:00
Eric Bickle
80c8259e34 Remove unnecessary AdditionalValueStep check 2023-10-10 09:35:45 -07:00
Mathias Vorreiter Pedersen
f1cefc8900 Merge branch 'main' into select-the-right-node-for-flow-sources 2023-10-10 17:35:37 +01:00
Mathias Vorreiter Pedersen
496f190d70 C++: Accept test changes. 2023-10-10 16:45:31 +01:00
Mathias Vorreiter Pedersen
512c10ec59 C++: Use the fully converted expression when converting models to dataflow nodes. 2023-10-10 16:45:25 +01:00
Rasmus Wriedt Larsen
ee75b104eb Python: Add change-note 2023-10-10 17:45:11 +02:00
Rasmus Wriedt Larsen
72d0dcdaba Python: Workaround for module level items from import * not being LocalSourceNodes 2023-10-10 17:45:11 +02:00
Rasmus Wriedt Larsen
6521e5165c Python: Extend import * with plain use
(no calls or anything)
2023-10-10 17:45:11 +02:00
yoff
f1266a3e81 Merge pull request #14417 from github/tausbn/python-add-flow-for-assignment-expressions 2023-10-10 17:09:20 +02:00
Tamas Vajk
4c6073ebce C#: Remove keyset from metadata_handle relation 2023-10-10 16:49:48 +02:00
Tamas Vajk
2378e31c5e C#: Make conflicting assembly selection deterministic 2023-10-10 16:32:02 +02:00
Michael B. Gale
be16cb4190 Merge pull request #14415 from github/mbg/go/dependabot-config 2023-10-10 14:36:34 +01:00
Michael B. Gale
ce905bba41 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-10-10 14:21:20 +01:00
Tamás Vajk
bc1c22cda2 Merge pull request #14425 from tamasvajk/standalone/nuget-download-lazy
C#: Only download nuget.exe if there are packages.config files
2023-10-10 14:28:43 +02:00
Rasmus Wriedt Larsen
2d947a4f53 Merge pull request #13781 from maikypedia/maikypedia/python-unsafe-deserialization
Python: Add unsafe deserialization sinks (CWE-502)
2023-10-10 13:30:38 +02:00
Owen Mansel-Chan
542d5a2451 Merge pull request #14414 from owen-mc/go/fix-incorrect-integer-conversion-performance-regression
Go: Change MaxValueState API to get architecture bit size
2023-10-10 11:27:18 +01:00
Jeroen Ketema
3b777c2764 C++: Rewrite cpp/cgi-xss to not use default taint tracking
Also add a test that demonstrates that we need to look at inidrect expressions
and not direct ones.
2023-10-10 11:56:39 +02:00
amammad
242f7e1c53 update pg :) 2023-10-10 11:42:32 +02:00
Tamas Vajk
1872a937d5 C#: Only download nuget.exe if there are packages.config files 2023-10-10 11:39:39 +02:00
Owen Mansel-Chan
fd9c1d30f9 Remove argument that is always one value 2023-10-10 10:35:04 +01:00
Owen Mansel-Chan
cf0411e7e2 Change MaxValueState API to get architecture bit size
This fixes a performance regression, though it is not clear why.
2023-10-10 10:35:02 +01:00
Taus
8e1bb4b364 Python: Accept moved consistency test results
Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com>
2023-10-10 09:22:36 +00:00
amammad
18edef6ea4 add better-sqlite3 tests 2023-10-10 11:20:17 +02:00
amammad
bbeb7b39d7 add better-sqlite3 2023-10-10 11:17:04 +02:00
Geoffrey White
0d562d4874 Swift: Autoformat. 2023-10-10 10:01:37 +01:00
Geoffrey White
48ee4add08 Merge branch 'main' into sqlpathinject3 2023-10-10 08:54:44 +01:00
Geoffrey White
0374414798 Swift: Fix TupleElement syntax. 2023-10-10 08:31:50 +01:00
Michael Nebel
5c44f8bbad Merge pull request #14370 from michaelnebel/java/enablethreatmodels
Java: Enable threat models for most Java queries.
2023-10-10 09:25:47 +02:00
Tamas Vajk
538df1bb6d C#: Add autobuilder test with global.json 2023-10-10 09:11:40 +02:00
Erik Krogh Kristensen
5cb3543899 Merge pull request #14420 from github/dependabot/cargo/ql/regex-1.10.0
Bump regex from 1.9.6 to 1.10.0 in /ql
2023-10-10 08:43:46 +02:00
dependabot[bot]
0e09420e7b Bump regex from 1.9.6 to 1.10.0 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.6 to 1.10.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.6...1.10.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-10 03:56:00 +00:00
Remco Vermeulen
76e56cdac7 Adjust query severities 2023-10-09 12:52:09 -07:00
Erik Krogh Kristensen
4489e2bf28 Merge pull request #14403 from erik-krogh/dDEps
All: delete outdated deprecations
2023-10-09 21:04:55 +02:00
amammad
2579791f51 fix examples 2023-10-09 19:00:55 +02:00
Jeroen Ketema
fe60269fdd Merge pull request #14416 from jketema/revert-cgi-xss-rewrite
Revert "C++: Rewrite `cpp/cgi-xss` to not use default taint tracking"
2023-10-09 18:52:54 +02:00
Jeroen Ketema
6ff8e06ace Revert "C++: Rewrite cpp/cgi-xss to not use default taint tracking"
This reverts commit b6132d2a0f.
2023-10-09 16:30:21 +02:00
Robert Marsh
dab9a859f3 Merge branch 'main' into rdmarsh2/swift/autoclosure-cfg 2023-10-09 14:21:28 +00:00
Taus
e8ac258994 Python: Add missing flow for AssignmentExpr nodes
Also extend the tests surrounding this construct to be a bit more comprehensive.

Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com>
2023-10-09 14:16:03 +00:00
Michael B. Gale
f186b93c93 Add dependabot configuration for Go dependencies 2023-10-09 15:14:17 +01:00
Robert Marsh
8af727734e Merge pull request #13909 from rdmarsh2/rdmarsh2/swift/for-in
Swift: dataflow for `for-in` loops
2023-10-09 10:00:27 -04:00
Michael B. Gale
ebd640da04 Merge pull request #14391 from github/mbg/go/update-newer-go-version-needed
Go: Fix version detection and test for `newer-go-version-needed`
2023-10-09 14:47:37 +01:00
Erik Krogh Kristensen
625e889c62 Merge pull request #14339 from erik-krogh/range-printing
JS/PY/RB/Java: escape unicode chars in overly-large-range
2023-10-09 14:22:38 +02:00
Geoffrey White
57e32b47b7 Merge pull request #14386 from geoffw0/swiftperf
Swift: defaultImplicitTaintRead performance improvement
2023-10-09 13:07:11 +01:00
Geoffrey White
62b0ebf2fe Merge pull request #14407 from geoffw0/grdbsinks
Swift: Add sinks for the GRDB database library to swift/hardcoded-key
2023-10-09 12:58:17 +01:00
erik-krogh
e1b2f81f43 Revert "update doc example to not use isBarrierGuard"
This reverts commit 28f8c1cc11.
2023-10-09 13:29:41 +02:00
erik-krogh
ef63d9dd47 use a bigger compilation cache in the compile-queries workflow 2023-10-09 13:21:37 +02:00
Michael Nebel
cf3a62d201 Java: Address review comments. 2023-10-09 13:06:59 +02:00
Anders Schack-Mulligen
4a0ab4a050 Merge pull request #14402 from Marcono1234/marcono1234/MemberRefExpr-getReceiverExpr
Java: Add predicate `MemberRefExpr::getReceiverExpr`
2023-10-09 13:01:36 +02:00
Anders Schack-Mulligen
8c6a1be070 Merge pull request #14401 from Marcono1234/marcono1234/ClassInstanceExpr-type-argument-doc
Java: Adjust `ClassInstanceExpr` type argument predicates docs
2023-10-09 13:01:18 +02:00
Robert
e38ba27a65 Merge pull request #14408 from github/robertbrignull/telemetryLevel-docs
Update about-telemetry-in-codeql-for-visual-studio-code.rst to mention telemtry.telemetryLevel
2023-10-09 11:38:33 +01:00
Robert
ada331588f Update about-telemetry-in-codeql-for-visual-studio-code.rst to mention telemtry.telemetryLevel 2023-10-09 11:04:52 +01:00
Jeroen Ketema
f7bd801e00 Merge pull request #11716 from jketema/rewrite-cgi-xss
C++: Rewrite `cpp/cgi-xss` to not use default taint tracking
2023-10-09 11:26:14 +02:00
Mathias Vorreiter Pedersen
a1d417d8b6 Merge pull request #14385 from alexet/ir-debug-perf
CPP: Improve performance of IR debugging
2023-10-09 11:21:03 +02:00
Tony Torralba
0258dd4fed Merge pull request #14379 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-10-09 10:06:22 +02:00
erik-krogh
a7ab9fd93b add change-notes 2023-10-09 09:43:06 +02:00
erik-krogh
f48b47c656 JavaScript: add import that populate the shared abstract classes 2023-10-09 09:14:55 +02:00
erik-krogh
57c757c0a6 Ruby: delete outdated deprecation in test code 2023-10-09 09:14:55 +02:00
erik-krogh
194f918c0b Python: delete various outdated deprecations 2023-10-09 09:14:55 +02:00
erik-krogh
c2942b37a7 JS: delete various outdated deprecations 2023-10-09 09:14:55 +02:00
erik-krogh
e0fefce2a3 Ruby: delete various deprecated predicates 2023-10-09 09:14:54 +02:00
erik-krogh
e3e8f3d7c4 Java: delete various outdated deprecations 2023-10-09 09:14:54 +02:00
erik-krogh
689eda4dae CPP: delete the deprecated AnalysedString class 2023-10-09 09:14:54 +02:00
erik-krogh
1c9f59e491 Python:delete deprecated files modelling web frameworks 2023-10-09 09:14:54 +02:00
erik-krogh
0d992a3d1f delete old deprecated aliases of various regex libraries 2023-10-09 09:14:54 +02:00
erik-krogh
28f8c1cc11 update doc example to not use isBarrierGuard 2023-10-09 09:14:51 +02:00
github-actions[bot]
7c332a31a8 Add changed framework coverage reports 2023-10-09 00:16:19 +00:00
amammad
ad2631202d fix comments 2023-10-08 21:32:04 +02:00
amammad
6c8cc79b4d v1 2023-10-08 21:24:54 +02:00
Geoffrey White
8a7325268a Swift: Change note. 2023-10-07 23:19:24 +01:00
Geoffrey White
c492b5f2dd Swift: Model sinks. 2023-10-07 23:19:09 +01:00
Geoffrey White
8bf6fd67d1 Swift: Add a test for GRDB hardcoded key sinks. 2023-10-07 23:07:32 +01:00
erik-krogh
4bc4e0845d delete the deprecated isBarrierGuard predicate from the shared dataflow library, and its uses 2023-10-07 21:48:49 +02:00
erik-krogh
d261cec3cd add change-note 2023-10-07 15:41:08 +02:00
Marcono1234
f3e5045259 Java: Add predicate MemberRefExpr::getReceiverExpr 2023-10-07 14:53:07 +02:00
erik-krogh
56e9eda2b9 fix performance by caching getArgument 2023-10-07 13:06:45 +02:00
Marcono1234
2c0dcd3a2d Java: Adjust ClassInstanceExpr type argument predicates docs
The type arguments which these predicates have as result are for the
type of the created instance.

Previously the documentation said "provided to the constructor", which
is misleading / incorrect. Type arguments provided to the constructor
are specified directly after the `new` keyword:
```
class C {
    <T> C() {
    }
}

new <String> C();
```

And those are not part of the results of these predicates.
2023-10-07 03:43:58 +02:00
Eric Bickle
4dca396106 Add change notes for ThreadResourceAbuse ArithExpr fix 2023-10-06 14:31:37 -07:00
Eric Bickle
000c1f7ec8 Java: Flow taint through ArithExpr for ThreadResourceAbuse
Ensure that tainted values flow through arithmetic operations when
checking for ThreadResourceAbuse vulnerabilities.

For example, multiplying 'number of seconds' by 1000 as an input
to Thread.Sleep, which accepts milliseconds, is a common scenario.
2023-10-06 14:24:37 -07:00
Robert Marsh
30a9656ebb Swift: change note for autoclosure cfg 2023-10-06 20:19:35 +00:00
Robert Marsh
cb749bd973 Swift: CFG for normal autoclosure exprs 2023-10-06 20:14:49 +00:00
Robert Marsh
661da76838 Swift: add function call autoclosure tests 2023-10-06 19:49:33 +00:00
erik-krogh
7ca0996912 add a taint-tracking tests for calls to tagged template strings 2023-10-06 21:39:42 +02:00
erik-krogh
9b6501787a add API-graph test for the new tagged template calls 2023-10-06 21:25:34 +02:00
Geoffrey White
0918e50b05 Swift: Switch pragma to inline_late. 2023-10-06 20:23:51 +01:00
erik-krogh
18e6a5491c recognize tagged templates as DataFlow::CallNode 2023-10-06 21:14:00 +02:00
erik-krogh
951ed01d6b combine the library-tests/CallGraphs/FullTest tests into one file 2023-10-06 20:57:09 +02:00
Geoffrey White
7c28528eac Swift: Change note. 2023-10-06 18:26:21 +01:00
Geoffrey White
676179620a Swift: Get sqlite3 C API results (model Data.withUnsafeBytes, Data.withUnsafeMutableBytes, permit flow out of collections at the query sink) 2023-10-06 18:26:20 +01:00
Geoffrey White
bc9d8cc40f Swift: Get another SQLite.swift result. 2023-10-06 18:26:20 +01:00
Geoffrey White
691665fca8 Swift: Add models for SQLite.swift. 2023-10-06 18:26:19 +01:00
Geoffrey White
bece2e8689 Swift: Add models for sqlite3 C API. 2023-10-06 18:26:19 +01:00
Geoffrey White
9a628d4165 Swift: Add test for sqlite3 C API. 2023-10-06 18:26:18 +01:00
Geoffrey White
8006996f46 Swift: Add test for SQLite.swift. 2023-10-06 18:26:18 +01:00
Geoffrey White
9ad1749957 Swift: Hide OpenExistentialExpr from the AST instead. 2023-10-06 17:55:29 +01:00
Geoffrey White
76db1c5c8b Swift: Add the same code to the AST test as well. 2023-10-06 17:13:49 +01:00
Robert Marsh
85587413d0 Swift: fix QLDoc formatting for getSequence 2023-10-06 15:29:56 +00:00
Robert Marsh
c281db6b5b Swift: improve QLDoc for getSequence 2023-10-06 15:23:58 +00:00
Robert Marsh
ec292ca4e1 Swift: Split for-each change note into two lines 2023-10-06 15:21:55 +00:00
Ian Lynagh
d34b85cf03 Kotlin: Remove 1.4 compatibility
We now only build with >= 1.5
2023-10-06 15:17:32 +01:00
amammad
7d36c23d59 fix qhelp and PascalCase issues 2023-10-06 16:14:10 +02:00
Jeroen Ketema
b6132d2a0f C++: Rewrite cpp/cgi-xss to not use default taint tracking 2023-10-06 16:11:13 +02:00
Michael Nebel
dca39348ab Java: Add change note. 2023-10-06 15:09:16 +02:00
Michael Nebel
fb10af9042 Jave: Remove the local threat model from the default configuration. 2023-10-06 14:58:48 +02:00
amammad
7d73808d60 fix a test mistake, add comments for JWT extension points 2023-10-06 13:31:09 +02:00
amammad
aa127b1662 do review improvements 2023-10-06 13:22:43 +02:00
Michael B. Gale
0b13da35eb Go: Update newer-go-version-needed test
- Use a version that is accepted by Go tooling
- Run is no longer successful with Go 1.21
2023-10-06 11:57:47 +01:00
Michael B. Gale
01a1d814f4 Do not call EmitNewerGoVersionNeeded for v1.21+ 2023-10-06 11:57:37 +01:00
Michael B. Gale
c63f6807c4 Go: Run go version with GOTOOLCHAIN=local 2023-10-06 11:57:26 +01:00
Michael B. Gale
76781e5d75 Go: Add GoVersionInfo type
Refactors `tryReadGoDirective` to return this instead of a pair.
This will make it easier to return multiple versions.
2023-10-06 11:57:08 +01:00
Mathias Vorreiter Pedersen
a08356979f Merge pull request #14382 from MathiasVP/deduplicate-why
C++: Project away `why` to prevent tuple duplication in `Buffer.qll`
2023-10-06 12:52:58 +02:00
Geoffrey White
b0c7964ea6 Swift: Add the same code to the CFG test as well. 2023-10-06 10:07:52 +01:00
Geoffrey White
b3185e9519 Swift: Expand the test case. 2023-10-06 09:43:33 +01:00
Mathias Vorreiter Pedersen
eb3f1967a5 Merge pull request #14365 from MathiasVP/disable-flow-through-pointer-arith-for-size
C++: Disable size-flow through pointer arithmetics in `cpp/invalid-pointer-deref`
2023-10-06 10:14:31 +02:00
Asger F
97b3ebe385 Merge pull request #14380 from asgerf/js/amd-range
JS: Add AmdModuleDefinition::Range
2023-10-05 21:05:28 +02:00
Mathias Vorreiter Pedersen
b231b1ccaf Merge pull request #14384 from MathiasVP/handle-instructions-in-reverse-flow 2023-10-05 20:26:38 +02:00
Robert Marsh
bbec4082c0 Merge pull request #14312 from geoffw0/sqlpathinject2
Swift: Add sinks for sqlite3 and SQLite.swift to swift/cleartext-storage-database
2023-10-05 14:08:55 -04:00
Geoffrey White
66637e8c03 Swift: Autoformat. 2023-10-05 18:53:30 +01:00
Geoffrey White
81d4ec1e98 pragma node 2023-10-05 18:30:50 +01:00
Alex Eyers-Taylor
c79ec8c37a CPP: Improve performance of IR debugging 2023-10-05 17:35:52 +01:00
Geoffrey White
fdcc6b482d Swift: Simplify allowImplicitRead slightly. 2023-10-05 16:42:43 +01:00
Geoffrey White
7ddece1560 Swift: Update .expected after merge. 2023-10-05 16:20:56 +01:00
Geoffrey White
6bea7f89a8 Merge branch 'main' into sqlpathinject2 2023-10-05 16:15:37 +01:00
Cornelius Riemenschneider
d3a1dbc0c7 Merge pull request #14381 from github/criemen/add-bazel-dbschemes
Add skeleton bazel files for accessing the dbschemes.
2023-10-05 16:53:45 +02:00
Geoffrey White
e31ca58a2f Swift: Post-merge fix. 2023-10-05 15:45:22 +01:00
Geoffrey White
17894db501 Merge branch 'main' into conversions2 2023-10-05 15:33:05 +01:00
Mathias Vorreiter Pedersen
20900dafc0 C++: Handle reverse flow when 'nodeTo' is an instruction. 2023-10-05 16:28:57 +02:00
Michael Nebel
96f93cefba UNDO AGAIN: Add local threat models. 2023-10-05 16:16:00 +02:00
Ian Lynagh
e124a70380 Merge pull request #14378 from igfoo/igfoo/compr
Kotlin: Some compression simplification
2023-10-05 13:16:00 +01:00
Ian Lynagh
0cf309b64e Merge pull request #14369 from igfoo/igfoo/remove_unused
Kotlin: Remove some unused code
2023-10-05 13:15:20 +01:00
Mathias Vorreiter Pedersen
2f39ab1977 C++: Project away 'why' to prevent tuple duplication in 'Buffer.qll'. 2023-10-05 13:32:52 +02:00
Geoffrey White
e225ea6bef Swift: Remove redundant code. 2023-10-05 11:14:54 +01:00
Geoffrey White
dcd88100f0 Swift: Minor corrections, update parse.expected. 2023-10-05 11:11:52 +01:00
Geoffrey White
446416f1ab Swift: Change note. 2023-10-05 11:06:11 +01:00
Geoffrey White
a1512c8af0 Swift: This should always have been private. 2023-10-05 11:06:11 +01:00
Geoffrey White
9bdddabd8a Swift: Avoid changing interfaces we don't need to. Improve QLDoc. 2023-10-05 10:45:59 +01:00
Geoffrey White
fddda0368c Swift: Add PotentialRegexEval / doesEvaluate mechanism. 2023-10-05 10:45:59 +01:00
Geoffrey White
fa10dbea9f Swift: Support mode flags through NSString.CompareOptions. 2023-10-05 10:45:59 +01:00
Geoffrey White
a052a4e385 Swift: Update to a proper data flow config so we can add implicit reads from arrays at the sink. 2023-10-05 10:45:58 +01:00
Geoffrey White
cdc0d1fff1 Swift: Check the options flag contains .regularExpression. 2023-10-05 10:45:58 +01:00
Geoffrey White
fe4ef48844 Swift: Rename some predicates and make them work on dataflow nodes. 2023-10-05 10:26:08 +01:00
Owen Mansel-Chan
602bb4083c Merge pull request #13949 from owen-mc/go/change-flowstate-for-incorrect-integer-conversion
Go: Improve incorrect integer conversion
2023-10-05 09:59:36 +01:00
Mathias Vorreiter Pedersen
333e607536 Merge pull request #14376 from MathiasVP/unique-in-hasIRRepresentationOfIndirectInstruction 2023-10-05 10:22:54 +02:00
Chris Smowton
399fab0c6c Merge pull request #14322 from smowton/smowton/admin/add-buildless-diagnostic-expectations
Add Java buildless diagnostic expectations
2023-10-05 09:02:02 +01:00
Cornelius Riemenschneider
96edc1d349 Add skeleton bazel files for accessing the dbschemes. 2023-10-05 09:00:38 +02:00
Asger F
315272839d JS: Change note 2023-10-05 08:13:43 +02:00
Robert Marsh
a402bfcfb0 Swift: update for-in change note 2023-10-04 20:05:11 +00:00
Robert Marsh
5dd7c14d36 Swift: add getSequence back to ForEachStmt 2023-10-04 20:05:00 +00:00
Asger F
162c477236 JS: Add AmdModuleDefinition::Range 2023-10-04 20:38:37 +02:00
Geoffrey White
b5ff104a00 Swift: Naive model for regular expression evaluations through NSString and StringProtocol methods. 2023-10-04 19:19:29 +01:00
Geoffrey White
5263cccefc Swift: Bite the bullet and make 'regex' a non-optional field of the regex test, so that we can be confident where we fail to identify them. 2023-10-04 19:19:28 +01:00
Geoffrey White
24c385b1da Swift: Expand and correct regex tests. 2023-10-04 19:19:28 +01:00
Mathias Vorreiter Pedersen
e38f65981e C++: Accept test changes. 2023-10-04 20:12:42 +02:00
Ian Lynagh
4d3863461e Kotlin: Determine our compression method later
This way, we already have a logger at the point that we want to log a
warning.
2023-10-04 18:32:12 +01:00
Ian Lynagh
cc63bb55c2 Kotlin: Change how we handle not supporting Brotli
This removes the potential for impossible cases.
2023-10-04 18:32:11 +01:00
Mathias Vorreiter Pedersen
75c74d50f9 C++: Use 'unique' in 'hasIRRepresentationOfIndirectInstruction' similar to how it's done in 'hasIRRepresentationOfIndirectOperand'. 2023-10-04 19:00:33 +02:00
Edward Minnix III
8e653d01a8 Merge pull request #14127 from egregius313/egregius313/java/mad/localuserinput
Java: Convert implementations of `LocalUserInput` to Models-as-Data
2023-10-04 12:55:44 -04:00
Robert Marsh
9c3b72cf3f Swift: remove TODO comment 2023-10-04 15:59:12 +00:00
Robert Marsh
00068d6157 Merge branch 'main' into rdmarsh2/swift/for-in
Fix conflict in AST test output
2023-10-04 15:58:36 +00:00
Ed Minnix
e2a14c7616 Add note about results to change note 2023-10-04 11:08:40 -04:00
Owen Mansel-Chan
11b92608c7 Add ".md" to the change note filename 2023-10-04 15:49:10 +01:00
Owen Mansel-Chan
ab07a38c25 Use ternary type for architecture bit size 2023-10-04 15:43:51 +01:00
Owen Mansel-Chan
015519e9e0 Combine isBoundFor and isBoundFor2 2023-10-04 15:31:00 +01:00
Owen Mansel-Chan
cd40663ca4 Address lots of review comments 2023-10-04 15:24:56 +01:00
Henry Mercer
74368540ae Merge pull request #14375 from github/release-prep/2.15.0
Release preparation for version 2.15.0
2023-10-04 15:18:55 +01:00
github-actions[bot]
9fe993bec3 Release preparation for version 2.15.0 2023-10-04 14:15:27 +00:00
Robert Marsh
b5f1296cc2 Swift: Use getFullyConverted in CFG generation
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-10-04 09:44:48 -04:00
Robert Marsh
f7ca8e5b39 Merge pull request #14224 from rdmarsh2/rdmarsh2/swift/nil-coalescing-cfg
Swift: CFG and data flow for nil coalescing operator
2023-10-04 09:43:31 -04:00
Owen Mansel-Chan
4122fd881f Move UpperBoundCheckGuard 2023-10-04 14:17:00 +01:00
Mathias Vorreiter Pedersen
843e9ad254 C++: Add more QLDoc. 2023-10-04 14:37:05 +02:00
Michael Nebel
40e63a63e2 Java: Re-factor most queries and tests to use threat models. 2023-10-04 14:01:58 +02:00
amammad
0f5dd40ff1 fix beego tests 2023-10-04 13:41:26 +02:00
amammad
0c2275ddb1 fix Gin tests 2023-10-04 12:57:15 +02:00
Owen Mansel-Chan
3703c5626f Merge pull request #14364 from owen-mc/go/improve-output-of-check-formatting-in-makefile
Go: improve output of check formatting in makefile
2023-10-04 11:54:40 +01:00
amammad
c3a21daf83 fix Echo tests 2023-10-04 12:54:34 +02:00
amammad
06ec3bbbb5 fix beego tests 2023-10-04 12:52:59 +02:00
Rasmus Wriedt Larsen
9c02b4f21c Merge pull request #14289 from microsoft/jb1/16-cryptography-models-libraries-and-queries-migration
16 cryptography models libraries and queries migration
2023-10-04 12:27:59 +02:00
Ian Lynagh
ec3f08037c Kotlin: Remove some unused code 2023-10-04 11:15:47 +01:00
Owen Mansel-Chan
bd2c49fcf0 Improve message 2023-10-04 11:07:19 +01:00
Owen Mansel-Chan
567052f35e Keep line breaks in list of files formatting 2023-10-04 10:23:29 +01:00
Henry Mercer
99646ba2a3 Merge pull request #14367 from github/henrymercer/rc-3.11-mergeback
Merge `rc/3.11` into `main`
2023-10-04 10:05:38 +01:00
Michael Nebel
f0fb065446 Java: Opt-in the SQL injection query to use threat model flow sources. 2023-10-04 10:51:07 +02:00
Michael Nebel
5fd6dc3b87 Java: Opt-in the XSS query to use threat model flow sources. 2023-10-04 10:48:09 +02:00
Michael Nebel
ecd8561104 C#: Undo poor mans quoting fix as it conflicts with the permanent solution. 2023-10-04 09:19:55 +02:00
BD
31550b22b6 Merge branch 'main' into enable-gokit-by-default 2023-10-04 12:42:09 +05:30
Ed Minnix
581d410304 Add change note 2023-10-03 22:29:00 -04:00
Ed Minnix
e122d81336 Add new source kinds for threat modeling 2023-10-03 22:29:00 -04:00
Edward Minnix III
a1d3667f1c Refactor Hudson file methods to MaD 2023-10-03 22:28:59 -04:00
Edward Minnix III
3a75c0fde7 Refactor DatabaseInput to MaD 2023-10-03 22:28:59 -04:00
Edward Minnix III
655470f3da Refactor EnvInput to MaD 2023-10-03 22:28:47 -04:00
Josh Brown
de2e8b0b12 explicit "this" qualifiers 2023-10-03 16:13:54 -07:00
Josh Brown
ad86e576a4 autoformat 2023-10-03 13:40:17 -07:00
Josh Brown
b683a3caf8 Merge branch 'main' into jb1/16-cryptography-models-libraries-and-queries-migration 2023-10-04 07:24:29 +11:00
Robert Marsh
06da5fd05c Swift: move import to make codegen happy 2023-10-03 17:23:00 +00:00
Geoffrey White
d258f69ab0 Merge pull request #14329 from geoffw0/sinks
Swift: Update summary queries
2023-10-03 17:39:00 +01:00
Geoffrey White
34b33e1577 Merge pull request #14328 from geoffw0/debugdesc
Swift: Model .description, .debugDescription more generally
2023-10-03 17:37:22 +01:00
Geoffrey White
c518f39a0c Merge pull request #14357 from geoffw0/commandinject3
Swift: Replace two additional taint steps with implicit reads
2023-10-03 17:34:59 +01:00
amammad
22c4b5113d do gofmt 2023-10-03 18:29:34 +02:00
Henry Mercer
da92da2204 Bump minor versions of packs we regularly release 2023-10-03 16:31:23 +01:00
Henry Mercer
f3847b3f51 Merge branch 'main' into henrymercer/rc-3.11-mergeback 2023-10-03 16:30:23 +01:00
Robert Marsh
cdef0796e3 Swift: QLDoc for NilCoalescingExpr.qll 2023-10-03 15:00:03 +00:00
Robert Marsh
497f0aa8ab Swift: sync test files and update expectation 2023-10-03 14:57:04 +00:00
Michael Nebel
8224f172b2 Merge pull request #14257 from michaelnebel/java/threatmodelsources
Java: Introduce a class of dataflow nodes for the threat modeling.
2023-10-03 16:10:49 +02:00
Mathias Vorreiter Pedersen
9a139ea903 C++: Accept test changes. 2023-10-03 15:58:35 +02:00
Mathias Vorreiter Pedersen
57d3f3f482 C++: Actually propagate the 'isBarrier1' or 'isBarrier2' predicates to the dataflow configurations. 2023-10-03 15:58:24 +02:00
Mathias Vorreiter Pedersen
9df5e43fae C++: Block flow through indirect flow through pointer-arithmetic instructions when following flow for the allocation size. 2023-10-03 15:31:50 +02:00
Owen Mansel-Chan
7c8233aade Add change note 2023-10-03 13:35:26 +01:00
Tamás Vajk
df988e46da Merge pull request #14351 from tamasvajk/csharp/standalone-compilation
C#: Extract compilation DB entity in standalone mode
2023-10-03 14:21:21 +02:00
Owen Mansel-Chan
5433636d49 Fix formatting errors in files included in qhelp 2023-10-03 12:48:03 +01:00
Owen Mansel-Chan
2a52455619 Improve output of check-formatting in Makefile
The list of files that would change when reformatted is now printed.
Also, parsing errors now make the check fail.
2023-10-03 12:48:01 +01:00
Ian Lynagh
c365f459fd Merge pull request #14355 from igfoo/igfoo/lang-vers
Kotlin: Specify language version when compiling for old compilers
2023-10-03 11:33:23 +01:00
Bharadwaj Machiraju
53a291aeae Remove GoKit from untrusted flow sources test 2023-10-03 15:39:52 +05:30
Bharadwaj Machiraju
6c8ae55a68 Enable GoKit module into the default list 2023-10-03 15:39:52 +05:30
Mathias Vorreiter Pedersen
dbe3bd0c50 Merge pull request #14360 from MathiasVP/promote-use-after-free-and-double-free
C++: Promote `cpp/double-free` and `cpp/use-after-free` to Code Scanning
2023-10-03 11:52:23 +02:00
Michael Nebel
fcbd301de8 Java: Address review comments. 2023-10-03 10:36:45 +02:00
Mathias Vorreiter Pedersen
b6ed9ccfda C++: Add change notes. 2023-10-03 09:33:40 +02:00
Mathias Vorreiter Pedersen
7084dc1a88 C++: Promote 'cpp/use-after-free' and 'cpp/double-free' to Code Scanning. 2023-10-03 09:22:47 +02:00
Mathias Vorreiter Pedersen
5632dd5e46 Merge pull request #14275 from alexet/fix-use-after-free-fp
CPP: Fix some use after free FPs.
2023-10-03 09:16:42 +02:00
Michael Nebel
5b949b19f7 Java: Cleanup threat model taxanomy to align with the EDR. 2023-10-03 09:16:39 +02:00
Michael Nebel
5c700afa27 Java: Add some threat model dataflow tests. 2023-10-03 09:16:39 +02:00
Michael Nebel
537965c0e8 Java: Add some testfiles. 2023-10-03 09:16:39 +02:00
Michael Nebel
2055d5492c Java: Let RemoteFlowSource and LocalUserInput extends SourceNode and fine grain the LocalUserInput threat models. 2023-10-03 09:16:38 +02:00
Michael Nebel
9a112dde66 Java: Introduce a class of dataflow nodes for the threat modeling. 2023-10-03 09:16:38 +02:00
Geoffrey White
0f1711fe1e Swift: Test insertMany. 2023-10-02 23:04:07 +01:00
Geoffrey White
bbd3c66d5a Swift: Update for CollectionContent. 2023-10-02 20:32:24 +01:00
Geoffrey White
81b358a711 Swift: Replace a similar additional taint step in another query. 2023-10-02 20:19:40 +01:00
Geoffrey White
27bdee8058 Swift: Replace additional taint step with implict read.
Now that we have array content, this is a more principled approach than having a special case data step.
2023-10-02 20:19:30 +01:00
Robert Marsh
ca722dc74c Swift: add NilCoalescingTest node to CFG
Fixes an issue where a nil-coalescing operation used in a boolean
context would result in no control flow out of the default operand of
the nil-coalescing operator.
2023-10-02 18:07:11 +00:00
Ian Lynagh
513a39f0b4 Kotlin: Specify language versino when compiling for old compilers
Otherwise builds with Kotlin 2 won't work with older compilers.
2023-10-02 18:14:01 +01:00
Ian Lynagh
f3c5c01ec5 Kotlin: Drop support for 1.4.32
We never claimed to support anything < 1.5.0, and compiling with
-language-version 1.4 fails as it's not meant to support sealed classes.

If we build 1.4.32 with -language-version 1.5 using a 2.0 compiler,
then the resulting plugin also fails.
2023-10-02 17:29:10 +01:00
Geoffrey White
db5e0ff7a8 Swift: Autoformat. 2023-10-02 16:06:38 +01:00
Tom Hvitved
2684a22484 Merge pull request #14255 from hvitved/dataflow/perf-improvements
Data flow: Performance improvements
2023-10-02 16:37:24 +02:00
Mathew Payne
a23904ca39 Add taint tests 2023-10-02 15:09:11 +01:00
Mathew Payne
3ab5fd5ca4 Add RestFramework handler kwargs 2023-10-02 14:58:21 +01:00
Tamas Vajk
b2514b3c69 Adjust expected test output 2023-10-02 13:35:16 +02:00
Geoffrey White
3d552d7d5d Swift: Simplify FloatPoint model now that it works to do so. 2023-10-02 11:59:26 +01:00
Geoffrey White
3265d49a98 Swift: Remove duplicate row. 2023-10-02 11:59:26 +01:00
Geoffrey White
f83456a398 Swift: Change note. 2023-10-02 11:59:25 +01:00
Geoffrey White
c61edc13e7 Swift: Model RangeReplaceableCollection initializers. 2023-10-02 11:59:25 +01:00
Geoffrey White
0c534b69eb Swift: Extend Numeric models. 2023-10-02 11:59:25 +01:00
Geoffrey White
2863a14cd1 Swift: Add more tests for Arrays. 2023-10-02 11:59:24 +01:00
Geoffrey White
df1bc1a597 Swift: Add more tests for Numerics. 2023-10-02 11:59:24 +01:00
Tamas Vajk
de45a9b137 C#: Extract compilation DB entity in standalone mode 2023-10-02 12:54:49 +02:00
Rasmus Wriedt Larsen
e7384da162 Merge pull request #14341 from GeekMasher/py-django-restframework
Python - Add support for RestFramework ModelViewSet functions
2023-10-02 10:50:11 +02:00
Henry Mercer
0dd3837c31 Merge pull request #14345 from github/adityasharad/atm/remove-js-ml-tests
ATM/JS: Remove test workflow
2023-10-02 09:44:46 +01:00
Tom Hvitved
4fa93a077c Address review comments 2023-10-02 09:03:12 +02:00
Erik Krogh Kristensen
5dccc8d33e Merge pull request #14348 from github/dependabot/cargo/ql/regex-1.9.6
Bump regex from 1.9.5 to 1.9.6 in /ql
2023-10-02 08:34:59 +02:00
dependabot[bot]
a86b010504 Bump regex from 1.9.5 to 1.9.6 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.5 to 1.9.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.5...1.9.6)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 03:33:25 +00:00
amammad
95363455af fix tests, and review suggestions. 2023-09-30 22:50:08 +10:00
amammad
f0f60c3b7d move JWT.qll to experimental 2023-09-30 22:30:30 +10:00
amammad
8ef969fcb9 fix a mistake: replaces tests after gofmt 2023-09-30 22:16:59 +10:00
Aditya Sharad
cf98b84279 ATM/JS: Remove test workflow
These queries are deprecated, and upcoming nightly CLIs will no longer support their experimental functionality. To avoid test breakage, remove this workflow.

The code and tests can be cleaned up as future follow-up.
2023-09-29 15:19:45 -07:00
Sarita Iyer
178b5c1c30 Merge pull request #14282 from github/saritai/update-language-display-names
Update language display names
2023-09-29 11:15:56 -04:00
Sarita Iyer
f29063bca3 Update codeql-for-java.rst 2023-09-29 10:44:27 -04:00
Rasmus Wriedt Larsen
3162033d56 Python: Make tests run for django rest framework 2023-09-29 16:21:04 +02:00
Sarita Iyer
b6b554f384 Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-09-29 10:07:22 -04:00
Sarita Iyer
c0653adc85 remove trailing space 2023-09-29 09:57:48 -04:00
Sarita Iyer
925d8e21ce Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-09-29 09:45:34 -04:00
Mathew Payne
41bb8377d9 Add change notes 2023-09-29 14:44:36 +01:00
Mathew Payne
19c93b0228 Add RestFramework tests 2023-09-29 14:41:57 +01:00
Michael Nebel
81e4cddf9f Merge pull request #14333 from michaelnebel/csharp/windowsunittests
C#: Also run extractor unit tests on a windows runner.
2023-09-29 15:28:26 +02:00
Rasmus Lerchedahl Petersen
177db998c7 Python: add change note 2023-09-29 15:28:08 +02:00
Mathew Payne
eb9b32473e Add support for ModelViewSet functions 2023-09-29 14:26:39 +01:00
Rasmus Lerchedahl Petersen
ed3ffde5e6 Python: modules are now possibly non-unique
We should consider if this is the right way..
2023-09-29 15:10:19 +02:00
Rasmus Lerchedahl Petersen
be506c64ba Python: update test-expectations
These are semantic differences.
They generally look good, except perhaps
we should exclude illegal package names?
(It passes `legalShortName`, though).
2023-09-29 15:10:19 +02:00
Rasmus Lerchedahl Petersen
4f35a62583 Python: broaden search for imports
This now finds vulnerabilities in
https://github.com/github/field-security-codeql/issues/100
2023-09-29 15:10:19 +02:00
Rasmus Lerchedahl Petersen
d9854eb409 Python: Add QLDoc 2023-09-29 15:10:19 +02:00
Rasmus Lerchedahl Petersen
1d4832cbfe python: allow namespace packages as packages
remove the logic around isPotentialPackage
2023-09-29 15:10:19 +02:00
Rasmus Lerchedahl Petersen
362cf107a4 python: add tests for module import
- `--max-import-depth=3` to give points-to a chance
- `not_root` dir to force namespace package logic
- add usage in `example.py` to get files extracted
2023-09-29 15:10:19 +02:00
yoff
dbecb1bd0f Merge pull request #14070 from yoff/python/promote-nosql-query
Python: promote nosql query
2023-09-29 14:21:22 +02:00
Rasmus Wriedt Larsen
9b73bbfc31 Python: Add keyword argument support
and a fair bit of refactoring
2023-09-29 13:54:21 +02:00
Rasmus Wriedt Larsen
d6d13f84a9 Python: -> NoSQL in QLDocs 2023-09-29 13:54:21 +02:00
Rasmus Wriedt Larsen
3676262313 Python: Clean trailing whitespace 2023-09-29 13:54:21 +02:00
Rasmus Wriedt Larsen
d7ad5a0f23 Python: List NoSQL injection sinks 2023-09-29 13:54:21 +02:00
Rasmus Wriedt Larsen
16e1a00e88 Python: NoSQLInjection -> NoSqlInjection 2023-09-29 13:52:51 +02:00
Rasmus Lerchedahl Petersen
97696680e6 Python: require dict sinks be dangerous. 2023-09-29 13:45:23 +02:00
Rasmus Lerchedahl Petersen
f3a01612e8 Python: rename flow states
Close to being a revert of
3043633d9c
but with slightly shorter names and added comments.
2023-09-29 13:23:36 +02:00
Rasmus Lerchedahl Petersen
e1708054a4 Python: fix QL alert 2023-09-29 12:06:51 +02:00
Anders Schack-Mulligen
efb49fcd3e Merge pull request #14336 from aschackmull/java/switch-rule-stmt-cfg
Java: Fix CFG for case rule statements.
2023-09-29 12:02:48 +02:00
Rasmus Lerchedahl Petersen
2d845e3e55 Python: nicer paths
turn "the long jump" that would end up
straight at the argument into a short jump
that ends up at the dictionary being written to.
Dataflow takes care of the rest of the path.
2023-09-29 12:02:16 +02:00
Rasmus Lerchedahl Petersen
74d6f37467 Python: update meta query TaintSinks 2023-09-29 12:02:16 +02:00
yoff
2e028a41ee Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-09-29 11:32:51 +02:00
Michael Nebel
c25113ae46 C#: Execute tests via the bash shell to ensure that we stop on error. 2023-09-29 09:35:43 +02:00
Michael Nebel
3fd083b249 C#: Enable the stub generator tests. 2023-09-29 09:35:43 +02:00
Michael Nebel
086588982e C#: Ensure that always use the same newline symbol for stub generation. 2023-09-29 09:35:42 +02:00
Michael Nebel
e42741e8ed C#: Also run extractor unit tests on a windows runner. 2023-09-29 09:33:33 +02:00
Stephan Brandauer
d7beda79ab Merge pull request #14197 from github/kaeluka/framework-mode-source-candidates
Java: Framework mode source candidates
2023-09-28 21:09:54 +02:00
Ian Lynagh
30d7f0cf0a Merge pull request #14334 from igfoo/igfoo/ext-frag
Kotlin: Handle IrExternalPackageFragment properly for more external entities
2023-09-28 20:01:52 +01:00
erik-krogh
5d4b542995 escape unicode chars in overly-large-range 2023-09-28 20:16:09 +02:00
Ian Lynagh
7f5f25c362 Merge pull request #14338 from igfoo/igfoo/dedupe
Kotlin: Differentiate 2 error messages
2023-09-28 17:56:53 +01:00
Alex Eyers-Taylor
6b0ae0f312 CPP: Remove unned argument from use-after-free 2023-09-28 17:53:32 +01:00
amammad
97c27ac11b revert SqlInjection.ql changes 2023-09-29 01:36:00 +10:00
amammad
58f4cd77dc add TypeORM to javascript.qll file
add tests
improvement on comments
2023-09-29 01:23:22 +10:00
amammad
e3c89011a9 perfomed gofmt on fasthttp.go 2023-09-29 00:57:17 +10:00
amammad
8d47a7b21d Update python/ql/lib/semmle/python/security/dataflow/PathInjectionQuery.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-09-28 18:13:34 +03:30
Stephan Brandauer
fdbc553029 Java: Automodel Framework mode: no longer skip non-public methods 2023-09-28 16:17:44 +02:00
Ian Lynagh
e9482fb096 Kotlin: Differentiate 2 error messages 2023-09-28 14:59:21 +01:00
Ian Lynagh
5db283e86a Kotlin: Fix comment 2023-09-28 14:26:02 +01:00
yoff
bc17bf69f4 Merge pull request #14317 from yoff/python/fix-regex-string-part-locations
Python: Improve computation of regex fragments inside string parts
2023-09-28 14:35:27 +02:00
Anders Schack-Mulligen
15e1098791 Java: Add change note. 2023-09-28 14:28:24 +02:00
Rasmus Lerchedahl Petersen
3043633d9c Python: Some renaming of flow states 2023-09-28 14:24:49 +02:00
Anders Schack-Mulligen
94556078f1 Java: Add guards logic for SwitchExpr default cases. 2023-09-28 14:21:04 +02:00
Rasmus Lerchedahl Petersen
d5b64c5ff2 Python: update test expectations 2023-09-28 14:20:30 +02:00
Anders Schack-Mulligen
917a15647e Java: Fix CFG for rule statements. 2023-09-28 14:19:36 +02:00
Anders Schack-Mulligen
922a4e8ddf Java: Add failing test 2023-09-28 14:15:56 +02:00
Rasmus Lerchedahl Petersen
a8e0023f39 Python: forgot to list framework 2023-09-28 13:42:33 +02:00
Rasmus Lerchedahl Petersen
2a7b593285 Python: Fix QL alerts 2023-09-28 13:35:29 +02:00
Ian Lynagh
261ae4ea4d Kotlin: Handle IrExternalPackageFragment properly for more external entities 2023-09-28 12:12:18 +01:00
Rasmus Lerchedahl Petersen
eb1be08bce Python: split modelling 2023-09-28 12:54:06 +02:00
Rasmus Lerchedahl Petersen
2a739b3b7a Python: rename module 2023-09-28 12:54:05 +02:00
Rasmus Lerchedahl Petersen
9682c8218a Python: rename file 2023-09-28 12:54:05 +02:00
yoff
c2b63830f1 Apply suggestions from code review
Claim conversions do not execute inputs in order to remove interaction with `py/unsafe-deserialization`.

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-09-28 12:40:37 +02:00
Rasmus Lerchedahl Petersen
d90630aa66 Python: fix query file 2023-09-28 12:34:10 +02:00
Owen Mansel-Chan
832e78c518 Unify approach to architecture bit size in isSink2 2023-09-28 11:24:48 +01:00
Koen Vlaswinkel
eb2db59127 Merge pull request #14330 from github/koesie10/csharp-mad-parentheses
C#: Fix parentheses in model editor queries
2023-09-28 12:14:52 +02:00
Rasmus Lerchedahl Petersen
3fb579eaff Python: add test for type tracking 2023-09-28 12:14:12 +02:00
Owen Mansel-Chan
cf5d1e36fe Add QLDoc 2023-09-28 11:02:04 +01:00
Owen Mansel-Chan
e0b61b2d68 Reduce the number of UpperBoundChecks
No need to have a separate class for each state
being blocked.
2023-09-28 11:00:43 +01:00
Owen Mansel-Chan
c0b579c49f Improve tests 2023-09-28 11:00:41 +01:00
Owen Mansel-Chan
7d34ce4dea Rewrite with different flow state 2023-09-28 11:00:34 +01:00
Rasmus Lerchedahl Petersen
37a4f35650 Python: further rename 2023-09-28 11:49:42 +02:00
yoff
8156fa9a4d Apply naming suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-09-28 11:47:10 +02:00
Asger F
0d96ed8aee Merge pull request #14305 from asgerf/shared/flow-state-inout-barriers
Shared: add in/out barriers with flow state
2023-09-28 11:07:23 +02:00
Koen Vlaswinkel
3f3c662a7d C#: Fix parentheses in model editor queries
The MaD format and the Java model editor queries use parentheses around
the method parameter types, but `parameterQualifiedTypeNamesToString`
returns the parameter types without parentheses. This adds the
parentheses to the result of `getParameterTypes` to ensure consistency
between the Java and C# queries.
2023-09-28 10:51:36 +02:00
Anders Schack-Mulligen
5feb2f7622 Merge pull request #14321 from aschackmull/shared/filesystem
All languages: Use shared FileSystem library and minor regex performance improvement.
2023-09-28 10:51:05 +02:00
Rasmus Wriedt Larsen
f3acc89900 Python: Accept .expected 2023-09-28 10:41:16 +02:00
Koen Vlaswinkel
10231e99ce Merge pull request #14199 from github/koesie10/add-java-model-editor-queries
Java: Add VS Code model editor queries
2023-09-28 10:13:13 +02:00
Koen Vlaswinkel
0f4f98787c Merge pull request #14200 from github/koesie10/add-csharp-model-editor-queries
C#: Add VS Code model editor queries
2023-09-28 10:12:57 +02:00
Geoffrey White
8e9ca7bc26 Swift: Improve RegexEvals.ql and summary regex reporting. 2023-09-28 08:31:45 +01:00
Anders Schack-Mulligen
80f00bcb0b FileSystem: Improve regex by only matching once instead of 3x. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
cfd08f23a5 FileSystem: Fix qldoc. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
20cbab9e8f C#: Minor simplification. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
68d05eb342 Ruby: Minor simplification. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
855c89667d JavaScript: Use shared FileSystem library. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
7bc0c54a41 QL: Use shared FileSystem library. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
73521ca16b Python: Use shared FileSystem library. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
a08fe5b8b1 Go: Use shared FileSystem library. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
2548939849 C++: Use shared FileSystem library. 2023-09-28 08:58:55 +02:00
Anders Schack-Mulligen
653844cc46 Java: Use shared FileSystem library. 2023-09-28 08:58:55 +02:00
Robert Marsh
77fd9172fa Swift: Fix extra param in downgrade script 2023-09-27 20:55:08 +00:00
Robert Marsh
64e4c1ea6d Swift: remove another table from downgrade script 2023-09-27 20:52:06 +00:00
Robert Marsh
d71d6b265a Swift: remove table from downgrade properties 2023-09-27 20:50:21 +00:00
Robert Marsh
4799ba0069 Swift: yet another downgrade script fix 2023-09-27 20:47:45 +00:00
Sarita Iyer
9609cafab4 Update annotations-in-java.rst 2023-09-27 16:27:32 -04:00
Robert Marsh
188ad6a571 Swift: another attempt at fixing downgrade script 2023-09-27 20:07:26 +00:00
Robert Marsh
9975a18a29 Swift: Hopefully fix codegen test failure 2023-09-27 20:06:13 +00:00
Sarita Iyer
8802395587 Merge branch 'saritai/update-language-display-names' of https://github.com/github/codeql into saritai/update-language-display-names 2023-09-27 15:01:44 -04:00
Sarita Iyer
deb47e34b8 fix underlines 2023-09-27 15:01:42 -04:00
Geoffrey White
bb1720d50a Swift: Fix test after merge. 2023-09-27 19:31:04 +01:00
Geoffrey White
936f846b09 Merge branch 'main' into implicitflow 2023-09-27 19:27:07 +01:00
Geoffrey White
e4e4c5be61 Swift: Make QL-for-QL happy. 2023-09-27 19:12:04 +01:00
Geoffrey White
98b2ef0a2f Swift: Autoformat. 2023-09-27 19:09:23 +01:00
Robert Marsh
a7a50cfc9a Swift: more downgrade script fixes 2023-09-27 18:01:17 +00:00
Alex Eyers-Taylor
2860c0c0d4 CPP: Move test into correct file. 2023-09-27 18:42:26 +01:00
Geoffrey White
87696e58ab Swift: Break the 'taint reach' metric off into its own query (it's expensive to compute). 2023-09-27 18:34:55 +01:00
Geoffrey White
ec573bdda8 Swift: Clean up and improve consistency. 2023-09-27 18:34:40 +01:00
Geoffrey White
ee83ad730b Swift: Add a summary query for regex evals. 2023-09-27 18:34:32 +01:00
Geoffrey White
9f1332bdb2 Swift: Add a summary query for query sinks. 2023-09-27 18:34:32 +01:00
Sarita Iyer
16fb482767 Merge branch 'main' into saritai/update-language-display-names 2023-09-27 13:20:22 -04:00
Sarita Iyer
ee9873fdce add kotlin to Java language guides 2023-09-27 13:16:58 -04:00
Benjamin Rodes
25203db4e7 Removing 'security' tags from all queries. 2023-09-27 12:43:51 -04:00
Owen Mansel-Chan
84c0c09673 Always use getters for FlowState 2023-09-27 17:13:58 +01:00
Owen Mansel-Chan
72ca6b8c5f Add isSigned to IntegerParsers 2023-09-27 17:13:56 +01:00
Owen Mansel-Chan
c796cba02f Improve UpperBoundCheckGuard.isBoundFor 2023-09-27 17:13:55 +01:00
Geoffrey White
e6dc4d324f Swift: Change note. 2023-09-27 16:58:59 +01:00
Geoffrey White
b6f0160760 Swift: Effect on recently added tests. 2023-09-27 16:52:31 +01:00
Geoffrey White
6a2911ae01 Swift: Make the tests more accurate. 2023-09-27 16:39:55 +01:00
Geoffrey White
086002f7cb Swift: Add a general model for description, debugDescription. 2023-09-27 16:39:54 +01:00
Geoffrey White
f12e45b243 Swift: Delete the specific description, debugDescription models. 2023-09-27 16:39:54 +01:00
amammad
7d5bbc3b1e put each new sink in its own framework 2023-09-28 01:02:05 +10:00
Alexander Eyers-Taylor
79b044d670 Merge pull request #14271 from github/post-release-prep/codeql-cli-2.14.6
Post-release preparation for codeql-cli-2.14.6
2023-09-27 15:19:12 +01:00
Michael Nebel
39499142a6 Merge pull request #14327 from michaelnebel/csharp/disablestubgentests
C#: Disable unit tests (need to fix line ending issues).
2023-09-27 16:06:33 +02:00
Taus
ad86aed363 Merge pull request #14326 from github/tausbn/clean-up-nodeinfo
Shared: Clean up `NodeInfo` in shared extractor
2023-09-27 15:55:27 +02:00
amammad
f2505eada8 fix two bugs, make package path more neat 2023-09-27 23:35:56 +10:00
Michael Nebel
cb1647cd02 C#: Disable unit tests (need to fix line ending issues). 2023-09-27 15:35:48 +02:00
amammad
32f41de3be Merge branch 'main' into amammad-go-fastHttp 2023-09-27 23:33:51 +10:00
amammad
9598bb5a68 stash 2023-09-27 23:22:29 +10:00
Tom Hvitved
56f8d5d57d Merge pull request #14229 from hvitved/ruby/splat-flow-performance
Ruby: Improve performance of flow through (hash) splats
2023-09-27 14:41:33 +02:00
Asger F
ba1f8766aa Shared: update PartialPathNode accordingly 2023-09-27 14:38:28 +02:00
Asger F
6792592a15 Shared: add late checks for stateful in/out barriers 2023-09-27 14:38:28 +02:00
Asger F
6d6cdf89ce Java: add a failing test for stateful in/out barriers 2023-09-27 14:38:21 +02:00
Taus
ff35f9fb8c Shared: Clean up NodeInfo in shared extractor
I was perusing the shared extractor the other day, when I came across
the `NodeInfo` struct. I noticed that the `fields` and `subtypes` fields
on this struct had two seemingly identical ways of expressing the same
thing: `None` and `Some(empty)` (where `empty` is respectively the empty
map and the empty vector). As far as I can tell, there's no semantic
difference in either case, so we can just elide the option type entirely
and use the empty value directly. This has the nice side-effect of
cleaning up some of the other code.
2023-09-27 12:29:07 +00:00
Ian Lynagh
f24abee285 Merge pull request #14323 from igfoo/igfoo/supportk2
Kotlin: Claim to support Kotlin 2
2023-09-27 13:28:57 +01:00
Michael Nebel
13d3e973b1 Merge pull request #14319 from michaelnebel/csharp/stubunittest
C#: Base a few more query tests on stubs.
2023-09-27 14:03:58 +02:00
Michael Nebel
30e1925025 Merge pull request #14325 from michaelnebel/csharp/stubgentests
C#: Add a couple of stub generator unit tests
2023-09-27 13:56:50 +02:00
amammad
c6ad358751 fix package FPs, fix additioanlstep issue 2023-09-27 21:11:07 +10:00
amammad
c78f390128 add go generate support, upgrade JWT.qll 2023-09-27 20:17:31 +10:00
Tom Hvitved
c570083163 Ruby: Improve performance of flow through (hash) splats 2023-09-27 11:49:31 +02:00
Michael Nebel
53c947dd9d C#: Add a couple of unit tests. 2023-09-27 11:44:17 +02:00
Michael Nebel
4c3cbad8fe C#: Prepare stub generator for unit testing and expose internals to the Test project. 2023-09-27 11:44:17 +02:00
Harry Maclean
dc2acf5a39 Merge pull request #14090 from hmac/splat-flow-4
Ruby: More splat flow (alternative)
2023-09-27 10:22:57 +01:00
Michael Nebel
577ea50ec9 C#: Base ConstantComparison and PossibleLossOfPrecision tests on stubs. 2023-09-27 09:35:57 +02:00
Michael Nebel
68fd25cd9c C#: Base DeadStoreOfLocal test on stubs. 2023-09-27 09:35:57 +02:00
Michael Nebel
f7daa863e2 Merge pull request #14318 from michaelnebel/csharp/readonlyfieldsinstubs
C#: Add readonly modifier to fields and constant values.
2023-09-27 09:28:55 +02:00
amammad
bb30689a6e added the go generate commands for depstubber 2023-09-27 06:41:09 +10:00
amammad
73803eaac9 fix tests
add missed afero sinks
2023-09-27 06:27:05 +10:00
Robert Marsh
50521f7b45 Swift: fix ql reference in downgrade script 2023-09-26 20:08:23 +00:00
amammad
cea44e2bee added the go generate commands for depstubber 2023-09-27 05:22:52 +10:00
amammad
3febbec64e fix qldoc and review suggestions 2023-09-27 05:16:35 +10:00
Rasmus Lerchedahl Petersen
8ade9ed164 Python: fix inconsistency
Since we calculate the end column by offset,
we must believ that the end line is the same
as the start line.
2023-09-26 21:02:14 +02:00
Rasmus Lerchedahl Petersen
db95eade64 Python: accept improved test output 2023-09-26 20:58:51 +02:00
Rasmus Lerchedahl Petersen
35f28c832a Python: small refactor (reviewer suggestion) 2023-09-26 20:55:35 +02:00
Rasmus Lerchedahl Petersen
f5059a6918 Python: fix computation at part boundaries 2023-09-26 20:51:15 +02:00
Rasmus Lerchedahl Petersen
cdf1db09bd Python: add test for part boundaries 2023-09-26 20:50:08 +02:00
Rasmus Lerchedahl Petersen
73aa302bd2 Python: only expose lengths of quote and prefix 2023-09-26 20:45:24 +02:00
Tom Hvitved
e7a3dc83bc Data flow: Performance improvements 2023-09-26 20:42:03 +02:00
Rasmus Lerchedahl Petersen
d25b93d944 Python: fix ql alerts 2023-09-26 20:33:24 +02:00
amammad
ad999a0174 fix qldoc and tests 2023-09-27 04:21:49 +10:00
Robert Marsh
81ee932e62 Swift: Fix db types in downgrade script for for-in 2023-09-26 18:03:08 +00:00
Michael B. Gale
539199bb40 Merge pull request #14314 from taigrr/main
update go tools version from v0.11.1 to v0.13.0
2023-09-26 17:33:52 +01:00
Ian Lynagh
497d48bd63 Kotlin: Claim to support Kotlin 2
We don't fully support it yet, but if we don't claim to support it then
Kotlin fails early.
2023-09-26 17:24:11 +01:00
Robert Marsh
293400a623 Swift: change note for for-in dataflow 2023-09-26 15:13:05 +00:00
Robert Marsh
ae1072e09f Merge branch 'main' into rdmarsh2/swift/for-in 2023-09-26 15:12:46 +00:00
Geoffrey White
49d47a3da4 Merge pull request #14209 from geoffw0/regexport
Swift: Port regex mode flag fix from Python to Swift
2023-09-26 15:41:10 +01:00
Chris Smowton
a123f62a38 Add Java buildless diagnostic expectations 2023-09-26 15:25:58 +01:00
Geoffrey White
eb78d401da Swift: Add to change note. 2023-09-26 14:56:32 +01:00
Asger F
6e869452b5 Shared: remove pragma[inline] implied by bindingset 2023-09-26 15:42:24 +02:00
Asger F
c7e892fa8e Shared: change note 2023-09-26 15:24:29 +02:00
Michael Nebel
5e3ae0afac C#: Update .NET and ASP.NET stubs. 2023-09-26 15:09:10 +02:00
Michael Nebel
839ef7fef5 C#: Add compile time constants for some types of fields in the stub generator. 2023-09-26 15:06:30 +02:00
Anders Schack-Mulligen
e6d832c7e5 Merge pull request #14297 from aschackmull/java/additional-steps-and-nodes
Java: Add support for additional nodes, read steps, and store steps for QL models and model ThreadLocal.initialValue
2023-09-26 14:50:37 +02:00
Geoffrey White
6b0271d4e5 Swift: Address review comment. 2023-09-26 13:40:46 +01:00
Geoffrey White
7a450c9941 Swift: Change note for mode flags. 2023-09-26 13:40:46 +01:00
Geoffrey White
33a5ba04cb Swift: Add explanatory comments and (minimal) support for additional regex mode flags. 2023-09-26 13:40:46 +01:00
Michael Nebel
d00ff9665c C#: Update .NET and ASP.NET stubs. 2023-09-26 12:28:23 +02:00
Michael Nebel
82f5a02729 C#: Add readonly modifier to fields during stub generation. 2023-09-26 12:28:00 +02:00
Rasmus Lerchedahl Petersen
d10b181d89 Python: add change note 2023-09-26 12:13:07 +02:00
Rasmus Lerchedahl Petersen
c1ebde4288 Python: improve location computation 2023-09-26 12:08:50 +02:00
Rasmus Lerchedahl Petersen
aa64390af7 Python: add more tests 2023-09-26 10:54:45 +02:00
Stephan Brandauer
26267b72d4 driveby: bug fix in automodel alert sink util 2023-09-26 10:46:56 +02:00
Stephan Brandauer
53b3755e50 remove now-unused getIndex predicate
Co-authored-by: @tausbn <tausbn@github.com>
2023-09-26 10:46:42 +02:00
Stephan Brandauer
9f7f2ab70e remove redundant fromSource calls
Co-authored-by: @tausbn <tausbn@github.com>
2023-09-26 10:45:54 +02:00
Stephan Brandauer
32502d5e2c Java: Automodel, remove erroneousEndpoints predicate from production queries 2023-09-26 10:45:54 +02:00
Stephan Brandauer
5d608acd0b Java: Automodel framework mode, fix query string 2023-09-26 10:45:54 +02:00
Stephan Brandauer
e71563e540 Java: Automodel fr mode: remove superfluous module 2023-09-26 10:45:54 +02:00
Stephan Brandauer
2be5b1955f Java: Automodel fr mode: add support for qualifier source candidates 2023-09-26 10:45:53 +02:00
Stephan Brandauer
dee387622e Java: Automodel: rename overloadable -> overridable 2023-09-26 10:45:53 +02:00
Stephan Brandauer
6121faf671 Java: Automodel: fr mode: connect new endpoints with MaD models 2023-09-26 10:45:53 +02:00
Stephan Brandauer
7f084c90c5 Java: automodel fr mode: add overloadable parameter candidates 2023-09-26 10:45:53 +02:00
Stephan Brandauer
8ea8123bd5 Java: Automodel ql-for-ql 2023-09-26 10:45:53 +02:00
Stephan Brandauer
86e50699dc Java: Automodel format 2023-09-26 10:45:53 +02:00
Stephan Brandauer
9e6eebb926 Java: Automodel: drive-by: remove unused message logic for candidate extraction 2023-09-26 10:45:53 +02:00
Stephan Brandauer
0d53600b12 Java: automodel fr mode: update test expectations 2023-09-26 10:45:53 +02:00
Stephan Brandauer
32a538b64c Java: automodel fr mode: add mad output to extraction metadata 2023-09-26 10:45:53 +02:00
Stephan Brandauer
b2578f0e30 Java: Automodel Fr Mode: add return value endpoint type 2023-09-26 10:45:52 +02:00
Stephan Brandauer
8cc6466c68 Java: Automodel: add extensibleType metadata to framework mode 2023-09-26 10:45:52 +02:00
Tom Hvitved
60b7840389 Merge pull request #14315 from hvitved/csharp/dependency-manager-cleanup
C#: Rely on CLI to cleanup scratch dir
2023-09-26 10:08:12 +02:00
Tom Hvitved
486afd9f29 Merge pull request #14310 from hvitved/csharp/stub-generator-test
C#: Add stub generator integration test
2023-09-26 10:07:45 +02:00
Anders Starcke Henriksen
464add4e16 Merge pull request #14246 from github/starcke/release-automodel-0.0.3
Release automodel queries version 0.0.3
2023-09-26 09:41:33 +02:00
Tom Hvitved
c06833758f Merge pull request #14313 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-09-26 09:26:31 +02:00
Tom Hvitved
ef699e5195 C#: Rely on CLI to cleanup scratch dir 2023-09-26 09:15:19 +02:00
Tom Hvitved
5adacb8477 Merge pull request #14311 from hvitved/csharp/dependency-manager-generated-files
C#: Expose generated files in `DependencyManager`
2023-09-26 08:15:32 +02:00
Tai Groot
013452c52d fix vendor 2023-09-25 18:45:37 -07:00
Tai Groot
79dcb9e814 update go tools version from v0.11.1 to v0.13.0 2023-09-25 18:38:24 -07:00
github-actions[bot]
1e57595d2c Add changed framework coverage reports 2023-09-26 00:15:37 +00:00
Robert Marsh
811c33b016 Swift: finish downgrade script for for-in PR 2023-09-25 20:23:43 +00:00
Robert Marsh
92fdb7a35f Swift: finish upgrade script for for-in PR 2023-09-25 20:13:52 +00:00
Geoffrey White
f9a617c714 Swift: Change note. 2023-09-25 20:31:00 +01:00
Geoffrey White
51ed824adf Swift: Add more SQLite.swift models. 2023-09-25 20:30:59 +01:00
Geoffrey White
6be01eac04 Swift: Add implict read steps for dictionary content. 2023-09-25 20:30:59 +01:00
Geoffrey White
4350060b0f Swift: Add SQLite.swift models. 2023-09-25 20:30:59 +01:00
Geoffrey White
839b9635b9 Swift: Effect of fixing string interpolation bug. 2023-09-25 20:30:58 +01:00
Geoffrey White
16ae637238 Swift: Add sqlite3 models. 2023-09-25 20:30:48 +01:00
Geoffrey White
4245a38de9 Swift: Add SQLite.swift and sqlite3 C API test cases for swift/cleartext-storage-database. 2023-09-25 20:30:48 +01:00
Joe Farebrother
7c230d61a8 Merge pull request #13882 from joefarebrother/csharp-insecure-direct-object-ref
C#: Add query for Insecure Direct Object Reference
2023-09-25 20:29:54 +01:00
amammad
fd0d194a8a add changenote 2023-09-26 05:26:00 +10:00
amammad
b7f874d1f1 fix tests, better afero support! 2023-09-26 05:04:25 +10:00
Tom Hvitved
a045e6b029 C#: Expose generated files in DependencyManager 2023-09-25 20:16:58 +02:00
Tom Hvitved
4183fbe7cb Merge pull request #14295 from hvitved/csharp/lambda-type-flow
C#: Improve lambda dispatch using type flow
2023-09-25 19:19:51 +02:00
amammad
c5faddc2a4 remove fasthttp in favor or fasthttp framework 2023-09-26 03:01:51 +10:00
amammad
9f9c9e0e5e fix issues according to codereview 2023-09-26 02:06:57 +10:00
amammad
e239d763dc Merge branch 'main' into amammad-go-NewFileSystemAccess 2023-09-26 02:04:59 +10:00
Tom Hvitved
4262fd5a48 C#: Add stub generator integration test 2023-09-25 17:02:11 +02:00
Joe Farebrother
d7c1be40d9 Fix codescanning alert by tweaking imported modules 2023-09-25 15:47:05 +01:00
Joe Farebrother
3efbbb3645 Elaborate 'guess' to 'guess or determine' 2023-09-25 15:44:40 +01:00
Michael Nebel
2d87d76576 Merge pull request #14272 from michaelnebel/csharp/externalapi
C#: Minor improvements to the ExternalApi implementation.
2023-09-25 16:35:58 +02:00
amammad
c3213e4de3 upgrade tests 2023-09-26 00:02:45 +10:00
Michael Nebel
e997a7c923 C#: Address review comment. 2023-09-25 14:59:18 +02:00
Tom Hvitved
f02d281188 Merge pull request #14309 from hvitved/csharp/stub-generator-output
C#: Make `GenerateStubs` return list of generated output
2023-09-25 14:46:49 +02:00
Tom Hvitved
ae06040a48 Address review comments 2023-09-25 14:30:08 +02:00
amammad
c1398f2b60 fix stub 2023-09-25 21:48:10 +10:00
yoff
c9976cf724 Merge pull request #14307 from yoff/python/inline-regex-location-tests
Python: switch regex location tests to inline expectations
2023-09-25 13:37:48 +02:00
Tom Hvitved
4bfd6771b4 C#: Make GenerateStubs return list of generated output 2023-09-25 13:27:50 +02:00
Tamás Vajk
831e50ccda Merge pull request #14306 from tamasvajk/standalone/remove-runtime-nuget-packages-2
C#: Remove legacy runtime packages from extraction references
2023-09-25 13:23:43 +02:00
amammad
875817222c fix qlDOC one missed mistake 2023-09-25 21:20:33 +10:00
Ian Lynagh
56a5c7876c Merge pull request #14220 from igfoo/igfoo/light_comments
Kotlin: Extract LighterAST comments as well as PSI comments
2023-09-25 11:50:55 +01:00
Rasmus Lerchedahl Petersen
417907b36d Python: switch to inline expectations 2023-09-25 11:44:56 +02:00
Tamas Vajk
ed83f59c23 C#: Remove legacy runtime packages from extraction references 2023-09-25 11:34:16 +02:00
Anders Schack-Mulligen
06cb277eb0 Merge pull request #14299 from aschackmull/dataflow/more-defaults
Dataflow: Make use of defaults for language-specific hooks.
2023-09-25 11:19:44 +02:00
Joe Farebrother
df5fcc92e7 Apply suggestions from docs review
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
2023-09-25 10:13:56 +01:00
Rasmus Wriedt Larsen
05ab28f11d autoformat 2023-09-25 10:35:18 +02:00
Rasmus Wriedt Larsen
db7b1eea55 Merge branch 'main' into maikypedia/python-unsafe-deserialization 2023-09-25 10:29:18 +02:00
Rasmus Wriedt Larsen
f515559e56 Python: Sort Frameworks.qll 2023-09-25 10:25:43 +02:00
Rasmus Wriedt Larsen
a45e10d64f Python: Slight rewrite of numpy test
To use positional argument for allow_pickle
2023-09-25 10:25:11 +02:00
Rasmus Wriedt Larsen
56d99fbd8a Add numpy reference 2023-09-25 10:24:53 +02:00
Rasmus Wriedt Larsen
d1caa75053 Python: Fix format for pandas.read_pickle 2023-09-25 10:24:27 +02:00
Koen Vlaswinkel
ced95e0f45 Java: Split API name column into separate columns 2023-09-25 10:16:59 +02:00
Asger F
d501856519 Update DataFlowImpl.qll copies 2023-09-25 10:05:29 +02:00
Koen Vlaswinkel
922ff7bb10 C#: Remove unnecessary import 2023-09-25 10:03:18 +02:00
Koen Vlaswinkel
dc6def79d0 C#: Split API name column into separate columns 2023-09-25 10:02:34 +02:00
Asger F
cfed7e9b6c Shared: add in/out barriers with flow state 2023-09-25 09:58:49 +02:00
Anders Schack-Mulligen
aa2c7a79d6 Dataflow: Add bindingset 2023-09-25 08:55:09 +02:00
amammad
0eb0c238f3 stash 2023-09-23 20:28:34 +10:00
Tom Hvitved
8f35c99f16 C#: Improve lambda dispatch using type flow 2023-09-23 11:41:03 +02:00
Tom Hvitved
09063c5189 C#: Port and extend type dispatch tests from Java 2023-09-23 11:37:51 +02:00
amammad
bafe357500 V3 2023-09-23 18:22:43 +10:00
amammad
0c40223192 v1 2023-09-23 18:17:49 +10:00
Robert Marsh
8ce79e6be8 Swift: for-in downgrade script 2023-09-22 19:12:27 +00:00
Ian Lynagh
7b779ca9d0 Merge pull request #14186 from igfoo/igfoo/kotlin-expected
Kotlin: Regenerate expected test output
2023-09-22 19:40:26 +01:00
Robert Marsh
325d6f738c Swift: add expr types to for-in upgrade script 2023-09-22 18:14:37 +00:00
Robert Marsh
5b77e7db8a Swift: for-in upgrade script passing CFG test 2023-09-22 17:44:45 +00:00
Ian Lynagh
56b9fa8e9c Kotlin: Avoid using a possibly-throwing method 2023-09-22 18:15:28 +01:00
Geoffrey White
ab6e8b9ecd Merge pull request #14252 from geoffw0/protocol3
Swift: Improve getABaseType implementions
2023-09-22 18:13:12 +01:00
Harry Maclean
2214caef4b Ruby: Identify named graphql params as sources 2023-09-22 17:54:55 +01:00
Geoffrey White
2c9433c621 Merge pull request #13946 from geoffw0/arraysteptest
Swift: Models and tests for numeric conversions
2023-09-22 16:26:38 +01:00
Koen Vlaswinkel
0fea21f3e7 C#: Remove unnecessary columns 2023-09-22 16:35:15 +02:00
Koen Vlaswinkel
f4522edc95 Java: Remove unnecessary columns 2023-09-22 16:11:30 +02:00
Koen Vlaswinkel
7dc22e47d6 Java: Switch from problem to table query 2023-09-22 16:08:20 +02:00
Tony Torralba
b1cee2f35c Merge pull request #14254 from atorralba/atorralba/arithexpr-improv
Java: Consider AssignOps in ArithExpr
2023-09-22 15:22:27 +02:00
Anders Schack-Mulligen
6316f61af9 Go: Fix import conflict. 2023-09-22 15:09:25 +02:00
Anders Schack-Mulligen
ae278fcad7 C++: Fix import conflict. 2023-09-22 15:06:21 +02:00
Max Schaefer
363dc49078 Merge pull request #14292 from github/max-schaefer/fix-python-regex-locations
Python: Improve source-location information for RegExpTerms.
2023-09-22 13:59:10 +01:00
Anders Schack-Mulligen
66da997b7b Dataflow: Make use of defaults for language-specific hooks. 2023-09-22 14:54:22 +02:00
amammad
a8aeb1d03e add active record and data mapper patterns support 2023-09-22 22:50:55 +10:00
Tom Hvitved
13ad6f8690 C#: Add missing flow summary for List<T>.ForEach 2023-09-22 13:48:32 +02:00
Tony Torralba
8f189cb90c Merge pull request #14290 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-09-22 13:46:55 +02:00
Anders Schack-Mulligen
b11194e561 Java: Add missing qldoc. 2023-09-22 13:46:08 +02:00
Anders Schack-Mulligen
8ee1f8ae69 Java: Add missing flow step for ThreadLocal.initialValue. 2023-09-22 13:33:45 +02:00
Max Schaefer
dfec1620ea Update expected test output. 2023-09-22 11:28:50 +01:00
Max Schaefer
6f67055852 Correctly account for length of string literal prefix when computing locations for RegExpTerms. 2023-09-22 11:24:25 +01:00
Max Schaefer
d4ff9c8ed1 Add test for locations of regexp terms. 2023-09-22 11:24:24 +01:00
Tom Hvitved
9638a6cb8f Merge pull request #14095 from hvitved/csharp/stub-generator
C#: Roslyn-based stub generation
2023-09-22 12:12:34 +02:00
Tom Hvitved
e417e862a2 Merge pull request #14283 from hvitved/ruby/collapse-stages
Ruby: Collapse DIL stages
2023-09-22 10:58:06 +02:00
amammad
522a2e2594 v2 2023-09-22 18:56:47 +10:00
Geoffrey White
ab54f0cc6c Merge pull request #14286 from geoffw0/interp
Swift: Fix bug in taint flow through string interpolation
2023-09-22 08:52:56 +01:00
Tom Hvitved
831baa867c C#: Refactor and regenerate stubs 2023-09-22 09:15:01 +02:00
github-actions[bot]
47809a8252 Add changed framework coverage reports 2023-09-22 00:14:56 +00:00
Chris Smowton
0aeec1a1a2 Merge pull request #14288 from smowton/smowton/admin/buildless-snapshot-repositories-test
Java: Add test re: buildless mode interaction with snapshot repositories
2023-09-21 21:36:13 +01:00
Josh Brown
7ad2932b3f Update SymmetricEncryptionAlgorithms.ql
Changing metadata to under python namespace
2023-09-21 12:12:16 -07:00
Benjamin Rodes
c0c2ae544b Updating weak elliptic curve sample queries. 2023-09-21 12:12:16 -07:00
Benjamin Rodes
5fed923af0 Changed python inventory subdirectory structure to add old and new inventory models. Added some example old models. 2023-09-21 12:12:15 -07:00
Benjamin Rodes
50db4fd63e Moved Cpp into sub directory 'cryptography' instead of crypto. Added python models, inventory, and example alerts. 2023-09-21 12:12:15 -07:00
Benjamin Rodes
7560db66fa incorrect import path 2023-09-21 12:12:15 -07:00
Benjamin Rodes
fe22dc45b1 Moving inventory queries into a new subdirectory structure for new_models and old_models. 2023-09-21 12:12:15 -07:00
Benjamin Rodes
6d7ac8de28 Adding example alerts 2023-09-21 12:12:15 -07:00
Benjamin Rodes
4c9cc5a21f Adding inventory queries. 2023-09-21 12:12:15 -07:00
Benjamin Rodes
7256faa7eb Added modeling infrastructure 2023-09-21 12:12:15 -07:00
Chris Smowton
0b5727f1d1 Add test re: buildless mode interaction with snapshot repositories 2023-09-21 19:46:28 +01:00
Arthur Baars
2d44724acd Merge pull request #14281 from aibaars/aibaars/java-standalone-test
Java: standalone: add basic integration tests
2023-09-21 20:09:02 +02:00
Chris Smowton
ffd0a72e74 Merge pull request #14285 from smowton/smowton/test/module-in-wrongly-named-file
Java: Test module definition in a file not named module-info.java in a buildless extraction
2023-09-21 19:03:35 +01:00
Geoffrey White
f2689dd515 Swift: Fix for string interpolation taint flow. 2023-09-21 19:02:16 +01:00
Geoffrey White
c7be9b42b3 Swift: Test demonstrating an issue with taint through string interpolation. 2023-09-21 19:02:06 +01:00
Sarita Iyer
27817ea9f0 fix 2023-09-21 12:07:07 -04:00
Chris Smowton
04258f8cfc Remove actual file 2023-09-21 16:41:17 +01:00
Alex Ford
67019c6784 Merge pull request #14274 from alexrford/rb/dataflow-tidy
Ruby: Minor fixes for dataflow queries
2023-09-21 16:33:34 +01:00
Sarita Iyer
1899a6048d fix table 2023-09-21 11:25:52 -04:00
Sarita Iyer
9b2b40004c remove import changes 2023-09-21 10:57:33 -04:00
Sarita Iyer
4d9d748d51 fix underlines 2023-09-21 10:08:41 -04:00
Chris Smowton
14998606b7 Add test for the case of a module definition in a file not named module-info.java in a buildless extraction 2023-09-21 14:40:42 +01:00
Tom Hvitved
f07d02be96 Regenerate stubs 2023-09-21 15:35:50 +02:00
Tom Hvitved
4805e2a47b Address more review comments 2023-09-21 15:35:50 +02:00
Alex Ford
4031623fda Ruby: delete identical-files refs to deleted files 2023-09-21 14:22:34 +01:00
Alex Ford
840b1e0a73 Ruby: delete DataFlowImplForHttpClientLibraries 2023-09-21 14:11:46 +01:00
Alex Ford
a64d37211d Ruby: use new dataflow api in Typhoeus.qll 2023-09-21 14:11:09 +01:00
Alex Ford
699f752ded Ruby: use new dataflow api in RestClient.qll 2023-09-21 14:09:41 +01:00
Arthur Baars
722ee165d7 Java: standalone: add basic integration tests 2023-09-21 15:09:40 +02:00
Alex Ford
25203d98c3 Ruby: use new dataflow api in OpenURI.qll 2023-09-21 14:08:22 +01:00
Alex Ford
09782296df Ruby: use new dataflow api in NetHttp.qll 2023-09-21 14:06:40 +01:00
Anders Schack-Mulligen
9f905497a5 Java: Add support for additional read and store steps and additional nodes. 2023-09-21 15:05:30 +02:00
Alex Ford
fc7e753035 Ruby: use new dataflow api in Httparty.qll 2023-09-21 14:04:46 +01:00
Paolo Tranquilli
e9e58d97be Merge pull request #14280 from github/revert-14011-revert-13991-redsun82/swift-use-concepts
Revert "Revert "Swift: use C++20 constraints and concepts to simplify code""
2023-09-21 15:04:30 +02:00
Alex Ford
92941a45f9 Ruby: use new dataflow api in HttpClient.qll 2023-09-21 14:03:09 +01:00
Tom Hvitved
c2306e6713 Ruby: Collapse DIL stages 2023-09-21 14:33:04 +02:00
Geoffrey White
05309810b8 Merge pull request #14266 from geoffw0/quickfix
Swift: Improve taint models for NSString
2023-09-21 13:09:01 +01:00
Sarita Iyer
f04a1a534a one more fix 2023-09-21 08:08:34 -04:00
Alex Ford
1ffcf4b9c4 Ruby: use new dataflow api in Faraday.qll 2023-09-21 13:07:06 +01:00
Alex Ford
1dbba19238 Ruby: use new dataflow api in Excon.qll 2023-09-21 13:00:17 +01:00
Sarita Iyer
36950d9d5c additional changes 2023-09-21 07:50:12 -04:00
Alex Ford
489f598551 Ruby: delete DataFlowImplForPathname 2023-09-21 12:50:12 +01:00
Anders Schack-Mulligen
7e04ac55b7 Merge pull request #14268 from aschackmull/java/xmlparsers-typetrack
Java/Dataflow: Add new light-weight data flow api and use it in XmlParsers
2023-09-21 13:33:21 +02:00
Anders Schack-Mulligen
13f7daf71e Merge pull request #13982 from aschackmull/dataflow/typeflow-calledge-pruning
Dataflow: Add type-based call-edge pruning.
2023-09-21 13:33:08 +02:00
Tom Hvitved
04c4e739ac Address review comments 2023-09-21 13:33:02 +02:00
Alex Ford
4cb91e022f Ruby: deprecate some flow states 2023-09-21 12:24:15 +01:00
Alex Ford
9d421ffa8d Ruby: configsig rb/improper-ldap-auth 2023-09-21 12:24:15 +01:00
Tom Hvitved
2343e5ecd8 C#: Regenerate NHibernate stubs 2023-09-21 12:56:11 +02:00
Tom Hvitved
e944b90eef C#: Regenerate Microsoft.AspNetCore.App stubs 2023-09-21 12:56:05 +02:00
Tom Hvitved
c547adc9d4 C#: Regenerate Microsoft.NetCore.App stubs 2023-09-21 12:56:04 +02:00
Tom Hvitved
58f45ea198 C#: Regenerate Newtonsoft.Json stubs 2023-09-21 12:56:04 +02:00
Anders Schack-Mulligen
3dadfa2243 Dataflow: review fixes 2023-09-21 11:52:41 +02:00
Tom Hvitved
8b2c233b61 C#: Use new stub generator in make_stubs_nuget.py 2023-09-21 11:33:25 +02:00
Tom Hvitved
e021fb46c8 C#: Roslyn based stub generation 2023-09-21 11:33:25 +02:00
Tom Hvitved
6021d00f7e C#: Move some methods into newly created Semmle.Extraction.CSharp.Util project 2023-09-21 11:33:25 +02:00
Tom Hvitved
2429a5383d C#: Move NestPaths to Semmle.Util 2023-09-21 11:33:25 +02:00
Mathias Vorreiter Pedersen
3d8231be1b Merge pull request #14269 from MathiasVP/add-getParameter-to-parameter-node 2023-09-21 09:20:57 +01:00
Paolo Tranquilli
60b7d79fba Revert "Revert "Swift: use C++20 constraints and concepts to simplify code"" 2023-09-21 10:17:22 +02:00
Tamás Vajk
40bf5c17fb Merge pull request #14273 from tamasvajk/standalone/remove-runtime-nuget-packages
C#: Remove platform-specific runtime nuget packages from the reference list in Standalone
2023-09-21 09:50:10 +02:00
Erik Krogh Kristensen
0783d7b271 Merge pull request #14278 from github/dependabot/cargo/ql/rayon-1.8.0
Bump rayon from 1.7.0 to 1.8.0 in /ql
2023-09-21 08:30:41 +02:00
Tamás Vajk
011391bd27 Merge pull request #14243 from tamasvajk/parallelize-restore
C#: Parallelize restore logic of missing packages
2023-09-21 08:04:27 +02:00
dependabot[bot]
d0554a05f9 Bump rayon from 1.7.0 to 1.8.0 in /ql
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.7.0 to 1.8.0.
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.7.0...rayon-core-v1.8.0)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-21 03:10:09 +00:00
Sarita Iyer
292a9481e6 Pending changes exported from your codespace 2023-09-20 22:02:14 +00:00
Alex Eyers-Taylor
d0849311a6 CPP: Fix use after free FPs by elimnatiing freeing nodes rather than freeing expressions. 2023-09-20 18:47:57 +01:00
Alex Eyers-Taylor
9de6230bbf CPP: Add use after free false positive example. 2023-09-20 18:34:47 +01:00
Geoffrey White
fef5a49fcb Swift: Remove now duplicate extension logic. 2023-09-20 15:36:15 +01:00
Rasmus Lerchedahl Petersen
12dab88ec7 Python: rename concept
`NoSqlQuery` -> `NoSqlExecution`
2023-09-20 15:49:35 +02:00
Rasmus Lerchedahl Petersen
4ec8b3f02f Python: Model map_reduce 2023-09-20 15:44:12 +02:00
Tamas Vajk
d29585c8b7 C#: Remove platform-specific runtime nuget packages from the reference list in Standalone 2023-09-20 15:24:01 +02:00
Rasmus Lerchedahl Petersen
7c085ecc61 Python: Add test for map_reduce
Also log requirement for old versions of `pymongo`
2023-09-20 15:23:18 +02:00
Anders Schack-Mulligen
d285afba08 Typetracking: minor perf fix. 2023-09-20 14:52:49 +02:00
Michael Nebel
0b84dee65e C#: Minor improvements to the ExternalApi implementation. 2023-09-20 14:34:27 +02:00
Koen Vlaswinkel
9e2984770f Java: Fix identification of supported endpoints in framework mode 2023-09-20 14:25:06 +02:00
Koen Vlaswinkel
73ebd21c33 Java: Refactor most of the logic out of the model editor query files 2023-09-20 14:13:28 +02:00
Koen Vlaswinkel
509b7fe0f8 Java: Add tests for supported framework methods 2023-09-20 14:11:00 +02:00
Koen Vlaswinkel
6adbc406a7 Java: Add tests for private methods 2023-09-20 14:05:28 +02:00
Koen Vlaswinkel
8e55189b84 Java: Add tests for generic interfaces/classes/methods 2023-09-20 14:02:34 +02:00
Koen Vlaswinkel
6e78aac6cc Java: Rename CallableMethod to Endpoint 2023-09-20 13:57:27 +02:00
Koen Vlaswinkel
fee9640077 Java: Update query id/tags and documentation 2023-09-20 13:54:35 +02:00
Koen Vlaswinkel
fe7ce0ae0b Java: Rename queries from fetch methods to endpoints 2023-09-20 13:52:49 +02:00
Koen Vlaswinkel
082a45400d Java: Rename AutomodelVsCode to ModelEditor 2023-09-20 13:51:05 +02:00
Tom Hvitved
455cde2f64 Merge pull request #14267 from hvitved/ruby/fix-join
Ruby: Fix bad join
2023-09-20 13:49:51 +02:00
Michael Nebel
13dd9a6c37 C#: Address review comments. 2023-09-20 13:43:38 +02:00
Michael Nebel
50a9219a3b C#: Re-factor most of the logic out of the model editor query files. 2023-09-20 13:08:01 +02:00
Michael Nebel
45432f211c C#: Identify whether callables in the source code are supported in terms of MaD. 2023-09-20 13:01:24 +02:00
github-actions[bot]
3acf5244b0 Post-release preparation for codeql-cli-2.14.6 2023-09-20 10:25:10 +00:00
Chris Smowton
07dbad509c Merge pull request #14265 from phillmv/patch-1
s/Replace/ReplaceAll/ in LogInjectionGood.go
2023-09-20 11:06:15 +01:00
Chris Smowton
a8afa05b1d Correct ReplaceAll params
ReplaceAll doesn't take a count argument
2023-09-20 10:00:53 +01:00
Mathias Vorreiter Pedersen
22d66b6d81 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll 2023-09-20 09:56:10 +01:00
Mathias Vorreiter Pedersen
fb1ce2ab70 C++: Lift 'getParameter' to 'ParameterNode'. 2023-09-20 09:51:35 +01:00
Rasmus Wriedt Larsen
8e864ab84a Merge pull request #14262 from RasmusWL/dataflow-labeler
Misc: Update auto labeler for shared dataflow pack
2023-09-20 10:26:44 +02:00
Anders Schack-Mulligen
5c40d553b4 Java: Switch XmlParsers lib to lightweight data flow. 2023-09-20 10:21:53 +02:00
Anders Schack-Mulligen
d7e965f863 Dataflow: Add lightweight api based on TypeTracking. 2023-09-20 10:21:21 +02:00
Anders Schack-Mulligen
d7bd8c7ffd Shared/TypeTracking: Add support for flow from non-LocalSourceNode source and bugfix in smallstep. 2023-09-20 10:19:33 +02:00
Tom Hvitved
1442bddf36 Ruby: Fix bad join
Before
```
Evaluated relational algebra for predicate DataFlowPublic#e1781e31::BarrierGuard#PolynomialReDoSCustomizations#32063fa3::PolynomialReDoS::lengthGuard#::getAMaybeGuardedCapturedDef#0#f@3c903abq with tuple counts:
          280924  ~0%    {2} r1 = SCAN Ssa#da392372::Make#SsaImpl#ff97b16a::SsaInput#::Definition::definesAt#3#dispred#ffff OUTPUT In.2, In.0
          280924  ~0%    {2} r2 = JOIN r1 WITH BasicBlocks#d5fe3e99::BasicBlock::getScope#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
          103843  ~1%    {2} r3 = JOIN r2 WITH SSA#304893e3::Ssa::CapturedEntryDefinition#f ON FIRST 1 OUTPUT Lhs.0, Lhs.1
          103843  ~5%    {3} r4 = JOIN r3 WITH Ssa#da392372::Make#SsaImpl#ff97b16a::SsaInput#::Definition::getSourceVariable#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
        19665045  ~0%    {3} r5 = JOIN r4 WITH Ssa#da392372::Make#SsaImpl#ff97b16a::SsaInput#::Definition::getSourceVariable#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.1
        19497860  ~0%    {3} r6 = JOIN r5 WITH Call#841c84e8::MethodCall::getBlock#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
        19496808  ~0%    {3} r7 = JOIN r6 WITH CfgNodes#ace8e412::ExprCfgNode::getExpr#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
        19496808  ~0%    {3} r8 = JOIN r7 WITH CfgNodes#ace8e412::ExprNodes::CallCfgNode#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2
        19496808  ~0%    {3} r9 = JOIN r8 WITH ControlFlowGraph#46cebcbd::CfgNode::getBasicBlock#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
        19496808  ~3%    {4} r10 = SCAN r9 OUTPUT In.0, true, In.1, In.2
           49434  ~7%    {3} r11 = JOIN r10 WITH DataFlowPublic#e1781e31::guardControlsBlock#3#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2, Lhs.3
             117  ~4%    {3} r12 = JOIN r11 WITH PolynomialReDoSCustomizations#32063fa3::PolynomialReDoS::lengthGuard#3#cpe#12#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
               0  ~0%    {1} r13 = JOIN r12 WITH SsaImpl#ff97b16a::Cached::getARead#1#ff ON FIRST 2 OUTPUT Lhs.2
                         return r13
```

After
```
Evaluated relational algebra for predicate DataFlowPublic#e1781e31::BarrierGuard#PolynomialReDoSCustomizations#32063fa3::PolynomialReDoS::lengthGuard#::getAMaybeGuardedCapturedDef#0#f@137a23jm with tuple counts:
        280924  ~0%    {2} r1 = SCAN Ssa#da392372::Make#SsaImpl#ff97b16a::SsaInput#::Definition::definesAt#3#dispred#ffff OUTPUT In.2, In.0
        280924  ~0%    {2} r2 = JOIN r1 WITH BasicBlocks#d5fe3e99::BasicBlock::getScope#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
        103843  ~1%    {2} r3 = JOIN r2 WITH SSA#304893e3::Ssa::CapturedEntryDefinition#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0
        102517  ~1%    {2} r4 = JOIN r3 WITH Call#841c84e8::MethodCall::getBlock#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        102378  ~2%    {2} r5 = JOIN r4 WITH CfgNodes#ace8e412::ExprCfgNode::getExpr#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        102378  ~2%    {2} r6 = JOIN r5 WITH CfgNodes#ace8e412::ExprNodes::CallCfgNode#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1
        102378  ~0%    {2} r7 = JOIN r6 WITH ControlFlowGraph#46cebcbd::CfgNode::getBasicBlock#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        102378  ~0%    {3} r8 = SCAN r7 OUTPUT In.0, true, In.1
          7417  ~5%    {2} r9 = JOIN r8 WITH DataFlowPublic#e1781e31::guardControlsBlock#3#fff_120#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2
            22  ~0%    {2} r10 = JOIN r9 WITH PolynomialReDoSCustomizations#32063fa3::PolynomialReDoS::lengthGuard#3#cpe#12#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            12  ~0%    {2} r11 = JOIN r10 WITH SsaImpl#ff97b16a::Cached::getARead#1#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
            12  ~0%    {2} r12 = JOIN r11 WITH Ssa#da392372::Make#SsaImpl#ff97b16a::SsaInput#::Definition::getSourceVariable#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1
             0  ~0%    {1} r13 = JOIN r12 WITH Ssa#da392372::Make#SsaImpl#ff97b16a::SsaInput#::Definition::getSourceVariable#0#dispred#ff ON FIRST 2 OUTPUT Lhs.0
                       return r13
```
2023-09-20 09:51:15 +02:00
Joe Farebrother
4497e22195 Add an additional example and additional test cases for authorize attribute cases 2023-09-20 04:13:34 +01:00
Joe Farebrother
475fe3a2a5 Attempt to improve performance in checksUser 2023-09-20 03:18:20 +01:00
Geoffrey White
af315c5072 Swift: Change note. 2023-09-19 23:02:14 +01:00
Geoffrey White
1b74b49bb3 Swift: Improve NSString models for varargs functions. 2023-09-19 23:02:14 +01:00
Rasmus Lerchedahl Petersen
30c37ca8cb Python: model §accumulator
also slightly rearrange the modelling
2023-09-19 22:21:14 +02:00
Robert Marsh
30b30695e4 Swift: WIP upgrade script for for-each refactor 2023-09-19 19:28:05 +00:00
Phill MV
11218f79c6 s/Replace/ReplaceAll/ in LogInjectionGood.go 2023-09-19 14:43:54 -04:00
Geoffrey White
f8c5a9a264 Swift: Test localizedStringWithFormat a bit better. 2023-09-19 18:43:54 +01:00
Geoffrey White
8354439d8d Merge pull request #14263 from geoffw0/typos
CPP / Swift: Typos
2023-09-19 18:02:33 +01:00
Geoffrey White
a3579f6e38 Merge branch 'main' into typos 2023-09-19 16:44:13 +01:00
Geoffrey White
ae159924a3 Swift: Add numeric barrier to the regular expression injection query as well. 2023-09-19 16:21:43 +01:00
Alexander Eyers-Taylor
2501a701ad Merge pull request #14256 from github/release-prep/2.14.6
Release preparation for version 2.14.6
2023-09-19 16:18:23 +01:00
Rasmus Lerchedahl Petersen
5611bda7ee Python: add test for $accumulator 2023-09-19 17:04:28 +02:00
Owen Mansel-Chan
650d8069f6 Merge pull request #14131 from omahs/patch-1
Docs: fix minor typos
2023-09-19 15:53:07 +01:00
Geoffrey White
935b7600ca Swift: Fix typos. 2023-09-19 15:19:00 +01:00
Geoffrey White
8a0e202b63 CPP: Fix typos. 2023-09-19 15:18:03 +01:00
Rasmus Wriedt Larsen
cc30c062b8 Misc: Update auto labeler for shared dataflow pack 2023-09-19 16:08:43 +02:00
Geoffrey White
e011951e1f Swift: Added change note for the new barriers. 2023-09-19 14:59:27 +01:00
Koen Vlaswinkel
3ebb9e16be C#: Update query id/tags and documentation 2023-09-19 15:54:15 +02:00
Koen Vlaswinkel
044fb9f320 C#: Rename queries from fetch methods to endpoints 2023-09-19 15:51:12 +02:00
Mathias Vorreiter Pedersen
2ae342c5c1 Merge pull request #14258 from MathiasVP/explicit-size_t
C++: Use `size_t` explicitly in CWE-193 tests
2023-09-19 14:50:54 +01:00
Koen Vlaswinkel
eace7a4bbf C#: Add tests for supported framework methods 2023-09-19 15:49:35 +02:00
Geoffrey White
32a2930c2f Swift: Accept bad tag filter test fixes. 2023-09-19 14:47:56 +01:00
Tom Hvitved
7c2df87ea2 Merge pull request #14247 from hvitved/dataflow/fix-consitency-checks
Data flow: Fix two consistency checks
2023-09-19 15:45:21 +02:00
omahs
473f17c0e6 fix typo 2023-09-19 14:39:49 +01:00
omahs
884f41b6f0 fix typo 2023-09-19 14:39:49 +01:00
omahs
278d0fb798 fix typo 2023-09-19 14:39:49 +01:00
omahs
f58dd7303c fix typo 2023-09-19 14:39:49 +01:00
Geoffrey White
5975546098 Swift: Add numeric barrier for predicate injection query as well. 2023-09-19 14:33:24 +01:00
Geoffrey White
2983295ba3 Swift: Add numeric barrier for uncontrolled format string query. 2023-09-19 14:33:23 +01:00
Geoffrey White
f98de85e36 Swift: Add numeric barrier for command injection query. 2023-09-19 14:33:23 +01:00
Geoffrey White
903b0f5bab Swift: Add numeric barrier for the SQL Injinjection query. 2023-09-19 14:33:23 +01:00
Geoffrey White
ee9a5c751c Swift: Add numeric barrier for to the JS eval query. 2023-09-19 14:33:22 +01:00
Tamas Vajk
c78cd73edf Refactor process starting and stdout and stderr reading 2023-09-19 15:20:09 +02:00
Mathias Vorreiter Pedersen
7ef5971337 C++: Use 'size_t' explicitly in test. 2023-09-19 13:58:08 +01:00
Tamas Vajk
edc93dfeb7 Add managed thread ID to extractor log messages 2023-09-19 14:56:27 +02:00
Koen Vlaswinkel
14a2b7f79f C#: Add tests for private methods and accessors 2023-09-19 14:55:57 +02:00
Mathias Vorreiter Pedersen
9b35202d21 Merge pull request #14249 from MathiasVP/fix-malloc-decl-in-test
C++: Fix the declaration of `malloc` in test
2023-09-19 13:53:23 +01:00
Koen Vlaswinkel
dd7904969f C#: Remove unnecessary isUnboundDeclaration predicates 2023-09-19 14:51:03 +02:00
Tamas Vajk
dfd7f1e78b C#: Parallelize restore logic of missing packages 2023-09-19 14:43:23 +02:00
amammad
69c2d9ed5c fix change notes 2023-09-19 22:24:52 +10:00
amammad
da864bf7f7 fix QLDoc 2023-09-19 22:19:18 +10:00
amammad
a96b0011f0 clean tests 2023-09-19 22:12:10 +10:00
Geoffrey White
158008ac4f Swift: New results in tests. 2023-09-19 13:08:08 +01:00
amammad
1e12a86781 Merge branch 'main' into amammad-go-JWT 2023-09-19 22:01:50 +10:00
amammad
2136929164 clean tests 2023-09-19 22:01:40 +10:00
github-actions[bot]
0a3670727f Release preparation for version 2.14.6 2023-09-19 11:40:30 +00:00
Michael Nebel
fc3bc95147 Merge pull request #14218 from michaelnebel/csharp/dotnetdotnet
Lua: Tracing of `dotnet dotnet`.
2023-09-19 13:21:34 +02:00
Michael Nebel
43cdbf2f86 Merge pull request #14142 from michaelnebel/csharp/dotnetunittests
C#: Re-factor Dotnet.cs to enable unit testing.
2023-09-19 13:19:44 +02:00
Owen Mansel-Chan
45484c78e8 Merge pull request #14057 from data-douser/data-douser-patch-1
Update codeql-library-for-go.rst
2023-09-19 11:34:44 +01:00
Geoffrey White
48d1b667cf Swift: Autoformat. 2023-09-19 11:22:12 +01:00
Geoffrey White
2d05b85bb4 Swift: Fix uses of legacy CArrayElement. 2023-09-19 11:20:05 +01:00
Mathias Vorreiter Pedersen
8906a37989 Merge pull request #14250 from MathiasVP/reduce-dataflow-duplication-for-allocations
C++: Reduce dataflow duplication for allocations
2023-09-19 11:18:20 +01:00
Tony Torralba
1e95a5a38a Java: Consider AssignOps in ArithExpr 2023-09-19 12:15:59 +02:00
Anders Schack-Mulligen
42054539f4 Dataflow: Minor review fixes. 2023-09-19 12:12:15 +02:00
Geoffrey White
311daa2539 Swift: Accept fixed test case having merged in main. 2023-09-19 10:39:59 +01:00
Alexander Eyers-Taylor
1f4a5301cd Merge pull request #14242 from alexet/simplify-ir-guards
CPP: Simplify some code in IRGuards.
2023-09-19 10:35:09 +01:00
Geoffrey White
037f246cda Merge branch 'main' into arraysteptest 2023-09-19 10:33:32 +01:00
yoff
811a7d0671 Merge pull request #14248 from RasmusWL/debug-queries
Python: Add debug queries
2023-09-19 11:27:27 +02:00
Michael Nebel
a3da11a962 C#: Rename DotNetCliWrapper to DotNet. 2023-09-19 11:12:36 +02:00
Geoffrey White
34240f7328 Swift: Accept generated changes. 2023-09-19 10:08:08 +01:00
Michael Nebel
6c0afab0aa C#: Rename DotnetVersion to DotNetVersion. 2023-09-19 11:03:26 +02:00
Michael Nebel
31327f4f73 C#: Only access the DotNetCliWrapper using the IDotNet interface. 2023-09-19 11:03:26 +02:00
Michael Nebel
1fd85f4fe3 C#: Rename DotNet to DotNetCliWrapper. 2023-09-19 11:03:26 +02:00
Michael Nebel
82e56e6dae C#: Rename DotnetCommand to DotNetCliInvoker. 2023-09-19 11:03:26 +02:00
Michael Nebel
05c5f3e050 C#: Make ReadOutput more robust and re-factor RunCommand methods. 2023-09-19 11:03:26 +02:00
Michael Nebel
d60055b148 C#: Add unit tests for DotNet. 2023-09-19 11:03:25 +02:00
Michael Nebel
f00b6e27a7 C#: Re-factor Dotnet to enable unit testing. 2023-09-19 11:03:25 +02:00
Tony Torralba
c45ca7212a Merge pull request #14126 from intrigus-lgtm/patch-9
Java: Fix alert message
2023-09-19 09:52:42 +02:00
Tony Torralba
9340347799 Merge pull request #14253 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-09-19 09:52:04 +02:00
github-actions[bot]
562dbf1b8d Add changed framework coverage reports 2023-09-19 00:15:19 +00:00
Geoffrey White
bcf990b362 Swift: Add change note. 2023-09-18 22:17:43 +01:00
amammad
bc6a0fc776 move to CWE-347 2023-09-19 07:15:46 +10:00
amammad
3585459548 fix qhelps 2023-09-19 06:17:31 +10:00
Geoffrey White
df29f3974b Swift: Update uses of getABaseType() and similar to do things correctly now. 2023-09-18 20:50:47 +01:00
Geoffrey White
37edcad1b0 Swift: Go through protocols added in extensions also. 2023-09-18 20:03:08 +01:00
Geoffrey White
f604b28ab5 Swift: Resolve type aliases (1) in base class declarations, not before them and (2) consistently. This is not behaviour preserving. 2023-09-18 20:01:46 +01:00
Geoffrey White
c78f5ce4cc Swift: Move NominalType.getABaseType() implementation out from NominalType (inconsistent, difficult to find) to Type. 2023-09-18 20:00:22 +01:00
Geoffrey White
b048268042 Swift: Add some QLDoc. 2023-09-18 20:00:19 +01:00
Geoffrey White
4f39cb65c2 ed test 2023-09-18 19:59:59 +01:00
Rasmus Wriedt Larsen
fd8d186b34 Python: Add debug queries
For manually debugging things, it's nice to be able to share debug
queries.

I had the DebugStats.ql lying around from way back, and thought it was
kinda cute. I've extended it with a bunch of things, not too sure if
they're all important, but I think it's kinda fun to see the
distribution of things 😊
2023-09-18 20:46:52 +02:00
Geoffrey White
ef8a997c99 Swift: Extend the test. 2023-09-18 19:37:20 +01:00
amammad
a6996c5d21 fix tests 2023-09-19 03:48:31 +10:00
Felicity Chapman
31b0c423a4 Merge pull request #14207 from github/felicitymay-11595-VS-code-docs
Updates to the Java and VS Code docs
2023-09-18 18:35:58 +01:00
amammad
c195a9f05d Merge branch 'main' into amammad-go-fastHttp 2023-09-19 03:07:27 +10:00
Mathias Vorreiter Pedersen
fda52a568d C++: Accept test changes. 2023-09-18 17:55:25 +01:00
Mathias Vorreiter Pedersen
d2e66a1186 C++: Ignore addresses of 'InitializeDynamicAllocationInstruction' in 'unique' when converting between instructions and expression in dataflow. 2023-09-18 17:55:19 +01:00
Felicity Chapman
7ed4f5b292 Update docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst 2023-09-18 17:31:22 +01:00
Felicity Chapman
7372562222 Fix heading indicator syntax length 2023-09-18 17:31:22 +01:00
Felicity Chapman
1228a83e77 Rename article file 2023-09-18 17:31:22 +01:00
Felicity Chapman
c2fa37e285 Apply suggestions from code review
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com>
2023-09-18 17:31:22 +01:00
Felicity Chapman
839f2a6be0 Remove unneeded link 2023-09-18 17:31:22 +01:00
Felicity Chapman
da29336a8c Revert article name 2023-09-18 17:31:22 +01:00
Felicity Chapman
12a86f52c3 Update docs/codeql/codeql-language-guides/data-extensions-to-model-java-dependencies.rst 2023-09-18 17:31:22 +01:00
Felicity Chapman
ac26330476 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-09-18 17:31:22 +01:00
Felicity Chapman
d5c79d4eee Add missing blank line 2023-09-18 17:31:22 +01:00
Felicity Chapman
c91029395d Add missing language code 2023-09-18 17:31:22 +01:00
Felicity Chapman
d10903a09c Apply suggestions from code review
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com>
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2023-09-18 17:31:22 +01:00
Felicity Chapman
854c126c37 Update docs/codeql/codeql-language-guides/extensible-predicates.rst
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-09-18 17:31:22 +01:00
Felicity Chapman
6b90ce0d80 Updates for review comments 2023-09-18 17:31:22 +01:00
Felicity Chapman
a4f3e5e0bb Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Co-authored-by: Robert <robertbrignull@github.com>
2023-09-18 17:31:21 +01:00
Felicity Chapman
93eff2a66a A few more updates 2023-09-18 17:31:21 +01:00
Felicity Chapman
488b824ca6 Add first draft of CodeQL model editor 2023-09-18 17:31:21 +01:00
Felicity Chapman
b42ab24bc8 Try to fix sphinx errors 2023-09-18 17:31:21 +01:00
Felicity Chapman
34e5c5c1f7 Start edits on using extension 2023-09-18 17:31:21 +01:00
Felicity Chapman
7be0b2e9eb Fix Sphinx bugs 2023-09-18 17:31:21 +01:00
Felicity Chapman
8c8bbde1f7 Fix a few more typos 2023-09-18 17:31:21 +01:00
Felicity Chapman
e865574412 Add bare content from Google doc 2023-09-18 17:31:21 +01:00
Felicity Chapman
075cbfd7d2 Split information extensions and predicates into 2 articles 2023-09-18 17:31:21 +01:00
Felicity Chapman
67ff5ae10e Add changes from Michael 2023-09-18 17:31:21 +01:00
Felicity Chapman
fde045902a Rename again 2023-09-18 17:31:21 +01:00
Felicity Chapman
73ecb119d6 Update name of renamed article and add to index 2023-09-18 17:31:21 +01:00
Felicity Chapman
8218397a83 Rename private beta article 2023-09-18 17:31:21 +01:00
Felicity Chapman
4779c23da1 Draft content for VS Code extension 2023-09-18 17:31:20 +01:00
Felicity Chapman
75955237a9 Make general updates, add framework for new article 2023-09-18 17:31:20 +01:00
Mathias Vorreiter Pedersen
8a2d4852c6 C++: Add another testcase. 2023-09-18 16:48:03 +01:00
Rasmus Wriedt Larsen
3df36ec89c Merge pull request #14245 from RasmusWL/minor-modeling-fixup
Python: Modernize modeling of `BaseHTTPRequestHandler`
2023-09-18 17:43:06 +02:00
Mathias Vorreiter Pedersen
bc0b2e5318 C++: Fix the return type and parameter type of 'malloc' in test. 2023-09-18 16:40:46 +01:00
Mathias Vorreiter Pedersen
6a2a029c4c Merge pull request #14244 from MathiasVP/remove-unnecessary-size_t-cast
C++: Remove unnecessary `size_t` cast from allocations
2023-09-18 16:18:24 +01:00
Harry Maclean
2053ee00ab Ruby: Add change note 2023-09-18 16:02:09 +01:00
Harry Maclean
18dac9ab8a Ruby: Handle GraphQL array types 2023-09-18 16:00:56 +01:00
Tom Hvitved
daad69bb30 Data flow: Fix two consistency checks 2023-09-18 16:36:11 +02:00
Alex Ford
e45edca103 Ruby: remove unused import 2023-09-18 14:55:11 +01:00
Koen Vlaswinkel
489561f4f1 C#: Fix formatting of ExternalApi 2023-09-18 15:49:59 +02:00
Koen Vlaswinkel
948e36a4c5 C#: Update comment for Endpoint 2023-09-18 15:47:50 +02:00
Koen Vlaswinkel
81a8eeed46 C#: Only include unbound declarations in endpoints 2023-09-18 15:45:30 +02:00
amammad
6f5aa58d82 add change note 2023-09-18 23:38:32 +10:00
Koen Vlaswinkel
93972a49d7 C#: Rename AutomodelVsCode to ModelEditor 2023-09-18 15:34:24 +02:00
Koen Vlaswinkel
4693f72d5f C#: Rename CallableMethod to Endpoint 2023-09-18 15:30:38 +02:00
amammad
09aee3081e fix library-tests 2023-09-18 23:29:45 +10:00
Koen Vlaswinkel
f468b2a3d1 C#: Add tests for generic interfaces/classes/methods 2023-09-18 14:58:20 +02:00
Rasmus Lerchedahl Petersen
4614b1ae9c Python: add change note 2023-09-18 14:34:03 +02:00
Anders Starcke Henriksen
a5db939234 Release automodel queries version 0.0.3 2023-09-18 14:29:09 +02:00
Erik Krogh Kristensen
998237e8af Merge pull request #13488 from erik-krogh/finalAlias
Shared: use final class aliases to use `extends` instead of `instanceof` in the shared libraries
2023-09-18 14:26:22 +02:00
yoff
4a37c2fc3a Merge pull request #13778 from geoffw0/javaparsemode
Java: Understand multiple parse mode flags specified in a regular expression string
2023-09-18 14:22:59 +02:00
Paolo Tranquilli
dc299fc9fa Merge pull request #14208 from github/redsun82/swift-unordered-base-types
Swift: rename `base_types` in `TypeDecl` to `inherited_types`
2023-09-18 14:21:20 +02:00
Rasmus Wriedt Larsen
ad1743ecde Python: Modernize modeling of BaseHTTPRequestHandler 2023-09-18 14:13:27 +02:00
Koen Vlaswinkel
8472b84cad C#: Remove unnecessary isEffectivelyPublic predicate 2023-09-18 13:49:16 +02:00
Koen Vlaswinkel
ff2cef3d6b C#: Switch from Declaration to Callable 2023-09-18 13:44:32 +02:00
Koen Vlaswinkel
e524e358f0 C#: Check accessor declaration for publicness 2023-09-18 13:40:23 +02:00
Koen Vlaswinkel
0cc74a2691 C#: Extract TestLibrary to separate module 2023-09-18 13:40:18 +02:00
Tamás Vajk
c4d7302f9e Merge pull request #14228 from tamasvajk/standalone-implicit-usings
C#: Generate source file with implicit usings in Standalone
2023-09-18 13:26:09 +02:00
Tony Torralba
bd31e1004a Merge pull request #14063 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-09-18 13:23:32 +02:00
Geoffrey White
4323bee243 Merge pull request #13980 from geoffw0/logfix
Swift: Improvements related to the swift/cleartext-logging query.
2023-09-18 12:18:40 +01:00
Anders Schack-Mulligen
b13d026434 Dataflow: Review fixes. 2023-09-18 13:15:26 +02:00
Tamas Vajk
fa814a5276 Add test cases for implicit using parsing 2023-09-18 12:47:50 +02:00
Mathias Vorreiter Pedersen
0e9f5f6b8e C++: Accept test changes. 2023-09-18 11:46:19 +01:00
Mathias Vorreiter Pedersen
38b100531b C++: Only add conversion when necessary. 2023-09-18 11:46:11 +01:00
Mathias Vorreiter Pedersen
53561b7883 C++: Add tests for sized allocation without a need for a synthesized conversion. 2023-09-18 11:45:18 +01:00
intrigus-lgtm
874f91c7ae Java: Further alert message improvement
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-09-18 12:25:31 +02:00
Alex Eyers-Taylor
c7ccfac938 CPP: Simplify some code in IRGuards. 2023-09-18 10:51:48 +01:00
Mathias Vorreiter Pedersen
734a91db9c Merge pull request #14237 from MathiasVP/range-analysis-perf
C++: Fix order of non-linear join in range analysis
2023-09-18 10:38:19 +01:00
Geoffrey White
86b0fae77e Swift: Update uses of deprecated ArrayContent. 2023-09-18 10:28:45 +01:00
Geoffrey White
d15420c42c Swift: Consequences of change in main on the test internals. 2023-09-18 10:07:23 +01:00
Geoffrey White
c3ea0cea91 Merge branch 'main' into logfix 2023-09-18 10:00:16 +01:00
Tony Torralba
b08e410f45 Merge pull request #14029 from atorralba/atorralba/apache-cxf-models
Java: Add new Apache CXF models
2023-09-18 10:54:05 +02:00
erik-krogh
9c0682848e use final class aliases to use extends instead of instanceof in the shared libraries 2023-09-18 10:25:49 +02:00
Erik Krogh Kristensen
a3e2e420f0 Merge pull request #14241 from github/dependabot/cargo/ql/chrono-0.4.31
Bump chrono from 0.4.30 to 0.4.31 in /ql
2023-09-18 08:41:25 +02:00
dependabot[bot]
f3a746c324 Bump chrono from 0.4.30 to 0.4.31 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.30 to 0.4.31.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.30...v0.4.31)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:10:03 +00:00
github-actions[bot]
0ae4b628a3 Add changed framework coverage reports 2023-09-18 00:15:17 +00:00
Maiky
52007fb9a2 Change v3 to v2 2023-09-17 21:42:18 +02:00
Maiky
1764aa0caf Fixing NumpyLoadCall 2023-09-17 19:44:48 +02:00
Maiky
8254d0dd10 Naming error
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-09-17 18:53:48 +02:00
Maiky
6d0ba5f97b Add allow_pickle to tests
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-09-17 18:53:18 +02:00
Maiky
70103967ef Doc changes
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-09-17 18:47:19 +02:00
Maiky
cada523031 Remove unnecessary import
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-09-17 18:46:13 +02:00
Maiky
97c20b181a Add change note 2023-09-16 14:01:53 +02:00
Mathias Vorreiter Pedersen
46b15fa6f2 C++: Fix join of non-linear joins. 2023-09-16 01:33:16 +01:00
Robert Marsh
2b54ad58b0 Swift: change note for nil-coalesing operator 2023-09-15 20:44:05 +00:00
Michael B. Gale
8dd7602dff Merge pull request #14234 from github/mbg/go/1.21-update-version-regex
Go: Update `versionRe` to include patch version
2023-09-15 17:23:51 +01:00
Michael B. Gale
d7278be064 Go: Update versionRe to include patch version
This is optional
2023-09-15 16:50:24 +01:00
Joe Farebrother
868836e747 Update severity 2023-09-15 16:40:12 +01:00
Joe Farebrother
eb2f5898bd Fix typos 2023-09-15 16:39:51 +01:00
Joe Farebrother
68ad5b7c00 Restrict logic for checking for id parameters on index expressions for performance 2023-09-15 16:35:29 +01:00
Mathias Vorreiter Pedersen
cdf5872eb3 Merge pull request #14217 from alexet/is-trivial-built-in
CPP:Make __is_trivial a builtin operation.
2023-09-15 16:01:25 +01:00
amammad
52d1e45b05 add comments for better quality 2023-09-15 23:25:25 +10:00
Chris Smowton
f160c6c646 Merge pull request #14195 from Kwstubbs/SQL_int_sanitizer
Add Integer/Boolean Sanitizer to SQL injection Query
2023-09-15 14:13:35 +01:00
Chris Smowton
aaa230a791 Merge branch 'main' into SQL_int_sanitizer 2023-09-15 13:44:58 +01:00
Chris Smowton
062024b3d6 Merge pull request #14232 from smowton/smowton/fix/autoformat
Fix formatting mistake
2023-09-15 13:00:40 +01:00
Chris Smowton
a63bb1bbed Tidy 2023-09-15 12:58:44 +01:00
Chris Smowton
e62fcf9a45 Fix formatting mistake 2023-09-15 12:37:34 +01:00
Tamas Vajk
c34fef1eb6 Adjust integration tests after path changes and generating file with global usings 2023-09-15 13:35:25 +02:00
Chris Smowton
24dc09efad Merge pull request #14206 from smowton/smowton/feature/add-java-miscompilation-tests
Java: add tests for programs that don't compile
2023-09-15 11:14:04 +01:00
Maiky
f08eb3cdf4 Doc change
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-09-15 11:51:53 +02:00
Maiky
15b965bb3b rename verifies() to verifiesSignature() 2023-09-15 11:45:19 +02:00
Maiky
c43d0866f6 Update ruby/ql/src/experimental/cwe-347/EmptyJWTSecret.ql
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-09-15 11:42:43 +02:00
Maiky
122881ddf5 Simplify DataFlow::PairNode
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-09-15 11:41:19 +02:00
Maiky
d4f6111621 Naming change
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-09-15 11:40:51 +02:00
Maiky
153a435257 Naming change
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-09-15 11:40:42 +02:00
Maiky
aea6eeda38 Naming change
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-09-15 11:40:34 +02:00
Maiky
2ebe46bd05 Naming change
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-09-15 11:40:20 +02:00
Joe Farebrother
6d704be7d2 Rewrite checks for index expressions in terms of dataflow 2023-09-15 10:25:27 +01:00
Joe Farebrother
a2dce6be14 Check for authorize attributes in more namespaces and on overridden methods 2023-09-15 10:25:27 +01:00
Joe Farebrother
6a95ed64ff Add test cases for authorization from attributes 2023-09-15 10:25:27 +01:00
Joe Farebrother
ac45050545 Add checks for authorization attributes 2023-09-15 10:25:27 +01:00
Joe Farebrother
0a27da08d6 Minor changes from review suggestions to shared logic between this and missing access control
Use case insensitive regex, factor out page load to improve possible bad joins make needsAuth not a member predicate
2023-09-15 10:25:27 +01:00
Joe Farebrother
a022893f0f Add additional example to qhelp + additional resource 2023-09-15 10:25:27 +01:00
Joe Farebrother
86abd338e5 Update test options 2023-09-15 10:25:26 +01:00
Joe Farebrother
9f25c71ca6 Apply minor reveiw suggstions 2023-09-15 10:25:26 +01:00
Joe Farebrother
4967fe0b77 Add change note + update query ID 2023-09-15 10:25:26 +01:00
Joe Farebrother
3e6750ba4c Add documentation 2023-09-15 10:25:26 +01:00
Joe Farebrother
f8b1b38438 Update alert message and make user checks more precise 2023-09-15 10:25:26 +01:00
Joe Farebrother
009a7bfc87 Add MVC tests 2023-09-15 10:25:26 +01:00
Joe Farebrother
20d42dfd7d Add tests for webforms case 2023-09-15 10:25:26 +01:00
Joe Farebrother
2edd73eb60 Fix typos in filepath + metadata, add severity 2023-09-15 10:25:26 +01:00
Joe Farebrother
251f875304 Fix filenme typo 2023-09-15 10:25:26 +01:00
Joe Farebrother
5d1289672b Add IDOR query 2023-09-15 10:25:26 +01:00
Joe Farebrother
a510a7b4c0 Add insecure direct object reference definitions and factor out those from missing access control 2023-09-15 10:25:26 +01:00
Mathias Vorreiter Pedersen
6c7833f28c Merge pull request #14223 from MathiasVP/add-explicit-dereferenced-by-operation-base-case-predicate
C++: Add a `directDereferencedByOperation` predicate
2023-09-15 10:19:26 +01:00
Tom Hvitved
14561c414b Merge pull request #14225 from hvitved/ruby/fix-bad-join
Ruby: Fix a bad join
2023-09-15 10:59:24 +02:00
Tamas Vajk
d725bd9169 C#: Generate source file with implicit usings in Standalone 2023-09-15 10:52:57 +02:00
Chris Smowton
c5001a86f6 Fix test expectations 2023-09-14 20:45:54 +01:00
Tom Hvitved
c83a29c27f Ruby: Fix a bad join
Before
```
Evaluated relational algebra for predicate Sinatra#e09174a3::Sinatra::ErbLocalsAccessSummary#fff@22c05bb6 with tuple counts:
          212957   ~2195%    {1} r1 = JOIN _Constant#54e8b051::ConstantValue::getStringlikeValue#0#dispred#ff_Expr#6fb2af19::Expr::getConstantV__#shared WITH Expr#6fb2af19::Pair::getKey#0#dispred#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.1
        43862468   ~6045%    {2} r2 = JOIN r1 WITH Call#841c84e8::MethodCall::getMethodName#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0
        43862468   ~6581%    {2} r3 = JOIN r2 WITH AST#a6718388::AstNode::getLocation#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        43844886  ~40661%    {2} r4 = JOIN r3 WITH locations_default ON FIRST 1 OUTPUT Rhs.1, Lhs.1
           15004   ~8295%    {3} r5 = JOIN r4 WITH project#Sinatra#e09174a3::Sinatra::ErbLocalsHashSyntheticGlobal#ffff_201#join_rhs ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Rhs.1
           15004   ~8890%    {3} r6 = SCAN r5 OUTPUT ("sinatra_erb_locals_access()" ++ In.0 ++ "#" ++ In.1), In.2, In.1
                             return r6
```

After
```
Evaluated relational algebra for predicate Sinatra#e09174a3::Sinatra::ErbLocalsAccessSummary#fff@f6249cga with tuple counts:
         10237       ~0%    {3} r1 = JOIN locations_default_10#join_rhs WITH project#Sinatra#e09174a3::Sinatra::ErbLocalsHashSyntheticGlobal#ffff_201#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
          4015       ~5%    {3} r2 = JOIN r1 WITH AST#a6718388::AstNode::getLocation#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
           825      ~96%    {3} r3 = JOIN r2 WITH Call#841c84e8::MethodCall::getMethodName#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
           940       ~0%    {4} r4 = JOIN r3 WITH Constant#54e8b051::ConstantValue::getStringlikeValue#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0
        325402       ~0%    {4} r5 = JOIN r4 WITH Expr#6fb2af19::Expr::getConstantValue#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3
        231819  ~133147%    {3} r6 = JOIN r5 WITH Expr#6fb2af19::Pair::getKey#0#dispred#ff_1#join_rhs ON FIRST 1 OUTPUT Lhs.2, Lhs.3, Lhs.1
        231819  ~138805%    {3} r7 = SCAN r6 OUTPUT ("sinatra_erb_locals_access()" ++ In.0 ++ "#" ++ In.1), In.2, In.1
                            return r7
```
2023-09-14 21:34:17 +02:00
Harry Maclean
5706bc6205 Ruby: Model GraphQL InputObject arguments 2023-09-14 19:02:39 +01:00
Ian Lynagh
730480360e Merge pull request #14221 from igfoo/igfoo/gradle_seq
Kotlin: Add more tests to the "gradle sequential" set
2023-09-14 18:39:11 +01:00
Robert Marsh
eddca7f3f6 Swift: autoformat for for-in changes 2023-09-14 16:48:19 +00:00
Chris Smowton
5f6a40b9e8 Note Kotlin test no longer has CFG dead-ends if ErrorExpr participates in the CFG 2023-09-14 17:42:00 +01:00
Chris Smowton
d9f7180b5c Add missing diagnostic expectations 2023-09-14 17:42:00 +01:00
Chris Smowton
8f940c311a Update expectations and add expected diagnostics 2023-09-14 17:42:00 +01:00
Chris Smowton
a1a7640427 Give ErrorExpr default control flow
This prevents a CFG dead-end because of one ErrorExpr
2023-09-14 17:42:00 +01:00
Chris Smowton
b1e128b5c1 Pretty-print a ClassInstanceExpr without a bound constructor nicely 2023-09-14 17:42:00 +01:00
Chris Smowton
9670f20bd7 Add test for method reference whose LHS has unknown type
This can happen when imports or source classes are missing.
2023-09-14 17:42:00 +01:00
Chris Smowton
6ea7b195db Add test for a module declaration made in a file named other than module-info.java
This triggers a weird corner case in our extractor, which used to throw a null pointer exception.
2023-09-14 17:42:00 +01:00
Chris Smowton
c47ba000d6 Add test exercising the case of a missing type used as an interface
This induces the TypeEnter phase to create an ErrorType with a parameter, which in turn used to cause a stack overflow in comparing the TypeWrapper objects involved.

Note the output remains somewhat broken, exposing an <any> type, but at least the overflow is resolved.
2023-09-14 17:42:00 +01:00
Chris Smowton
4b5651bde9 Add test for Java extracting ErrorType 2023-09-14 17:42:00 +01:00
Chris Smowton
c0f8973749 Add test for extracting a Java AST with an error expression
Also note that ErrorExpr can occur outside upgrade/downgrade scripts
2023-09-14 17:42:00 +01:00
Chuan-kai Lin
264e57fc59 Merge pull request #14222 from github/mergeback-codeql-cli-2.14.5
Custom post-release preparation for codeql-cli-2.14.5
2023-09-14 09:40:11 -07:00
Robert Marsh
ab7cd5254a Swift: update dataflow test for nil coalescing 2023-09-14 16:28:00 +00:00
Mathias Vorreiter Pedersen
8aeb9b9ae0 Merge pull request #14219 from MathiasVP/fix-phi-flow-2
C++: Fix `phi`->`phi` flow
2023-09-14 17:22:51 +01:00
Robert Marsh
9a5fa42dbe Swift: CFG for nil coalescing operator 2023-09-14 16:16:30 +00:00
Mathias Vorreiter Pedersen
b18de9e641 C++: Add a named base case predicate for 'dereferencedByOperation' that can be used in queries. 2023-09-14 17:12:58 +01:00
Ian Lynagh
e5ac7620e3 Kotlin: Add more tests to the "gradle sequential" set 2023-09-14 15:44:32 +01:00
AlexDenisov
ff7ff6dcfa Merge pull request #14201 from MathiasVP/add-ast-consistency-query
C++: Add AST consistency query
2023-09-14 16:34:20 +02:00
Robert Marsh
56b646a74c Merge branch 'main' into rdmarsh2/swift/for-in 2023-09-14 14:14:06 +00:00
Robert Marsh
55546fe61c Merge pull request #14205 from rdmarsh2/rdmarsh2/swift/unify-array-collection-content
Swift: Unify `ArrayContent` and `CollectionContent`
2023-09-14 10:08:37 -04:00
Tom Hvitved
c0e600c515 Merge pull request #12672 from hvitved/ruby/implicit-array-reads-at-sinks
Ruby: Allow for implicit array reads at all sinks during taint tracking
2023-09-14 15:39:37 +02:00
amammad
0d3b944207 fix some mistakes:( 2023-09-14 23:39:28 +10:00
Tom Hvitved
61bfc4ec09 Merge pull request #14204 from hvitved/ruby/simplify-viable-callable
Ruby: Simplify `viableSourceCallableNonInit`
2023-09-14 15:36:47 +02:00
Robert Marsh
dd01da4938 Swift: AST and CFG tests for nil coalescing 2023-09-14 13:26:41 +00:00
Ian Lynagh
52d924924b Kotlin: Extract LighterAST comments as well as PSI comments 2023-09-14 14:24:52 +01:00
Mathias Vorreiter Pedersen
6ce7a56b41 Merge pull request #14190 from github/alexdenisov/await-inconsistencies
Swift: fix CFG for identity expressions (await, dot_self, parent)
2023-09-14 14:15:31 +01:00
Harry Maclean
5411123b8a Ruby: Fix GraphQL test 2023-09-14 14:14:26 +01:00
Robert Marsh
62953cb250 Swift: document "ArrayElement" case in MaD
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-09-14 09:11:35 -04:00
Robert Marsh
6ad78eba05 Swift: ArrayContent aliased to CollectionContent 2023-09-14 13:08:36 +00:00
Mathias Vorreiter Pedersen
b0566af938 C++: Accept test changes. 2023-09-14 14:04:12 +01:00
Mathias Vorreiter Pedersen
36b7b6cffe C++: Fix phi-phi flow. 2023-09-14 14:02:03 +01:00
Mathias Vorreiter Pedersen
2a55034e55 C++: Add failing test. 2023-09-14 14:01:48 +01:00
Michael Nebel
e577fb68bd C#: Add integration test for dotnet dotnet. 2023-09-14 14:59:49 +02:00
Michael Nebel
8768b9e3dd C#: Fix tracer issue with dotnet dotnet. 2023-09-14 14:49:57 +02:00
Erik Krogh Kristensen
7e7852eff6 Merge pull request #13641 from erik-krogh/multi-char
JS/RB: write qhelp for `incomplete-multi-character-sanitization`
2023-09-14 14:48:30 +02:00
Harry Maclean
57ae1ee3e9 Ruby: Add test for GraphQL remote flow sources 2023-09-14 13:46:52 +01:00
Harry Maclean
1526fff085 Ruby: Add missing doc comments 2023-09-14 13:46:37 +01:00
Alex Eyers-Taylor
d79a2c7674 CPP:Make __is_trivial a builtin operation. 2023-09-14 12:50:36 +01:00
Harry Maclean
20f1a74202 Ruby: Restrict GraphQL remote flow sources
Previously we considered any splat parameter in a graphql resolver to be
a remote flow source. Now we limit that to reads of the parameter which
yield scalar types (e.g. String), as defined by the GraphQL schema.

This should reduce GraphQL false positives.
2023-09-14 12:14:56 +01:00
Harry Maclean
4168245fc0 Ruby: Fix doc comments 2023-09-14 10:02:27 +01:00
Harry Maclean
29a8a82e92 Ruby: add more docs for splat flow 2023-09-14 09:26:42 +01:00
Tom Hvitved
97ed5b8afb Ruby: Improvments to splat flow
- Only step through a `SynthSplatParameterElementNode` when there is a splat parameter
  at index > 0.
- Model read+stores via `SynthSplatArgumentElementNode` as a single read-store
  step in type tracking.
2023-09-14 09:26:42 +01:00
Harry Maclean
bf51cbad88 Ruby: Update test fixture 2023-09-14 09:26:38 +01:00
Tom Hvitved
e11a4b63e9 Ruby: Remove SynthSplatArgParameterNode 2023-09-14 09:26:38 +01:00
Harry Maclean
5a6a52b767 Ruby: Use fewer SynthSplatArgumentElementNodes
In cases such as

    def f(x, *y); end

    f(*[1, 2])

we don't need any `SynthSplatArgumentElementNodes`. We get flow from the
splat argument to a `SynthSplatParameterNode` via `parameterMatch`, then
from element 0 of the synth splat to the positional param `x` via a
read step.

We add a read step from element 1 to `SynthSplatParameterElementNode(1)`.
From there we get flow to element 0 of `*y` via an existing store step.
2023-09-14 09:26:38 +01:00
Harry Maclean
4c1beea465 Ruby: Address review comments 2023-09-14 09:26:33 +01:00
Paolo Tranquilli
168aca0af4 Swift: add release notes 2023-09-14 10:25:16 +02:00
Paolo Tranquilli
fc51f4a80e Swift: add update/downgrade scripts 2023-09-14 10:22:59 +02:00
Paolo Tranquilli
270c6407f0 Swift: accept test changes 2023-09-14 10:18:41 +02:00
Paolo Tranquilli
8d02bcc3cb Swift: change non-generated TypeDecl.ql 2023-09-14 10:18:24 +02:00
Michael Nebel
b9acf1a4ee Merge pull request #14111 from michaelnebel/csharp/reduceprojectrestore
C#: Avoid explicitly restoring projects in solution files.
2023-09-14 10:06:49 +02:00
Paolo Tranquilli
cf1667c325 Swift: update extractor after schema changes 2023-09-14 10:05:17 +02:00
Paolo Tranquilli
4d3aecfff6 Swift: rename base_types to syntactic_base_types in TypeDecl 2023-09-14 10:03:52 +02:00
Harry Maclean
3c8683428b Ruby: Model more splat flow (alternative approach) 2023-09-14 08:55:59 +01:00
Harry Maclean
9ccd8cd248 Ruby: Update documentation 2023-09-14 08:54:49 +01:00
Harry Maclean
ef63ea8399 Ruby: Update fixture 2023-09-14 08:54:48 +01:00
Harry Maclean
7ebd51163e Ruby: Handle more splat arg flow
Allow flow from a splat argument to a positional parameter in cases
where there are positional arguments left of the splat. For example:

    def foo(x, y, z); end

    foo(1, *[2, 3])
2023-09-14 08:54:48 +01:00
Tom Hvitved
e258324960 Ruby: Allow for implicit array reads at all sinks during taint tracking 2023-09-14 09:40:05 +02:00
Chuan-kai Lin
d8fb875bbb Merge pull request #14214 from github/cklin/pick-js-fix-2.14.5
Cherry pick "fix out of bounds string access in isUsingDecl" into 2.14.5
2023-09-13 14:21:47 -07:00
erik-krogh
cc3a76f7f5 fix out of bounds string access in isUsingDecl 2023-09-13 14:16:02 -07:00
Erik Krogh Kristensen
111227e763 Merge pull request #14211 from erik-krogh/usingOutOfBounds
JS: fix out of bounds string access in isUsingDecl
2023-09-13 22:23:15 +02:00
Erik Krogh Kristensen
b019fb3e91 Merge pull request #14212 from erik-krogh/usingOutOfBounds-hotfix
JS: fix out of bounds string access in isUsingDecl
2023-09-13 22:23:13 +02:00
Robert Marsh
e0fae764f1 Swift: move IteratorProtocol model to its own file 2023-09-13 20:09:17 +00:00
erik-krogh
c6b8c444d0 fix out of bounds string access in isUsingDecl 2023-09-13 21:53:49 +02:00
Robert Marsh
20de4c625c Swift: autoformat DataFlowPrivate 2023-09-13 18:57:27 +00:00
Robert Marsh
86bd2168ec Swift: breaking change note for array content removal 2023-09-13 18:34:30 +00:00
Robert Marsh
0b66be5f07 Swift: restore ArrayElement as an alias for CollectionElement 2023-09-13 18:29:03 +00:00
Robert Marsh
43ca192ceb Swift: remove ArrayContent in UnsafeJsEvalQuery 2023-09-13 18:26:06 +00:00
erik-krogh
fdd349c1a3 fix out of bounds string access in isUsingDecl 2023-09-13 20:11:21 +02:00
Geoffrey White
6aa8daeeb6 Swift: Fix inline expectations. 2023-09-13 19:06:54 +01:00
Geoffrey White
535a69cd8b Merge branch 'main' into logfix 2023-09-13 19:01:52 +01:00
Geoffrey White
e109892388 Merge pull request #14189 from geoffw0/protocol2
Swift: Consistent additional taint steps between the cleartext-* queries
2023-09-13 18:44:20 +01:00
Geoffrey White
d01a3e26d6 Swift: Change note. 2023-09-13 18:20:49 +01:00
Geoffrey White
200d9a4dfb Swift: Port regex mode flag character fix from Python. 2023-09-13 18:19:02 +01:00
Geoffrey White
df60f560a2 Swift: Add demonstrative test case. 2023-09-13 18:11:40 +01:00
Geoffrey White
af3d8c88bb Java: Fix test comment. 2023-09-13 17:58:31 +01:00
Geoffrey White
1c81bd52e6 Java: Change note. 2023-09-13 17:51:26 +01:00
Geoffrey White
8c3e778be6 Java: Port regex mode flag character fix from Python. 2023-09-13 17:50:52 +01:00
Chuan-kai Lin
00c83f185a Merge pull request #14182 from cklin/deprecate-assume-small-delta
Document assume_small_delta deprecation
2023-09-13 07:54:33 -07:00
Mathias Vorreiter Pedersen
18fa6f5d64 Merge pull request #14202 from alexet/translated-element-location
CPP: Add a location to TranslatedElement to help with debugging IR creation
2023-09-13 15:19:24 +01:00
Michael Nebel
84ec823ac0 C#: Add some explanatory comments about parallel restore. 2023-09-13 16:07:47 +02:00
Anders Schack-Mulligen
74787bfba8 Dataflow: One more minor perf tweak. 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
b63d518114 Dataflow: Minor perf tweak. 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
b456ba217a Dataflow: Improve rev-to-fwd call edge pruning. 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
f456bf8d57 Dataflow: Add change note. 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
13e7e6b983 Dataflow: Improve fwd-taken call edge predicate and improve fwd-to-rev call edge pruning. 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
47f68504a8 Dataflow: Postpone typeflow calledge pruning until stage 3. 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
f5a4b792bd C++/Go/Python/Ruby/Swift: Add dummy localMustFlowStep. 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
1750d00fbe C#: Add localMustFlowStep 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
e677c1ffe6 Java: Add qltest 2023-09-13 15:43:46 +02:00
Anders Schack-Mulligen
c8094d34a7 Dataflow: Add type-based call-edge pruning. 2023-09-13 15:43:45 +02:00
Anders Schack-Mulligen
300425540a Java: Minor improvement to TypeFlow for super accesses. 2023-09-13 15:43:45 +02:00
Anders Schack-Mulligen
a7b677ba40 Java: Bugfix for SuperAccess.isOwnInstanceAccess(). 2023-09-13 15:43:45 +02:00
Anders Schack-Mulligen
110a4c81e3 Java: Minor perf fix. 2023-09-13 15:43:45 +02:00
Dave Bartolomeo
edf6a80c3b Merge pull request #14185 from michaelnebel/csharp/quotinghotfixrc
C#: Quoting hotfix.
2023-09-13 09:34:05 -04:00
Alex Ford
79c305c1a1 Merge pull request #14124 from alexrford/rb/dataflow-query-refactor
Ruby: Use the new dataflow API for checked in queries
2023-09-13 14:24:47 +01:00
Koen Vlaswinkel
0434cce4c3 Java: Fix formatting of AutomodelVsCode.qll file 2023-09-13 14:54:03 +02:00
Tom Hvitved
bb7ba7872f Merge pull request #14203 from hvitved/ruby/semantic-merge-fix
Ruby: Fix semantic merge conflict
2023-09-13 14:53:18 +02:00
Koen Vlaswinkel
95296f1518 Java: Use don't care expression for kind and provenance 2023-09-13 14:45:47 +02:00
Tom Hvitved
f15cbb9316 Ruby: Simplify viableSourceCallableNonInit 2023-09-13 14:25:28 +02:00
Max Schaefer
e722e3288f Merge pull request #13771 from github/max-schaefer/server-side-url-redirect-help
JavaScript: Improve query help for `js/server-side-unvalidated-url-redirection`.
2023-09-13 13:20:48 +01:00
yoff
62b41799d2 Merge pull request #14178 from yoff/python/broaden-sql-injection-frameworks
Python: import all frameworks in SQL-injection query
2023-09-13 14:14:09 +02:00
Mathias Vorreiter Pedersen
177fcacf38 Merge pull request #14134 from MathiasVP/add-surprising-lifetimes-to-experimental
C++: Copy the Coding Standards' use-after-lifetime-ended query to Experimental
2023-09-13 13:06:18 +01:00
Tom Hvitved
f3a78efe03 Ruby: Fix semantic merge conflict 2023-09-13 14:04:20 +02:00
yoff
7d931492d8 Update python/ql/lib/semmle/python/security/dataflow/SqlInjectionCustomizations.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-09-13 13:37:18 +02:00
Michael Nebel
0127b779b5 C#: Address review comments. 2023-09-13 13:31:58 +02:00
Alex Ford
b5ec99cb2f Ruby: fix missing qldoc 2023-09-13 12:28:19 +01:00
Mathias Vorreiter Pedersen
a0018c92e1 Merge pull request #14193 from MathiasVP/fully-converted-expressions-for-flow-after-free
C++: Use fully converted expressions for `cpp/use-after-free` and `cpp/double-free`
2023-09-13 12:24:23 +01:00
Alex Eyers-Taylor
0c10fa0c87 CPP: Add a location to TranslatedElement to help with debugging IR creation 2023-09-13 12:21:30 +01:00
Ian Lynagh
bd1d6e1d1e Merge pull request #14188 from igfoo/igfoo/kotlin-1.9.20
Kotlin: Support 1.9.20
2023-09-13 12:19:46 +01:00
Mathias Vorreiter Pedersen
0cd4e32ed8 C++: Add AST consistency query. 2023-09-13 12:15:40 +01:00
Koen Vlaswinkel
585fb9db7e C#: Add VS Code model editor queries 2023-09-13 13:12:55 +02:00
Koen Vlaswinkel
7db082f3fd Java: Add VS Code model editor queries 2023-09-13 13:04:26 +02:00
Erik Krogh Kristensen
cd5973764b Merge pull request #14112 from erik-krogh/pyAllowedHosts
Py: add sanitizer guard for `url_has_allowed_host_and_scheme`
2023-09-13 12:59:38 +02:00
Mathias Vorreiter Pedersen
af51a0a9ca C++: Respond to review comments. 2023-09-13 11:43:12 +01:00
Mathias Vorreiter Pedersen
81d20be1ee Update cpp/ql/src/experimental/Security/CWE/CWE-416/UseAfterExpiredLifetime.qhelp
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-09-13 11:37:32 +01:00
Rasmus Wriedt Larsen
7292730391 Python: Add change-note 2023-09-13 11:55:48 +02:00
Rasmus Wriedt Larsen
f62c4108ef Python: Move url_has_allowed_host_and_scheme to Django.qll 2023-09-13 11:55:44 +02:00
Tom Hvitved
7400b4741e Merge pull request #14108 from hvitved/dataflow/more-consistency-checks
Data flow: Add `ArgumentNode` consistency checks
2023-09-13 11:30:51 +02:00
amammad
54a44777b7 v1 2023-09-13 19:14:15 +10:00
Tom Hvitved
bb85f87d7b Merge pull request #11725 from hvitved/ruby/capture-field-flow
Ruby: Reimplement flow through captured variables using field flow
2023-09-13 10:52:36 +02:00
Geoffrey White
3bf0d66d6c Merge pull request #13906 from geoffw0/commandinject2
Swift: Add tests and develop command injection query
2023-09-13 08:59:06 +01:00
Stephan Brandauer
7a7dc9b68f Merge pull request #14184 from github/kaeluka/application-mode-new-candidates-fixes
Java: Automodel, new candidates fix
2023-09-13 09:27:10 +02:00
Tom Hvitved
88d2e2590f Ruby: Rename LambdaSelfParameterNode to LambdaSelfReferenceNode 2023-09-13 08:52:22 +02:00
Kevin Stubbings
f9fe86a1ca Added change-notes 2023-09-12 21:34:30 -07:00
Kevin Stubbings
7d213d5bb9 Add Integer/Boolean Sanitizer 2023-09-12 21:10:11 -07:00
Ian Lynagh
df9c601571 Kotlin: Pass memory limits to kotlinc in some tests
We can run out of memory with the defaults
2023-09-12 23:14:41 +01:00
Robert Marsh
d9e694be9d Swift: update test expectation for collection content 2023-09-12 19:20:43 +00:00
Robert Marsh
4b970ff774 Swift: update models for array/collection content 2023-09-12 19:20:22 +00:00
Tom Hvitved
d3558f8579 Python: Update expected test output 2023-09-12 21:18:31 +02:00
Rasmus Wriedt Larsen
1de7460aba Python: Don't warn on multipleArgumentCall 2023-09-12 21:16:14 +02:00
Robert Marsh
3b7295b0fd Swift: unify ArrayContent and CollectionContent 2023-09-12 19:12:44 +00:00
Robert Marsh
7ca6b6f9a6 Swift: add dataflow test for async for 2023-09-12 19:05:03 +00:00
Robert Marsh
53ad559da5 Swift: fix for-try-await CFG 2023-09-12 19:04:30 +00:00
Mathias Vorreiter Pedersen
05080924de C++: Don't use converted expressions in 'LeapYear.qll'. 2023-09-12 19:48:52 +01:00
Mathias Vorreiter Pedersen
b03054b1ed C++: Make sure some instruction also gives back the 'ParenthesisExpr's. 2023-09-12 19:46:42 +01:00
Mathias Vorreiter Pedersen
71fe6f5d4b C++: Use fully converted expressions in 'cpp/use-after-free' and 'cpp/double-free'. 2023-09-12 19:28:57 +01:00
Robert Marsh
ecf1d98ce5 Merge pull request #14165 from rdmarsh2/rdmarsh2/swift/keypath-write-flow
Swift: flow through writeable keypaths
2023-09-12 14:24:40 -04:00
Tom Hvitved
c9910f5464 C++: Update expected test output 2023-09-12 20:05:12 +02:00
Tom Hvitved
53302117a1 C#: Implement missingArgumentCallExclude and multipleArgumentCallExclude 2023-09-12 20:05:11 +02:00
Tom Hvitved
b470c36c82 Ruby: Implement multipleArgumentCallExclude 2023-09-12 20:05:11 +02:00
Tom Hvitved
c13a8e41ad Data flow: Add more consistency checks 2023-09-12 20:05:05 +02:00
Ian Lynagh
4908188060 Kotlin: Add 1.9.20 support 2023-09-12 18:28:33 +01:00
Ian Lynagh
4d1ceff7df Kotlin: Fix build 2023-09-12 18:28:33 +01:00
Ian Lynagh
2b9a425468 Kotlin: Support 1.9.20 2023-09-12 18:28:33 +01:00
Geoffrey White
0d7769f687 Merge pull request #13276 from geoffw0/sqlpathinject
Swift: Add path injection sinks for sqlite3 and SQLite.swift
2023-09-12 17:36:27 +01:00
Henning Makholm
596f7012ca Merge pull request #14191 from github/hmakholm/pr/monotonic-unique
C++ tests: fix output of bug-stricken test
2023-09-12 18:21:35 +02:00
Geoffrey White
7e962dc764 Swift: Accept fixed test cases. 2023-09-12 17:18:29 +01:00
Max Schaefer
a9e81672f0 Make suggestion to replace example.com more explicit. 2023-09-12 16:54:05 +01:00
Robert Marsh
c2868fe05a Swift: change note for keypath write dataflow 2023-09-12 15:53:50 +00:00
Robert Marsh
47ac54bb81 Swift: autoformat DataFlowPrivate 2023-09-12 15:52:53 +00:00
Robert Marsh
8f797c7189 Merge branch 'main' into rdmarsh2/swift/keypath-write-flow 2023-09-12 15:51:36 +00:00
Max Schaefer
7ddb7da65e Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-09-12 16:47:23 +01:00
Chuan-kai Lin
d792175907 Merge pull request #14174 from github/post-release-prep/codeql-cli-2.14.4
Post-release preparation for codeql-cli-2.14.4
2023-09-12 08:02:20 -07:00
Henning Makholm
bac175e881 C++ tests: fix output of bug-stricken test
The expected output was incorrect and the result of an evaluator bug.
This change should go together with the internal PR that fixes this bug.
2023-09-12 16:28:59 +02:00
Alex Denisov
743fd902a1 Swift: fix CFG for identity expressions (await, dot_self, parent) 2023-09-12 16:04:45 +02:00
Stephan Brandauer
928898e979 Java: automodel: add class and method doc to test code 2023-09-12 15:43:09 +02:00
Geoffrey White
d65f2b4fa9 Swift: Change note. 2023-09-12 14:36:37 +01:00
Mathias Vorreiter Pedersen
d6e143a858 Merge pull request #14151 from MathiasVP/deduplicate-dataflow-results-take-3
C++: Deduplicate dataflow query results
2023-09-12 14:07:40 +01:00
Stephan Brandauer
089b147d04 Java: Automodel format 2023-09-12 14:27:12 +02:00
Stephan Brandauer
bd10ac799a Java: Automodel application mode: add test expectations 2023-09-12 14:20:28 +02:00
Stephan Brandauer
8121c7fefa Java: Automodel application mode: add method doc and class doc as related locations 2023-09-12 14:08:55 +02:00
Tom Hvitved
49d57653dc Merge pull request #14170 from hvitved/csharp/cil-arg-exclude
C#: Exclude CIL arguments from `ArgumentNode` when they are compiled from source
2023-09-12 13:44:29 +02:00
Ian Lynagh
2f57a62a7a Merge pull request #14144 from igfoo/igfoo/nonir
Kotlin: Give some more informative errors messages
2023-09-12 12:07:09 +01:00
Ian Lynagh
d8a99e6b7d Kotlin: Regenerate expected test output
It's now in the order generated by the new CLI. This means that
changes in test output are easier to understand.
2023-09-12 11:13:58 +01:00
Mathias Vorreiter Pedersen
d528c96563 Merge branch 'main' into deduplicate-dataflow-results-take-3 2023-09-12 10:28:57 +01:00
Mathias Vorreiter Pedersen
ff28f45058 C++: Accept test changes. 2023-09-12 10:28:46 +01:00
Mathias Vorreiter Pedersen
7d2c12e63d C++: Handle the extent of 'new[]' in 'getConvertedResultExpressionImpl0' and add a few more comments. 2023-09-12 10:28:36 +01:00
Michael Nebel
7bcaa49f5a C#: Add integration test with quoted arguments. 2023-09-12 10:33:39 +02:00
Michael Nebel
6fe9b70c92 C#: Poor mans quoting of arguments on windows. 2023-09-12 10:33:21 +02:00
Stephan Brandauer
0115ba0df3 Java: Automodel: drive-by, add extensibleType metadata to app mode +/- extraction 2023-09-12 09:29:54 +02:00
intrigus-lgtm
b6417ca212 Java: Fix alert message
The signing key that is being set, is _not_ what is being parsed.
A _JWT_ is being parsed, that will then be verified using the set key.
(Or in our case not, because we're looking for security problems :P)
2023-09-12 02:23:37 +02:00
Geoffrey White
ae0fcf791b Swift: Expand the additional taint step from the cleartext storage database query to the other sensitive data queries. 2023-09-11 22:25:17 +01:00
Geoffrey White
aa5820c061 Swift: Add some test cases. 2023-09-11 19:33:37 +01:00
Chuan-kai Lin
43eee2b4b3 Document assume_small_delta deprecation 2023-09-11 10:37:15 -07:00
Chris Smowton
b291ee361a Merge pull request #14179 from github/smowton/fix/go-baseline-quoting
Fix space handling in Golang configure-baseline scripts
2023-09-11 15:54:24 +01:00
Rasmus Lerchedahl Petersen
a063d7d510 Python: sinks -> decodings
Query operators that interpret JavaScript
are no longer considered sinks.
Instead they are considered decodings
and the output is the tainted dictionary.
The state changes to `DictInput` to reflect
that the user now controls a dangerous dictionary.

This fixes the spurious result and moves the error reporting
to a more logical place.
2023-09-11 16:33:20 +02:00
Geoffrey White
e038f60640 Swift: Convert some sinks to CSV. 2023-09-11 14:54:32 +01:00
Rasmus Lerchedahl Petersen
d9f63e1ed3 Python: Split modelling of query operators
`$where` and `$function` behave quite differently.
2023-09-11 15:54:00 +02:00
Geoffrey White
7d05446483 Swift: Formatting. 2023-09-11 14:11:11 +01:00
Rasmus Lerchedahl Petersen
154a36934d Python: Add test for function 2023-09-11 14:49:03 +02:00
Geoffrey White
1cde183005 Merge branch 'main' into logfix 2023-09-11 13:14:58 +01:00
Geoffrey White
c18de7d9af Merge pull request #14036 from geoffw0/quicktest
Swift: Additional dataflow test
2023-09-11 13:04:48 +01:00
Geoffrey White
3fd5de83cb Merge branch 'main' into sqlpathinject 2023-09-11 12:42:49 +01:00
Michael Nebel
6bfaa90fe4 C#: Avoid explicitly restoring the projects in the restored solution files. 2023-09-11 13:30:28 +02:00
Geoffrey White
fc69be4df9 Merge branch 'main' into quicktest 2023-09-11 12:25:38 +01:00
Michael Nebel
aaaf6f8616 Merge pull request #14150 from michaelnebel/csharp/tracerwhitespace
C#: Explicitly quote arguments in the LUA tracer on windows.
2023-09-11 13:18:21 +02:00
Chris Smowton
d13f4210eb Fix space handling in Golang configure-baseline scripts 2023-09-11 10:51:35 +01:00
Michael Nebel
d4a1c297aa C#: Quote arguments containing whitespaces on windows in the tracer. 2023-09-11 11:18:27 +02:00
Michael Nebel
8475464fbe C#: Cleanup hotfix version of quoting. 2023-09-11 11:18:27 +02:00
Rasmus Lerchedahl Petersen
93140cb061 Python: import all frameworks
Are there any frameworks we do _not_ want here?
2023-09-11 11:17:08 +02:00
Mathias Vorreiter Pedersen
becb469477 Merge branch 'main' into deduplicate-dataflow-results-take-3 2023-09-11 09:55:11 +01:00
Michael Nebel
1b90216c98 Merge pull request #14172 from michaelnebel/csharp/poormansquoting
C#: Poor mans quoting.
2023-09-11 08:57:44 +02:00
Mathias Vorreiter Pedersen
7ff4ebd912 Merge pull request #14102 from alexet/alexet/remove-unreachable-ir
CPP: Remove sucessors of non-returning IR calls transitively.
2023-09-09 14:48:26 +01:00
github-actions[bot]
d699880c86 Post-release preparation for codeql-cli-2.14.4 2023-09-08 21:17:52 +00:00
Robert Marsh
988a871999 Swift: add flow through for-in loops 2023-09-08 20:00:27 +00:00
Chuan-kai Lin
1a575ef297 Merge pull request #14167 from asgerf/ts/tolerate-out-of-order-requests
JS: tolerate out of order requests in TypeScript extractor
2023-09-08 12:33:44 -07:00
Robert Marsh
a3e250aef5 Swift: extract iterator variable for for-in loops 2023-09-08 19:08:57 +00:00
Robert Marsh
e1ffc8d886 Merge pull request #14171 from MathiasVP/fix-dataflow-out-of-post-update-nodes
C++: Fix dataflow out of post update nodes
2023-09-08 14:56:41 -04:00
Alex Eyers-Taylor
5892939488 CPP:Fix chnage note spelling 2023-09-08 17:47:04 +01:00
Mathias Vorreiter Pedersen
9f89c63771 C++: Accept test changes. 2023-09-08 17:07:26 +01:00
Mathias Vorreiter Pedersen
0be61be07a C++: Handle flow out of post-update nodes when there's another use of the variable in the call that we need to skip. 2023-09-08 17:07:26 +01:00
Alex Eyers-Taylor
5fe44b65b7 CPP: Avoid CP with edgekind in non-returning analysis 2023-09-08 16:55:06 +01:00
Robert Marsh
50d23f145b merge main into for-in getnextcall branch 2023-09-08 15:51:27 +00:00
Robert Marsh
161e5a4ca2 Merge branch 'main' into rdmarsh2/swift/keypath-write-flow 2023-09-08 15:39:06 +00:00
Robert Marsh
1082b1d4d1 Swift: use PostUpdateNodeImpl for more postupdate nodes 2023-09-08 15:19:46 +00:00
Michael B. Gale
109bd9057e Merge pull request #14161 from github/mbg/go/add-toolchain-directive-diagnostic
Go: Add diagnostic for 1.21 `toolchain` error
2023-09-08 14:55:47 +01:00
Stephan Brandauer
7705f0e7e6 Merge pull request #14162 from github/kaeluka/application-mode-source-candidates
Java: Automodel App Mode Extraction: Source Candidates
2023-09-08 15:43:03 +02:00
Michael Nebel
11987d3ebf C#: Add integration test with quoted arguments. 2023-09-08 15:09:24 +02:00
Michael Nebel
9691100138 C#: Poor mans quoting of arguments on windows. 2023-09-08 15:09:24 +02:00
Tom Hvitved
ecbf2d8b13 C#: Exclude CIL arguments from ArgumentNode when they are compiled from source 2023-09-08 14:14:06 +02:00
Mathias Vorreiter Pedersen
d5442ec9c5 C++: Add regression test. 2023-09-08 13:10:04 +01:00
Stephan Brandauer
bbedd72260 Java: Automodel App Mode: rename MethodCall to MethodReturnValue 2023-09-08 13:57:21 +02:00
Stephan Brandauer
704c7ee104 Java: Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
2023-09-08 13:54:26 +02:00
Rasmus Lerchedahl Petersen
d91cd21204 Python: rename file 2023-09-08 13:37:54 +02:00
Tom Hvitved
354a55c735 Merge pull request #14169 from hvitved/backport-fix
Revert "C#: Bump all dependencies"
2023-09-08 13:37:12 +02:00
Alex Eyers-Taylor
e208a7aed6 CPP: Add change notes for the non-returning function improvements. 2023-09-08 11:26:27 +01:00
Tom Hvitved
01a74db368 Merge pull request #14168 from hvitved/csharp/recommended-extensions-remove
C#: Remove test explorer recommendations (superseded by C# dev kit)
2023-09-08 11:29:27 +02:00
Tom Hvitved
e6a6a7931b Revert "C#: Bump all dependencies" 2023-09-08 11:19:00 +02:00
Tom Hvitved
9b8948bc2e C#: Remove test explorer recommendations (superseded by C# dev kit) 2023-09-08 10:47:52 +02:00
Tom Hvitved
f720528368 Merge pull request #14149 from hvitved/csharp/extract-gen-no-trap-stack
C#: Clear TRAP stack when calling `PopulateGenerics`
2023-09-08 10:37:07 +02:00
Asger F
ea384b340a JS: Change note 2023-09-08 10:31:04 +02:00
Asger F
e08a873829 JS: Tolerate TypeScript files being requested out of order 2023-09-08 10:31:04 +02:00
Erik Krogh Kristensen
94442c1799 Merge pull request #14166 from github/dependabot/cargo/ql/chrono-0.4.30
Bump chrono from 0.4.29 to 0.4.30 in /ql
2023-09-08 09:38:28 +02:00
Stephan Brandauer
4effc11fdb Java: comments 2023-09-08 09:16:56 +02:00
dependabot[bot]
66a4f1bf74 Bump chrono from 0.4.29 to 0.4.30 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.29 to 0.4.30.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.29...v0.4.30)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-08 04:04:05 +00:00
Mathias Vorreiter Pedersen
49fee35b37 Merge pull request #13947 from rdmarsh2/rdmarsh2/swift/dictionary-flow-tuples
Swift: collection/tuple content for dictionary flow
2023-09-07 22:05:10 +01:00
Robert Marsh
0d79158bb1 Swift: remove TODOs after deciding not to do them 2023-09-07 20:15:12 +00:00
Robert Marsh
603f2cd3b2 Swift: fix test expectation properly 2023-09-07 19:35:02 +00:00
Mathias Vorreiter Pedersen
32ed82eecc Merge pull request #14154 from MathiasVP/fix-off-by-one-in-asDefiningArgument 2023-09-07 18:48:57 +01:00
Robert Marsh
0fff540add Swift: update a test expectation for dictionary flow 2023-09-07 16:14:23 +00:00
Robert Marsh
4f4491a876 Swift: autoformat 2023-09-07 16:14:05 +00:00
Robert Marsh
5fe942e642 Swift: flow through writeable keypaths 2023-09-07 15:56:44 +00:00
Rasmus Wriedt Larsen
2182bf17dc Merge pull request #14160 from erik-krogh/py-clear-text-log-help
Py: add new qhelp for clear-text-logging
2023-09-07 16:35:19 +02:00
Alex Ford
5b013dd5d2 Merge branch 'main' into rb/dataflow-query-refactor 2023-09-07 14:57:38 +01:00
Alex Ford
947fa0de62 Ruby: fix qldoc warnings 2023-09-07 14:57:04 +01:00
Alex Ford
4a01de13ef Ruby: avoid toString in query warning 2023-09-07 14:54:50 +01:00
Stephan Brandauer
c4f5213d68 Java: format 2023-09-07 15:50:03 +02:00
Stephan Brandauer
836a5822f3 Java: Automodel App Mode: remove bogus implementation 2023-09-07 15:49:58 +02:00
Stephan Brandauer
c173d9ae40 Java: automodel application mode: generate models for overridden method candidates 2023-09-07 15:49:58 +02:00
Stephan Brandauer
3121949123 Java: automodel application mode: test case for overridden method candidate 2023-09-07 15:49:58 +02:00
Stephan Brandauer
1e1b59ed52 Java: automodel: additionally consider sources for alreadyAiModeled property 2023-09-07 15:49:58 +02:00
Stephan Brandauer
6f7d78183f Java: add endpoints for parameters of overridden methods in automodel application mode 2023-09-07 15:49:57 +02:00
Stephan Brandauer
dff8259e78 Java: support remote sources in automodel positive example extraction 2023-09-07 15:49:57 +02:00
Stephan Brandauer
fcabca4581 Java: Export MaD output in application mode extraction queries 2023-09-07 15:49:57 +02:00
Stephan Brandauer
8d133f86c7 Java: replace getArgIndex by getMaDInput 2023-09-07 15:49:57 +02:00
Stephan Brandauer
902a585b47 Java: remove isArgOf predicate 2023-09-07 15:49:57 +02:00
Stephan Brandauer
caaf2f83d7 Java: enable model exclusion characteristic also for source candidates 2023-09-07 15:49:57 +02:00
Stephan Brandauer
344aa9cb6b Java: enable local call characteristic also for source candidates 2023-09-07 15:49:57 +02:00
Stephan Brandauer
afc5aedd0a Java: enable exception characteristic also for source candidates 2023-09-07 15:49:57 +02:00
Stephan Brandauer
a526b79211 Java: enable unexploitable is/exists characteristics also for source candidates 2023-09-07 15:49:57 +02:00
Stephan Brandauer
f55d950be3 Java: update application mode extraction test expectations after adding source candidates 2023-09-07 15:49:57 +02:00
Stephan Brandauer
937e452ce0 Java: add extensibleType to sampling keys 2023-09-07 15:49:57 +02:00
Stephan Brandauer
eb1e29d284 Java: add new endpoint class for source candidates in application mode 2023-09-07 15:49:57 +02:00
Stephan Brandauer
7cfcbf6b71 Java: add extensible type to endpoint class in application mode 2023-09-07 15:49:56 +02:00
Alex Ford
0aee7f6ac6 Ruby: qlformat 2023-09-07 14:47:02 +01:00
Alex Ford
13300a2e2f Ruby: un-private PathGraph imports 2023-09-07 14:24:46 +01:00
Alex Ford
a893911dba Ruby: Use a newtype instead of DataFlow::FlowState for insecure-download 2023-09-07 14:22:18 +01:00
Alex Ford
75fdde543f Ruby: Use a newtype instead of DataFlow::FlowState for hardcoded-data 2023-09-07 14:13:26 +01:00
Rasmus Lerchedahl Petersen
b07d085157 Python: make test PoC a proper package 2023-09-07 15:04:27 +02:00
Rasmus Lerchedahl Petersen
970e881697 Python: Follow naming convention 2023-09-07 15:03:51 +02:00
Alexander Eyers-Taylor
df2b313c5e Merge pull request #14155 from alexet/reach-end-of-function-return
CPP: Make functions that reach the end return.
2023-09-07 13:58:43 +01:00
Alex Eyers-Taylor
43a72f2a8e CPP:Add tests for the aliased IR. 2023-09-07 13:42:31 +01:00
Alex Eyers-Taylor
404145dd1b CPP: Update tests 2023-09-07 13:42:31 +01:00
Alex Ford
0d7d5a35c9 Ruby: Use a newtype instead of DataFlow::FlowState for code-injection 2023-09-07 13:39:10 +01:00
Alex Eyers-Taylor
b44c4587a4 CPP: Remove sucessors of non-returning IR calls. 2023-09-07 12:58:20 +01:00
Alex Eyers-Taylor
e8dfecc4a4 CPP: Fix test result 2023-09-07 12:49:13 +01:00
Alex Eyers-Taylor
d603b7ac3c CPP: Make functions that reach the end return.
This is UB in C++ but not C where it is only bad if the result is used.
2023-09-07 12:39:48 +01:00
Alex Ford
dfc3b33910 Ruby: Use a newtype instead of DataFlow::FlowState for unicode-bypass-validation 2023-09-07 12:09:47 +01:00
Michael B. Gale
3b708993c7 Go: Add diagnostic for 1.21 toolchain error 2023-09-07 11:51:20 +01:00
erik-krogh
bf3fe3cd66 add new qhelp for clear-text-logging 2023-09-07 12:39:13 +02:00
Michael B. Gale
38892bb51b Merge pull request #13999 from github/mbg/csharp/standalone/dotnet-version
C# Standalone: Install .NET SDK specified in `global.json`
2023-09-07 11:30:53 +01:00
Rasmus Wriedt Larsen
ec0529d68c Merge pull request #14145 from p-/p--asyncio-cmdi-exec
Python: Support for command injection sinks found in the `asyncio` module
2023-09-07 11:27:50 +02:00
Rasmus Wriedt Larsen
bfb4be26c2 Python: Autoformat 2023-09-07 10:31:39 +02:00
Rasmus Wriedt Larsen
54c456d95d Python: Apply suggestions from code review 2023-09-07 10:28:46 +02:00
Rasmus Lerchedahl Petersen
f253f9797f Python: update test expectations 2023-09-07 10:22:37 +02:00
Rasmus Lerchedahl Petersen
7edebbeaff Python: Add QLDocs 2023-09-07 10:22:37 +02:00
Rasmus Lerchedahl Petersen
c0b3245a53 Python: Enrich the NoSql concept
This allows us to make more precise modelling
The query tests now pass.
I do wonder, if there is a cleaner approach, similar to
`TaintedObject` in JavaScript. I want the option to
get this query in the hands of the custumors before
such an investigation, though.
2023-09-07 10:22:37 +02:00
Rasmus Lerchedahl Petersen
114984bd8c Python: Added tests based on security analysis
currently we do not:
- recognize the pattern
   `{'author': {"$eq": author}}` as protected
- recognize arguements to `$where` (and friends)
   as vulnerable
2023-09-07 10:22:37 +02:00
Rasmus Lerchedahl Petersen
bf8bfd91cd Python: Add inline query test 2023-09-07 10:22:30 +02:00
Rasmus Wriedt Larsen
d4c3dfffec Merge pull request #14158 from RasmusWL/fix-ssrf-example
Python: Fix typo in SSRF example
2023-09-07 10:22:21 +02:00
Max Schaefer
46d7165885 Explain about redirects to example.com. 2023-09-07 09:12:07 +01:00
Rasmus Wriedt Larsen
c85ea9a0c0 Python: Fix typo in SSRF example 2023-09-07 09:45:02 +02:00
Rasmus Lerchedahl Petersen
19046ea417 Python: more renames 2023-09-07 09:28:30 +02:00
Rasmus Lerchedahl Petersen
087961d179 Python: Refactor to allow customizations
Also use new DataFlow API
2023-09-07 09:28:30 +02:00
Rasmus Lerchedahl Petersen
db0459739f Python: rename file 2023-09-07 09:28:30 +02:00
Rasmus Lerchedahl Petersen
55707d395e Python: Make things compile in their new location
- Move NoSQL concepts to the non-experimental concepts file
- fix references
2023-09-07 09:28:30 +02:00
Rasmus Lerchedahl Petersen
60dc1afbc0 Python: prepare to promote NoSqlInjection
Mostly move files, preserving authourship.
This will not compile.
2023-09-07 09:28:29 +02:00
Michael B. Gale
ccbc6f446a Use git ls-files to find DLLs to index 2023-09-06 22:17:08 +01:00
Tom Hvitved
718e491800 C#: Clear TRAP stack when calling PopulateGenerics 2023-09-06 21:12:01 +02:00
Tom Hvitved
334502a3de Merge pull request #14153 from github/revert-14082-csharp/bump-dependencies
Revert "C#: Bump all dependencies"
2023-09-06 21:10:56 +02:00
Mathias Vorreiter Pedersen
3f6346737c Update 2023-09-06-as-defining-argument-off-by-one-fix.md
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
2023-09-06 19:48:48 +01:00
Mathias Vorreiter Pedersen
87925abaa2 C++: Add change note. 2023-09-06 17:26:08 +01:00
Mathias Vorreiter Pedersen
14faa5d020 C++: Fix off-by-one in 'asDefiningArgument' so that the domain of the argument is '[1..]' like 'asIndirectArgument'. 2023-09-06 17:19:44 +01:00
Peter Stöckli
7aa5d2dc8a Python: move asyncio CMDi related tests to stdlib tests 2023-09-06 16:54:18 +02:00
Robert Marsh
5bdd9597d2 Merge branch 'main' into rdmarsh2/swift/dictionary-flow-tuples 2023-09-06 14:50:16 +00:00
Mathias Vorreiter Pedersen
12a717e3af Merge pull request #14141 from github/alexdenisov/unresolved-ast-nodes
Swift: add queries for unresolved AST nodes
2023-09-06 15:40:11 +01:00
Tom Hvitved
6e0ff56788 Revert "C#: Bump all dependencies" 2023-09-06 16:23:38 +02:00
Peter Stöckli
ede7d8fb6a Python: apply suggestions from code review for asyncio 2023-09-06 15:47:07 +02:00
Mathias Vorreiter Pedersen
2bed77de09 Merge branch 'main' into deduplicate-dataflow-results-take-3 2023-09-06 14:12:36 +01:00
Max Schaefer
a02f373e79 Use better sanitiser. 2023-09-06 14:06:16 +01:00
Mathias Vorreiter Pedersen
4cbe82353f C++: Accept more test changes. 2023-09-06 13:58:28 +01:00
Mathias Vorreiter Pedersen
b22199982e C++: Add change note. 2023-09-06 13:08:21 +01:00
Michael Nebel
a8e427ffe1 Merge pull request #14097 from michaelnebel/csharp/extractorerrormessages
C#: Update extractor_messages relation schema.
2023-09-06 14:01:36 +02:00
Cornelius Riemenschneider
76f1c7a4cd Merge pull request #14137 from github/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 2 to 4
2023-09-06 13:13:30 +02:00
Cornelius Riemenschneider
79d210f7bd Update .github/workflows/ruby-build.yml
Co-authored-by: Arthur Baars <aibaars@github.com>
2023-09-06 12:19:46 +02:00
Tom Hvitved
a06a9ffa29 Address review comments 2023-09-06 11:01:54 +02:00
Tom Hvitved
6de315d086 Add change note 2023-09-06 11:01:54 +02:00
Tom Hvitved
48e2dcfa35 Ruby: Reimplement flow through captured variables using field flow 2023-09-06 11:00:55 +02:00
Tom Hvitved
5d1c399371 Ruby: Add more data-flow tests for captured variables 2023-09-06 10:34:34 +02:00
Mathias Vorreiter Pedersen
3eb2da4c03 C++: No need to remove duplications manually. 2023-09-06 09:29:11 +01:00
Tom Hvitved
3a9c34c3c6 Merge pull request #14132 from hvitved/csharp/data-flow-property-write
C#: Fix logic for flow into property writes
2023-09-06 08:49:53 +02:00
Erik Krogh Kristensen
a11db7a80a Merge pull request #14148 from github/dependabot/cargo/ql/chrono-0.4.29
Bump chrono from 0.4.28 to 0.4.29 in /ql
2023-09-06 07:25:13 +02:00
dependabot[bot]
7f73c59304 Bump chrono from 0.4.28 to 0.4.29 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.28 to 0.4.29.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.28...v0.4.29)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 03:58:08 +00:00
Chuan-kai Lin
163252d5f6 Merge pull request #14147 from github/release-prep/2.14.4
Release preparation for version 2.14.4
2023-09-05 13:50:45 -07:00
github-actions[bot]
abf2b12b1c Release preparation for version 2.14.4 2023-09-05 16:56:14 +00:00
Mathias Vorreiter Pedersen
570b08e2e9 Merge pull request #14143 from alexet/global-from-unreachble
CPP: Handle globals flowing into "UnreacheachedInstruction"
2023-09-05 16:58:55 +01:00
Peter Stöckli
9027eac312 Python: add change notes for asyncio CMDi sinks 2023-09-05 16:14:56 +02:00
Peter Stöckli
8c4dccc81b Python: initial support for CMDi via asyncio 2023-09-05 15:33:29 +02:00
Michael Nebel
b5d4987c0a C#: Add upgrade and downgrade scripts. 2023-09-05 15:32:09 +02:00
Michael Nebel
880da69d16 C#: Update extractor_messages relation schema. 2023-09-05 15:19:32 +02:00
Tamás Vajk
97f09e106e Merge pull request #14101 from tamasvajk/csharp/recursive-generics
C#: Exclude base type extraction of recursive generics
2023-09-05 14:24:51 +02:00
Ian Lynagh
5ea4c44701 Kotlin: Give some more informative errors messages 2023-09-05 12:33:49 +01:00
Alex Denisov
35e949945d Swift: add queries for unresolved AST nodes 2023-09-05 13:29:11 +02:00
Alex Eyers-Taylor
3db384ddc3 CPP: Handle globals flowing into "UnreacheachedInstruction" 2023-09-05 11:50:32 +01:00
dependabot[bot]
03771ffad2 Bump actions/checkout from 2 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 12:17:54 +02:00
Tom Hvitved
cb8922034c Merge pull request #14133 from hvitved/ruby/flow-test-path-graph-fixes
Ruby: Use proper `PathGraph` module in inline flow tests
2023-09-05 10:33:07 +02:00
Tamas Vajk
bf96e688ff Fix review findings 2023-09-05 10:19:41 +02:00
Rasmus Wriedt Larsen
49f5d38956 Merge pull request #14068 from RasmusWL/dataflow-config-refactor
Python: Use new dataflow API
2023-09-04 21:04:10 +02:00
Tom Hvitved
a2912cd72b Ruby: Use proper PathGraph module in inline flow tests
Gets rid of
```
PathNode is incompatible with PathNode (the type of the edge relation).
```
warnings.
2023-09-04 20:27:34 +02:00
Tom Hvitved
4a1163b38c Merge pull request #14109 from hvitved/ruby/hide-desugared-assignments-in-dataflow 2023-09-04 19:59:33 +02:00
Mathias Vorreiter Pedersen
1232120d42 C++: Naively copy the 'surprising lifetimes' query from Coding Standards and add required metadata. 2023-09-04 16:21:28 +01:00
Michael B. Gale
5337785571 Remove TODO comment 2023-09-04 15:10:00 +01:00
Michael B. Gale
bd5f5314ea C#: Pass .dotnet path to standalone extractor 2023-09-04 15:09:28 +01:00
Michael B. Gale
37535d1f52 C#: Make WithDotNet public 2023-09-04 15:08:57 +01:00
Michael B. Gale
3b010a2fb3 C# standalone: accept path to .dotnet folder 2023-09-04 15:08:53 +01:00
Michael B. Gale
4c2a7aab3d Do not rename global.json in standalone mode 2023-09-04 15:04:44 +01:00
Michael B. Gale
bbe90be0db Wrap StandaloneBuildRule in WithDotNet 2023-09-04 15:02:44 +01:00
Tom Hvitved
55aedbc46c C#: Fix logic for flow into property writes 2023-09-04 15:42:50 +02:00
Kasper Svendsen
ecee427c72 Merge pull request #14117 from kaspersv/delete-unnecessary-test
Java: Delete java test query which fails to compile
2023-09-04 15:28:57 +02:00
Alex Ford
0325c87ccb Merge pull request #13825 from boveus/add-cwe-208
Ruby: Add Unsafe HMAC Comparison Query.
2023-09-04 14:10:12 +01:00
Ian Lynagh
a2659eecfb Merge pull request #14018 from igfoo/igfoo/extractor_information_kotlin1
Kotlin: Write usesK2 ("uses Kotlin 2") information to the database
2023-09-04 13:38:23 +01:00
Michael B. Gale
77369a09a4 Merge pull request #13872 from Kwstubbs/Kevin_error_sanitizer
Go: Add sanitizer to remove paths passing through http.Error
2023-09-04 13:25:55 +01:00
Alex Ford
11e5565344 Merge branch 'main' into add-cwe-208 2023-09-04 12:45:49 +01:00
Ian Lynagh
03ad04bc8e Merge pull request #14118 from igfoo/igfoo/kotlin_master
Kotlin: Make it possible to build with master
2023-09-04 12:12:25 +01:00
AlexDenisov
e2602fbbc4 Merge pull request #14119 from github/alexdenisov/sequence-expr
Swift: fix SequenceExpr extraction
2023-09-04 12:29:07 +02:00
Paolo Tranquilli
7d89028688 Merge pull request #14106 from github/alexdenisov/rename-xcode-autobuilder
Swift: rename autobuilder. NFC
2023-09-04 12:28:47 +02:00
Ian Lynagh
bbf441f87a Kotlin: Add an integration test for Kotlin 2 2023-09-04 11:28:31 +01:00
Alex Denisov
888dd786b4 Swift: fix SequenceExpr extraction
Before we extracted all the subexpressions from the `SequenceExpr` while we should've only extracted the expressions at odd indices:
```
...
/// SequenceExpr - A list of binary operations which has not yet been
/// folded into a tree.  The operands all have even indices, while the
/// subexpressions with odd indices are all (potentially overloaded)
/// references to binary operators.
class SequenceExpr final : public Expr,
...
```

The AST for a `SequenceExpr` looks like this:

```
sequence_expr:
  unresolved_dot_expr:
    ...
  assign_expr:
    member_ref_expr:
      ...
    dot_syntax_call_expr:
      ...
  unresolved_member_chain_expr:
    ...
```

however, what's is not visible with the "final" AST is that `unresolved_dot_expr` is the unresolved version of `assign_expr.member_ref_expr` and the `unresolved_member_chain_expr` is the unresolved version of `assign_expr.dot_syntax_call_expr`.
This becomes visible when I enable typechecker debugging:

```c++
auto &typeCheckerOptions = invocation.getTypeCheckerOptions();
typeCheckerOptions.DebugConstraintSolver = true;
```

Which prints the following snippets:

```
---Initial constraints for the given expression---
(assign_expr type='()' location=foo.swift:25:54 range=[foo.swift:25:13 - line:25:57]
  (unresolved_dot_expr type='$T2' location=foo.swift:25:29 range=[foo.swift:25:13 - line:25:29] field 'preferredDatePickerStyle' function_ref=unapplied
    (unresolved_dot_expr type='$T1' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18] field 'datePicker' function_ref=unapplied
      (declref_expr type='DatePickerCell' location=foo.swift:25:13 range=[foo.swift:25:13 - line:25:13] decl=foo.(file).DatePickerRowProtocol extension.configurePickerStyle(_:_:).cell@foo.swift:15:33 function_ref=unapplied)))
  (unresolved_member_chain_expr implicit type='$T5' location=foo.swift:25:57 range=[foo.swift:25:56 - line:25:57]
    (unresolved_member_expr type='$T4' location=foo.swift:25:57 range=[foo.swift:25:56 - line:25:57] name='wheels' function_ref=unapplied)))

// ...

---Type-checked expression---
(assign_expr type='()' location=foo.swift:25:54 range=[foo.swift:25:13 - line:25:57]
  (member_ref_expr type='@lvalue UIDatePickerStyle' location=foo.swift:25:29 range=[foo.swift:25:13 - line:25:29] decl=UIKit.(file).UIDatePicker.preferredDatePickerStyle
    (force_value_expr implicit type='UIDatePicker' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18] implicit_iuo_unwrap
      (load_expr implicit type='UIDatePicker?' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18]
        (member_ref_expr type='@lvalue UIDatePicker?' location=foo.swift:25:18 range=[foo.swift:25:13 - line:25:18] decl=foo.(file).DatePickerCell.datePicker@foo.swift:10:29
          (declref_expr type='DatePickerCell' location=foo.swift:25:13 range=[foo.swift:25:13 - line:25:13] decl=foo.(file).DatePickerRowProtocol extension.configurePickerStyle(_:_:).cell@foo.swift:15:33 function_ref=unapplied)))))
  (dot_syntax_call_expr type='UIDatePickerStyle' location=foo.swift:25:57 range=[foo.swift:25:56 - line:25:57]
    (declref_expr type='(UIDatePickerStyle.Type) -> UIDatePickerStyle' location=foo.swift:25:57 range=[foo.swift:25:57 - line:25:57] decl=UIKit.(file).UIDatePickerStyle.wheels function_ref=unapplied)
    (argument_list implicit
      (argument
        (type_expr implicit type='UIDatePickerStyle.Type' location=foo.swift:25:56 range=[foo.swift:25:56 - line:25:56] typerepr='UIDatePickerStyle')))))
```

The proposed solution is to only extract subexpressions at indices from `SequenceExpr` thus ignoring all the unresolved leftovers.

Note: I'm not entirely sure about the case when there is only child (`elements.size() == 1`) so I'm always extracting it.

This patch fixes the last source of unresolved expressions.
2023-09-04 11:42:12 +02:00
Rasmus Wriedt Larsen
a58c9e91ea Merge pull request #14130 from RasmusWL/fixup-accept-ci-changes
Misc: Fixup for `accept-expected-changes-from-ci.py`
2023-09-04 09:47:31 +02:00
Rasmus Wriedt Larsen
301133ad94 Misc: Fixup for accept-expected-changes-from-ci.py
Allow empty lines while looking for diff (between `---expected` and `FAILED`). This can happen when there is `Locations outside the test directory` since an empty line is printed after that warning message (this output can be interleaved with the diff due to parallel execution).
2023-09-04 09:32:06 +02:00
Erik Krogh Kristensen
284ca5e4ee Merge pull request #14129 from github/dependabot/cargo/ql/regex-1.9.5
Bump regex from 1.9.3 to 1.9.5 in /ql
2023-09-04 08:11:51 +02:00
dependabot[bot]
4919cc4c4e Bump regex from 1.9.3 to 1.9.5 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.3 to 1.9.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.3...1.9.5)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 03:47:05 +00:00
Alex Ford
98851736d6 Revert "Ruby: configsig rb/tainted-format-string"
This reverts commit f5860cb4818dc3c07eeb6731e75bf5df203dd48f.
2023-09-03 17:20:06 +01:00
Alex Ford
bf6837cca0 Revert "Ruby: configsig rb/http-to-file-access"
This reverts commit e77ba1589663905c952cdb643ab66885760b27bd.
2023-09-03 17:20:06 +01:00
Alex Ford
e399eac2b3 Ruby: changenote for using new dataflow api 2023-09-03 17:20:06 +01:00
Alex Ford
73ed5696f3 Ruby: configsig rb/xxe 2023-09-03 17:20:06 +01:00
Alex Ford
956207b7d9 Ruby: configsig rb/meta/tainted-nodes 2023-09-03 17:20:06 +01:00
Alex Ford
f24102e0e7 Ruby: configsig rb/weak-params 2023-09-03 17:20:06 +01:00
Alex Ford
6c06def5d7 Ruby: configsig rb/manually-checking-http-verb 2023-09-03 17:20:06 +01:00
Alex Ford
39af2d2870 Ruby: configsig rb/user-controlled-file-decompression 2023-09-03 17:20:06 +01:00
Alex Ford
cdc788b162 Ruby: configsig rb/hardcoded-credentials 2023-09-03 17:20:06 +01:00
Alex Ford
4d1684e37b Ruby: configsig rb/overly-permissive-file 2023-09-03 17:20:06 +01:00
Alex Ford
b6d12f8b1c Ruby: configsig rb/zip-slip 2023-09-03 17:20:05 +01:00
Alex Ford
ebf2a2e1f5 Ruby: configsig rb/unicode-bypass-validation 2023-09-03 17:20:05 +01:00
Alex Ford
7445fc43f9 Ruby: configsig rb/regexp-injection 2023-09-03 17:20:05 +01:00
Alex Ford
494b7b3fdf Ruby: configsig rb/polynomial-redos 2023-09-03 17:20:05 +01:00
Alex Ford
04d3d04317 Ruby: configsig rb/regex/badly-anchored-regexp 2023-09-03 17:20:05 +01:00
Alex Ford
77f3a70376 Ruby: renames for rb/xpath-injection 2023-09-03 17:20:05 +01:00
Alex Ford
42cd58695d Ruby: configsig rb/url-redirection 2023-09-03 17:20:05 +01:00
Alex Ford
f79796a644 Ruby: configsig rb/shell-command-constructed-from-input 2023-09-03 17:20:05 +01:00
Alex Ford
f03f670312 Ruby: configsig rb/html-constructed-from-input 2023-09-03 17:20:05 +01:00
Alex Ford
8ad6c72ba2 Ruby: configsig rb/unsafe-deserialization 2023-09-03 17:20:05 +01:00
Alex Ford
461bc0d359 Ruby: configsig rb/unsafe-code-construction 2023-09-03 17:20:05 +01:00
Alex Ford
3e23a6e021 Ruby: configsig rb/server-side-template-injection 2023-09-03 17:20:05 +01:00
Alex Ford
0a73ebdbee Ruby: configsig rb/tainted-format-string 2023-09-03 17:20:05 +01:00
Alex Ford
f5e433940f Ruby: renames for rb/stored-xss 2023-09-03 17:20:05 +01:00
Alex Ford
030aae5693 Ruby: configsig rb/stack-trace-exposure 2023-09-03 17:20:05 +01:00
Alex Ford
bf1cb33be3 Ruby: configsig rb/sql-injection 2023-09-03 17:20:05 +01:00
Alex Ford
ba8ff0710d Ruby: configsig rb/request-forgery 2023-09-03 17:20:05 +01:00
Alex Ford
df9173502e Ruby: configsig rb/sensitive-get-query 2023-09-03 17:20:05 +01:00
Alex Ford
593d9a48d4 Ruby: configsig rb/reflected-xss 2023-09-03 17:20:05 +01:00
Alex Ford
ad2bbfb265 Ruby: configsig rb/path-injection 2023-09-03 17:20:05 +01:00
Alex Ford
867e47bcdd Ruby: renames for rb/log-injection 2023-09-03 17:20:04 +01:00
Alex Ford
eb34bbbfd2 Ruby: renames for rb/ldap-injection 2023-09-03 17:20:04 +01:00
Alex Ford
d46eceb5f4 Ruby: configsig rb/kernel-open 2023-09-03 17:20:04 +01:00
Alex Ford
a8ad0d8ff5 Ruby: renames for rb/insecure-download 2023-09-03 17:20:04 +01:00
Alex Ford
c973fc1274 Ruby: configsig rb/http-to-file-access 2023-09-03 17:20:04 +01:00
Alex Ford
2536f1a0cd Ruby: configsig rb/user-controlled-bypass 2023-09-03 17:20:04 +01:00
Alex Ford
377570f361 Ruby: configsig rb/command-line-injection 2023-09-03 17:20:04 +01:00
Alex Ford
b1a49ddb0d Ruby: configsig rb/code-injection 2023-09-03 17:20:04 +01:00
Alex Ford
6fa267a820 Ruby: configsig rb/clear-text-storage-sensitive-data 2023-09-03 17:20:04 +01:00
Alex Ford
2a2f21d3a9 Ruby: configsig rb/clear-text-logging-sensitive-data 2023-09-03 17:20:04 +01:00
amammad
f3ea72c234 proper tests with depstubber, remove Duplicates :( 2023-09-03 04:51:05 +10:00
amammad
b5a257ca7c add proper test cases 2023-09-03 04:09:56 +10:00
amammad
8f11543e9d fix go.mod 2023-09-02 22:47:35 +10:00
amammad
9b8f43bf63 remove tmp test 2023-09-02 22:41:39 +10:00
amammad
6af82526dc add tests 2023-09-02 22:40:18 +10:00
amammad
a8a9edcacd V1 2023-09-02 22:27:08 +10:00
Mathias Vorreiter Pedersen
20f501d1c7 C++: Change queries to use 'asExpr' instead of 'asConvertedExpr'. 2023-09-01 15:01:32 +01:00
Mathias Vorreiter Pedersen
cca6052026 C++: Use 'operandNode' to generate the string for indirect operands. 2023-09-01 14:04:54 +01:00
Mathias Vorreiter Pedersen
f1c4fa2345 C++: When we generate a string for the node we avoid multiple results by only using the 0'th result from the 'asExpr' predicate. However, when we want to convert between nodes and expressions we don't care about which one we get. 2023-09-01 14:04:52 +01:00
Mathias Vorreiter Pedersen
d2bb73ba1f C++: Use the index to to get the 'most converted' and 'least converted' instruction in a bunch of places. 2023-09-01 13:47:06 +01:00
Mathias Vorreiter Pedersen
4dfaf9225c C++: Index 'getConvertedResultExpression' by an integer. 2023-09-01 13:32:29 +01:00
Mathias Vorreiter Pedersen
16d62186c0 C++: Use this new predicate everywhere we need to convert an instruction to an expression. 2023-09-01 13:32:25 +01:00
Mathias Vorreiter Pedersen
60819ad7f2 Add a single predicate that should be used to convert an instruction to an expression. 2023-09-01 13:06:25 +01:00
Ian Lynagh
181594badb Kotlin: Add packageFqName and IrSymbolInternals compatibility
In master, we need to switch to these, but for building for older
versions we need to add our own support.

Currently the v_1_9_255 files are nto used, but we will need them (in a
differently-named directory) for a future release.
2023-09-01 11:20:58 +01:00
Ian Lynagh
72e08a9277 Kotlin: Tweak the build system
You can now make a versions/* directory that the build system doesn't
know about. This can be used to add support for not-yet-supported
versions.
2023-09-01 11:08:54 +01:00
Kasper Svendsen
4bc6ca3d84 Java: Delete java test query which fails to compile 2023-09-01 11:21:06 +02:00
Mathias Vorreiter Pedersen
67a0112fcb Merge pull request #14115 from MathiasVP/fix-incorrect-load-of-constant
C++: Don't generate `Load`s for constant expressions
2023-09-01 08:50:44 +01:00
Mathias Vorreiter Pedersen
72d9812fea C++: Accept more test changes. 2023-08-31 21:56:35 +01:00
Mathias Vorreiter Pedersen
dfefd62089 C++: Accept test changes. 2023-08-31 20:38:46 +01:00
Mathias Vorreiter Pedersen
aed14f2924 C++: Don't insert loads for constants. 2023-08-31 20:38:40 +01:00
Mathias Vorreiter Pedersen
b575747357 C++: Add testcase with invalid IR. 2023-08-31 20:35:33 +01:00
yoff
da64ea40b9 Merge pull request #13782 from jorgectf/jorgectf/shlex-quote
Python: Add `shlex.quote` as `py/shell-command-constructed-from-input` sanitizer
2023-08-31 21:08:58 +02:00
Ian Lynagh
eb59bc04cd Kotlin: Add missing imports 2023-08-31 19:28:05 +01:00
Ian Lynagh
3009f40814 Kotlin: Opt in to org.jetbrains.kotlin.ir.symbols.IrSymbolInternals
Needed for upstream master.
2023-08-31 19:28:05 +01:00
Ian Lynagh
1ec29bffbb Kotlin: Don't use deprecated createBlockBody
The function that takes a list of statements is hidden in upstream
master.
2023-08-31 19:28:05 +01:00
Ian Lynagh
d511d46cde Kotlin: Use packageFqName rather than fqName
Upstream master says:
   error: using 'fqName: FqName' is an error. Please use `packageFqName` instead
2023-08-31 19:28:05 +01:00
Alex Ford
ce35d6921f Ruby: configsig rb/hardcoded-data-interpreted-as-code 2023-08-31 16:20:18 +01:00
Mathias Vorreiter Pedersen
10548b57d7 Merge pull request #14103 from MathiasVP/non-certain-def-is-a-use
C++: Non-certain definitions should always be uses
2023-08-31 16:15:30 +01:00
Geoffrey White
0cb00c9091 Swift: Change note. 2023-08-31 15:50:54 +01:00
Geoffrey White
93c39c5fdd Swift: Add data flow through OpenExistentialExpr. 2023-08-31 15:50:32 +01:00
Geoffrey White
b8d29e8fc1 Swift: Add a more realistic test case as well. 2023-08-31 15:46:47 +01:00
Geoffrey White
aeeafd75bf Swift: Add a test for flow through OpenExistentialExpr. 2023-08-31 15:27:18 +01:00
Erik Krogh Kristensen
cd590d356d Merge pull request #14053 from erik-krogh/ts52
JS: Add support for TypeScript 5.2
2023-08-31 14:39:50 +02:00
Tamas Vajk
c1d8091891 C#: Exclude base type extraction of recursive generics 2023-08-31 14:15:38 +02:00
Tom Hvitved
89e9d25f02 Ruby: Hide desugared assignments from data flow path graph 2023-08-31 14:04:57 +02:00
erik-krogh
8dad4950a9 add sanitizer guard for url_has_allowed_host_and_scheme 2023-08-31 13:48:42 +02:00
Tom Hvitved
23857267db Merge pull request #14110 from hvitved/ruby/remove-emptiness-successor
Ruby: Get rid of unused `EmptinessSuccessor`
2023-08-31 13:41:25 +02:00
erik-krogh
d4bc6e434a add test with false positive 2023-08-31 13:40:47 +02:00
Tamas Vajk
3476437bfe C#: Add test case with recursive generics 2023-08-31 13:21:46 +02:00
Tom Hvitved
50db6916c8 Ruby: Get rid of unused EmptinessSuccessor 2023-08-31 13:17:05 +02:00
Tom Hvitved
73370e7282 Merge pull request #14100 from hvitved/dataflow/consistency-pack
Data flow: Add consistency checks to shared ql pack
2023-08-31 11:47:40 +02:00
Tom Hvitved
756886808d Merge pull request #14098 from hvitved/csharp/cil-best-impl
C#: Speedup `bestImplementation`
2023-08-31 10:57:28 +02:00
Mathias Vorreiter Pedersen
f5509da4bb Merge pull request #14038 from alexet/delete-ir
CPP: Add delete/delete[] calls to the IR.
2023-08-31 09:22:34 +01:00
Asger F
2d5c40db31 Merge pull request #14048 from asgerf/shared/variable-capture-write-source-node
Variable capture: allow arbitrary data-flow nodes to be the source of a write
2023-08-31 10:20:48 +02:00
Tom Hvitved
c68d0bc936 Merge pull request #14099 from hvitved/csharp/transitive-capture-call-unique
C#: Do not embed target callable in `TransitiveCapturedCall`
2023-08-31 10:12:26 +02:00
Alex Denisov
c1da2dfa73 Swift: fix autobuild.sh 2023-08-31 09:40:13 +02:00
Michael Nebel
ded49015e0 Merge pull request #13970 from michaelnebel/csharp/usereferenceassemlblies
C#: Compile against the reference assemblies in the standalone extractor (if possible)
2023-08-31 09:00:30 +02:00
Erik Krogh Kristensen
cd289f8207 Merge pull request #14105 from github/dependabot/cargo/ql/chrono-0.4.28
Bump chrono from 0.4.27 to 0.4.28 in /ql
2023-08-31 08:16:42 +02:00
Alex Denisov
803adae9c6 Swift: rename autobuilder. NFC 2023-08-31 08:12:52 +02:00
dependabot[bot]
4770eb0328 Bump chrono from 0.4.27 to 0.4.28 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.27 to 0.4.28.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.27...v0.4.28)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-31 03:44:01 +00:00
Mathias Vorreiter Pedersen
1159508e4f Merge pull request #14008 from MathiasVP/reuse-even-more-nodes
C++: Reuse even more `DataFlow::Node`s
2023-08-30 19:38:52 +01:00
Alex Eyers-Taylor
59a77666a6 CPP: Remove uneeded indirection around delete calls in the IR. 2023-08-30 16:31:51 +01:00
Michael Nebel
3afa4aa91e C#: Add change note. 2023-08-30 16:51:16 +02:00
Mathias Vorreiter Pedersen
261ba8e02d C++: Add QLDoc to 'isDereference'. 2023-08-30 14:34:30 +01:00
Tom Hvitved
253f932d2a Python: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
9af706c2a5 Swift: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
db304d118b C++: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
fefe64bf0c Java: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
5c8367a695 C#: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
c4b626a416 Ruby: Use data flow consistency checks from shared pack 2023-08-30 15:29:41 +02:00
Tom Hvitved
de7c9bdd9b Data flow: Add consistency checks to shared ql pack 2023-08-30 15:29:41 +02:00
Michael Nebel
291d7b3e05 C#: Use reference assemblies instead of implementation assemblies. 2023-08-30 14:19:11 +02:00
Michael Nebel
a966c0e1eb C#: Do not include the mscorlib assembly and remove the option. 2023-08-30 14:19:11 +02:00
Tom Hvitved
ce229fe21f Merge pull request #14096 from hvitved/ruby/expected-test-fix
Ruby: Update expected test output
2023-08-30 13:50:49 +02:00
Tom Hvitved
29982fe30e C#: Do not embed target callable in TransitiveCapturedCall 2023-08-30 13:48:44 +02:00
Tom Hvitved
66f5e4a05b C#: Speedup bestImplementation
Avoids an expensive anti-join:

```
[2023-08-29 15:25:48] Evaluated non-recursive predicate _FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf_Method#621e9e2e::__#antijoin_rhs@96d08bc8 in 272332ms (size: 1841891).
Evaluated relational algebra for predicate _FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf_Method#621e9e2e::__#antijoin_rhs@96d08bc8 with tuple counts:
         4632443     ~2%    {3} r1 = JOIN _cil_instruction_3#antijoin_rhs_cil_method_implementation#shared WITH cil_method_implementation ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1

        71945701     ~3%    {3} r2 = JOIN r1 WITH cil_method_implementation_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
        71945701  ~1329%    {3} r3 = JOIN r2 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.1
         5016836     ~4%    {4} r4 = JOIN r3 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, Rhs.1
                            {4} r5 = SELECT r4 ON In.3 < In.2
           65637     ~3%    {2} r6 = SCAN r5 OUTPUT In.0, In.1

        71945701     ~0%    {3} r7 = JOIN r1 WITH cil_method_implementation_10#join_rhs ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Rhs.1
        71945701     ~1%    {4} r8 = JOIN r7 WITH assemblies ON FIRST 1 OUTPUT Lhs.2, Lhs.1, Lhs.0, Rhs.1
        71945701     ~0%    {5} r9 = JOIN r8 WITH cil_method_implementation ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Lhs.2, Lhs.0, Lhs.3
        71945701     ~0%    {5} r10 = JOIN r9 WITH assemblies ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
        71945701     ~0%    {5} r11 = JOIN r10 WITH FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf ON FIRST 1 OUTPUT Lhs.4, Lhs.1, Lhs.2, Lhs.3, Rhs.1
        71945701     ~2%    {5} r12 = JOIN r11 WITH FileSystem#df18ed9a::Make#File#1a556f64::Input#::Container::toString#0#dispred#bf ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.1
                            {5} r13 = SELECT r12 ON In.4 > In.3
        33509342     ~0%    {3} r14 = SCAN r13 OUTPUT In.0, In.1, In.2
        33509342     ~0%    {4} r15 = JOIN r14 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.0, Lhs.1
        33051362  ~1670%    {2} r16 = JOIN r15 WITH Method#621e9e2e::MethodImplementation::getNumberOfInstructions#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3

        33116999  ~1646%    {2} r17 = r6 UNION r16
                            return r17
```
2023-08-30 13:46:11 +02:00
Tom Hvitved
7e77c77d92 Ruby: Update expected test output 2023-08-30 13:33:48 +02:00
erik-krogh
984795ee46 fix off-by-one 2023-08-30 13:29:23 +02:00
Anders Starcke Henriksen
44a83a71a8 Merge pull request #13879 from github/starcke/automodel-pack
Create separate automodel pack
2023-08-30 13:24:25 +02:00
Rasmus Wriedt Larsen
62c2316124 Merge pull request #14084 from RasmusWL/flask-jsonify
Python: Remove XSS FP from use of `flask.jsonify`
2023-08-30 13:07:54 +02:00
Mathias Vorreiter Pedersen
4ca259b200 C++: Non-exact definitions should always be a use. 2023-08-30 11:50:57 +01:00
Mathias Vorreiter Pedersen
6a21fa04cd Merge pull request #14034 from geoffw0/hostname
Swift: New query: Incomplete regular expression for hostnames
2023-08-30 11:33:36 +01:00
Mathias Vorreiter Pedersen
b092da485d C++: Accept more test changes. 2023-08-30 11:26:40 +01:00
Tom Hvitved
c32c4bb6d2 Merge pull request #14086 from hvitved/csharp/perf-fixes
C#: Various performance fixes
2023-08-30 12:13:52 +02:00
Geoffrey White
39b45fa24f Merge pull request #13943 from geoffw0/weakhashexample
Swift: Update the weak sensitive data hashing examples and qhelp
2023-08-30 10:36:23 +01:00
Michael Nebel
f88428f3fd Merge pull request #14085 from michaelnebel/csharp/use-stubs-5
C#: Use stubs in unit tests.
2023-08-30 11:07:53 +02:00
Anders Starcke Henriksen
361ae1747e Merge branch 'main' into starcke/automodel-pack 2023-08-30 09:25:28 +02:00
erik-krogh
2643ab3dbf using is not a keyword 2023-08-30 08:44:59 +02:00
Michael Nebel
a966944fd8 Merge pull request #14083 from michaelnebel/csharp/autobuilderimports
C#: Re-factor using statements order in autobuilder.
2023-08-30 08:16:03 +02:00
erik-krogh
5e11fe74f7 Merge branch 'main' into ts52 2023-08-30 07:57:55 +02:00
Erik Krogh Kristensen
9bf5999ca0 Merge pull request #14093 from github/dependabot/cargo/ql/chrono-0.4.27
Bump chrono from 0.4.26 to 0.4.27 in /ql
2023-08-30 07:42:44 +02:00
dependabot[bot]
e3ff7644f7 Bump chrono from 0.4.26 to 0.4.27 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.26 to 0.4.27.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.26...v0.4.27)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 03:14:05 +00:00
Geoffrey White
125629a7e2 Swift: Delete 'usually'. 2023-08-29 23:25:22 +01:00
Geoffrey White
210a5bfff2 Update swift/ql/src/queries/Security/CWE-328/WeakSensitiveDataHashing.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-29 23:24:12 +01:00
Geoffrey White
7006cfd8f8 Swif: Fix paragraph breaks. 2023-08-29 23:00:17 +01:00
Brandon Stewart
56f0387613 Merge branch 'main' into add-cwe-208 2023-08-29 13:09:59 -04:00
Kevin Stubbings
84d52b94a3 Forgot delete 2023-08-29 08:38:18 -07:00
Kevin Stubbings
ffa3bdc8bb Change note changes 2023-08-29 08:37:15 -07:00
Michael Nebel
e226c564b6 C#: Base WriteOnlyContainer test on stubs. 2023-08-29 16:24:01 +02:00
Michael Nebel
35a1dd8ba9 C#: Base Useless Code tests on stubs. 2023-08-29 16:20:59 +02:00
Mathias Vorreiter Pedersen
e4a11b86d9 Merge branch 'main' into reuse-even-more-nodes 2023-08-29 15:08:30 +01:00
Michael Nebel
e9b3f1282a C#: Base UseBraces tests on stubs. 2023-08-29 16:05:15 +02:00
Tom Hvitved
8624ff12be Merge pull request #14082 from hvitved/csharp/bump-dependencies
C#: Bump all dependencies
2023-08-29 15:52:40 +02:00
Michael Nebel
fc850b18fe C#: Base ReadOnlyContainer tests on stubs. 2023-08-29 15:36:03 +02:00
Michael Nebel
7d7a893b55 C#: Base Performance tests on stubs. 2023-08-29 15:34:33 +02:00
Jean Helie
41726f52a2 Merge pull request #13954 from github/kaeluka/add-provenance-to-metadata
Java: Automodel: Add Candidates for Regression Testing
2023-08-29 14:33:02 +01:00
Michael Nebel
6760dd9121 C#: Base Nullness tests on stubs. 2023-08-29 15:30:24 +02:00
Michael Nebel
b3be4797e2 C#: Base the Metrics tests on stubs. 2023-08-29 15:23:42 +02:00
Michael Nebel
c906009e5b C#: Base the MagicConstants tests on stubs. 2023-08-29 15:19:19 +02:00
Michael Nebel
4c16f1be8b C#: Base the Likely Bugs tests on stubs. 2023-08-29 15:16:48 +02:00
Mathias Vorreiter Pedersen
99cc4171f8 C++: Fix FPs by making 'isArgumentOfCallable' more robust. 2023-08-29 14:12:09 +01:00
yoff
ae4c76c788 Merge pull request #13975 from yoff/python/parsemodechars-not-chars 2023-08-29 14:05:57 +02:00
Alex Eyers-Taylor
9df5e30034 CPP: Add changenote for adding delete to the IR. 2023-08-29 12:13:40 +01:00
Alex Eyers-Taylor
24b679d5a0 CPP: Fix IR formatting. 2023-08-29 11:17:44 +01:00
Alex Eyers-Taylor
8b1b1618c4 CPP: Add tests for false positive in memory vulnerability queries. 2023-08-29 11:17:44 +01:00
Alex Eyers-Taylor
3b344c3578 CPP: Handle cases where the deallocator function is determined dynamically. 2023-08-29 11:17:44 +01:00
Alex Eyers-Taylor
689fda43ed CPP: Add delete/delete[] calls to the IR. 2023-08-29 11:17:43 +01:00
amammad
40ff16bdaf Merge branch 'main' into amammad-go-JWT 2023-08-29 20:02:57 +10:00
Michael Nebel
08c24930ac C#: Base the Language Abuse tests on stubs. 2023-08-29 11:39:47 +02:00
Tom Hvitved
7611bfb149 C#: Apply closed-world assumption for type-parameter qualifiers in dynamic calls 2023-08-29 11:27:45 +02:00
Tom Hvitved
1da885fae2 C#: Fix bad join in SSA library
```
[2023-08-29 10:10:29] Evaluated non-recursive predicate SsaImpl#75014cd4::Cached::lastRefBeforeRedefExt#4#ffff@4207c208 in 27604ms (size: 7511062).
Evaluated relational algebra for predicate SsaImpl#75014cd4::Cached::lastRefBeforeRedefExt#4#ffff@4207c208 with tuple counts:
           9905038   ~9%    {5} r1 = SCAN Ssa#da392372::Make#SsaImpl#75014cd4::SsaInput#::lastRefRedefExt#5#fffff OUTPUT In.2, In.3, In.1, In.0, In.4
                            {5} r2 = r1 AND NOT _SsaImpl#75014cd4::SsaInput::variableRead#4#ffff_3012#join_rhs_const_false#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2)
           4605608   ~0%    {4} r3 = SCAN r2 OUTPUT In.3, In.0, In.1, In.4

        4510888816   ~0%    {5} r4 = JOIN _SsaImpl#75014cd4::SsaInput::variableRead#4#ffff_3012#join_rhs_const_false#antijoin_rhs WITH project#Ssa#da392372::Make#SsaImpl#75014cd4::SsaInput#::lastRefRedefExt#5#fffff_1203#join_rhs ON FIRST 2 OUTPUT Rhs.2, Lhs.2, Lhs.0, Lhs.1, Rhs.3
           5294405  ~82%    {4} r5 = JOIN r4 WITH SsaImpl#75014cd4::adjacentDefReachesReadExt#6#ffffff_014523#join_rhs ON FIRST 4 OUTPUT Lhs.0, Rhs.4, Rhs.5, Lhs.4

           9900013  ~28%    {4} r6 = r3 UNION r5
                            return r6
```
2023-08-29 11:26:30 +02:00
Tom Hvitved
e219281016 C#: Speed up ForwarderAssertMethod
Avoids the following bad predicate

```
[2023-08-29 10:03:13] (252s) Tuple counts for _Callable#f85cebf6::Callable::getBody#0#dispred#ff_Variable#afb43847::Variable::getAnAccess#0#dispre__#join_rhs/5@43feb6tl after 4m0s:
                      4416261    ~203%     {4} r1 = JOIN _Callable#f85cebf6::Callable::getAParameter#0#dispred#ff_10#join_rhs_Variable#afb43847::Variable::ge__#shared WITH Callable#f85cebf6::Callable::getBody#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1 'arg1', Lhs.2 'arg2', Lhs.0 'arg3', Rhs.1 'arg4'
                      1189565718 ~152%     {5} r2 = JOIN r1 WITH Variable#afb43847::Variable::getAnAccess#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1 'arg0', Lhs.0 'arg1', Lhs.1 'arg2', Lhs.2 'arg3', Lhs.3 'arg4'
                                           return r2
```
2023-08-29 11:25:20 +02:00
Michael Nebel
946854bd17 C#: Base the EmptyBlock test on stubs. 2023-08-29 11:24:10 +02:00
Tom Hvitved
1ac9d2ee5b CFG: Compute splitsToString using concat, and exclude partial split sets 2023-08-29 11:23:56 +02:00
Michael Nebel
7068da25f0 C#: Base the Documentation tests on stubs. 2023-08-29 11:22:51 +02:00
Michael Nebel
dd274422d1 Merge pull request #14079 from bgrainger/fix-unsynchronized-static-access-docs
Delete thin space from documentation
2023-08-29 11:17:52 +02:00
Michael Nebel
f2bf540209 C#: Base the Dead Code tests on stubs. 2023-08-29 11:15:43 +02:00
Rasmus Wriedt Larsen
49d510018d Python: Add change-note 2023-08-29 11:11:32 +02:00
Rasmus Wriedt Larsen
0b2458d065 Python: Improve modeling of Flask jsonify
I also tested whether `Flask.jsonify` or `Flask().jsonify` worked, but
they do not.
2023-08-29 11:11:32 +02:00
Rasmus Wriedt Larsen
26319bfc04 Python: Fix Flask jsonify XSS regression
The reason the result was found before, is that `jsonify(data)` was
modeled as TWO separate subclasses of `Http::Server::HttpResponse`, one
because of the implicit construction in return
(FlaskRouteHandlerReturn), and one from the `jsonify` call
(FlaskJsonifyCall). Due to the QL evaluation, we got a combination from
the two, meaning mime-type from FlaskRouteHandlerReturn and body from
FlaskJsonifyCall...
2023-08-29 11:11:32 +02:00
Jean Helie
de76c0749a Java: Automodel Framework Mode: Add Candidates for Regression Testing 2023-08-29 09:53:55 +01:00
Mathias Vorreiter Pedersen
d14ad92dbd Merge pull request #14006 from MathiasVP/promote-invalid-pointer-deref-out-of-experimental
C++: Promote `cpp/invalid-pointer-deref` out of experimental
2023-08-29 09:38:56 +01:00
Rasmus Wriedt Larsen
b36fd9fdab Python: Add jsonify XSS regression example 2023-08-29 10:38:49 +02:00
Mathias Vorreiter Pedersen
f3a77c6006 Merge pull request #14060 from MathiasVP/fix-compare-where-assign-meant-fp
C++: Fix FP in `cpp/compare-where-assign-meant`
2023-08-29 09:38:39 +01:00
Mathias Vorreiter Pedersen
dbdb433957 Merge pull request #14058 from alexet/delete-or-delete-array
CPP: Add parent class for delete and delete[]
2023-08-29 09:38:07 +01:00
Michael Nebel
d3ba7e6b3c C#: Re-factor using statements order in autobuilder. 2023-08-29 10:10:30 +02:00
Michael Nebel
5f4861f72e Merge pull request #14069 from michaelnebel/csharp/nugetexe
C#: Download `nuget.exe` in the dependency manager (if not present).
2023-08-29 10:04:50 +02:00
Michael Nebel
5de8d9181d C#: Address review comments. 2023-08-29 09:33:11 +02:00
Jeroen Ketema
0d1fd88729 Merge pull request #14050 from jketema/inline-6
Consolidate all `InlineFlowTest` libraries in the dataflow qlpack
2023-08-29 09:30:35 +02:00
Tom Hvitved
bce47fe344 C#: Bump all dependencies 2023-08-29 09:24:39 +02:00
Kevin Stubbings
29e14f7d8d Feedback, Format, Add Change Notes 2023-08-28 14:15:21 -07:00
Bradley Grainger
d10597f69d Delete thin space from documentation.
Update the MSDN link to avoid an unnecessary redirection and use the correct anchor.
2023-08-28 11:02:38 -07:00
Dave Bartolomeo
3343b78015 Merge pull request #14074 from github/post-release-prep/codeql-cli-2.14.3
Post-release preparation for codeql-cli-2.14.3
2023-08-28 13:34:10 -04:00
github-actions[bot]
3eba77421a Post-release preparation for codeql-cli-2.14.3 2023-08-28 15:53:49 +00:00
Rasmus Wriedt Larsen
ce6335866b Python: Move ModificationOfParameterWithDefault to new dataflow API 2023-08-28 16:19:47 +02:00
Mathias Vorreiter Pedersen
f65fe34513 C++: Add false positive caused by flowing back into a function after doing reverse reads. 2023-08-28 14:45:16 +01:00
Asger F
d4cfa8c2b8 Java: autoformatting changes 2023-08-28 15:35:06 +02:00
Asger F
d2fe4d235a Java: Inline VariableWrite.getSource() 2023-08-28 15:34:48 +02:00
Rasmus Wriedt Larsen
e8e8d975e3 Python: Remove all usage of DataFlow2+TaintTracking2
(and any higher number as well)
2023-08-28 15:34:19 +02:00
Rasmus Wriedt Larsen
c665c21d83 Python: More style-guide renaming
Split it into multiple commits to make it easier to review.
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
996364d6ee Python: Fix naming style guide violations 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
efec4e7ebf Python: Add missing qldocs 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
98538d237e Python: Autoformat 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
5ba8e102eb Python: Adopt tests to new DataflowQueryTest
Since we want to know the _sinks_ and not just the flow, we need to
expose the config as well :|
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
6961ca5234 Python: Rename to EmailXss 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
ed0e441567 Python: Accept missing DataflowQueryTest implementation for now 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
6d4491e0a9 Python: Modernize WebAppConstantSecretKey 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
852b01c65d Python: Move SmtpMessageConfig to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
d5e2a30e5b Python: Modernize py/azure-storage/unsafe-client-side-encryption-in-use a bit
To use consistent naming
2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
bfcc194b85 Python: Move experimental paramiko to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
acd0f2a8fb Python: Move experimental LDAPInsecureAuth to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
c6911c2ae0 Python: Move experimental UnicodeBypassValidation to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
2c06394bf3 Python: Move experimental CookieInjection to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
2c412707ab Python: Move experimental CsvInjection to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
ace1e23c21 Python: Move experimental ClientSuppliedIpUsedInSecurityCheck to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
d948e103fa Python: Move experimental HeaderInjection to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
53e57dad5c Python: Move experimental InsecureRandomness to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
3bf2705668 Python: Move experimental TimingAttackAgainstHeaderValue to new dataflow API 2023-08-28 15:31:08 +02:00
Rasmus Wriedt Larsen
c88a0ccb7c Python: Move experimental TimingAttackAgainstHash to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
a779547515 Python: Move experimental PossibleTimingAttackAgainstHash to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
8abd3430a2 Python: Move experimental TimingAttackAgainstSensitiveInfo to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
1a4e8d9464 Python: Move experimental PossibleTimingAttackAgainstSensitiveInfo to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
5fd3594f5f Python: Move TimingAttack.qll to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
5d8329d9c8 Python: Move experimental ZipSlip to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
67cc3a3935 Python: Move experimental ReflectedXSS to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
a0d26741d0 Python: Move experimental TarSlipImprov to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
3cdd875e9f Python: Move experimental UnsafeUnpack to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
3edb9d1011 Python: Move experimental TokenBuiltFromUUID to new dataflow API 2023-08-28 15:31:07 +02:00
Rasmus Wriedt Larsen
acde1920e7 Python: Move UntrustedDataToExternalAPI to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
657b1997cc Python: Move FullServerSideRequestForgery and PartialServerSideRequestForgery to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
dbfe517555 Python: Move HardcodedCredentials to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
46322b717a Python: Move XmlBomb to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
add1077532 Python: Move RegexInjection to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
c6caf83dfe Python: Move PolynomialReDoS to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
4c336990e5 Python: Move XpathInjection to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
60e45335dd Python: Move Xxe to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
4c76ca6127 Python: Move UrlRedirect to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
6f08e73dbc Python: Move UnsafeDeserialization to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
dd074173d2 Python: Move WeakSensitiveDataHashing to new dataflow API
I adopted helper predicates to do the "heavy" lifting of .asPathNode1(), maybe I like this approach better... let me know what you think 😊
2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
9d6b96dfd2 Python: Move CleartextStorage to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
70095446b6 Python: Move CleartextLogging to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
cca78f31ff Python: Move PamAuthorization to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
dcd96083e8 Python: Move StackTraceExposure to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
f75e65c67d Python: Move LogInjection to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
88cf9c99b0 Python: Move CodeInjection to new dataflow API 2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
05573904a5 Python: Move LdapInjection to new dataflow API
We could have switched to a stateful config, but I tried to keep changes
as straight forward as possible.
2023-08-28 15:27:50 +02:00
Rasmus Wriedt Larsen
c360346e9e Python: Move ReflectedXss to new dataflow API 2023-08-28 15:27:49 +02:00
Rasmus Wriedt Larsen
b30142c1d7 Python: Move CommandInjection to new dataflow API 2023-08-28 15:27:49 +02:00
Rasmus Wriedt Larsen
700841e9b0 Python: Move UnsafeShellCommandConstruction to new dataflow API 2023-08-28 15:27:49 +02:00
Rasmus Wriedt Larsen
d4e4e2d426 Python: Move TarSlip to new dataflow API 2023-08-28 15:27:49 +02:00
Rasmus Wriedt Larsen
e97032909a Python: Move PathInjection to new dataflow API 2023-08-28 15:27:49 +02:00
Rasmus Wriedt Larsen
245c24077d Python: Move SqlInjection to new dataflow API 2023-08-28 15:27:49 +02:00
Michael Nebel
e19c7758ed C#: Cleanup NugetPackages.cs. 2023-08-28 15:19:16 +02:00
Michael Nebel
6e4865ddd9 C#: Download nuget.exe to the source directory in case it is not installed. 2023-08-28 15:14:13 +02:00
Michael Nebel
b6c2ea520b C#: Some re-factoring of NugetPackages and logic for file downloading. 2023-08-28 15:14:13 +02:00
yoff
2e981e330b Merge pull request #14059 from RasmusWL/fix-loginjection-tests
Python: Fix stdlib sinks in LogInjection query
2023-08-28 14:44:51 +02:00
amammad
68392e7ae7 V1 2023-08-28 22:23:51 +10:00
yoff
6e05246daa Merge pull request #13935 from yoff/python/mad-on-externals
Python: MaD on externals
2023-08-28 14:04:54 +02:00
Rasmus Wriedt Larsen
c807ab4216 Python: Apply suggestions from code review
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-08-28 14:04:22 +02:00
yoff
826b8e6aa5 Merge pull request #14067 from RasmusWL/modern-dataflowquerytests
Python: Adopt tests to new `DataflowQueryTest`
2023-08-28 13:54:34 +02:00
erik-krogh
78487d437f add test for await using in TypeScript 2023-08-28 13:30:35 +02:00
erik-krogh
1e3387f2c5 Merge branch 'main' into ts52 2023-08-28 13:22:56 +02:00
Michael Nebel
e7dbe9f289 Merge pull request #14028 from michaelnebel/csharp/dependencygetfiles
C#: Improve GetFiles in the Dependency Manager.
2023-08-28 12:53:28 +02:00
Rasmus Wriedt Larsen
38b78128c0 Merge pull request #13990 from RasmusWL/experimental-cleanup
Python: Port old experimental points-to based queries
2023-08-28 12:11:17 +02:00
Rasmus Wriedt Larsen
889cb7a95b Python: Adopt tests to new DataflowQueryTest
Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com>
2023-08-28 11:44:01 +02:00
Rasmus Wriedt Larsen
9c44235782 Python: Modernize DataflowQueryTest.qll
Co-authored-by: Rasmus Lerchedahl Petersen <yoff@github.com>
2023-08-28 11:40:41 +02:00
Rasmus Wriedt Larsen
7cba6cd1d8 Python: Update .expected files
Due to change in path-graph, and including LHS of assignments
2023-08-28 11:33:44 +02:00
Rasmus Wriedt Larsen
0f242475f2 Merge branch 'main' into experimental-cleanup 2023-08-28 11:01:22 +02:00
Rasmus Wriedt Larsen
0dca8a5d86 Python: Remove old points-to modeling file
Since all of this was ported already
2023-08-28 10:40:45 +02:00
Rasmus Wriedt Larsen
39e2b133e9 Python: Fix naming 2023-08-28 10:40:33 +02:00
erik-krogh
be2712698b add support for await using in the JS parser 2023-08-28 09:34:13 +02:00
erik-krogh
1cbee6a8a4 delete leftover todo comment that was implemented 2023-08-28 08:40:35 +02:00
amammad
25c60c455e v1 2023-08-27 23:53:45 +10:00
Mathias Vorreiter Pedersen
bb1712b489 Merge branch 'main' into reuse-even-more-nodes 2023-08-26 18:08:58 +01:00
Alex Ford
9957e2683b Merge pull request #13313 from maikypedia/maikypedia/ldap-improper-auth
Ruby: Add Improper LDAP Authentication query (CWE-287)
2023-08-25 20:52:34 +01:00
Maiky
17565cde75 Add JWT Security Queries 2023-08-25 21:28:53 +02:00
Alexander Eyers-Taylor
ea2140dc7d Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-25 17:15:08 +01:00
Alex Eyers-Taylor
8badf10a53 CPP: Add change notes for changes to DeleteExpr/DeleteArrayExpr 2023-08-25 17:13:34 +01:00
Alex Ford
ae635c609f Ruby: autoformat 2023-08-25 17:11:07 +01:00
Mathias Vorreiter Pedersen
9542646a5d C++: Add change note. 2023-08-25 16:45:53 +01:00
Mathias Vorreiter Pedersen
104416cc59 C++: Accept test changes. 2023-08-25 16:40:06 +01:00
Mathias Vorreiter Pedersen
cb2f7b0f95 C++: Exclude results in macro expansions from 'cpp/compare-where-assign-meant'. 2023-08-25 16:39:47 +01:00
Mathias Vorreiter Pedersen
759f939edd C++: Add false positive. 2023-08-25 16:38:48 +01:00
Rasmus Wriedt Larsen
bf9a0dab2a Python: Fix stdlib sinks in LogInjection query 2023-08-25 17:04:48 +02:00
Rasmus Wriedt Larsen
7852429df2 Python: Accept LogInjection .expected changes
I don't know how this had gone unnoticed for so long, but I realized when I tried to run this query locally
2023-08-25 17:04:40 +02:00
Alex Eyers-Taylor
d699201ad0 CPP: Add a test demonstating when a deallocator call exists. 2023-08-25 15:45:50 +01:00
Alex Eyers-Taylor
027ed5e909 CPP: Docs improvements to DeleteOrDeleteArrayExpr 2023-08-25 15:45:50 +01:00
Alex Eyers-Taylor
417b9c9a32 CPP: Use DeleteOrDeleteArrayExpr in another place. 2023-08-25 15:45:50 +01:00
Alex Eyers-Taylor
a3711e1df0 CPP: Replace getAllocatorCall with getDeallocator call. 2023-08-25 15:45:50 +01:00
Shati Patel
c5612ae522 Merge pull request #14051 from github/shati-patel/mrva-results-view
Docs: Update screenshots of variant analysis results view
2023-08-25 15:42:49 +01:00
Mathias Vorreiter Pedersen
68bccfdb93 Merge pull request #14013 from alexet/only-taint-argv-indirections
CPP:Only taint argv indirections
2023-08-25 15:19:51 +01:00
Mathias Vorreiter Pedersen
b948ed9045 C++: Accept test changes and add a few non-field flow tests to make up for the fact that we're no longer using field flow in the query. 2023-08-25 15:18:15 +01:00
Mathias Vorreiter Pedersen
89b91ec5c8 C++: Disable field flow from the 'cpp/invalid-pointer-deref' query. 2023-08-25 15:01:37 +01:00
Mathias Vorreiter Pedersen
c3cf48b38a C++: Add a 'fieldFlowBranchLimit' override to the product flow library. 2023-08-25 14:58:56 +01:00
Michael Nebel
02b8adf717 C#: Address review comments and some light re-factoring. 2023-08-25 15:33:54 +02:00
Maiky
ffd618d6cc Revert "Add "" and nil as sources"
This reverts commit 664c1eba72.
2023-08-25 15:23:55 +02:00
data-douser
5d986d7b60 Update codeql-library-for-go.rst
Correct a typo in the golang docs.
2023-08-25 07:10:25 -06:00
Alex Eyers-Taylor
04f8ed6af0 CPP: Simplify code using DeleteOrDeleteArrayExpr 2023-08-25 13:57:16 +01:00
Alex Eyers-Taylor
c43ba456e5 CPP: Remove old DeleteOrDeleteArrayExpr from a query. 2023-08-25 13:57:16 +01:00
Alex Eyers-Taylor
4ca98bd6fd CPP: Add parent class for delete and delete[] 2023-08-25 13:57:16 +01:00
AlexDenisov
0fe7740dda Merge pull request #14052 from github/sashabu/swift-logging-compiler
Swift: Route compiler diagnostics through our log.
2023-08-25 14:47:24 +02:00
Alex Eyers-Taylor
1afcf8c8a8 Add changenotes. 2023-08-25 13:05:10 +01:00
Alex Eyers-Taylor
9f8fbf8a1a CPP: Update tests for argv change 2023-08-25 13:05:10 +01:00
Alex Eyers-Taylor
45ddb4832c CPP: Make wordexp take an indirect argument. 2023-08-25 13:05:10 +01:00
Alex Eyers-Taylor
a2f2b6c33f CPP:Only consider **argv as tainted. 2023-08-25 13:05:10 +01:00
Michael Nebel
61a523510e C#: Only use small files during file content reference analysis. 2023-08-25 14:04:52 +02:00
Michael Nebel
a81d982c90 C#: Fetch file info fewer times and make dependencies more clear. 2023-08-25 14:04:52 +02:00
Tony Torralba
6573b1f772 Merge pull request #14056 from atorralba/atorralba/java/jenkins-stapler-regenerate
Java: Re-generate Jenkins and Stapler models
2023-08-25 13:15:21 +02:00
Tom Hvitved
42fd9f0c54 Merge pull request #14047 from hvitved/dataflow/join-fix
Data flow: Fix a bad join order
2023-08-25 12:18:24 +02:00
Ian Lynagh
a7de0f96e2 Merge pull request #14049 from igfoo/igfoo/kot1.9.10
Kotlin: We now support 1.9.10
2023-08-25 11:11:14 +01:00
Rasmus Lerchedahl Petersen
ad49eada48 Python: Do not alter codeql-workspaces.yml
And remove the qlpack referred to therein.
Instead we rename and duplicate the extesion file
that this qlpack pointed to.
These two extension files are kept in sync by `identical-files.json`.
2023-08-25 11:46:41 +02:00
Rasmus Lerchedahl Petersen
68cd422788 Python: Fix test expectations 2023-08-25 11:27:53 +02:00
Tony Torralba
5367fb99d9 Manually update a couple of models affected by the nested name change 2023-08-25 11:25:40 +02:00
Mathias Vorreiter Pedersen
9c5d7350dc C++: Add a small amount of pruning to 'SizeBarrierConfig'. 2023-08-25 10:25:28 +01:00
Mathias Vorreiter Pedersen
ded06a77d0 C++: More pruning. 2023-08-25 10:22:55 +01:00
Tony Torralba
25ac87279e Add change note 2023-08-25 11:17:54 +02:00
Tony Torralba
2448bc8ce2 Java: Add new Apache CXF models 2023-08-25 11:17:51 +02:00
Mathias Vorreiter Pedersen
2fd627b460 Merge pull request #13827 from geoffw0/closuremodels
Swift: Model withUnsafeBytes and similar closure methods
2023-08-25 10:01:52 +01:00
Tony Torralba
50a9c31b4a Merge pull request #14055 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-25 10:04:51 +02:00
Tony Torralba
2ed01d06b4 Java: Re-generate Jenkins and Stapler models
Re-generated the Jenkins and Stapler models to pick up the changes from github/codeql#14032
2023-08-25 10:01:28 +02:00
github-actions[bot]
c9d64b6b4f Add changed framework coverage reports 2023-08-25 00:14:40 +00:00
Jeroen Ketema
b550c067a1 Java: Remove redundant inline expectation test imports 2023-08-25 00:18:55 +02:00
Jeroen Ketema
9d573e5544 Consolidate all InlineFlowTest libraries in the dataflow qlpack 2023-08-24 21:38:46 +02:00
Rasmus Lerchedahl Petersen
137f9e7234 Python: Adress review comments
- make qldoc accurate
- fix ql4ql alert
2023-08-24 21:28:07 +02:00
Rasmus Lerchedahl Petersen
d3c24ba110 PythonÆ fix test expectations 2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
e9e6bce80a shared: handle empty groups in delta 2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
88fc96e8d7 Python: Add test with prefix 2023-08-24 21:21:49 +02:00
Rasmus Lerchedahl Petersen
7ad1a21c2d Python: make mode characters not be characters
They are simply considered part of the group start.
2023-08-24 21:21:49 +02:00
yoff
a834703195 Merge pull request #13779 from geoffw0/pythonparsemode
Python: Understand multiple parse mode flags specified in a regular expression string
2023-08-24 21:20:45 +02:00
Tom Hvitved
763216b932 Merge pull request #14045 from hvitved/csharp/standalone-resolve-target-framework
C#: Favor DLLs with most recent .NET Core target framework when resolving dependencies in standalone
2023-08-24 20:56:26 +02:00
erik-krogh
56f1ff8af1 bump from release candidate to final release 2023-08-24 20:32:27 +02:00
erik-krogh
0273b20c75 add downgrade and upgrade script 🤞 2023-08-24 20:30:26 +02:00
erik-krogh
ce97d38a18 add to the stat file 2023-08-24 20:30:26 +02:00
erik-krogh
cb66d62959 add test for the new type-stuff in TS 5.2 we get for free 2023-08-24 20:30:26 +02:00
erik-krogh
dc454d3a72 add support for the new using keyword in TypeScript 2023-08-24 20:30:26 +02:00
erik-krogh
a7d92b3473 add JS support the using keyword 2023-08-24 20:30:26 +02:00
erik-krogh
dfc83d844a very initial support for TypeScript 5.2 2023-08-24 20:30:25 +02:00
Geoffrey White
415d9e0674 Swift: Address review comments. 2023-08-24 18:41:48 +01:00
Alexandre Boulgakov
7e05551f16 Swift: Check whether a SourceLoc is valid before using it. 2023-08-24 18:14:34 +01:00
Ian Lynagh
5dff1852e1 Kotlin: We now support 1.9.10 2023-08-24 17:36:45 +01:00
Geoffrey White
242a49e6f1 Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-24 17:19:01 +01:00
shati-patel
c44b8249a5 Docs: Update screenshots of variant analysis results view 2023-08-24 17:15:04 +01:00
Mathias Vorreiter Pedersen
bdad9e197b C++: Fix more joins.
Before:
```
[2023-08-24 15:47:20] Evaluated non-recursive predicate _IRBlock#896e97af::IRBlock::dominates#1#dispred#ff_Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInpu__#antijoin_rhs@94b1847k in 9831ms (size: 70660).
Evaluated relational algebra for predicate _IRBlock#896e97af::IRBlock::dominates#1#dispred#ff_Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInpu__#antijoin_rhs@94b1847k with tuple counts:
    1121232  ~0%    {4} r1 = JOIN _DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs_DataFlowUtil#47741e1f::TSsaPhiN__#shared WITH Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInput#::DefinitionExt::definesAt#4#dispred#fffff ON FIRST 1 OUTPUT Rhs.2, Lhs.0, Lhs.1, Lhs.2
  265759166  ~2%    {4} r2 = JOIN r1 WITH IRBlock#896e97af::IRBlock::dominates#1#dispred#ff ON FIRST 1 OUTPUT Lhs.3, Rhs.1, Lhs.1, Lhs.2
      70684  ~5%    {3} r3 = JOIN r2 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 2 OUTPUT Lhs.2, Lhs.3, Lhs.0
                    return r3

[2023-08-24 15:47:29] Evaluated non-recursive predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@b6f296tl in 8943ms (size: 1121232).
Evaluated relational algebra for predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@b6f296tl with tuple counts:
    1050572   ~2%    {3} r1 = _DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs_DataFlowUtil#47741e1f::TSsaPhiN__#shared AND NOT _IRBlock#896e97af::IRBlock::dominates#1#dispred#ff_Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInpu__#antijoin_rhs(Lhs.0, Lhs.1, Lhs.2)
    1050572   ~3%    {3} r2 = SCAN r1 OUTPUT In.1, false, In.2

    1121232   ~0%    {3} r3 = JOIN _DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs_DataFlowUtil#47741e1f::TSsaPhiN__#shared WITH Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInput#::DefinitionExt::definesAt#4#dispred#fffff ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Lhs.2
  265759166   ~1%    {3} r4 = JOIN r3 WITH IRBlock#896e97af::IRBlock::dominates#1#dispred#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
      70684   ~0%    {2} r5 = JOIN r4 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 2 OUTPUT Lhs.2, Lhs.0
      70684   ~0%    {3} r6 = SCAN r5 OUTPUT In.0, true, In.1

    1121256   ~2%    {3} r7 = r2 UNION r6
                      return r7
```

After:
```
Evaluated non-recursive predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@59ab2a2e in 456ms (size: 1117096).
Evaluated relational algebra for predicate DataFlowUtil#47741e1f::SsaPhiNode::getAnInput#1#dispred#fff@59ab2a2e with tuple counts:
    384518   ~0%    {2} r1 = JOIN DataFlowUtil#47741e1f::TSsaPhiNode#ff WITH Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInput#::DefinitionExt::definesAt#4#dispred#fffff ON FIRST 1 OUTPUT Lhs.1, Rhs.2
  1121232   ~0%    {3} r2 = JOIN r1 WITH DataFlowUtil#47741e1f::Cached::simpleLocalFlowStep#2#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1

  1117447   ~0%    {4} r3 = JOIN r2 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1, Lhs.0
    70684   ~0%    {2} r4 = JOIN r3 WITH IRBlock#896e97af::IRBlock::dominates#1#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.3
    70684   ~0%    {3} r5 = SCAN r4 OUTPUT In.0, true, In.1

  1117447   ~0%    {4} r6 = JOIN r2 WITH project#DataFlowUtil#47741e1f::Node::hasIndexInBlock#fff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1, Lhs.0
                    {4} r7 = r6 AND NOT IRBlock#896e97af::IRBlock::dominates#1#dispred#ff(Lhs.0, Lhs.1)
  1046763   ~0%    {2} r8 = SCAN r7 OUTPUT In.2, In.3
  1046763   ~3%    {3} r9 = SCAN r8 OUTPUT In.0, false, In.1

  1117447   ~2%    {3} r10 = r5 UNION r9
                    return r10
```
2023-08-24 15:57:39 +01:00
Jeroen Ketema
da403c1a79 Merge pull request #14039 from jketema/non-constant-assign
C++: Omit assign case from `cpp/non-constant-format`
2023-08-24 16:54:19 +02:00
Jeroen Ketema
45c56fbce7 Update cpp/ql/src/change-notes/2023-08-24-remove-non-constant-assign-sources.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-24 16:17:59 +02:00
Jeroen Ketema
607f729339 C++: Add change note 2023-08-24 16:11:39 +02:00
Asger F
6c664e93ef Merge pull request #14035 from asgerf/shared/variable-capture-nested
Variable capture: synchronize with aliases in nested scopes
2023-08-24 15:39:34 +02:00
Paolo Tranquilli
e3d6b3e537 Swift: route compiler diagnostics through our log
(cherry picked from commit b8c55612e5)
2023-08-24 14:20:15 +01:00
Asger F
f17518ace2 Java: update to reflect changes in VariableCapture.qll 2023-08-24 14:06:44 +02:00
Asger F
cd7c851d64 VariableCapture: add VariableWriteSourceNode 2023-08-24 14:06:44 +02:00
Asger F
1286235773 Address review comments 2023-08-24 13:58:33 +02:00
Anders Schack-Mulligen
7af1e96943 Merge pull request #14032 from aschackmull/java/mad-nestednames
Java: Use nested names in MaD signatures.
2023-08-24 13:53:55 +02:00
Tony Torralba
6b58d11eeb Merge pull request #13900 from atorralba/atorralba/java/jaxws-getaremotemethod-improv
Java: Improve `JaxWsEndpoint::getARemoteMethod`
2023-08-24 13:37:15 +02:00
Mathias Vorreiter Pedersen
d42e892097 Fix more joins.
Before:
```
Tuple counts for valueFlowStepSsa#4#ffff/4@2cddce6j after 11.4s:
  11571217  ~3%     {3} r1 = SCAN semSsaUpdateStep#3#fff OUTPUT In.0 'v', In.1 'e', f2i(In.2)
  11992425  ~0%     {4} r2 = JOIN r1 WITH SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'v', Rhs.1 'pos', Lhs.1 'e', Lhs.2 'delta'

  869481225 ~2%     {4} r3 = JOIN SemanticGuard#7b46a302::semGuardDirectlyControlsSsaRead#3#fff_102#join_rhs WITH SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff ON FIRST 1 OUTPUT Rhs.1 'v', Lhs.2, Lhs.1, Lhs.0 'pos'
  5749      ~0%     {4} r4 = JOIN r3 WITH semEqFlowCond#5#fffbff#cpe#12356_03412#join_rhs ON FIRST 3 OUTPUT Lhs.3 'pos', Lhs.0 'v', Rhs.3 'e', Rhs.4
  5749      ~1%     {4} r5 = SCAN r4 OUTPUT In.0 'pos', In.1 'v', In.2 'e', f2i(In.3)
  5749      ~0%     {4} r6 = SCAN r5 OUTPUT In.1 'v', In.0 'pos', In.2 'e', In.3 'delta'

  11998174  ~0%     {4} r7 = r2 UNION r6
                    return r7
```

After:
```
Tuple counts for valueFlowStepSsaEqFlowCond#4#ffff/4@f196e4ok after 37ms:
  59567  ~0%     {5} r1 = JOIN const_true WITH semEqFlowCond#5#ffffff_301245#join_rhs ON FIRST 1 OUTPUT Rhs.1 'v', Rhs.2 'e', Rhs.4, Rhs.5, Rhs.3
  59567  ~0%     {5} r2 = SCAN r1 OUTPUT In.0 'v', In.1 'e', In.2, In.3, f2i(In.4)
  59567  ~4%     {5} r3 = SCAN r2 OUTPUT In.3, In.2, In.0 'v', In.1 'e', In.4 'delta'
  176881 ~0%     {4} r4 = JOIN r3 WITH SemanticGuard#7b46a302::semGuardDirectlyControlsSsaRead#3#fff_021#join_rhs ON FIRST 2 OUTPUT Rhs.2 'pos', Lhs.2 'v', Lhs.3 'e', Lhs.4 'delta'
                  return r4

Tuple counts for valueFlowStepSsa#4#ffff/4@e22d39v5 after 1s:
  5749     ~0%     {4} r1 = JOIN SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff WITH valueFlowStepSsaEqFlowCond#4#ffff ON FIRST 2 OUTPUT Lhs.1 'v', Lhs.0 'pos', Rhs.2 'e', Rhs.3 'delta'

  11571217 ~0%     {3} r2 = SCAN semSsaUpdateStep#3#fff OUTPUT In.0 'v', In.1 'e', f2i(In.2)
  11992425 ~0%     {4} r3 = JOIN r2 WITH SemanticSSA#aa9d1d08::SemSsaReadPosition::hasReadOfVar#1#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.0 'v', Rhs.1 'pos', Lhs.1 'e', Lhs.2 'delta'

  11998174 ~0%     {4} r4 = r1 UNION r3
                    return r4
```
2023-08-24 12:20:41 +01:00
Erik Krogh Kristensen
59de92ce64 Merge pull request #14027 from erik-krogh/py-reg-app
ReDoS: limit concretize to strings of at most length 100
2023-08-24 12:57:42 +02:00
Tom Hvitved
f2eed4d8c4 Data flow: Fix a bad join order
Before
```
Evaluated relational algebra for predicate DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowThroughIntoCall#6#ffffff@0ea4e2mt with tuple counts:
           1065437   ~0%    {4} r1 = SCAN project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::fwdFlow#9#fffffffff#2 OUTPUT In.0, In.3, In.1, In.2
        1158508760   ~0%    {6} r2 = JOIN r1 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowIntoCallApa#6#ffffff_14023#join_rhs ON FIRST 2 OUTPUT Lhs.0, Lhs.2, Lhs.3, Rhs.2, Rhs.3, Rhs.4

                            {6} r3 = SELECT r2 ON In.5 != false
        1158470345   ~4%    {6} r4 = SCAN r3 OUTPUT In.4, In.1, In.2, In.0, In.3, In.5

                            {6} r5 = SELECT r2 ON In.5 = false
             38415   ~0%    {5} r6 = SCAN r5 OUTPUT In.2, In.0, In.1, In.3, In.4
                 4   ~0%    {5} r7 = JOIN r6 WITH DataFlowImplCommon#f7de413b::MakeImplCommon#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Cached::TApproxFrontNil#f ON FIRST 1 OUTPUT Lhs.4, Lhs.2, Lhs.0, Lhs.1, Lhs.3
                 4   ~0%    {6} r8 = SCAN r7 OUTPUT In.0, In.1, In.2, In.3, In.4, false

        1158470349   ~4%    {6} r9 = r4 UNION r8
             44065   ~3%    {6} r10 = JOIN r9 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::returnFlowsThrough#8#ffffffff ON FIRST 3 OUTPUT Lhs.4, Lhs.3, Lhs.0, Lhs.5, Lhs.2, Rhs.3
                            return r10
```

After
```
Evaluated relational algebra for predicate DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowThroughIntoCall#6#ffffff@979c54q9 with tuple counts:
         11095   ~0%    {4} r1 = SCAN project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::returnFlowsThrough#8#ffffffff OUTPUT In.0, In.3, In.1, In.2
        470154   ~1%    {8} r2 = JOIN r1 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::flowIntoCallApa#6#ffffff_20134#join_rhs ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2, Lhs.3, Rhs.1, Rhs.2, Rhs.3, Rhs.4

                        {8} r3 = SELECT r2 ON In.6 != false
        470152   ~0%    {8} r4 = SCAN r3 OUTPUT In.5, In.2, In.3, In.7, In.0, In.1, In.4, In.6

                        {8} r5 = SELECT r2 ON In.6 = false
             2   ~0%    {7} r6 = SCAN r5 OUTPUT In.3, In.0, In.1, In.2, In.4, In.5, In.7
             0   ~0%    {7} r7 = JOIN r6 WITH DataFlowImplCommon#f7de413b::MakeImplCommon#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Cached::TApproxFrontNil#f ON FIRST 1 OUTPUT Lhs.5, Lhs.3, Lhs.0, Lhs.6, Lhs.1, Lhs.2, Lhs.4
             0   ~0%    {8} r8 = SCAN r7 OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, false

        470152   ~0%    {8} r9 = r4 UNION r8
         44065   ~3%    {6} r10 = JOIN r9 WITH project#DataFlowImpl#248dabc3::MakeImpl#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Impl#DataFlow#167ac380::DataFlowMake#DataFlowImplSpecific#21008cd7::RubyDataFlow#::Global#XSS#e59174e9::OrmTracking::Config#::C#::MkStage#Stage2#::Stage#Stage3Param#::fwdFlow#9#fffffffff#2 ON FIRST 4 OUTPUT Lhs.6, Lhs.0, Lhs.5, Lhs.7, Lhs.2, Lhs.4
                        return r10
```
2023-08-24 12:08:34 +02:00
Geoffrey White
f07f97a94e Python: Accept test changes. I think these reflect the 'parse mode chars should not be considered chars' issue. 2023-08-24 10:52:52 +01:00
Tom Hvitved
7723dbc6d7 Merge pull request #14026 from hvitved/dataflow/stage3-call-ctx
Data flow: Use call contexts in stage 3
2023-08-24 11:52:08 +02:00
Tony Torralba
8c32919381 Merge pull request #13903 from atorralba/atorralba/jaxrs-mad-models
Java: New models for JAX-RS
2023-08-24 11:43:13 +02:00
Tom Hvitved
554a2c26c3 C#: Favor DLLs with most recent .NET Core target framework when resolving dependencies in standalone 2023-08-24 11:42:06 +02:00
Tony Torralba
3f9701cea7 Two fixes:
* Consider that the @WebService annotation (et al) can be in a supertype or interface

* getARemoteMethod should only return public methods, since protected, package-private, and private methods are not exposed
2023-08-24 11:35:52 +02:00
Mathias Vorreiter Pedersen
4e6707fee5 Fix joins.
Before:
```
Pipeline standard for boundedSsa#8#ffffffff@d4d576wg was evaluated in 651 iterations totaling 39789ms (delta sizes total: 235714).
        3482    ~0%    {8} r1 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

        1747    ~0%    {8} r2 = SELECT r1 ON In.5 = false
        1747    ~3%    {8} r3 = SCAN r2 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

        1735    ~4%    {8} r4 = SELECT r1 ON In.5 = true
        1735    ~6%    {8} r5 = SCAN r4 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

        1843   ~97%    {8} r6 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

        907   ~99%    {8} r7 = SELECT r6 ON In.5 = false
        907  ~108%    {8} r8 = SCAN r7 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

        2642   ~41%    {8} r9 = r5 UNION r8
        4389   ~22%    {8} r10 = r3 UNION r9

        936   ~99%    {8} r11 = SELECT r6 ON In.5 = true
        936  ~100%    {8} r12 = SCAN r11 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

      512745    ~2%    {6} r13 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5
      229218    ~0%    {9} r14 = JOIN r13 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Rhs.2, Rhs.3, Lhs.2, Rhs.4, Lhs.3, Lhs.1, Lhs.4, Lhs.5
      229218    ~0%    {8} r15 = SCAN r14 OUTPUT In.0, In.1, In.2, In.3, (In.4 + In.5), In.6, In.7, In.8
                      {8} r16 = r15 AND NOT num#TSemNoReason#f(Lhs.0)
        5397    ~0%    {8} r17 = SCAN r16 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

      557965    ~0%    {5} r18 = SCAN unequalIntegralSsa#5#fffff#prev_delta OUTPUT In.0, In.2, In.3, In.1, In.4
          0    ~0%    {8} r19 = JOIN r18 WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.3, Rhs.4, Rhs.5

          0    ~0%    {8} r20 = SELECT r19 ON In.5 = false
          0    ~0%    {8} r21 = SCAN r20 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

        5397    ~0%    {8} r22 = r17 UNION r21
        6333   ~12%    {8} r23 = r12 UNION r22
      10722   ~16%    {8} r24 = r10 UNION r23

          0    ~0%    {8} r25 = SELECT r19 ON In.5 = true
          0    ~0%    {8} r26 = SCAN r25 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

  362119282    ~1%    {5} r27 = SCAN unequalIntegralSsa#5#fffff#prev OUTPUT In.0, In.2, In.3, In.1, In.4
          41    ~8%    {8} r28 = JOIN r27 WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Lhs.4, Rhs.3, Rhs.4, Rhs.5

          27    ~0%    {8} r29 = SELECT r28 ON In.5 = false
          27    ~4%    {8} r30 = SCAN r29 OUTPUT In.0, In.1, In.2, (In.3 + i2f(1)), false, In.6, In.7, In.4

          14   ~42%    {8} r31 = SELECT r28 ON In.5 = true
          14   ~42%    {8} r32 = SCAN r31 OUTPUT In.0, In.1, In.2, (In.3 - i2f(1)), true, In.6, In.7, In.4

          41   ~12%    {8} r33 = r30 UNION r32
          41   ~12%    {8} r34 = r26 UNION r33

      512745    ~0%    {7} r35 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5, In.6
      229272    ~0%    {10} r36 = JOIN r35 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Lhs.2, Lhs.1, Lhs.4, Lhs.5, Lhs.6, Rhs.2, Rhs.3, Rhs.4, Lhs.3
      229272    ~0%    {9} r37 = SCAN r36 OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, In.7, (In.8 + In.9)
      223867    ~0%    {8} r38 = JOIN r37 WITH num#TSemNoReason#f ON FIRST 1 OUTPUT Lhs.6, Lhs.7, Lhs.1, Lhs.8, Lhs.2, Lhs.3, Lhs.4, Lhs.5

        3482    ~1%    {8} r39 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

        1747    ~0%    {8} r40 = SELECT r39 ON In.4 = false
        1747    ~0%    {8} r41 = SCAN r40 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

        1735    ~0%    {8} r42 = SELECT r39 ON In.4 = true
        1735    ~0%    {8} r43 = SCAN r42 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

        3482    ~0%    {8} r44 = r41 UNION r43

      557965    ~0%    {4} r45 = SCAN unequalIntegralSsa#5#fffff#prev_delta OUTPUT In.0, In.2, In.3, In.1
          0    ~0%    {8} r46 = JOIN r45 WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Rhs.3, Rhs.4, Rhs.5, Rhs.6

          0    ~0%    {8} r47 = SELECT r46 ON In.4 = false
          0    ~0%    {8} r48 = SCAN r47 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

          0    ~0%    {8} r49 = SELECT r46 ON In.4 = true
          0    ~0%    {8} r50 = SCAN r49 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

          0    ~0%    {8} r51 = r48 UNION r50
        3482    ~0%    {8} r52 = r44 UNION r51
                      {8} r53 = r52 AND NOT num#TSemNoReason#f(Lhs.0)
          20    ~0%    {8} r54 = SCAN r53 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

        1843    ~0%    {8} r55 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

        907    ~0%    {8} r56 = SELECT r55 ON In.4 = false
        907    ~1%    {8} r57 = SCAN r56 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

        936    ~0%    {8} r58 = SELECT r55 ON In.4 = true
        936    ~1%    {8} r59 = SCAN r58 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

        1843    ~3%    {8} r60 = r57 UNION r59

  362119282    ~0%    {4} r61 = SCAN unequalIntegralSsa#5#fffff#prev OUTPUT In.0, In.2, In.3, In.1
          41    ~0%    {8} r62 = JOIN r61 WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.1, Lhs.2, Rhs.3, Rhs.4, Rhs.5, Rhs.6

          27    ~0%    {8} r63 = SELECT r62 ON In.4 = false
          27    ~0%    {8} r64 = SCAN r63 OUTPUT In.7, In.0, In.1, In.2, (In.3 + i2f(1)), false, In.5, In.6

          14    ~0%    {8} r65 = SELECT r62 ON In.4 = true
          14    ~0%    {8} r66 = SCAN r65 OUTPUT In.7, In.0, In.1, In.2, (In.3 - i2f(1)), true, In.5, In.6

          41    ~0%    {8} r67 = r64 UNION r66
        1884    ~3%    {8} r68 = r60 UNION r67
                      {8} r69 = r68 AND NOT num#TSemNoReason#f(Lhs.0)
        1853    ~0%    {8} r70 = SCAN r69 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

        1873    ~0%    {8} r71 = r54 UNION r70
      225740    ~0%    {8} r72 = r38 UNION r71
      225781    ~0%    {8} r73 = r34 UNION r72
      236503    ~2%    {8} r74 = r24 UNION r73
      235722    ~1%    {8} r75 = r74 AND NOT boundedSsa#8#ffffffff#prev(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.7)
                      return r75
```

After:
```
Pipeline standard for boundedSsa#8#ffffffff@2122e6w8 was evaluated in 651 iterations totaling 343ms (delta sizes total: 235815).
      0    ~0%    {8} r1 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.3, Rhs.4, Rhs.5

      0    ~0%    {8} r2 = SELECT r1 ON In.5 = false
      0    ~0%    {8} r3 = SCAN r2 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

      0    ~0%    {8} r4 = SELECT r1 ON In.5 = true
      0    ~0%    {8} r5 = SCAN r4 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

    41    ~8%    {8} r6 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.3, Rhs.4, Rhs.5

    27    ~0%    {8} r7 = SELECT r6 ON In.5 = false
    27    ~0%    {8} r8 = SCAN r7 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

    27    ~0%    {8} r9 = r5 UNION r8
    27    ~0%    {8} r10 = r3 UNION r9

    14   ~42%    {8} r11 = SELECT r6 ON In.5 = true
    14   ~42%    {8} r12 = SCAN r11 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

  3482    ~0%    {8} r13 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

  1747    ~0%    {8} r14 = SELECT r13 ON In.5 = false
  1747    ~3%    {8} r15 = SCAN r14 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

  1735    ~3%    {8} r16 = SELECT r13 ON In.5 = true
  1735    ~3%    {8} r17 = SCAN r16 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

  3482    ~0%    {8} r18 = r15 UNION r17
  3496    ~0%    {8} r19 = r12 UNION r18
  3523    ~0%    {8} r20 = r10 UNION r19

  1843  ~103%    {8} r21 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Rhs.4, Rhs.5, Rhs.6

    907  ~105%    {8} r22 = SELECT r21 ON In.5 = false
    907  ~108%    {8} r23 = SCAN r22 OUTPUT In.0, In.1, (In.2 + i2f(1)), In.3, false, In.6, In.7, In.4

    936  ~101%    {8} r24 = SELECT r21 ON In.5 = true
    936  ~109%    {8} r25 = SCAN r24 OUTPUT In.0, In.1, (In.2 - i2f(1)), In.3, true, In.6, In.7, In.4

512745    ~4%    {6} r26 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5
229313    ~0%    {9} r27 = JOIN r26 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Rhs.2, Lhs.2, Rhs.4, Lhs.3, Rhs.3, Lhs.1, Lhs.4, Lhs.5
229313    ~0%    {8} r28 = SCAN r27 OUTPUT In.0, In.1, In.2, (In.3 + In.4), In.5, In.6, In.7, In.8
                  {8} r29 = r28 AND NOT num#TSemNoReason#f(Lhs.0)
  5492    ~2%    {8} r30 = SCAN r29 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

  6428   ~15%    {8} r31 = r25 UNION r30
  7335   ~27%    {8} r32 = r23 UNION r31

512745    ~0%    {7} r33 = SCAN bounded#7#fffffff#prev_delta OUTPUT In.0, In.3, In.1, In.2, In.4, In.5, In.6
229367    ~0%    {10} r34 = JOIN r33 WITH boundFlowStepSsa#6#ffffff_240135#join_rhs ON FIRST 2 OUTPUT Rhs.5, Lhs.2, Lhs.1, Lhs.4, Lhs.5, Lhs.6, Rhs.2, Rhs.3, Rhs.4, Lhs.3
229367    ~0%    {9} r35 = SCAN r34 OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, In.7, (In.8 + In.9)
223867    ~0%    {8} r36 = JOIN r35 WITH num#TSemNoReason#f ON FIRST 1 OUTPUT Lhs.6, Lhs.1, Lhs.8, Lhs.7, Lhs.2, Lhs.3, Lhs.4, Lhs.5

      0    ~0%    {8} r37 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedPhi#7#fffffff#prev ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.3, Rhs.4, Rhs.5, Rhs.6

      0    ~0%    {8} r38 = SELECT r37 ON In.4 = false
      0    ~0%    {8} r39 = SCAN r38 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

      0    ~0%    {8} r40 = SELECT r37 ON In.4 = true
      0    ~0%    {8} r41 = SCAN r40 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

      0    ~0%    {8} r42 = r39 UNION r41

  3482    ~0%    {8} r43 = JOIN unequalIntegralSsa#5#fffff#prev_delta WITH boundedSsa#8#ffffffff#prev ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

  1747    ~0%    {8} r44 = SELECT r43 ON In.4 = false
  1747    ~0%    {8} r45 = SCAN r44 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

  1735    ~1%    {8} r46 = SELECT r43 ON In.4 = true
  1735    ~2%    {8} r47 = SCAN r46 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

  3482    ~2%    {8} r48 = r45 UNION r47
  3482    ~2%    {8} r49 = r42 UNION r48
                  {8} r50 = r49 AND NOT num#TSemNoReason#f(Lhs.0)
    20    ~0%    {8} r51 = SCAN r50 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

    41    ~2%    {8} r52 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedPhi#7#fffffff#prev_delta ON FIRST 3 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.3, Rhs.4, Rhs.5, Rhs.6

    27    ~0%    {8} r53 = SELECT r52 ON In.4 = false
    27    ~0%    {8} r54 = SCAN r53 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

    14    ~0%    {8} r55 = SELECT r52 ON In.4 = true
    14    ~0%    {8} r56 = SCAN r55 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

    41    ~0%    {8} r57 = r54 UNION r56

  1843    ~1%    {8} r58 = JOIN unequalIntegralSsa#5#fffff#prev WITH boundedSsa#8#ffffffff#prev_delta ON FIRST 4 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Rhs.4, Rhs.5, Rhs.6, Rhs.7

    907    ~0%    {8} r59 = SELECT r58 ON In.4 = false
    907    ~1%    {8} r60 = SCAN r59 OUTPUT In.7, In.0, In.1, (In.2 + i2f(1)), In.3, false, In.5, In.6

    936    ~0%    {8} r61 = SELECT r58 ON In.4 = true
    936    ~0%    {8} r62 = SCAN r61 OUTPUT In.7, In.0, In.1, (In.2 - i2f(1)), In.3, true, In.5, In.6

  1843    ~0%    {8} r63 = r60 UNION r62
  1884    ~0%    {8} r64 = r57 UNION r63
                  {8} r65 = r64 AND NOT num#TSemNoReason#f(Lhs.0)
  1853    ~1%    {8} r66 = SCAN r65 OUTPUT In.1, In.2, In.3, In.4, In.5, In.6, In.7, In.0

  1873    ~1%    {8} r67 = r51 UNION r66
225740    ~0%    {8} r68 = r36 UNION r67
233075    ~0%    {8} r69 = r32 UNION r68
236598    ~0%    {8} r70 = r20 UNION r69
235817    ~0%    {8} r71 = r70 AND NOT boundedSsa#8#ffffffff#prev(Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.7)
                  return r71
```
2023-08-24 10:29:04 +01:00
Asger F
b424f3fe83 Update a comment to be more accurate 2023-08-24 11:12:39 +02:00
Jeroen Ketema
9f7413eded C++: Omit assign case from cpp/non-constant-format 2023-08-24 11:02:40 +02:00
Anders Schack-Mulligen
ebe3f61ef6 Java: Fix models in qltest. 2023-08-24 09:44:43 +02:00
Jeroen Ketema
f996fa2f8b Merge pull request #14043 from jketema/ir-regres
C++: Add IR test case that shows regression after frontend update
2023-08-24 09:23:58 +02:00
AlexDenisov
d89a86fea4 Merge pull request #13979 from github/alexdenisov/autobuilder-spm
Swift: teach autobuilder about SPM, CocoaPods, and Carthage
2023-08-24 08:50:04 +02:00
Jeroen Ketema
c882945e30 C++: Add IR test case that shows regression after frontend update 2023-08-24 08:36:22 +02:00
erik-krogh
db2b8d4bcc remove some test code I accidentially commited 2023-08-24 07:56:05 +02:00
Mathias Vorreiter Pedersen
123e58767b C++: Share RangeAnalysisUtil with 'cpp/overrun-write'. 2023-08-23 22:42:00 +01:00
Harry Maclean
96e9dfc7b2 Merge pull request #13969 from hmac/shared-extractor-globs
Shared extractor: support file path globs
2023-08-23 16:41:39 +01:00
Harry Maclean
b76842ad3d Shared: Fix clippy lint 2023-08-23 16:24:57 +01:00
Harry Maclean
3680613f2d Shared: Restrict extractor file globs to filenames 2023-08-23 16:09:56 +01:00
Mathias Vorreiter Pedersen
6cf99688e1 Merge pull request #13985 from alexet/ir-tainted-sql
CPP: Convert SQL tainted away from away from DefaultTaintTracking.
2023-08-23 15:40:55 +01:00
Rasmus Wriedt Larsen
89b790d048 Merge pull request #14037 from RasmusWL/fix-tests
Python: Fix tests
2023-08-23 16:37:40 +02:00
Rasmus Wriedt Larsen
f33359bd5c Python: Fix tests 2023-08-23 15:37:55 +02:00
Asger F
2b540e251a Merge pull request #14007 from asgerf/js/import-path-string
JS: Follow immediate predecessors in path resolution
2023-08-23 15:28:22 +02:00
Harry Maclean
54c2221f35 Merge pull request #14033 from hmac/excon-bugfix
Ruby: Fix bug in excon model
2023-08-23 14:24:53 +01:00
Harry Maclean
cc7ef5dac1 Shared: Fix clippy lint in shared extractor 2023-08-23 14:11:22 +01:00
Harry Maclean
ed40d72e4f Shared: Bump extractor version 2023-08-23 14:11:22 +01:00
Harry Maclean
24ac6c0596 QL: Update for shared extractor changes 2023-08-23 14:11:21 +01:00
Harry Maclean
7e2abf20c6 Shared: Support glob patterns in shared extractor
Replace the `file_extensions` field with `file_globs`, which supports
UNIX style glob patterns powered by the `globset` crate.

This allows files with no extension (e.g. Dockerfiles) to be extracted,
by specifying a glob such as `*Dockerfile`.

One surprising aspect of this change is that the globs match against the
whole path, rather than just the file name.

This is a breaking change.
2023-08-23 14:11:21 +01:00
Asger F
d146514275 Merge pull request #13928 from asgerf/js/ignore-huge-files
JS: Ignore files larger than 10 MB during extraction
2023-08-23 15:09:58 +02:00
Asger F
d2fca1b804 Merge pull request #13926 from asgerf/js/fix-cyclic-alias-extraction
JS: fix crash in case of cyclic alias
2023-08-23 15:09:39 +02:00
Geoffrey White
46fc1fdaa1 Swift: Suggestions from review. 2023-08-23 14:04:56 +01:00
Geoffrey White
15c49eeee9 Update swift/ql/lib/codeql/swift/regex/Regex.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-23 13:58:05 +01:00
Asger F
ee1b3fd7e9 Java: update test after VariableCapture.qll change 2023-08-23 14:57:26 +02:00
Asger F
8aec87ea57 Update VariableCapture.qll 2023-08-23 14:57:26 +02:00
Alex Eyers-Taylor
949b0a2613 CPP:Move import to start of file 2023-08-23 13:39:29 +01:00
Alex Eyers-Taylor
7d99d61662 CPP: Convert SQL tainted to IR dataflow. 2023-08-23 13:39:29 +01:00
Michael Nebel
08d44c1bdc Merge pull request #14019 from michaelnebel/csharp/excludedlls
C#: Exclude dll files when getting files in the dependency manager.
2023-08-23 14:15:32 +02:00
Asger F
b8fc84e8e4 JS: Change note 2023-08-23 14:11:07 +02:00
Asger F
c6a757e085 JS: More robust handling of cyclic aliases 2023-08-23 14:11:07 +02:00
Asger F
794a459c1b JS: Add reproduction test 2023-08-23 14:11:07 +02:00
Asger F
b93e404441 JS: Change log 2023-08-23 14:05:21 +02:00
Geoffrey White
02fbb47b64 Swift: Change note. 2023-08-23 13:04:49 +01:00
Geoffrey White
03ca29ab96 Swift: Adapt the IncompleteHostnameRegex qhelp for Swift. 2023-08-23 13:04:49 +01:00
Geoffrey White
1805b070dc Swift: Adapt the IncompleteHostnameRegex test for Swift. 2023-08-23 13:04:48 +01:00
Harry Maclean
d18ca3f5d7 Ruby: Fix bug in excon model
If a codebase included a definition for `Excon.new`, we matched
connection nodes to unrelated request nodes.
2023-08-23 12:55:36 +01:00
Tony Torralba
0f3918af16 Merge pull request #13773 from atorralba/atorralba/java/mdht-xxe-sink
Java: Add XXE sinks for MDHT
2023-08-23 13:49:49 +02:00
Asger F
ae2a1c7399 JS: Change note 2023-08-23 13:39:56 +02:00
Anders Schack-Mulligen
736c4beb9e Java: Add change note. 2023-08-23 13:26:41 +02:00
Anders Schack-Mulligen
6c02e30f56 Java: Update models. 2023-08-23 13:24:55 +02:00
Anders Schack-Mulligen
4b0a1cf74b Java: Remove old interpretation. 2023-08-23 13:19:16 +02:00
Anders Schack-Mulligen
410c09270f Java: Use nested names in MaD signatures. 2023-08-23 13:17:52 +02:00
Geoffrey White
d594de8190 Swift: Test dataflow on fields a bit more. 2023-08-23 10:49:03 +01:00
Geoffrey White
efcadbda69 Swift: Get the IncompleteHostnameRegex query working for Swift. 2023-08-23 10:32:10 +01:00
Harry Maclean
a5c8917ff0 Merge pull request #14031 from hmac/hmac-fix-test
Ruby: Update test fixture
2023-08-23 10:15:23 +01:00
Harry Maclean
842da58269 Ruby: Update test fixture 2023-08-23 09:59:04 +01:00
Harry Maclean
fb4b774c0d Merge pull request #13967 from hmac/remove-splat-all
Ruby: Remove isSplatAll
2023-08-23 09:40:06 +01:00
Michael Nebel
1f1d48f768 Merge pull request #14020 from tamasvajk/fix/dependency-fetching-1
C#: Fix lazy evaluation of not yet downloaded packages
2023-08-23 10:39:29 +02:00
Michael Nebel
95193633fe Update csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs
Co-authored-by: Tom Hvitved <hvitved@github.com>
2023-08-23 10:35:20 +02:00
erik-krogh
25e4f2c3a2 limit concretize to strings of at most length 100 2023-08-23 10:26:29 +02:00
Tom Hvitved
3810b796a0 Data flow: Use call contexts in stage 3 2023-08-23 10:05:57 +02:00
Geoffrey White
6deaf4e5f8 Swift: Rework ParsedStringRegex and introduce the needed RegexPatternSource class. 2023-08-23 09:01:15 +01:00
Asger F
d8462ad1b3 JS: Add a file size limit to extractor 2023-08-23 09:54:55 +02:00
Asger F
bc47646a79 JS: Move getMegabyteCountFromPrefixedEnv into a shared place 2023-08-23 09:54:55 +02:00
Asger F
dec6039469 JS: Follow immediate predecessors in path resolution 2023-08-23 09:53:51 +02:00
Geoffrey White
6fb1058e73 Swift: Copy IncompleteHostnameRegex query from JS. 2023-08-23 08:46:13 +01:00
Michael Nebel
672d1637ab C#: Exclude dll files when getting files in the dependency manager. 2023-08-23 09:28:49 +02:00
Maiky
664c1eba72 Add "" and nil as sources 2023-08-22 18:10:33 +02:00
Alex Denisov
b657301d39 Swift: update test expectations 2023-08-22 18:03:19 +02:00
Ian Lynagh
deaf912cb8 Kotlin: Add an integration test for extractor information 2023-08-22 16:39:18 +01:00
Jeroen Ketema
cf53956d39 Merge pull request #14021 from jketema/non-const-format-test
C++: Add `cpp/non-constant-format` test
2023-08-22 17:38:45 +02:00
Alex Denisov
e9fdbfabea Swift: extract nextCall from ForEachStmt 2023-08-22 17:36:40 +02:00
Jeroen Ketema
6566b91355 C++: Add indication that the test result is good 2023-08-22 16:38:46 +02:00
Robert Marsh
5734e475d4 Merge pull request #14014 from rdmarsh2/rdmarsh2/swift/keypath-force-steps
Swift: flow through keypath optional components
2023-08-22 10:35:36 -04:00
Jeroen Ketema
1e8daff02a C++: Add cpp/non-constant-format test 2023-08-22 16:23:47 +02:00
Robert Marsh
e94781fa8f Swift: fix comment 2023-08-22 13:27:17 +00:00
Michael Nebel
c1f167ceee C#: Move package filtering logic from FileContent to DependencyManager. 2023-08-22 14:51:33 +02:00
Tamas Vajk
87d0d723ed C#: Fix lazy evaluation of not yet downloaded packages 2023-08-22 14:50:03 +02:00
Mathias Vorreiter Pedersen
530c950b41 C++: Fix formatting. 2023-08-22 13:40:00 +01:00
Mathias Vorreiter Pedersen
66f11d427b C++: Simplify description. 2023-08-22 13:39:38 +01:00
Mathias Vorreiter Pedersen
bbce7ee96d C++: Cache 'getAnInput' since it's now used in several queries. 2023-08-22 13:37:24 +01:00
Tamás Vajk
afe1e9c453 Merge pull request #13957 from tamasvajk/razor-standalone-2
C#: Generate source files from cshtml files in standalone
2023-08-22 14:22:11 +02:00
Michael Nebel
fe36230061 Merge pull request #14015 from michaelnebel/csharp/vscodesettings
C#: Update of VS Code settings.
2023-08-22 14:16:31 +02:00
Mathias Vorreiter Pedersen
1c3a0d1632 Update cpp/ql/src/Security/CWE/CWE-193/InvalidPointerDeref.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-22 13:03:07 +01:00
Mathias Vorreiter Pedersen
e88277bd3b Update cpp/ql/src/Security/CWE/CWE-193/InvalidPointerDeref.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-22 13:02:37 +01:00
Mathias Vorreiter Pedersen
abe28cb106 Update cpp/ql/src/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-08-22 13:02:29 +01:00
Ian Lynagh
c67cc23e07 Kotlin: Write usesK2 information to the database 2023-08-22 12:37:01 +01:00
Tom Hvitved
31738a37ae Merge pull request #14016 from hvitved/csharp/codeql-threads
C#: Respect `$CODEQL_THREADS` environment variable
2023-08-22 13:04:48 +02:00
Maiky
f301e46175 Remove isEmptyPassword predicate 2023-08-22 12:23:32 +02:00
yoff
00c0ebe9e4 Merge pull request #13738 from RasmusWL/path-steps
Python: Include all assignments in data flow paths
2023-08-22 11:58:11 +02:00
Michael Nebel
2b718fbc62 Merge pull request #13995 from michaelnebel/csharp/refactorimports
C#: Re-factor imports.
2023-08-22 11:52:02 +02:00
Tom Hvitved
6bb37ca465 C#: Respect $CODEQL_THREADS environment variable 2023-08-22 11:46:03 +02:00
Michael Nebel
b4c903fd15 C#: tasks.json no longer needed if C# Dev kit is installed. 2023-08-22 11:45:53 +02:00
Michael Nebel
8441b54bd8 C#: Set the extractor solution file as the default solution for the C# Dev Kit and add config for the Format usings plugin. 2023-08-22 11:35:47 +02:00
Michael Nebel
e9b1c933ed C#: Recommend the C# Dev Kit and C# Format usings plugins. 2023-08-22 11:34:50 +02:00
Tom Hvitved
5192d7c137 Merge pull request #13997 from hvitved/ruby/type-tracking-splats
Ruby: Include more (hash) splat flow in type tracking
2023-08-22 11:33:39 +02:00
Tom Hvitved
3f54ecbcc2 Update ruby/ql/lib/codeql/ruby/typetracking/TypeTrackerSpecific.qll
Co-authored-by: Harry Maclean <hmac@github.com>
2023-08-22 11:18:12 +02:00
Alex Denisov
5cce37baa9 Swift: update test expectations 2023-08-22 11:11:28 +02:00
Alex Denisov
48607e3ad7 Swift: address code review comments 2023-08-22 10:01:16 +02:00
AlexDenisov
b98a966729 Apply suggestions from code review
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
2023-08-22 09:57:25 +02:00
Anders Starcke Henriksen
3b8b33a94d Released pack. 2023-08-22 09:45:52 +02:00
Anders Starcke Henriksen
3aeacf6df3 Update publish script to have right path. 2023-08-22 09:37:31 +02:00
Anders Schack-Mulligen
bdc5f9cdea Merge pull request #14012 from knewbury01/knewbury01/add-sanitizer-command-query
Java: add sanitizer to command injection query
2023-08-22 08:40:49 +02:00
Michael Nebel
ce6fd8ac5f Merge pull request #13432 from michaelnebel/updateissupported
Java/C#: Update telemetry queries to report callables with sink/source neutrals as being supported.
2023-08-22 08:39:38 +02:00
Sid Shankar
a9ea61f0b2 Merge pull request #14001 from github/sidshank/clarify-js-and-ts-requirements
Clarify system requirements for TypeScript extraction
2023-08-21 20:59:11 -04:00
Robert Marsh
a335ece5e5 Swift: change note for keypath optional flows 2023-08-21 20:11:37 +00:00
Robert Marsh
1634fa2e25 Swift: support for optional chaining in keypaths 2023-08-21 20:09:28 +00:00
Robert Marsh
81bf415b50 Swift: modify test so implicit read isn't needed at sink 2023-08-21 20:08:30 +00:00
Robert Marsh
246d5c530e Swift: flow through keypath force components 2023-08-21 19:07:40 +00:00
Geoffrey White
f7776f812c Swift: 'good enough' fix for UnsafeJsEval flow. 2023-08-21 18:30:30 +01:00
Henry Mercer
5a76b9f59e Merge pull request #14010 from github/henrymercer/cs/add-alias
C#: Add "c#" alias to language pack
2023-08-21 18:26:54 +01:00
Geoffrey White
317757b7ae Swift: Create proper models for JavaScriptCore. 2023-08-21 18:24:26 +01:00
Kristen Newbury
5e01e1d464 Java: add sanitizer to command injection query 2023-08-21 12:33:05 -04:00
Mathias Vorreiter Pedersen
e1ed49f3ac Merge pull request #14011 from github/revert-13991-redsun82/swift-use-concepts
Revert "Swift: use C++20 constraints and concepts to simplify code"
2023-08-21 17:21:42 +01:00
Paolo Tranquilli
1daedd9fb6 Revert "Swift: use C++20 constraints and concepts to simplify code" 2023-08-21 17:40:15 +02:00
Henry Mercer
cbce0736c2 C#: Add "c#" alias to language pack
This will allow users to reference the C# extractor using
`--language c#` in future versions of the CLI.
2023-08-21 16:27:39 +01:00
Harry Maclean
414ae76ae1 Ruby: Add another splat flow test 2023-08-21 16:21:55 +01:00
Harry Maclean
c615f183c1 Ruby: Add test for spurious splat flow
We don't yet properly model splat flow when a positional argument
follows a splat argument.
2023-08-21 16:11:10 +01:00
Max Schaefer
87364137df Use more sensible validator in example. 2023-08-21 15:14:01 +01:00
Tamas Vajk
2575db356d Improve code quality: fix review findings 2023-08-21 16:07:56 +02:00
Paolo Tranquilli
6d85d0d0f7 Merge pull request #13991 from github/redsun82/swift-use-concepts
Swift: use C++20 constraints and concepts to simplify code
2023-08-21 15:45:44 +02:00
Mathias Vorreiter Pedersen
ef9d342a99 C++: Accept more test changes. 2023-08-21 14:02:18 +01:00
Mathias Vorreiter Pedersen
c46f9e4572 C++: Don't consider additional loads when reusing dataflow operands. 2023-08-21 12:51:41 +01:00
Mathias Vorreiter Pedersen
50190efe1c C++: Don't limit instruction and operand reuse to those cases where we have a result for 'isUseImpl'. 2023-08-21 12:51:00 +01:00
Tom Hvitved
12d1d04592 Merge pull request #13983 from hvitved/dataflow/reduced-dispatch-early-join
Data flow: Earlier call-context based dispatch filtering
2023-08-21 13:20:08 +02:00
Tom Hvitved
1b4520b058 Data flow: Update QL doc 2023-08-21 12:56:37 +02:00
Sid Shankar
671eb0f82f Updates requirements for TypeScript only
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-08-21 06:51:30 -04:00
Jeroen Ketema
2d0f73d7c2 Merge pull request #13881 from jketema/shared-taint-tracking
Introduce shared taint tracking library
2023-08-21 12:45:49 +02:00
Geoffrey White
6ef6be7291 Swift: UnsafeJSEval regression. 2023-08-21 11:28:48 +01:00
Geoffrey White
997984c529 Swift: Minor test .expected changes. 2023-08-21 11:15:43 +01:00
Geoffrey White
a54747f850 Swift: Fix mysterious taint flow issue. 2023-08-21 11:06:04 +01:00
Rasmus Wriedt Larsen
c8c69aac9b Merge pull request #13561 from amammad/amammad-python-WebAppsConstatntSecretKeys
Python: Flask & Django Constant Secret Key initialization
2023-08-21 11:39:19 +02:00
Mathias Vorreiter Pedersen
e776178be5 C++: Add some whitespace to make stuff appear in the diff. 2023-08-21 10:23:41 +01:00
Mathias Vorreiter Pedersen
0a41acc0a6 C++: Add change note. 2023-08-21 10:23:41 +01:00
Mathias Vorreiter Pedersen
70fdfc2ae3 C++: Set precision to medium and add security severity. 2023-08-21 10:23:23 +01:00
Mathias Vorreiter Pedersen
4daabdae2b C++: Promote 'cpp/invalid-pointer-deref' out of experimental. 2023-08-21 10:23:22 +01:00
Geoffrey White
b4db68af80 Swift: Add content to the string models. 2023-08-21 10:16:40 +01:00
Geoffrey White
a6f29fa417 Swift: Address pointer/pointee conflation in the string tests themselves. 2023-08-21 10:16:39 +01:00
Tamas Vajk
b5cdaa2f94 Fix compile issues after rebase 2023-08-21 10:43:36 +02:00
Tamas Vajk
62666915b4 Adjust integration test to opt into cshtml extraction 2023-08-21 10:38:22 +02:00
Tamas Vajk
84a78e7a8d Add opt-in environment variable for cshtml generation 2023-08-21 10:38:22 +02:00
Tamas Vajk
ba0cc76da1 Minor cleanup of dotnet CLI invocations 2023-08-21 10:38:22 +02:00
Tamas Vajk
ad3cc8e1c7 Change backslash to forward slash in file paths in the analyzer config file 2023-08-21 10:38:22 +02:00
Tamas Vajk
c2eb2e9c69 Add more logging 2023-08-21 10:38:22 +02:00
Tamas Vajk
a644133d8f Write CSC arguments to file and pass that to the execution 2023-08-21 10:38:22 +02:00
Michael Nebel
166633dac0 C#: Only apply Path.combine to OS agnostic parts of the path. 2023-08-21 10:38:21 +02:00
Michael Nebel
d48ab36273 C#: Run dotnet exec command silently. 2023-08-21 10:38:21 +02:00
Tamas Vajk
d391246f27 C#: Generate source files from .cshtml files in standalone 2023-08-21 10:38:21 +02:00
Tamas Vajk
ba0f07b66c C#: Add integration test for cshtml extraction in standalone mode 2023-08-21 10:38:21 +02:00
Tamas Vajk
af1a0b9a6c C#: Include cshtml files in integration test results 2023-08-21 10:38:21 +02:00
Jeroen Ketema
a2bb7dee18 Java: Delete copy of shared taint tracking library 2023-08-21 10:32:28 +02:00
Michael Nebel
51f166d71e Java: Address review comments. 2023-08-21 10:22:28 +02:00
Paolo Tranquilli
bda516e9ea C++: tweak dispatcher clauses 2023-08-21 10:01:45 +02:00
Michael Nebel
106ba11e10 Address review comments. 2023-08-21 09:59:02 +02:00
Michael Nebel
d66fe08661 Add QLDoc for the getKind predicate. 2023-08-21 09:59:02 +02:00
Michael Nebel
a9f7994b7d Swift: Sync files and make manual changes. 2023-08-21 09:59:01 +02:00
Michael Nebel
4c06fbdc65 Ruby: Sync files and make manual changes. 2023-08-21 09:59:01 +02:00
Michael Nebel
42c7006378 Python: Sync files and make manual changes. 2023-08-21 09:59:01 +02:00
Michael Nebel
25cc561e50 Go: Sync files and make manual adjustments. 2023-08-21 09:59:01 +02:00
Michael Nebel
764581cc3e C#: Update FlowSummaries expected output. 2023-08-21 09:59:01 +02:00
Michael Nebel
807faf2c70 C#: Only include Neutral summary callables in the FlowSummaries test case. 2023-08-21 09:59:01 +02:00
Michael Nebel
6840a6dafe C#: Re-factor NeutralCallable to include all neutrals and introduce NeutralSummaryCallable. Also include printing of the neutral kind in FlowSummaries testcase. 2023-08-21 09:59:00 +02:00
Michael Nebel
8b5b153a21 C#: Update outdated comments in supported external APIs test case file. 2023-08-21 09:59:00 +02:00
Michael Nebel
699ed107f3 Java: Update SupportedExternalApis expected test output. 2023-08-21 09:59:00 +02:00
Michael Nebel
5623ccf4a0 Java: Re-factor NeutralCallable to include all neutrals and introduce NeutralSummaryCallable. 2023-08-21 09:59:00 +02:00
Michael Nebel
6deeb36a97 Java: Update the comments in SupportedExternalApis to include the neutral kind and add a sink neutral example. 2023-08-21 09:58:59 +02:00
Michael Nebel
864f60f90f C#: Re-arrange using statements. 2023-08-21 09:41:28 +02:00
Tony Torralba
71a36fcf0f Merge pull request #14003 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-21 09:28:05 +02:00
Michael Nebel
034db52c5c Merge pull request #13986 from michaelnebel/csharp/refactordepencyfetching
C#: Re-factor dependency fetching into a separate project.
2023-08-21 09:24:58 +02:00
Michael Nebel
4fb73ea191 C#: Address review comments. 2023-08-21 08:53:17 +02:00
Michael Nebel
1de86b4313 C#: Address review comments. 2023-08-21 07:37:27 +02:00
github-actions[bot]
181b3d0e33 Add changed framework coverage reports 2023-08-21 00:14:44 +00:00
Sid Shankar
79ab27bfed Clarifies JS and TS system requirements 2023-08-18 15:50:00 -04:00
Dave Bartolomeo
9798fcddfa Merge pull request #13998 from github/release-prep/2.14.3
Release preparation for version 2.14.3
2023-08-18 14:59:47 -04:00
github-actions[bot]
098dfb4242 Release preparation for version 2.14.3 2023-08-18 14:48:15 +00:00
Edward Minnix III
d109637e2d Merge pull request #13413 from egregius313/egregius313/trust-boundary
Java: Trust Boundary Violation Query
2023-08-18 10:33:32 -04:00
Michael B. Gale
a1c9deea61 Merge pull request #13867 from github/mbg/go/1.21-support
Go: Basic Go 1.21 support
2023-08-18 14:37:11 +01:00
Paolo Tranquilli
b78f12481f Swift: tweak priority of location information sources 2023-08-18 15:18:48 +02:00
Jeroen Ketema
1643a83678 Merge pull request #13996 from jbj/accept-BadlyBoundedWrite
C++: Accept regression in test after evaluator fix
2023-08-18 14:28:46 +02:00
Alex Denisov
7e36f7dcaf Swift: fix autobuilder crash 2023-08-18 14:26:16 +02:00
Paolo Tranquilli
386dedb9df Swift: fix location extractor hitting swift assertion 2023-08-18 14:21:30 +02:00
Tom Hvitved
deaa37d9d3 Ruby: Include more (hash)splat flow in type tracking 2023-08-18 14:07:12 +02:00
Paolo Tranquilli
c17a582b34 Revert "Swift: upgrade clang-formatting to 15.0.7"
This reverts commit 970b3d06be.
2023-08-18 13:59:41 +02:00
Tom Hvitved
da05e3e0e8 Ruby: Add more type tracking tests 2023-08-18 13:51:29 +02:00
Jonas Jensen
a002f59f58 C++: Undo BadlyBoundedWrite change from #13929
This rolls back the query change, ensuring that there is no need for a
change note.
2023-08-18 13:48:58 +02:00
Jonas Jensen
478a105e21 C++: delete change note
Since the previous commit removed the best evidence we had for the
change described in this note, I'm removing the note for now.
2023-08-18 13:35:32 +02:00
Jonas Jensen
cd1f196848 C++: Accept regression in test after evaluator fix 2023-08-18 13:30:20 +02:00
Alex Denisov
6a5e539833 Swift: update test expectations 2023-08-18 13:18:02 +02:00
Alex Denisov
202a4cd1a2 Swift: teach autobuilder about SPM, CocoaPods, and Carthage 2023-08-18 13:17:57 +02:00
Harry Maclean
0bbda992fb Ruby: Remove isSplatAll arg/parameter position
This is equivalent to isSplat(0).
2023-08-18 12:09:04 +01:00
Harry Maclean
222aa41bbf Merge pull request #13938 from hmac/splat-flow-2
Ruby: More precise flow into splat parameters
2023-08-18 12:07:58 +01:00
Erik Krogh Kristensen
08ef31d452 Merge pull request #13916 from erik-krogh/limit-java-field-reg
Java: limit field flow when tracking regex strings
2023-08-18 12:14:31 +02:00
Michael Nebel
d968a91799 C#: Introduce convenience constructor for the DependencyManager. 2023-08-18 11:49:07 +02:00
Michael Nebel
c0d1179c8a C#: Minimal update of relevant code to minimize project dependencies and hide some implementation details behind interfaces. 2023-08-18 11:42:12 +02:00
Michael Nebel
f47e59dff1 C#: Move dependency related files into a new project. 2023-08-18 11:42:12 +02:00
Michael Nebel
b48567f6a5 C#: Add shared dependency fetching project. 2023-08-18 11:42:12 +02:00
Michael Nebel
15dd130d31 C#: Remove unused parameter in DownloadMissingPackages. 2023-08-18 11:42:11 +02:00
Rasmus Wriedt Larsen
b579ab0694 Python: Accept .expected change 2023-08-18 11:12:55 +02:00
Tom Hvitved
81ed72c96a Data flow: Revert join order changes 2023-08-18 10:49:33 +02:00
Stephan Brandauer
480e3bf506 Java: update model exclusions logic to cope with new automodel test location 2023-08-18 10:28:51 +02:00
Rasmus Wriedt Larsen
38577e6a5c Python: Remove duplicated SSTI tests
Besides the Cheetah tests, which were missing from the query tests.
2023-08-18 10:20:16 +02:00
Rasmus Wriedt Larsen
33f8998c2e Python: Minor fix in test 2023-08-18 10:19:44 +02:00
Paolo Tranquilli
3c4e755233 Swift: fix macOS not having std::ranges::sized_range 2023-08-18 10:18:53 +02:00
Rasmus Wriedt Larsen
843f2681bb Python: Apply suggestions from code review
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-08-18 10:09:45 +02:00
Paolo Tranquilli
8b3e32fa97 Swift: add missing include 2023-08-18 09:10:44 +02:00
Paolo Tranquilli
53ed39065c Swift: tweak location extractor using new concept 2023-08-18 06:45:11 +02:00
Paolo Tranquilli
eb8997dc7a Swift: fix print_unextracted 2023-08-18 06:44:42 +02:00
Tom Hvitved
4d951d8df1 Address review comments 2023-08-17 21:04:58 +02:00
Geoffrey White
86a73fa0e7 Swift: Accept fixed spurious test results. 2023-08-17 19:41:21 +01:00
Geoffrey White
0fd4f6180f Swift: Allow subscript content reads from collections. 2023-08-17 19:37:55 +01:00
Geoffrey White
1ac9d2c618 Swift: Update models with CollectionElement, value flow. 2023-08-17 18:49:19 +01:00
Michael B. Gale
9082fd218e Add taint flow tests for clear 2023-08-17 18:39:32 +01:00
Edward Minnix III
8d88af1af0 Apply docs review suggestions
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
2023-08-17 13:05:38 -04:00
Ed Minnix
4eb1035dfe Documentation fixes 2023-08-17 13:05:38 -04:00
Ed Minnix
655a98452a Remove escapeHTML models 2023-08-17 13:05:37 -04:00
Ed Minnix
f53496b2a7 Added documentation for trust-boundary-violation sink 2023-08-17 13:05:37 -04:00
Ed Minnix
d468ea9e90 Add default sanitizers 2023-08-17 13:05:37 -04:00
Ed Minnix
b305962c9a Use more appropriate description 2023-08-17 13:05:37 -04:00
Ed Minnix
a36c12ff1f Add trust-boundary-violation sink kind 2023-08-17 13:05:37 -04:00
Ed Minnix
60642c52aa Use non-extending subtype 2023-08-17 13:05:37 -04:00
Ed Minnix
e22a67e7fe Remove unnecessary methods 2023-08-17 13:05:37 -04:00
Ed Minnix
a3a4c31911 Replace servlet source node with RemoteFlowSource 2023-08-17 13:05:37 -04:00
Edward Minnix III
929090a847 Typos and style fixes
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-08-17 13:05:37 -04:00
Ed Minnix
52ebf9fff6 Java: Add trust boundary change note 2023-08-17 13:05:37 -04:00
Ed Minnix
172b8a6967 Documentation fixes 2023-08-17 13:05:37 -04:00
Ed Minnix
b567ec875a Documentation 2023-08-17 13:05:37 -04:00
Ed Minnix
55fae2daaa Added ESAPI sanitizer 2023-08-17 13:05:37 -04:00
Ed Minnix
97d6e82869 Stubs for org.owasp.esapi 2023-08-17 13:05:37 -04:00
Ed Minnix
f58590c6a9 Trust Boundary Work 2023-08-17 13:05:37 -04:00
Ed Minnix
2aba425464 TrustBoundary test ql file 2023-08-17 13:05:36 -04:00
Ed Minnix
ab9f0240d3 Add taint steps for HTML encoding methods 2023-08-17 13:05:36 -04:00
Ed Minnix
b9f2da7875 Comments and import fixes 2023-08-17 13:05:36 -04:00
Ed Minnix
3e7444cd66 Style fixes 2023-08-17 13:05:36 -04:00
Ed Minnix
15370506b8 Add missing security severity 2023-08-17 13:05:36 -04:00
Ed Minnix
a8b7e70d01 Convert trust boundary models to MaD 2023-08-17 13:05:36 -04:00
Ed Minnix
76438f13b6 Trust Boundary Query 2023-08-17 13:05:36 -04:00
Edward Minnix III
41a527cf72 Merge pull request #13934 from egregius313/egregius313/add-dashes-to-sha-algorithms
Java: Add dashes to SHA algorithm names in `Encryption.qll`
2023-08-17 13:03:15 -04:00
Michael B. Gale
109b96f038 Add comment explaining TaintStep test 2023-08-17 17:50:41 +01:00
Michael B. Gale
e65269be69 Add DefaultTaintSanitizer for clear 2023-08-17 17:49:46 +01:00
Geoffrey White
59e2b0482c Merge branch 'main' into closuremodels 2023-08-17 17:16:44 +01:00
Paolo Tranquilli
3de7b75853 Swift: remove uneeded include 2023-08-17 17:36:36 +02:00
Paolo Tranquilli
970b3d06be Swift: upgrade clang-formatting to 15.0.7 2023-08-17 17:24:42 +02:00
Paolo Tranquilli
7c764f3b50 Swift: use C++20 constraints and concepts to simplify code
This simplifies several instances of metaprogramming by leveraging
[constraints and concepts from C++20][1]. This:
* gets rid of `std::enable_if` by usage of `requires`, making it more
  readable and yield better compiler messages.
* uses `requires` instead of `static_assert` to enforce `TrapLabel`
  typing
* simplifies all compile-time tests for validity of a given expression
* uses some standard library concepts where possible
* generalizes and simplifies `SwiftLocationExtractor`

Notice that in order to use the `std::derived_from` concept, `virtual`
inheritance had to be added to the label tags, because diamond
inheritance is a problem otherwise. That's because
`std::derived_from<T, U>` requires that `T*` be convertible to `U*`,
which is false if there are multiple non-virtual inheritance paths from
`U` to `T`. As tags never get actually instantiated, there is no runtime
performance penalty in using `virtual` inheritance.

[1]: https://en.cppreference.com/w/cpp/language/constraints
2023-08-17 17:24:42 +02:00
Rasmus Wriedt Larsen
cf54d3f4ca Python: Move paramiko tests to own folder 2023-08-17 15:45:28 +02:00
Rasmus Wriedt Larsen
4c693b4fc3 Python: Port py/xslt-injection to new data-flow 2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
ef139f2ee9 Python: Delete XsltSinks.ql test 2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
779fe6498c Python: Rename to XsltInjection.ql 2023-08-17 15:45:07 +02:00
Rasmus Wriedt Larsen
0336c76871 Python: Rename template injection tests 2023-08-17 15:45:04 +02:00
Rasmus Wriedt Larsen
91edde72c4 Python: Port py/template-injection to new data-flow
I kept all the modeling in _one_ file, since that makes it easy to work
with such an external contribution... and I would certainly propose this
file setup for the future 👍
2023-08-17 15:44:26 +02:00
Paolo Tranquilli
700f383bab Merge pull request #13988 from github/redsun82/swift-version-macro
Swift: fix version check macro to be lexicographic
2023-08-17 15:34:04 +02:00
Anders Schack-Mulligen
e27aad9d6c Merge pull request #13987 from aschackmull/java/rangeanalysis-joinorder-fix
Java: Join-order fix in RangeAnalysis.
2023-08-17 14:47:26 +02:00
Mathias Vorreiter Pedersen
af7fe89c5a Merge pull request #13989 from MathiasVP/add-invalid-ptr-false-positive-3
C++: Add `cpp/invalid-pointer-deref` false positive
2023-08-17 12:50:55 +01:00
Mathias Vorreiter Pedersen
5f5a87e2c7 C++: Add false positive. 2023-08-17 12:13:16 +01:00
Paolo Tranquilli
75cc1d8f75 Swift: fix version check macro to be lexicographic 2023-08-17 12:19:28 +02:00
Anders Schack-Mulligen
f8a0b6cd22 Java: Add nomagic 2023-08-17 11:20:02 +02:00
Anders Starcke Henriksen
1b31c4dd4c Update filter to point to right pack. 2023-08-17 11:07:27 +02:00
Anders Schack-Mulligen
0afda68ba1 Java: Join-order fix in RangeAnalysis. 2023-08-17 11:07:24 +02:00
Rasmus Wriedt Larsen
4277be5819 Python: Add change-note 2023-08-17 10:46:36 +02:00
Tom Hvitved
7cc01ea8b5 Merge pull request #13595 from hvitved/csharp/use-shared-cfg-pack
C#: Adopt shared CFG construction library from shared `controlflow` pack
2023-08-17 10:37:09 +02:00
Rasmus Wriedt Larsen
24f9f13790 Python: Fix tests 2023-08-17 10:15:36 +02:00
Anders Starcke Henriksen
56871c77f5 Merge branch 'main' into starcke/automodel-pack 2023-08-17 10:04:44 +02:00
Tony Torralba
67c557115b Merge pull request #13915 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-17 10:03:04 +02:00
Tom Hvitved
fe0f766994 Merge pull request #13966 from hvitved/csharp/mad-repr-fix
C#: Fix `getMadRepresentationSpecific`
2023-08-17 09:40:41 +02:00
Tom Hvitved
da8005dbd3 Code review suggestions 2023-08-17 09:26:58 +02:00
github-actions[bot]
b0da1ef892 Add changed framework coverage reports 2023-08-17 00:14:13 +00:00
Jeroen Ketema
33e8310625 Merge branch 'main' into shared-taint-tracking 2023-08-17 00:14:25 +02:00
Robert Marsh
d3cc366dc5 Swift: add QLDoc for DictionarySubscriptNode 2023-08-16 17:57:30 +00:00
Robert Marsh
3ee3eabd95 Swift: add EnumContent to clearsContent 2023-08-16 17:52:26 +00:00
Ian Lynagh
1fb4e13e0a Merge pull request #13960 from igfoo/igfoo/parent
Kotlin: Handle Kotlin 2 parents better
2023-08-16 16:27:15 +01:00
Mathias Vorreiter Pedersen
e56cd0b498 Merge pull request #13984 from MathiasVP/fix-expected-for-swift
Swift: Fix expected files after a semantic merge conflict
2023-08-16 15:06:27 +01:00
Maiky
5f502ec6bb rename change-note 2023-08-16 15:32:53 +02:00
yoff
7f2f6f14e7 Merge pull request #13729 from yoff/python/model-aws-lambdas
Python/JavaScript: Shared module for serverless functions
2023-08-16 15:14:08 +02:00
Rasmus Wriedt Larsen
0443057608 Merge branch 'main' into amammad-python-WebAppsConstatntSecretKeys 2023-08-16 15:06:08 +02:00
Mathias Vorreiter Pedersen
b2c7c57815 Swift: Fix expected files after a semantic merge conflict. 2023-08-16 13:52:06 +01:00
Mathias Vorreiter Pedersen
66d13dc0d5 Merge pull request #13981 from MathiasVP/fix-orig-delta-for-subtraction
C++: Fix original delta calculation for subtraction in new range analysis
2023-08-16 13:28:21 +01:00
Tom Hvitved
570654d1f0 Data flow: Earlier call-context based dispatch filtering 2023-08-16 14:24:45 +02:00
Mathias Vorreiter Pedersen
20df63f26d C++: Respond to review comments. 2023-08-16 12:50:41 +01:00
Geoffrey White
4b66bada3d Swift: Model array initializers. 2023-08-16 12:13:46 +01:00
Jeroen Ketema
591565a0db Merge pull request #13971 from jketema/float
C++: Update test after float128 related extractor changes
2023-08-16 13:11:35 +02:00
Mathias Vorreiter Pedersen
5e14b5cca7 C++: 'origDelta' should always be 'odLeft' when deriving subtraction ranges. 2023-08-16 12:10:31 +01:00
yoff
b2988e5516 Update python/ql/lib/change-notes/2023-08-07-serverless-sources.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-16 12:56:39 +02:00
Geoffrey White
9a4410d4b7 Swift: Additional test cases for array conversions. 2023-08-16 11:53:05 +01:00
Mathias Vorreiter Pedersen
986aa74db7 Merge pull request #13972 from MathiasVP/range-analysis-for-sub-expr
C++: Support subtraction in the new range analysis
2023-08-16 11:51:11 +01:00
Michael B. Gale
1bd536dd9e Rename getLocation to hasLocation 2023-08-16 11:21:35 +01:00
Geoffrey White
c123c3a8d8 Swift: Codegen. 2023-08-16 11:09:39 +01:00
Rasmus Wriedt Larsen
c55b0982f7 Merge pull request #13819 from yoff/python/relax-module-resolution
Python: Relax module resolution
2023-08-16 12:04:49 +02:00
Geoffrey White
c9e26678d0 Swift: Change notes. 2023-08-16 10:58:04 +01:00
Geoffrey White
da6c2b6c31 Swift: Add more swift/cleartext-logging sinks. 2023-08-16 10:41:02 +01:00
Michael Nebel
365b10183f Merge pull request #13744 from tamasvajk/standalone/integration-test
C#: Add integration test for standalone extraction
2023-08-16 10:50:12 +02:00
Geoffrey White
6a54a8bc62 Swift: QLDoc VariadicSequenceType. 2023-08-16 08:43:51 +01:00
Geoffrey White
8f2e2a6155 Swift: Fix array content sinks for swift/cleartext-logging. 2023-08-16 08:43:50 +01:00
Geoffrey White
269f0c6cb1 Swift: Flow through varargs. 2023-08-16 08:43:28 +01:00
Geoffrey White
3fe8655b6e Swift: Test data flow through varargs. 2023-08-16 08:34:32 +01:00
Stephan Brandauer
44a9cf93e0 Merge branch 'main' into kaeluka/add-provenance-to-metadata 2023-08-16 09:31:03 +02:00
Stephan Brandauer
808dc3e8d3 Java: Automodel framework mode: track exact ai- provenance in alreadyAiModeled meta data property 2023-08-16 09:25:03 +02:00
Stephan Brandauer
20254c3d0a Merge pull request #13886 from github/kaeluka/java-automodel-variadic-args
Java: automodel application mode: use endpoint class like in framework mode
2023-08-16 08:49:01 +02:00
Ed Minnix
cafd08521e Add change note 2023-08-15 23:46:12 -04:00
Ed Minnix
7cfe78a52d Add dashes to SHA algorithm names in Encryption.qll 2023-08-15 23:42:17 -04:00
Geoffrey White
b4595d8b92 Swift: Model getVaList, correct NSLogv sink for swift/cleartext-logging. 2023-08-15 22:05:58 +01:00
Jeroen Ketema
4ada83c0ba C++: Update test after float128 related extractor changes 2023-08-15 22:10:05 +02:00
Rasmus Lerchedahl Petersen
6614e037ae Python: format 2023-08-15 21:40:20 +02:00
Robert Marsh
79368c187c Swift: fixes around DictionaryContent 2023-08-15 19:34:27 +00:00
Michael B. Gale
c981fd714e Exclude String from TaintSteps
For `os.dirEntry` and `os.unixDirent` which are only available
on unix and Windows respectively.
2023-08-15 20:32:41 +01:00
Michael B. Gale
ee58dbc6f7 Add new built-ins to builtinFunction predicate
- `clear` isn't pure because it modifies a data structure in place
- `clear` may not be used correctly, but this is determined statically
2023-08-15 20:16:42 +01:00
Robert Marsh
a9f5471e76 Swift: add tests for broken dictionary flow case 2023-08-15 17:58:21 +00:00
Chris Smowton
b8372c2f95 Merge pull request #13973 from github/smowton/fix/go-version-comparison
Go: Don't warn when Go version exactly matches go.mod
2023-08-15 18:21:04 +01:00
Mathias Vorreiter Pedersen
49a5a39395 C++: Accept test changes. 2023-08-15 16:49:58 +01:00
Chris Smowton
3bcfbcdf68 Don't warn when Go version exactly matches go.mod
We had only previously tested this with e.g. installed go 1.20.5 >= go.mod request `go 1.20`; now we have go 1.21.0 which shouldn't elicit a warning because 1.21.0 is equal to the go.mod request `go 1.21`.
2023-08-15 16:49:42 +01:00
Paolo Tranquilli
234763efa6 Merge pull request #13959 from github/redsun82/cmake-fix
C++: make cmake generation work with internal rule `cc_binary_add_features`
2023-08-15 17:16:51 +02:00
Robert Marsh
3d20897725 Merge pull request #13910 from rdmarsh2/rdmarsh2/swift/for-await-cfg
Swift: CFG test for for-try-await
2023-08-15 11:16:07 -04:00
Mathias Vorreiter Pedersen
e145b81f58 C++: Accept test changes. 2023-08-15 16:12:44 +01:00
Mathias Vorreiter Pedersen
109e45e112 C++: Add precise range analysis for subtraction. 2023-08-15 16:12:40 +01:00
Mathias Vorreiter Pedersen
3fb024164b C++: Add a FP caused by bad range analysis for subtraction. 2023-08-15 16:00:35 +01:00
Mathias Vorreiter Pedersen
90888e592f Merge pull request #13965 from MathiasVP/better-certain-writes-and-invalid-ptr-deref-prep
C++: Remove more dataflow FPs after frontend upgrade
2023-08-15 15:43:55 +01:00
yoff
7eb41140ab Update python/ql/lib/semmle/python/Module.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-15 15:47:00 +02:00
Rasmus Lerchedahl Petersen
e6943ce98e Python: use standard test format 2023-08-15 15:26:18 +02:00
Michael B. Gale
b95effe916 Allow patch-level updates in Go CI 2023-08-15 14:13:36 +01:00
yoff
99bc050366 Update shared/yaml/codeql/serverless/ServerLess.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-15 15:09:30 +02:00
Kasper Svendsen
bb317bc558 Merge pull request #13968 from kaspersv/shadow-dbscheme
QL language specs: declarations can shadow dbscheme types and preds
2023-08-15 14:20:04 +02:00
Kasper Svendsen
30a813ab08 QL language specs: declarations can shadow dbscheme types and preds 2023-08-15 13:58:19 +02:00
Ian Lynagh
3b9bd16097 Kotlin: Mark some functions as private 2023-08-15 12:38:47 +01:00
Tom Hvitved
26b76171ca C#: Fix getMadRepresentationSpecific 2023-08-15 13:23:21 +02:00
Ian Lynagh
a8b69e5b55 Kotlin: Fix build on old versions 2023-08-15 11:30:23 +01:00
Mathias Vorreiter Pedersen
569f3c9b78 C++: Don't do indirect (instruction -> operand) flow when there's a store to the address in between the instruction and the operand. 2023-08-15 11:08:01 +01:00
Mathias Vorreiter Pedersen
f662cceb0b C++: Use value numbering to better detect whether a write is certain. 2023-08-15 11:07:14 +01:00
Rasmus Lerchedahl Petersen
8f70c9f950 Python: add comment about namespace packages 2023-08-15 12:02:02 +02:00
Tom Hvitved
44b734e120 Merge pull request #13955 from hvitved/ruby/type-tracking-capture-insensitive
Ruby: Make type tracking flow-insensitive for captured variables
2023-08-15 11:42:41 +02:00
Paolo Tranquilli
8e229ac31b Merge branch 'main' into redsun82/cmake-fix 2023-08-15 11:38:37 +02:00
Erik Krogh Kristensen
6a3b9e10eb Merge pull request #13914 from erik-krogh/escape-unicode
ReDoS: escape unicode chars in the output for the ReDoS queries
2023-08-15 11:21:21 +02:00
Mathias Vorreiter Pedersen
fec9626fe7 Merge pull request #13836 from github/alexdenisov/unresolved-dot-exprs
Swift: 'ParsedSequence' lacks proper types and yields 'Unresolved' AST nodes
2023-08-15 09:14:39 +01:00
Michael Nebel
a95aad51bd Merge pull request #13546 from michaelnebel/java/withoutelement
Java: Support for With[out]Element for MaD.
2023-08-15 10:03:03 +02:00
Rasmus Wriedt Larsen
d12743d7c3 Merge pull request #13941 from yoff/python/test-nice-location
Python: fix nice locations for import aliases
2023-08-14 21:37:23 +02:00
Tom Hvitved
061575ff77 Merge pull request #13937 from hvitved/ruby/for-loop-desugar
Ruby: Improve desugaring of `for` loops
2023-08-14 20:12:12 +02:00
Ian Lynagh
eb27428514 Kotlin: Handle IrExternalPackageFragment when dealing with external decls 2023-08-14 17:37:48 +01:00
Arthur Baars
77db0cf547 Merge pull request #13334 from aibaars/print-cfg-2
Ruby: printCfg: only show graph for selected CfgScope
2023-08-14 18:24:20 +02:00
Ian Lynagh
72af8ac1e2 Kotlin: Switch to useDeclarationParentOf
This lets us handle Kotlin 2 declarations whose parent is an
IrExternalPackageFragment, indicating that they are in a (multi)file
class.
2023-08-14 17:02:49 +01:00
Ian Lynagh
4f336820de Kotlin: Start handling IrExternalPackageFragment parents 2023-08-14 17:02:48 +01:00
Paolo Tranquilli
ef804c018d C++: make cmake generation work with internal rule cc_binary_add_features 2023-08-14 17:32:03 +02:00
Ian Lynagh
77451de9a3 Kotlin: Fix isExternalDeclaration for Kotlin 2 2023-08-14 15:01:13 +01:00
amammad
eb5529eac5 sanitize resutls exist in test/demo/example/sample directories 2023-08-14 23:48:03 +10:00
Mathias Vorreiter Pedersen
9359bea7b5 Merge pull request #13725 from MathiasVP/fix-barriers-in-invalid-pointer-deref
C++: Fix barriers in invalid pointer deref
2023-08-14 14:29:12 +01:00
Geoffrey White
5e940cd46f Merge pull request #13829 from geoffw0/typegetname
Swift: Correct the behaviour of Type.getName
2023-08-14 14:21:26 +01:00
Geoffrey White
657642a122 Java: Expose parts of the vquery message in the test. 2023-08-14 14:12:07 +01:00
Tom Hvitved
e96cbeb00a Ruby: Adjust locations of synthesized nodes 2023-08-14 14:37:47 +02:00
Tom Hvitved
c084a9b27a Ruby: Make type tracking flow-insensitive for captured variables 2023-08-14 13:44:37 +02:00
Stephan Brandauer
bc55afcee7 Java: Automodel framework mode: use new interface 2023-08-14 13:17:55 +02:00
Harry Maclean
d45e9101ba Ruby: Add change note 2023-08-14 11:20:58 +01:00
Rasmus Wriedt Larsen
1c3cc1fa29 Python: Remove flow through stdlib
This means tests can pass on any machine now 👍
2023-08-14 11:55:22 +02:00
Rasmus Wriedt Larsen
794d04e4c0 Python: Model os.getenv[b] 2023-08-14 11:55:00 +02:00
Michael Nebel
0e9f8c4b97 Merge pull request #13876 from michaelnebel/csharp/aspnetdlls
C#: Include ASP.NET assemblies in the standalone extraction.
2023-08-14 11:53:47 +02:00
Stephan Brandauer
551b34e3be Java: Automodel application mode: include candidates that are useful for regression testing 2023-08-14 11:46:40 +02:00
Rasmus Wriedt Larsen
6e168ff7d8 Python: Only interested in StrConst 2023-08-14 11:46:21 +02:00
Geoffrey White
b6dc2acc71 Merge branch 'main' into typegetname 2023-08-14 10:46:14 +01:00
Mathias Vorreiter Pedersen
e2f671e327 C++: Add more comments. 2023-08-14 10:44:46 +01:00
Rasmus Wriedt Larsen
0fba38c6d8 Merge branch 'main' into amammad-python-WebAppsConstatntSecretKeys 2023-08-14 11:29:56 +02:00
Rasmus Wriedt Larsen
eeefdc5dcd Python: Fix formatting 2023-08-14 11:29:38 +02:00
Michael Nebel
6ecbb400d7 C#: Turn initialize into a readonly field. 2023-08-14 11:19:42 +02:00
Tamas Vajk
01af74aeda C#: Add space to CMD metacharacters 2023-08-14 11:19:17 +02:00
Tamas Vajk
3680681e8b C#: Add integration test for standalone extraction 2023-08-14 11:19:00 +02:00
Michael Nebel
d76bb49b6a C#: Make some FileContent unit tests. 2023-08-14 11:18:19 +02:00
Michael Nebel
a0bad3ce15 C#: Re-factor FileContent to make it unit-testable and make an initializer class. 2023-08-14 11:18:19 +02:00
Michael Nebel
a362ce083d C#: Some file content regexp tweaking. 2023-08-14 11:18:19 +02:00
Michael Nebel
c95d219c84 C#: Re-factor the processing of all files into a helper class and make sure to only do one pass of the files. 2023-08-14 11:18:19 +02:00
Michael Nebel
db685e5fc4 C#: Tidy up. 2023-08-14 11:18:19 +02:00
Michael Nebel
e24fa4705a C#: Introduce caching or detecting the newest runtimes and fetching all file names in the source dir. 2023-08-14 11:18:19 +02:00
Michael Nebel
ddb50b8120 C#: Improve regular expressions and fix lowercase issue. 2023-08-14 11:18:19 +02:00
Michael Nebel
ca7fa2e7c8 C#: Use ASP.NET dlls when needed and available. 2023-08-14 11:18:19 +02:00
Michael Nebel
b71c41018c C#: Re-factor the GetRuntime method. 2023-08-14 11:18:19 +02:00
Michael Nebel
5bc8804242 C#: Introduce method to decide whether we need to include ASP.NET dlls in standalone compilation. 2023-08-14 11:18:19 +02:00
Michael Nebel
88b51e6ad3 C#: Re-factor logic for fetching info from group and remove a redundant continue statement. 2023-08-14 11:18:18 +02:00
Michael Nebel
881d86321e C#: Introduce regex for framework reference and project sdk and make some minor re-writes. 2023-08-14 11:18:18 +02:00
Michael Nebel
f5d776571b Merge pull request #13952 from michaelnebel/csharp/runtimewhitespacefix
C#: .NET Runtime path detection (bugfix).
2023-08-14 11:17:27 +02:00
Mathias Vorreiter Pedersen
df9c756369 C++: Add more comments. 2023-08-14 10:09:27 +01:00
yoff
d2a0b9a66c Update python/ql/lib/change-notes/2023-08-10-fix-alias-locations.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-14 10:55:00 +02:00
Mathias Vorreiter Pedersen
c265113073 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-08-14 09:51:28 +01:00
Harry Maclean
ca5456a54a Ruby: Remove duplicate disjuncts 2023-08-14 09:45:57 +01:00
Michael Nebel
9e03a211a5 C#: Add unit test where path to dotnet frameworks contain whitespaces. 2023-08-14 10:40:00 +02:00
Michael Nebel
1942ea8396 C#: Paths can contain whitespace (this is indeed common on windows). 2023-08-14 10:40:00 +02:00
Michael Nebel
280a27d9ca C#: Log some more info during dotnet --list-runtimes execution. 2023-08-14 10:40:00 +02:00
Michael Nebel
78c732db97 C#: Re-factor of ProgressMonitor and introduce LogInfo. 2023-08-14 10:40:00 +02:00
Michael Nebel
ef9453e862 C#: Selected runtime location should be logged as information. 2023-08-14 10:40:00 +02:00
yoff
307f44339c Update python/ql/lib/change-notes/2023-08-08-relax-module-resolution.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-08-14 10:23:47 +02:00
Stephan Brandauer
1a95a34441 Java: automodel: use the call for call context, rather than the argument 2023-08-14 09:54:44 +02:00
Stephan Brandauer
4107758c8a Java: automodel extraction: add strings to query selection 2023-08-14 09:49:50 +02:00
Mathias Vorreiter Pedersen
2c6bbd8060 C++: Replace 'left' with 'small' and 'right' with 'large' for consistency. 2023-08-13 22:53:41 +01:00
Robert Marsh
7053c62c41 Swift: update and sync tests 2023-08-11 18:52:37 +00:00
Robert Marsh
3f0a249aea Swift: Autoformat Dictionary.qll 2023-08-11 18:42:37 +00:00
Robert Marsh
f047161741 Swift: Change note for dictionary flow 2023-08-11 17:33:45 +00:00
Robert Marsh
653a229482 Swift: QLDoc for Dicitonary.qll 2023-08-11 17:32:29 +00:00
Robert Marsh
f5fac66627 Swift: autoformat 2023-08-11 17:31:39 +00:00
Henry Mercer
75e6fd9c8e Merge pull request #13918 from github/post-release-prep/codeql-cli-2.14.2
Post-release preparation for codeql-cli-2.14.2
2023-08-11 16:28:16 +01:00
Mathias Vorreiter Pedersen
efe3c0d34a C++: Rename n' to m. 2023-08-11 15:24:08 +01:00
Harry Maclean
6011d26823 Ruby: Restrict parameter nodes 2023-08-11 15:14:32 +01:00
Brandon Stewart
b0944cf9a6 Merge branch 'main' into add-cwe-208 2023-08-11 09:37:16 -04:00
Tom Hvitved
e39fb093e9 Merge pull request #13945 from hvitved/ruby/destruct-param-test
Ruby: Add test for documenting missing flow through destructured parameters
2023-08-11 15:11:39 +02:00
Mathias Vorreiter Pedersen
f4e6deeee0 C++: Remove 'ValidForStateConfig'. 2023-08-11 13:57:59 +01:00
Henry Mercer
1213eba630 Merge branch 'main' into post-release-prep/codeql-cli-2.14.2 2023-08-11 13:54:55 +01:00
Ian Lynagh
5161cd1a3c Merge pull request #13944 from igfoo/igfoo/getFunctionLabel
Kotlin: Handle null parent IDs in getFunctionLabel correctly
2023-08-11 12:28:32 +01:00
Mathias Vorreiter Pedersen
2164069eda C++: Add another testcase. 2023-08-11 12:00:43 +01:00
Michael B. Gale
513da82510 Model data flow for min and max 2023-08-11 11:51:07 +01:00
Mathias Vorreiter Pedersen
88d3fcb34b C++: Fix comment. 2023-08-11 11:50:50 +01:00
Mathias Vorreiter Pedersen
3d5b1986c9 C++: Fix a bug where 'boundedImpl' could give back multiple deltas. 2023-08-11 11:46:28 +01:00
Mathias Vorreiter Pedersen
c0a54e90c9 C++: Fix an inequality that should be strict, but wasn't. 2023-08-11 11:43:55 +01:00
Michael B. Gale
d189a15737 Exclude poly1305.mac.Write from TaintSteps
Not available on arm64
2023-08-11 11:33:52 +01:00
Tom Hvitved
c95b58673a Merge pull request #13939 from hvitved/ruby/captured-access-fix2
Ruby: Fix another bug in `isCapturedAccess`
2023-08-11 12:28:39 +02:00
Michael B. Gale
9f51f6f7ac Merge pull request #13948 from github/mbg/go/fix-compare-identical-values-arm64
Make `CompareIdenticalValues` test work on arm64
2023-08-11 11:22:49 +01:00
Michael B. Gale
a623733dfa Add location info to TaintSteps query 2023-08-11 11:10:39 +01:00
Michael B. Gale
ee0bfff9f4 Update expected test output for TaintStep 2023-08-11 10:57:11 +01:00
Michael B. Gale
bb56536bfa Update expected test output for LocalTaintStep 2023-08-11 10:57:10 +01:00
Michael B. Gale
14731e8fa3 Bump supported Go version to 1.21 2023-08-11 10:57:10 +01:00
Michael B. Gale
238049a870 Add Go 1.21 builtins 2023-08-11 10:57:10 +01:00
Michael B. Gale
4df4a0f51f Update expected test output for TypeParamType 2023-08-11 10:55:00 +01:00
Michael B. Gale
69589766ec Use Go 1.21 in CI 2023-08-11 10:55:00 +01:00
Michael B. Gale
48c35ce5e9 Use Go 1.21 for extractor 2023-08-11 10:55:00 +01:00
Michael B. Gale
13d4bd9c0a Make CompareIdenticalValues test work on arm64 2023-08-11 10:51:52 +01:00
Owen Mansel-Chan
c10d03e74e Merge pull request #13820 from owen-mc/go/refactor-data-flow-configurations
Go: Make flow configurations use new data flow API
2023-08-11 10:49:51 +01:00
Owen Mansel-Chan
35a300f894 Apply suggestions from code review
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-08-11 10:06:14 +01:00
Owen Mansel-Chan
b7dfa2347c Put QLDoc on data flow and taint tracking modules
We preserve all old QLDocs, but move them from the
config to the Flow module. This makes more sense than
the Config module, which is often private, and is generally
not directly accessed.
2023-08-11 10:06:12 +01:00
Rasmus Wriedt Larsen
ca93f4d223 Python: Accept .expected changes 2023-08-11 10:36:05 +02:00
Stephan Brandauer
a9906f6f7b Java: fix - add extra $@
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-08-11 09:15:09 +02:00
Robert Marsh
d3c68c773a Swift: Add Dictionary models 2023-08-10 20:53:16 +00:00
Robert Marsh
70c2ef599a Swift: collection/tuple content for dictionary flow 2023-08-10 20:52:47 +00:00
Brandon Stewart
68d9c8491e Merge branch 'main' into add-cwe-208 2023-08-10 16:14:04 -04:00
Rasmus Lerchedahl Petersen
3457f23db5 Python: Add change note 2023-08-10 20:53:43 +02:00
Geoffrey White
0a2e4def8e Swift: Change note. 2023-08-10 19:53:24 +01:00
Geoffrey White
4f5d7e1b6f Swift: Accept test changes. 2023-08-10 19:49:27 +01:00
Geoffrey White
936b1ced4d Swift: Add one last test case (and address a .expected change elsewhere). 2023-08-10 19:39:39 +01:00
Rasmus Lerchedahl Petersen
e5cd3e8f64 Python: nice locations for import aliases
These were computed wrongly before.
2023-08-10 20:27:06 +02:00
Tom Hvitved
b28f60ccd2 Ruby: Add test for documenting missing flow through destructured parameters 2023-08-10 20:22:11 +02:00
Robert Marsh
36bdadfc36 Merge pull request #13933 from geoffw0/madtuples
Swift: Models-as-data support for tuple content
2023-08-10 14:17:45 -04:00
Ian Lynagh
58da62e244 Kotlin: Handle null parent IDs in getFunctionLabel correctly 2023-08-10 18:49:10 +01:00
Erik Krogh Kristensen
3e2c6d69f9 Merge pull request #13940 from erik-krogh/rate-default
JS: change the defaults in the qhelp for missing-rate-limit to something more reasonable
2023-08-10 19:25:33 +02:00
Geoffrey White
94a5aa450c Swift: Edit the weak sensitive data hashing examples and qhelp to encourage use of HMAC and key derivation algorithms where appropriate. 2023-08-10 18:21:25 +01:00
Owen Mansel-Chan
08e1e8a120 Improve inaccurate deprecation comments 2023-08-10 15:50:08 +01:00
Owen Mansel-Chan
94c15f712a Remove unnecessary fieldFlowBranchLimit 2023-08-10 15:50:06 +01:00
Owen Mansel-Chan
0928fa6e1f Give MyFlowstate a less generic name 2023-08-10 15:50:05 +01:00
Owen Mansel-Chan
36b1a0dc54 Update for recent changes to DsnInjection 2023-08-10 15:50:03 +01:00
Owen Mansel-Chan
2578ef4786 Remove output from running query like a test 2023-08-10 15:50:02 +01:00
Owen Mansel-Chan
089ea010d7 Improve QLDoc for Config::FlowState in StringBreak 2023-08-10 15:50:01 +01:00
Owen Mansel-Chan
e33d303b48 Do not make unnecessary changes 2023-08-10 15:49:59 +01:00
Owen Mansel-Chan
e6c8a0b653 Use more descriptive names for merged path graphs 2023-08-10 15:49:58 +01:00
Owen Mansel-Chan
6b4bf12316 Revert edit to deprecated class 2023-08-10 15:49:57 +01:00
Owen Mansel-Chan
039925164d Keep newline at the end of identical-files.json
VS Code's JSON formatter removed it automatically. It turns out
that the easiest way to keep it is to use the
`files.insertFinalNewline` setting, which the JSON formatter obeys.
2023-08-10 15:49:55 +01:00
Owen Mansel-Chan
046e517c3f Remove unnecessary import 2023-08-10 15:49:54 +01:00
Owen Mansel-Chan
81d4149a17 Note deprecation in QLDoc for LogInjection 2023-08-10 15:49:52 +01:00
Owen Mansel-Chan
b6b7e1589c Make taint tracking tests use new API 2023-08-10 15:49:51 +01:00
Owen Mansel-Chan
c11da5bf67 Make taint tracking tests use InlineFlowTest 2023-08-10 15:49:50 +01:00
Owen Mansel-Chan
663fb2cc06 Make taint tracking tests use config from InlineFlowTest 2023-08-10 15:49:48 +01:00
Owen Mansel-Chan
8db3e4a9b4 Make IncorrectIntegerConversion use new API 2023-08-10 15:49:47 +01:00
Owen Mansel-Chan
6c0c8d6963 Make BadRedirectCheck use new API 2023-08-10 15:49:45 +01:00
Owen Mansel-Chan
442dfc1833 Make InsecureTLS use new API 2023-08-10 15:49:44 +01:00
Owen Mansel-Chan
b00e44725c Make CorsMisconfiguration use new API 2023-08-10 15:49:43 +01:00
Owen Mansel-Chan
9b19cde8ab Make SensitiveConditionBypass use new API 2023-08-10 15:49:42 +01:00
Owen Mansel-Chan
2d3d21d074 Make StackTraceExposure use new API 2023-08-10 15:49:40 +01:00
Owen Mansel-Chan
d9844bd4d6 Make WrongUsageOfUnsafe use new API 2023-08-10 15:49:39 +01:00
Owen Mansel-Chan
00ea023fdb Make ConditionalBypass use new API 2023-08-10 15:49:37 +01:00
Owen Mansel-Chan
1b4fef9c21 Make HTMLTemplateEscapingPassthrough use new API
Removed edges and nodes are mostly duplicates. They were only there
originally due to multiple configurations being in scope.
`DataFlow::PathNode` has union semantics for configurations. Nodes are
only generated if they are reachable from a source, but this includes
sources from other configurations.

No alerts are lost.
2023-08-10 15:49:36 +01:00
Owen Mansel-Chan
ea1f39683d Make DivideByZero use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:49:35 +01:00
Owen Mansel-Chan
045936b1fd Make PamAuthBypass use new API 2023-08-10 15:49:33 +01:00
Owen Mansel-Chan
cfc4a6a6b7 Make Timing use new API 2023-08-10 15:49:32 +01:00
Owen Mansel-Chan
39762da5e0 Make DsnInjection use new API 2023-08-10 15:49:31 +01:00
Owen Mansel-Chan
a53da376d1 Make LDAPInjection use new API 2023-08-10 15:49:29 +01:00
Owen Mansel-Chan
f60ca76eb2 Make EmailInjection use new API 2023-08-10 15:49:28 +01:00
Owen Mansel-Chan
1962aa3de4 Make SSRF use new API 2023-08-10 15:49:27 +01:00
Owen Mansel-Chan
71735c86c2 Make WeakCryptoAlgorithm use new API 2023-08-10 15:49:25 +01:00
Owen Mansel-Chan
46185e3a02 Make HardcodedKeys use new API 2023-08-10 15:49:24 +01:00
Owen Mansel-Chan
b5ac0c94c6 Make ZipSlip use new API 2023-08-10 15:49:23 +01:00
Owen Mansel-Chan
7341b6156d Make XPathInjection use new API 2023-08-10 15:49:21 +01:00
Owen Mansel-Chan
a6177b3c92 Make UnsafeUnzipSymlink use new API 2023-08-10 15:49:20 +01:00
Owen Mansel-Chan
7db1daba6e Make TaintedPath use new API 2023-08-10 15:49:19 +01:00
Owen Mansel-Chan
6c91f77776 Make StringBreak use new API 2023-08-10 15:49:17 +01:00
Owen Mansel-Chan
30ae34352b Make StoredXss use new API 2023-08-10 15:49:16 +01:00
Owen Mansel-Chan
4334a51cf3 Make StoredCommand use new API 2023-08-10 15:49:15 +01:00
Owen Mansel-Chan
ac1670c0af Make SqlInjection use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:49:13 +01:00
Owen Mansel-Chan
646e158813 Make tests use config from InlineFlowTest
For InterProceduralDataFlow, it's hard to get it to use InlineFlowTest
because you need to show both the source and the sink, and there are
problems with quoting when the source is already surrounded by quotes.
2023-08-10 15:49:12 +01:00
Owen Mansel-Chan
81854279bd Make tests use InlineFlowTest 2023-08-10 15:49:11 +01:00
Owen Mansel-Chan
d385113e11 Make InsufficientKeySize use new API 2023-08-10 15:49:09 +01:00
Owen Mansel-Chan
16ef11a3c3 Make ConstantOauth2State use new API
Removed edges were only there originally due to multiple configurations
being in scope. `DataFlow::PathNode` has union semantics for
configurations. Nodes are only generated if they are reachable from a
source, but this includes sources from other configurations.

No alerts are lost.
2023-08-10 15:49:08 +01:00
Owen Mansel-Chan
fbd0c4edd0 Make HostKeyCallbackAssignment use new API 2023-08-10 15:49:07 +01:00
Owen Mansel-Chan
a1a31bfd62 Make SuspiciousCharacterInRegexp use new API 2023-08-10 15:49:05 +01:00
Owen Mansel-Chan
8f644af769 Make MissingRegexpAnchor use new API 2023-08-10 15:49:04 +01:00
Owen Mansel-Chan
442f6875f5 Make IncompleteHostNameRegexp use new API 2023-08-10 15:49:03 +01:00
Owen Mansel-Chan
0e1383ddd7 Make UnhandledFileCloseWritableHandle use new API 2023-08-10 15:49:01 +01:00
Owen Mansel-Chan
00cc78dfe6 Make CookieWithoutHttpOnly use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:49:00 +01:00
Owen Mansel-Chan
a7382e06c2 Make ClearTextLogging use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:48:59 +01:00
Owen Mansel-Chan
653563fcbc Make StringsNewReplacer use new API
We don't have to keep a deprecated copy as this is private. This allows
us to delete a copy of the DataFlow library!
2023-08-10 15:48:57 +01:00
Owen Mansel-Chan
1f6cdc7eda Make OpenURLRedirect use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.

Removed nodes and edges were only there originally due to multiple
configurations being in scope. `DataFlow::PathNode` has union semantics
for configurations. Nodes are only generated if they are reachable from
a source, but this includes sources from other configurations.
2023-08-10 15:48:55 +01:00
Owen Mansel-Chan
d2a5d19439 Make SafeUrlFlow use new API 2023-08-10 15:48:54 +01:00
Owen Mansel-Chan
97c32970a0 Make RequestForgery use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:48:53 +01:00
Owen Mansel-Chan
1c2536321c Make ReflectedXss use new API 2023-08-10 15:48:51 +01:00
Owen Mansel-Chan
3d9f8d50bc Make InsecureRandomness use new API 2023-08-10 15:48:50 +01:00
Michael B. Gale
87c089e0a8 Make CommandInjection.qll use new API
The new `edges` and `nodes` sections in the .expected files are because
the PathGraph module was not imported in the tests before, and thus
these query predicates were not in scope.
2023-08-10 15:48:48 +01:00
Michael B. Gale
957757c271 Make UntrustedDataToUnknownExternalAPI use new API 2023-08-10 15:48:47 +01:00
Michael B. Gale
d6919dd57b Make UntrustedDataToExternalAPI use new API 2023-08-10 15:48:46 +01:00
Michael B. Gale
82a1b15d11 Make AllocationSizeOverflow use new API
The extra nodes in .expected files are due to the changes from
https://github.com/github/codeql/pull/13717, which are not applied to
configuration classes extending DataFlow::Configuration or
TaintTracking::Configuration.
2023-08-10 15:48:44 +01:00
Tom Hvitved
5a6ce293cc Merge pull request #13942 from hvitved/dataflow/variable-capture-consistency-fix 2023-08-10 16:20:28 +02:00
Brandon Stewart
01577dac32 format document 2023-08-10 13:59:47 +00:00
Tom Hvitved
9b38028e25 Data flow: Fix localWriteStep consistency query 2023-08-10 15:31:04 +02:00
Brandon Stewart
b899b648e5 Update ruby/ql/src/experimental/cwe-208/UnsafeHmacComparison.ql
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-10 09:21:16 -04:00
Brandon Stewart
7882cf0bf0 Update ruby/ql/src/experimental/cwe-208/UnsafeHmacComparison.ql
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-10 09:21:02 -04:00
Mathias Vorreiter Pedersen
9aae174942 C++: Move conjunct below comment. 2023-08-10 13:58:07 +01:00
Michael Nebel
f6aca58dbb Merge pull request #13885 from michaelnebel/csharp/linqforeach
C#: LINQ recommendation queries.
2023-08-10 14:55:11 +02:00
Rasmus Lerchedahl Petersen
eac44e89d9 Python: test nice locations
there are errors both on lines 2 and 3 due to
locations being computed wrongly.
2023-08-10 14:21:16 +02:00
Mathias Vorreiter Pedersen
6d949cbd39 C++: Rename 'getAFlowStateForNode' to 'getASizeAddend'. 2023-08-10 13:19:28 +01:00
Mathias Vorreiter Pedersen
a2b8eb924e C++: Remove the '+ 1' in 'getAFlowStateForNode'. 2023-08-10 13:17:47 +01:00
Mathias Vorreiter Pedersen
f9fc79b16f Merge pull request #13930 from geoffw0/uitextinput
Swift: Flow sources for UITextInput
2023-08-10 13:05:47 +01:00
Tom Hvitved
f19232f800 Ruby: Fix another bug in isCapturedAccess 2023-08-10 14:02:58 +02:00
erik-krogh
5ffce86768 change the defaults in the qhelp for missing-rate-limit to something more reasonable 2023-08-10 13:40:17 +02:00
Harry Maclean
b365ff095a Ruby: Fix SynthSplatParameterElementNode
Make this class into a proper subclass of `ParameterNodeImpl`, to
prevent some consistency test failures.
2023-08-10 12:35:12 +01:00
Tom Hvitved
77fca277fe Ruby: Improve desugaring of for loops 2023-08-10 13:22:01 +02:00
Ian Lynagh
f377d25c23 Merge pull request #13919 from igfoo/igfoo/useFunction
Kotlin: useFunction might return null
2023-08-10 12:17:20 +01:00
Tom Hvitved
4e954c29a2 Merge pull request #13936 from hvitved/ruby/captured-access-fix
Ruby: Fix bug in `isCapturedAccess`
2023-08-10 13:15:48 +02:00
Tom Hvitved
b99b6b85ba Merge pull request #13927 from hvitved/csharp/fix-bad-join
C#: Fix bad join order
2023-08-10 13:04:16 +02:00
Harry Maclean
5fff9fa8da More precise flow into splat parameters
We now precisely track flow from positional arguments to splat
parameters, provided that splat arguments are not used and there are no
positional parameters after the splat parameter. For example, in this
case:

    def f(x, y, *z); end

    f(a, b, c, d)

we get flow from `c` to `z[0]` and `d` to `z[1]`.

We get false flow if there are positional parameters after the splat
parameter. For example in this case:

    def g(x, y, *z, w); end

    g(a, b, c, d)

we get flow from `d` to `z[0]` instead of `w`.

We also track flow in this case

    def f(a, *b)
      sink b[0]
    end

    f(1, *[taint, 2])
2023-08-10 12:02:47 +01:00
Harry Maclean
a58aa17c7a Merge pull request #13878 from hmac/splat-flow
Ruby: Track flow from splat arguments to positional parameters
2023-08-10 12:01:38 +01:00
Mathias Vorreiter Pedersen
1455e8bd4c C++: Convert all '<'s to '<='s. 2023-08-10 11:55:57 +01:00
Mathias Vorreiter Pedersen
dcc1429ed8 C++: Get rid of '+ 1' in comments. 2023-08-10 11:38:40 +01:00
Mathias Vorreiter Pedersen
b750016bc1 C++: Fix more comments. 2023-08-10 11:31:30 +01:00
Rasmus Wriedt Larsen
46af77c1af Python: Include all assignments in data flow paths
Like Ruby did in https://github.com/github/codeql/pull/12566
2023-08-10 11:45:29 +02:00
Rasmus Wriedt Larsen
9bd5694c3f Python: Add tests of path-graph for dataflow/taint-tracking
Although this is actually using taint-tracking (so we can use the +=
statement), I would personally forget to check under the
dataflow/tainttracking folder to look for such a test, so I'm opting to
keep it under the dataflow/ folder.
2023-08-10 11:44:17 +02:00
Jeroen Ketema
2e338cc7b4 Merge pull request #13929 from jketema/buffer
C++: Only consider the maximum buffer size for badly bounded write
2023-08-10 10:40:37 +02:00
Geoffrey White
376479325d Swift: Model LosslessStringConvertible. 2023-08-10 09:27:05 +01:00
Geoffrey White
effe3762b8 Swift: More robust OptionalSomePattern flow. 2023-08-10 08:49:46 +01:00
Tom Hvitved
e40f0a7350 Ruby: Fix bug in isCapturedAccess 2023-08-10 09:37:04 +02:00
Rasmus Lerchedahl Petersen
dbc60140e0 Python: move tests to data extensions
For these tests, we cannot use the same mechanism, as we want the
data extensions to be available for both tests.

Instead, we create a ql-pack for the test directory and point to
the data entensions from there. This makes the extensions
available for all tests in the directory.
2023-08-10 09:17:34 +02:00
Tom Hvitved
e7acf8c3a8 Ruby: Add test 2023-08-10 08:53:00 +02:00
Geoffrey White
aa2e79b6da Swift: Model numeric conversions. 2023-08-10 00:19:50 +01:00
Maiky
97f8d1fca9 add getValue() method 2023-08-10 00:39:35 +02:00
Maiky
e60fa6f1a7 Remove unnecesary } 2023-08-10 00:25:47 +02:00
Maiky
c5c2df4593 fix Singleton set literal 2023-08-10 00:13:02 +02:00
Geoffrey White
e86ccf8498 Swift: Test flow through various conversions. 2023-08-09 23:05:45 +01:00
Brandon Stewart
74567041a7 remove pathgraph 2023-08-09 19:51:07 +00:00
Brandon Stewart
cca4c35cf8 add pathgraph 2023-08-09 19:23:21 +00:00
Rasmus Lerchedahl Petersen
168a1e01a4 Python: move test to data extensions
For this test, we can simply use the convention,
that a file called `[ql-file-stem].ext.yml` will be used
as data extensions exactly for the test represented by `ql-file`.
2023-08-09 21:22:17 +02:00
Brandon Stewart
7f07422a5d Merge branch 'main' into add-cwe-208 2023-08-09 14:52:51 -04:00
Brandon Stewart
07d5beca34 run format document 2023-08-09 18:51:55 +00:00
github-actions[bot]
432c21d4fb Post-release preparation for codeql-cli-2.14.2 2023-08-09 18:45:18 +00:00
Brandon Stewart
26401fec70 address PR comments 2023-08-09 18:44:42 +00:00
Mathias Vorreiter Pedersen
ce9b018789 C++: Move bounds checkout out of 'operandGuardChecks' for clarity. 2023-08-09 18:37:17 +01:00
Geoffrey White
c20a17e7b7 Swift: Update the consistency test .expecteted as well. 2023-08-09 15:47:28 +01:00
Rasmus Wriedt Larsen
51a05286fa Merge pull request #13731 from pwntester/py/aiohttp_improvements
Python: Aiohttp improvements
2023-08-09 16:37:20 +02:00
Geoffrey White
23f0dd5542 Swift: Support MAD tuple content flow. 2023-08-09 15:08:11 +01:00
Harry Maclean
b03f6efa60 Ruby: Refactor 2023-08-09 15:01:40 +01:00
Harry Maclean
142393b599 Ruby: Handle unknown content in splat flow 2023-08-09 15:01:40 +01:00
Harry Maclean
4239268efd Ruby: Prevent some false flow into splat params
In cases where there are positional parameters after a splat parameter,
don't attempt to match the splat parameter to a splat argument. We need
more sophisticated modelling to handle these cases, which is future
work.
2023-08-09 15:01:40 +01:00
Harry Maclean
6f3e2cdde3 Ruby: Add change note 2023-08-09 15:01:40 +01:00
Harry Maclean
c0baa5116f Ruby: add test for example splat arg/param matches 2023-08-09 15:01:40 +01:00
Harry Maclean
72356d1515 Ruby: track flow from *args to positional params
This models flow in the following case:

    def foo(x, y)
      sink x # 1
      sink y # 2
    end

    args = [source 1, source 2]
    foo(*args)

We do this by introducing a SynthSplatParameterNode which accepts
content from the splat argument, if one is given at the callsite.
From this node we add read steps to each positional parameter.
2023-08-09 15:01:40 +01:00
Jeroen Ketema
e04d30a676 C++: Update expected test changes due to the line in test2.cpp having shifted 2023-08-09 15:50:07 +02:00
Jeroen Ketema
6100425274 C++: Add change note 2023-08-09 15:47:19 +02:00
Geoffrey White
b4b2338144 Swift: Test for MAD tuple content flow. 2023-08-09 14:41:32 +01:00
Jeroen Ketema
6d7a75d1b9 Merge pull request #13931 from MathiasVP/revert-constant-bounds-and-prep
C++: Revert constant bounds for new range analysis
2023-08-09 15:39:53 +02:00
Mathias Vorreiter Pedersen
8a490775d8 Merge branch 'main' into fix-barriers-in-invalid-pointer-deref 2023-08-09 14:32:58 +01:00
Ian Lynagh
0eb6d1c76e Kotlin: useFunction might return null 2023-08-09 13:45:15 +01:00
Rasmus Lerchedahl Petersen
885e25ff2d Python: use file-name-convention of *.model.yml 2023-08-09 14:25:33 +02:00
Mathias Vorreiter Pedersen
acd16afddd Revert "Merge pull request #13880 from MathiasVP/type-bounds-preparation"
This reverts commit 3e9d9e72dc, reversing
changes made to 877ee7047d.
2023-08-09 13:03:06 +01:00
Mathias Vorreiter Pedersen
cb1076c335 Revert "Merge pull request #13783 from MathiasVP/type-bounds-for-new-range-analysis"
This reverts commit e9750af89f, reversing
changes made to 37a546253e.
2023-08-09 13:02:54 +01:00
erik-krogh
fe542565c3 fix performance 2023-08-09 13:48:07 +02:00
Michael B. Gale
01ff690d51 Merge pull request #13923 from github/mbg/go/bump-go-libraries 2023-08-09 11:36:35 +01:00
Mathias Vorreiter Pedersen
da66136ded Merge pull request #13911 from MathiasVP/fix-taint-for-frontend-upgrade
C++: Fix taint-flow in preparation for frontend upgrade
2023-08-09 11:30:07 +01:00
Jeroen Ketema
d0e7354a1b C++: Only consider the maximum buffer size for badly bounded write 2023-08-09 12:30:00 +02:00
Jeroen Ketema
9572b9d308 C++: Add test where buffer initialized with literal is reassigned an allocation 2023-08-09 12:26:10 +02:00
Rasmus Wriedt Larsen
c0dec21546 Merge pull request #13925 from RasmusWL/fixup-script
Misc: Fixup `accept-expected-changes-from-ci.py`
2023-08-09 11:45:34 +02:00
Tom Hvitved
7dac819730 C#: Fix bad join order
Before
```
Evaluated recursive predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@8254eapb in 6096ms on iteration 4 (delta size: 592145).
Evaluated relational algebra for predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@8254eapb on iteration 4 running pipeline standard with tuple counts:
          204507  ~0%    {2} r1 = SCAN Stmt#3baf294a::TryStmt::getATriedElement#ff#prev_delta OUTPUT In.1, In.0
          204507  ~0%    {3} r2 = JOIN r1 WITH _@callable#f_ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff_10#j__#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
        17844283  ~0%    {3} r3 = JOIN r2 WITH ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.2
          592145  ~0%    {2} r4 = JOIN r3 WITH Element#baf0c59e::Element::getAChild#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.1
          592145  ~0%    {2} r5 = r4 AND NOT Stmt#3baf294a::TryStmt::getATriedElement#ff#prev(Lhs.0, Lhs.1)
                         return r5
```

After
```
Evaluated recursive predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@4adecd47 in 310ms on iteration 4 (delta size: 592145).
Evaluated relational algebra for predicate Stmt#3baf294a::TryStmt::getATriedElement#ff@4adecd47 on iteration 4 running pipeline standard with tuple counts:
        204507  ~0%    {2} r1 = SCAN Stmt#3baf294a::TryStmt::getATriedElement#ff#prev_delta OUTPUT In.1, In.0
        204507  ~0%    {2} r2 = r1 AND NOT _statements_10#join_rhs#antijoin_rhs#13(Lhs.0)
        592145  ~2%    {3} r3 = JOIN r2 WITH Element#baf0c59e::Element::getAChild#0#dispred#ff ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Rhs.1
        592145  ~0%    {3} r4 = JOIN r3 WITH ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
        592145  ~0%    {2} r5 = JOIN r4 WITH ControlFlowElement#9501aa28::ControlFlowElement::getEnclosingCallable#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.0
        592145  ~0%    {2} r6 = r5 AND NOT Stmt#3baf294a::TryStmt::getATriedElement#ff#prev(Lhs.0, Lhs.1)
                       return r6
```
2023-08-09 11:28:06 +02:00
AlexDenisov
6e8f600cb9 Merge pull request #13924 from github/alexdenisov/cherry-pick-reverted-pr
Revert "Swift: Route compiler diagnostics through our log."
2023-08-09 11:02:19 +02:00
Rasmus Wriedt Larsen
69aa099ed1 Misc: Fixup accept-expected-changes-from-ci.py
I guess there has been a rename of the URL from `/jobs/` to `/job/`, since the script has been working previously.
2023-08-09 10:44:31 +02:00
Geoffrey White
e828d8dace Swift: Add UIKit to supported-frameworks.rst as well. 2023-08-09 09:25:43 +01:00
Geoffrey White
131b2b3e0c Swift: Change note. 2023-08-09 09:25:43 +01:00
Geoffrey White
09346c76e7 Swift: Add models. 2023-08-09 09:25:43 +01:00
AlexDenisov
fa729faa0a Revert "Swift: Route compiler diagnostics through our log." 2023-08-09 10:02:59 +02:00
Mathias Vorreiter Pedersen
499b6f35e5 C++: Also key SSA defs and uses by the base address. 2023-08-09 08:44:16 +01:00
Mathias Vorreiter Pedersen
e2feed78a0 C++: Generate SSA variables for all calls instead of just for calls to
allocators.
2023-08-09 08:44:10 +01:00
Stephan Brandauer
e927470961 Merge branch 'main' into kaeluka/java-automodel-variadic-args 2023-08-09 09:02:32 +02:00
Michael Nebel
560b876c01 Merge pull request #13891 from felickz/csharp-hardcoded-cred-identity-fp
cs/hardcoded-credentials - Removes false positive matches on benign Microsoft.AspNetCore.Identity properties
2023-08-09 08:32:36 +02:00
Chad Bentz
fa23a45f9d Merge branch 'main' into csharp-hardcoded-cred-identity-fp 2023-08-08 17:48:27 -04:00
Geoffrey White
cb6aed18f3 Swift: Add tests. 2023-08-08 22:29:53 +01:00
Michael B. Gale
9da749ad77 Bump Go extractor dependencies 2023-08-08 22:23:47 +01:00
erik-krogh
0bce42410a support arbitrary codepoints in NfaUtils.qll 2023-08-08 22:14:51 +02:00
erik-krogh
859e1bfabc add constraint that i should be between 0 and 65535 2023-08-08 21:11:59 +02:00
Mathias Vorreiter Pedersen
389294bded Merge pull request #13920 from MathiasVP/fix-out-nodes
C++: Remove unnecessary predicates
2023-08-08 20:11:36 +01:00
erik-krogh
0391e063ca move to4digitHex to Numbers.qll 2023-08-08 21:10:58 +02:00
Geoffrey White
a1234d4235 Merge pull request #13905 from geoffw0/forceunwrap
Swift: Flow through ForceValueExpr on LHS of assignment
2023-08-08 18:36:50 +01:00
Brandon Stewart
93dd9d0aa4 Update ruby/ql/src/experimental/cwe-208/UnsafeHmacComparison.ql
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-08 12:54:54 -04:00
Mathias Vorreiter Pedersen
2a1d5b7481 Merge branch 'main' into fix-out-nodes 2023-08-08 16:32:03 +01:00
Geoffrey White
2b0fcab182 Swift: Update test annotations following merge. 2023-08-08 16:06:52 +01:00
Geoffrey White
e9f0b535ea Merge branch 'main' into forceunwrap 2023-08-08 16:03:31 +01:00
Anders Schack-Mulligen
0ca3f3308b Merge pull request #13478 from aschackmull/java/varcapture
Java: Add proper support for variable capture flow.
2023-08-08 16:22:56 +02:00
Anders Starcke Henriksen
3918e57ffe Take filter pack into account. 2023-08-08 15:10:12 +02:00
Anders Starcke Henriksen
8d34ab6d18 Merge branch 'main' into starcke/automodel-pack 2023-08-08 15:02:33 +02:00
Anders Starcke Henriksen
7da6da1c93 Merge pull request #13852 from github/starcke/automodel-package-filter
Add option to filter automodel queries
2023-08-08 14:59:00 +02:00
Alex Denisov
cebaca328e Swift: 'ParsedSequence' lacks proper types and yields 'Unresolved' AST nodes 2023-08-08 14:41:15 +02:00
Anders Schack-Mulligen
1cd32722be Java: More review fixes. 2023-08-08 14:32:48 +02:00
Mathias Vorreiter Pedersen
f4f5d43bcb C++: indirectReturnOutNodeOperand0 and indirectReturnOutNodeInstruction0
were broken and for some reason only handled the case where calls mapped
to raw indirect nodes :wat:. It turns out these predicates weren't
actually needed anyway.
2023-08-08 13:23:10 +01:00
Alexandre Boulgakov
28863f39b0 Merge pull request #13917 from github/revert-13869-sashabu/swift-logging-compiler
Revert "Swift: Route compiler diagnostics through our log."
2023-08-08 12:45:58 +01:00
Anders Schack-Mulligen
9d59f50340 Java: Review fixes. 2023-08-08 13:37:40 +02:00
Rasmus Lerchedahl Petersen
e47e77c438 Python: add change note 2023-08-08 12:17:23 +02:00
Rasmus Lerchedahl Petersen
f33aff42ad Python: missing result was fixed 2023-08-08 12:14:57 +02:00
Geoffrey White
c95432457d Swift: Correct a test case (but preserve the original as well since it's interesting). 2023-08-08 10:41:21 +01:00
Geoffrey White
6ccf47ece9 Swift: Accept test changes resulting from merge. 2023-08-08 10:28:29 +01:00
AlexDenisov
75dad4764f Revert "Swift: Route compiler diagnostics through our log." 2023-08-08 11:25:13 +02:00
Rasmus Lerchedahl Petersen
f865fa3050 Python: simplify using getSubscript 2023-08-08 11:16:35 +02:00
Michael Nebel
0ed724eb13 Java: Make a flow summary for Set.clear using WithoutElement and introduce appropriate tests. 2023-08-08 11:10:08 +02:00
Rasmus Wriedt Larsen
4f47461f60 Python: Add requested test 2023-08-08 10:44:48 +02:00
Geoffrey White
063ab1c13f Merge branch 'main' into closuremodels 2023-08-08 09:40:27 +01:00
Michael Nebel
f67d5e1dc6 C#: Add tests for the LINQ missed-where and missed-cast queries. 2023-08-08 10:32:16 +02:00
Michael Nebel
1a511c2d52 C#: Update the queries that provide LINQ recommendation. 2023-08-08 10:31:33 +02:00
Anders Schack-Mulligen
ab334f6c1b Java: Always apply heuristic query regardless of existing models. 2023-08-08 10:01:43 +02:00
Anders Schack-Mulligen
cd22bb3505 Java: Add another test case. 2023-08-08 10:00:55 +02:00
erik-krogh
03fbd387df way better hex conversion 2023-08-08 09:08:39 +02:00
erik-krogh
45c39e6072 limit field flow when tracking regex strings in Java 2023-08-08 09:01:23 +02:00
erik-krogh
92db7b047c escape unicode chars in the output for the ReDoS queries 2023-08-08 00:15:54 +02:00
Henry Mercer
0673b19ce1 Merge pull request #13912 from github/release-prep/2.14.2
Release preparation for version 2.14.2
2023-08-07 21:24:56 +01:00
Geoffrey White
b2d3d465f0 Swift: Add more missing details to the URL model (along with a change from the SetContent PR, this fixes the test failures we were getting). 2023-08-07 20:15:50 +01:00
Geoffrey White
a73354d0b3 Swift: Accept test failures. 2023-08-07 20:14:07 +01:00
Chad Bentz
d4b5a4d4f4 Merge branch 'main' into csharp-hardcoded-cred-identity-fp 2023-08-07 15:09:01 -04:00
Chad Bentz
7b33574b85 pull dependencies from Microsoft.AspNetCore.App 2023-08-07 18:45:16 +00:00
Geoffrey White
da34da7497 Merge branch 'main' into commandinject2 2023-08-07 19:37:05 +01:00
Geoffrey White
022a06659c Merge pull request #13838 from rdmarsh2/rdmarsh2/swift/set-content
Swift: add SetContent for data flow
2023-08-07 19:15:30 +01:00
github-actions[bot]
79c90fa36a Release preparation for version 2.14.2 2023-08-07 18:08:52 +00:00
Ian Lynagh
3e86c4c39e Kotlin: Allow extractNewExpr to return null 2023-08-07 18:59:51 +01:00
Robert Marsh
65fbcc570c Swift: CFG test for for-try-await 2023-08-07 17:44:57 +00:00
Robert Marsh
eeaa361b12 Merge pull request #13907 from MathiasVP/cleanup-ssa-internals
C++: Small cleanup of `SsaInternals`
2023-08-07 13:16:59 -04:00
Robert Marsh
07650af357 Swift: accept test for CollectionContent rename 2023-08-07 15:04:21 +00:00
Mathias Vorreiter Pedersen
60f2e8a676 C++: Fix QLDoc. 2023-08-07 15:55:43 +01:00
Robert Marsh
146c50049c Finish CollectionContent rename
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-08-07 10:26:40 -04:00
Mathias Vorreiter Pedersen
f2f4e1f882 C++: Add more QLDoc. 2023-08-07 15:22:46 +01:00
Mathias Vorreiter Pedersen
e9750af89f Merge pull request #13783 from MathiasVP/type-bounds-for-new-range-analysis
C++: Constant type-bounds in the new range analysis
2023-08-07 15:20:45 +01:00
Mathias Vorreiter Pedersen
291f1a189d C++: Unify the two branches. 2023-08-07 14:23:35 +01:00
Jeroen Ketema
8b6a7985db Refactor the traint-tracking library to follow the dataflow library refactoring 2023-08-07 15:23:15 +02:00
Jeroen Ketema
5d2984b7a5 Merge branch 'main' into shared-taint-tracking 2023-08-07 15:22:29 +02:00
Michael Nebel
37a546253e Merge pull request #13688 from michaelnebel/csharp/aspnetcore
C#: Turn RuntimeVersion into a record type.
2023-08-07 15:20:21 +02:00
Geoffrey White
4c8accd5ba Swift: Add a few more test cases. 2023-08-07 14:06:38 +01:00
Jami
5862cd2378 Merge pull request #13889 from jcogs33/jcogs33/fix-some-models
Java: remove duplicate models
2023-08-07 08:46:18 -04:00
Mathias Vorreiter Pedersen
467231e469 Merge pull request #13887 from jketema/float128x
C++: Remove support for `_Float128x` which is not actually supported by gcc
2023-08-07 13:42:24 +01:00
Jeroen Ketema
073d170253 C++: Fix typo in change note 2023-08-07 14:30:35 +02:00
Rasmus Lerchedahl Petersen
957c0d6387 Python: move change note 2023-08-07 14:28:53 +02:00
Jeroen Ketema
e795e1c387 C++: Add change note 2023-08-07 14:24:04 +02:00
Mathias Vorreiter Pedersen
6e6e118d4b C++: Make the branches more identical. 2023-08-07 13:22:46 +01:00
Geoffrey White
dc98dec5b6 Swift: Change note. 2023-08-07 13:16:00 +01:00
Stephan Brandauer
3433437034 Java: automodel application mode: only extract the first argument corresponding to a varargs array 2023-08-07 14:15:17 +02:00
Geoffrey White
ab3f3d03c5 Swift: Model taint into optionals via ForceValueExpr. 2023-08-07 13:11:29 +01:00
Michael Nebel
6bb9e6d122 C#: Address review comments. 2023-08-07 13:40:37 +02:00
Edward Minnix III
58d8a2d77f Merge pull request #13899 from egregius313/egregius313/random-nextbytes-typo-fix
Java: Fix typo in `StdlibRandomSource::getOutput`
2023-08-07 07:36:44 -04:00
Tom Hvitved
2126ab0dde Merge pull request #13901 from hvitved/dataflow/refactor
Data flow: Refactor shared library
2023-08-07 13:22:53 +02:00
Ian Lynagh
0d97c1c54a Merge pull request #13837 from igfoo/igfoo/nullFunLabel
Kotlin: Pass on a parentId and remove some redundant braces
2023-08-07 12:19:22 +01:00
Michael Nebel
e62ec888c0 Merge pull request #13506 from michaelnebel/java/threatmodels
Java: Threat Models
2023-08-07 12:50:01 +02:00
Stephan Brandauer
e1a5eba61b Java: automodel application mode: refactor varargs endpoint class to rely on normal argument node for nicer extracted examples 2023-08-07 12:18:52 +02:00
Stephan Brandauer
650ff8db87 Java: automodel comments 2023-08-07 12:18:51 +02:00
Stephan Brandauer
0781cb78e8 Java: automodel application mode: add isVarargsArray metadata value 2023-08-07 12:18:51 +02:00
Stephan Brandauer
5abf7769a7 Java: automodel application mode: use endpoint class like in framework mode 2023-08-07 12:18:51 +02:00
Tony Torralba
fb0102b763 Java: New models for JAX-RS 2023-08-07 11:52:23 +02:00
Rasmus Lerchedahl Petersen
2f9172046b Python: change-note 2023-08-07 11:50:13 +02:00
Rasmus Lerchedahl Petersen
ef1a5cb0fa shared: change-note 2023-08-07 11:50:03 +02:00
Tom Hvitved
34864e1077 Swift: Adjust to data flow refactor 2023-08-07 11:35:23 +02:00
Tom Hvitved
6c989b9c6b Python: Adjust to data flow refactor 2023-08-07 11:35:23 +02:00
Tom Hvitved
693970f243 Java: Adjust to data flow refactor 2023-08-07 11:35:23 +02:00
Tom Hvitved
56e19411d0 Go: Adjust to data flow refactor 2023-08-07 11:35:22 +02:00
Tom Hvitved
05cf796c54 C#: Adjust to data flow refactor 2023-08-07 11:35:21 +02:00
Tom Hvitved
7ef3adcafd C++: Adjust to data flow refactor 2023-08-07 11:35:21 +02:00
Tom Hvitved
db88b7da88 Ruby: Adjust to data flow refactor 2023-08-07 11:35:21 +02:00
Tom Hvitved
b926a7ebba Data flow: Update QL doc 2023-08-07 11:35:21 +02:00
Tom Hvitved
4d14311653 Data flow: Rename DataFlowParameter to InputSig 2023-08-07 11:35:21 +02:00
Tom Hvitved
6208175aa9 Data flow: Move DataFlowParameter into DataFlow.qll 2023-08-07 11:35:21 +02:00
Tom Hvitved
0d33c32d8e Data flow: Move DataFlowImpl(Common).qll into an internal folder 2023-08-07 11:35:21 +02:00
Rasmus Lerchedahl Petersen
4dbaed9ec2 Python: add qldoc 2023-08-07 11:31:22 +02:00
Rasmus Lerchedahl Petersen
b8717b3046 Python: remove incorrect use of "stem" 2023-08-07 11:25:31 +02:00
Anders Starcke Henriksen
0d78eeb871 Address comments. 2023-08-07 10:47:59 +02:00
Mathias Vorreiter Pedersen
e14e0cdbb7 Merge pull request #13888 from github/revert-13757-sources
Revert "Swift: Pragmatic fix for CustomUrlSchemes.qll."
2023-08-07 09:31:10 +01:00
Tony Torralba
43b9199734 Java: Improved JaxWsEndpoint::getARemoteMethod 2023-08-07 10:21:58 +02:00
Erik Krogh Kristensen
6631e838cf re-appearing -> reappearing
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2023-08-07 09:57:52 +02:00
Erik Krogh Kristensen
2300285204 Merge pull request #13898 from github/dependabot/cargo/ql/regex-1.9.3
Bump regex from 1.9.1 to 1.9.3 in /ql
2023-08-07 08:41:43 +02:00
Ed Minnix
23e2eb11dd Change note 2023-08-07 00:23:58 -04:00
Ed Minnix
fe4eef0bcb Fix typo, replace getBytes with nextBytes 2023-08-07 00:16:47 -04:00
dependabot[bot]
6ed4aaf94b Bump regex from 1.9.1 to 1.9.3 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.1 to 1.9.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.1...1.9.3)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 03:30:06 +00:00
Mathias Vorreiter Pedersen
33e991b037 C++: Fix QLDoc. 2023-08-06 20:50:19 +01:00
Mathias Vorreiter Pedersen
af07efe14f C++: Accept test changes. 2023-08-05 21:59:08 +02:00
Mathias Vorreiter Pedersen
f0a1742ad6 C++: Fix barriers in 'AllocationToInvalidPointer.qll'. 2023-08-05 21:58:24 +02:00
Mathias Vorreiter Pedersen
7c9d41d3b9 C++: Make 'SizeBarrier' private as promised. 2023-08-05 21:57:57 +02:00
Mathias Vorreiter Pedersen
835b5e349b C++: Accept test changes. 2023-08-05 21:56:51 +02:00
Mathias Vorreiter Pedersen
0f285ccce0 C++: Fix QLDoc. 2023-08-05 21:55:00 +02:00
Mathias Vorreiter Pedersen
c0828a488f C++: Fix barriers in 'InvalidPointerToDereference.qll'. 2023-08-05 21:55:00 +02:00
Chad Bentz
e2e9c810bf Add lib change-notes 2023-08-04 22:11:36 +00:00
Chad Bentz
5a106fd5d6 Removes false positive creds from NetCore Identity 2023-08-04 21:46:35 +00:00
Jeroen Ketema
c4a65e58bb Add change note 2023-08-04 22:53:33 +02:00
Jeroen Ketema
747cd1745a Update all languages to use the shared taint-tracking library 2023-08-04 22:53:25 +02:00
Jeroen Ketema
20b792545d Add missing QLDoc 2023-08-04 22:52:05 +02:00
Jeroen Ketema
7ba2f7a22a Address review comments 2023-08-04 22:52:05 +02:00
Jeroen Ketema
bdd64ce86d Introduce shared taint tracking library 2023-08-04 22:51:55 +02:00
Robert Marsh
3ebbb80a9e Swift: Change note for CollectionContent 2023-08-04 20:19:35 +00:00
Robert Marsh
10bbf441dc Swift: QLDoc for Set.qll 2023-08-04 20:17:56 +00:00
Robert Marsh
ccc3094267 Swift: autoformat 2023-08-04 20:17:08 +00:00
Geoffrey White
c7fb8de5f9 Swift: Test ForceValueExpr content reads. 2023-08-04 21:15:15 +01:00
Jeroen Ketema
daf6ecd12f C++: Update dbscheme stats file 2023-08-04 22:07:00 +02:00
Robert Marsh
6f38769a9b Swift: rename SetContent to CollectionContent 2023-08-04 18:46:43 +00:00
Robert Marsh
024c5cfe2f Swift: add MaD print support for EnumElement 2023-08-04 18:44:42 +00:00
Robert Marsh
0142309cab Swift: add summary read steps in dataflow 2023-08-04 18:44:42 +00:00
Robert Marsh
b301092e34 Swift: model updates for Set 2023-08-04 18:44:42 +00:00
Robert Marsh
de0ec3e3f7 Swift: WIP SetContent for dataflow 2023-08-04 18:44:42 +00:00
Jami Cogswell
19622aec49 Java: remove duplicate 'Files.newOutputStream' ai model 2023-08-04 14:06:57 -04:00
Jami Cogswell
e64d581f7a Java: remove duplicate 'Files.newInputStream' ai model 2023-08-04 14:05:05 -04:00
Jami Cogswell
d2a24dee7f Java: remove duplicate 'Files.delete' ai model 2023-08-04 14:02:59 -04:00
Jami Cogswell
516831aa41 Java: remove duplicate 'Files.move' ai model 2023-08-04 14:01:27 -04:00
Jami Cogswell
c510d33fbf Java: remove duplicate 'Files.deleteIfExists' ai model 2023-08-04 13:52:18 -04:00
Alexandre Boulgakov
761db70d8d Revert "Swift: Pragmatic fix for CustomUrlSchemes.qll." 2023-08-04 18:03:00 +01:00
Mathias Vorreiter Pedersen
abe3a816ce Merge pull request #13851 from MathiasVP/sink-without-states
DataFlow: Support stateless `isSink` in `StateConfigSig`s
2023-08-04 18:01:42 +02:00
Geoffrey White
416b731870 Swift: Model NSUserScriptTask sinks. 2023-08-04 17:01:06 +01:00
Geoffrey White
71771890a5 Swift: Add a test with NSUserScriptTask. 2023-08-04 17:01:05 +01:00
Geoffrey White
348c45dff3 Swift: Use enum content in URL and NSURL models. 2023-08-04 17:01:05 +01:00
Geoffrey White
1c7d63a18f Swift: Model sinks explicitly with models-as-data. 2023-08-04 17:01:05 +01:00
Geoffrey White
7b9b96d657 Swift: Unify the two sink models into one (needs further polish). 2023-08-04 17:01:04 +01:00
Geoffrey White
8c2140b28d Swift: Add tests. 2023-08-04 17:01:04 +01:00
Geoffrey White
2664c306d3 Swift: Qhelp / examples. 2023-08-04 17:01:04 +01:00
Geoffrey White
048daa9a57 Swift: QLDoc comments and metadata. 2023-08-04 17:01:03 +01:00
Jeroen Ketema
7b3bdee5ea C++: Update dbscheme and add upgrade and downgrade scripts 2023-08-04 17:59:03 +02:00
Jeroen Ketema
ea9f49efa1 C++: Remove support for _Float128x which is not actually supported by gcc 2023-08-04 17:23:11 +02:00
Alexandre Boulgakov
97c688849d Merge pull request #13869 from github/sashabu/swift-logging-compiler
Swift: Route compiler diagnostics through our log.
2023-08-04 16:13:12 +01:00
Mathias Vorreiter Pedersen
2d832db883 C++: Accept test changes. 2023-08-04 16:12:00 +02:00
Mathias Vorreiter Pedersen
9807c0b0a6 C++: Filter type-based reasons out of MCTV queries. 2023-08-04 16:11:35 +02:00
Mathias Vorreiter Pedersen
b14db86ef9 C++: Let 'hasConstantBound' determine a reason. 2023-08-04 16:09:07 +02:00
Mathias Vorreiter Pedersen
050a563580 C++: Infer a constant upper bound whenever we convert to a 'larger' upper bound (and similarly for lower bounds). 2023-08-04 16:03:09 +02:00
Tony Torralba
33eaeb9cf8 Merge pull request #13484 from aegilops/java/experimental/command-injection
Java: Experimental version of Java Command Injection query
2023-08-04 15:48:15 +02:00
Michael Nebel
51c8331c8f Merge pull request #13522 from michaelnebel/csharp/usestubs4
C#: Use stubs for query tests.
2023-08-04 15:40:08 +02:00
Mathias Vorreiter Pedersen
3e9d9e72dc Merge pull request #13880 from MathiasVP/type-bounds-preparation
C++: Add a type-based `SemReason`.
2023-08-04 14:52:16 +02:00
Mathias Vorreiter Pedersen
98e670f25c Update cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/RangeAnalysisStage.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-08-04 14:34:03 +02:00
Mathias Vorreiter Pedersen
121d754be4 Update cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/RangeAnalysisImpl.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-08-04 14:33:58 +02:00
Asger F
213cabccc0 JS: Test with file more extensions 2023-08-04 14:24:51 +02:00
Asger F
ea2ddf8905 JS: Do not parse the initial ! or = as part of the template expression 2023-08-04 14:24:38 +02:00
Michael Nebel
9c4d77a925 Java: Address review comments. 2023-08-04 13:47:30 +02:00
Michael Nebel
d3eb9c1325 Java: Add release note and address review comments. 2023-08-04 13:36:43 +02:00
Paul Hodgkinson
5db569da89 Merge branch 'main' into java/experimental/command-injection 2023-08-04 12:11:29 +01:00
Mathias Vorreiter Pedersen
e066e87890 Update shared/dataflow/codeql/dataflow/DataFlowImpl.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-08-04 11:32:41 +02:00
Jeroen Ketema
877ee7047d Merge pull request #13884 from jketema/global-var-declspec
C++: Add test for `__declspec` attribute on a global variable
2023-08-04 11:26:10 +02:00
Mathias Vorreiter Pedersen
86dbb507fd C++: Add more comments to explain the meaning of 'combineWith'. 2023-08-04 11:20:17 +02:00
Mathias Vorreiter Pedersen
eb19052a7d Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-08-04 11:10:12 +02:00
Mathias Vorreiter Pedersen
981f67531c DataFlow: Introduce 'revSinkNode'. 2023-08-04 11:09:08 +02:00
Mathias Vorreiter Pedersen
75c333273c C++: Bind 'impl'. Oops. 2023-08-04 10:58:54 +02:00
Mathias Vorreiter Pedersen
d398c8c5a8 C++: Share some code by introducing a parameterized module to construct reasons. 2023-08-04 10:52:18 +02:00
Geoffrey White
af8d4e5ab2 Swift: Change note. 2023-08-04 09:42:53 +01:00
Jeroen Ketema
d80eff330b C++: Add test for __declspec attribute on a global variable 2023-08-04 10:35:32 +02:00
Anders Starcke Henriksen
3ef82c1091 Address comments. 2023-08-04 10:22:17 +02:00
Geoffrey White
d24db3fcd3 Swift: Use .ArrayElement in the models, where appropriate. 2023-08-04 09:18:37 +01:00
Geoffrey White
b41d47b910 Swift: Array.withUnsafeBytes doesn't reliably match ContiguousBytes, so define models there as well. 2023-08-04 09:18:36 +01:00
Geoffrey White
c48d47484a Swift: Fix mistake in the string taint test. 2023-08-04 09:18:36 +01:00
Geoffrey White
664dc01c48 Swift: Add closure function models. 2023-08-04 09:18:36 +01:00
Geoffrey White
49d1556c29 Swift: Model update(repeating:), to support the tests. 2023-08-04 09:18:36 +01:00
Geoffrey White
315cb32f6c Swift: Remove special case from UnsafeJsEval query. 2023-08-04 09:18:35 +01:00
Geoffrey White
feadd7127b Swift: Add tests with some different container types. 2023-08-04 09:18:35 +01:00
Geoffrey White
63c71f0b77 Swift: Add tests of with* closure methods. 2023-08-04 09:18:34 +01:00
Tony Torralba
586c8803c5 Move the sources back the .ql files
Otherwise they would both apply at the same time, making both versions of the query identical.
2023-08-04 10:02:56 +02:00
Kevin Stubbings
a36a555b7a Quick change 2023-08-04 00:59:28 -07:00
Kevin Stubbings
9f4389cbb5 Search for html.dot extension instead of dot 2023-08-04 00:55:51 -07:00
Tony Torralba
e9bad321b6 Apply suggestions from code review 2023-08-04 09:21:45 +02:00
Maiky
0cd1c1e2e5 Make private
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:08:50 +02:00
Maiky
0dec4876f1 Replace cast to DataFlow::CallNode
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:08:35 +02:00
Maiky
6f1b406b3a typo
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:08:10 +02:00
Maiky
0237f37842 typo
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-08-03 17:07:58 +02:00
Maiky
c54561e775 Merge branch 'main' into maikypedia/ldap-improper-auth 2023-08-03 16:49:30 +02:00
Maiky
fd649c1702 Fix getHost() (ldap.host = ip is not covered) 2023-08-03 16:37:48 +02:00
Maiky
f7a662814d simplify usesSsl() 2023-08-03 16:20:20 +02:00
Maiky
2d87489dfa change useSsl() to usesSsl() 2023-08-03 16:18:44 +02:00
Anders Starcke Henriksen
e7ca2330cb Update workspace. 2023-08-03 15:55:42 +02:00
Mathias Vorreiter Pedersen
7270b5079b C++: Add a type-based 'SemReason'. 2023-08-03 15:26:10 +02:00
Paul Hodgkinson
fba37aa7c9 Merge branch 'main' into java/experimental/command-injection 2023-08-03 14:12:38 +01:00
Geoffrey White
deb97a6ccc Swift: Improve regex performance with possessive matching (i.e. don't backtrack). 2023-08-03 13:57:49 +01:00
aegilops
fc7f8409be Fix up for code review 2023-08-03 13:50:40 +01:00
aegilops
3658710578 Fixed formatting, committed expected test results 2023-08-03 13:50:40 +01:00
Tom Hvitved
b69188fee9 C#: Adopt shared CFG construction library from shared controlflow pack 2023-08-03 14:12:24 +02:00
Tom Hvitved
e011480114 Merge pull request #13509 from hvitved/cfg-pack
Convert shared CFG construction library to a parameterized module
2023-08-03 14:11:56 +02:00
Anders Starcke Henriksen
e2abd3ff13 Create separate automodel pack. 2023-08-03 13:55:15 +02:00
Mathias Vorreiter Pedersen
9ed8dec87f Merge pull request #13877 from jketema/constant-doc
C++: Improve the QL doc of `isConstant`
2023-08-03 13:41:44 +02:00
Mathias Vorreiter Pedersen
50f5c4d5f6 DataFlow: Don't support stateless sink nodes in partial flow exploration. 2023-08-03 13:30:05 +02:00
Paolo Tranquilli
67cd25184a Merge pull request #12433 from github/alexdenisov+redsun82/tuple-mangling
Swift: properly identify types and declarations in trap files via mangling
2023-08-03 13:27:07 +02:00
Jeroen Ketema
48048d6f38 Merge pull request #13874 from jketema/use-after-free
C++: Improve use-after-free example code
2023-08-03 13:21:12 +02:00
Owen Mansel-Chan
00c704201c Merge pull request #13871 from github/rc/3.10
Merge `rc/3.10` into `main`
2023-08-03 11:24:07 +01:00
Jeroen Ketema
7ff6f09626 C++: Improve the QL doc of isConstant 2023-08-03 12:16:12 +02:00
Jeroen Ketema
0c0720a962 C++: Improve use-after-free example code
* Remove the mismatch between `new` and `free` and use `delete` instead
* Make the function `void`, so people copying the code will not forget
  to add a `return`.
* Balance out the `...` for omitted code.
2023-08-03 11:06:15 +02:00
Tom Hvitved
2ac646770e Merge ControlFlowTreeBase and AstNode 2023-08-03 10:59:26 +02:00
Jeroen Ketema
1ad533a4f8 Merge pull request #13873 from jketema/ir-range-test
C++: Add semantic range analysis test as IR test
2023-08-03 10:58:24 +02:00
Chris Smowton
8702efda1e Merge pull request #13835 from github/smowton/fix/logrus-with-context
Don't treat logrus' WithContext method as a logging function
2023-08-03 09:57:30 +01:00
Tom Hvitved
525ed65b0b Rename getNode to getAstNode 2023-08-03 10:56:50 +02:00
Jeroen Ketema
f7923d93f1 C++: Add semantic range analysis test as IR test
The range analysis test currently fails with the frontend update, because the
generated IR is incorrect after the update.
2023-08-03 10:13:23 +02:00
Anders Schack-Mulligen
0ae81eace3 Java: update fixed test 2023-08-03 10:07:00 +02:00
Asger F
5950865b55 Merge pull request #13755 from github/max-schaefer/js-server-crash-help
JavaScript: Improve qhelp for js/server-crash.
2023-08-03 10:04:08 +02:00
Anders Schack-Mulligen
72171972c3 Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
84316c41a3 Java: Add more qldoc. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
90052a3ca2 Java: Add proper types for capture nodes. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
e2a0849a0e Java: Add more qldoc. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
37455ec29e Java: Replace ratpack test fix with general heuristic summary. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
c5990311ca Java: Redesign and reimplement variable capture flow. 2023-08-03 10:04:06 +02:00
Anders Schack-Mulligen
70bef64e2a Java: Fix ratpack flow. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
f4a05c183b Shared: Add some qldoc. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
15daa51ee5 Shared: Address review comments and QL4QL alerts. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
a23e77ca58 Java: Disregard heap parameter in any-argument and any-parameter specs. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
9a4de208ef Java: Fix qltests. 2023-08-03 10:04:05 +02:00
Anders Schack-Mulligen
d1a616a70a Java: Add proper support for variable capture flow. 2023-08-03 10:04:02 +02:00
Asger F
c38cbe859d Merge pull request #13737 from asgerf/dynamic/fuzzy-models
Dynamic: add Fuzzy token
2023-08-03 09:58:24 +02:00
Anders Starcke Henriksen
131ae1aae9 Fix name in predicate. 2023-08-03 09:53:40 +02:00
Anders Starcke Henriksen
1c425a5602 Change from package to endpoint. 2023-08-03 09:50:23 +02:00
Anders Starcke Henriksen
9b8d7df370 Add option to filter automodel queries by package. 2023-08-03 09:50:23 +02:00
Tom Hvitved
2f3e52646c Add class wrappers around newtype in Cfg.qll 2023-08-03 09:39:30 +02:00
Tom Hvitved
5d69e14cc1 Rename ControlFlowElement to AstNode 2023-08-03 09:39:30 +02:00
Tom Hvitved
1988397f93 Make shared CFG construction library a parameterized module 2023-08-03 09:39:30 +02:00
Tom Hvitved
5049aafdd8 Copy existing ControlFlowGraphImplShared into new shared controlflow pack 2023-08-03 09:32:37 +02:00
Kevin Stubbings
8960453662 Add sanitizer to remove http.Error sink 2023-08-02 16:56:14 -07:00
Geoffrey White
06c19fd8cf Swift: Add CommonCrypto test cases for the broken crypto query. 2023-08-02 18:36:05 +01:00
Mathias Vorreiter Pedersen
89aa86a1d6 Merge pull request #13741 from rdmarsh2/rdmarsh2/swift/array-content-flow
Swift: add DataFlow::Content for arrays
2023-08-02 17:37:40 +02:00
Paolo Tranquilli
56869553e8 Swift: route compiler diagnostics through our log
(cherry picked from commit b8c55612e5)
2023-08-02 15:41:54 +01:00
Owen Mansel-Chan
ff5409fec7 Merge pull request #13785 from owen-mc/go/change-golangSpecificParamArgFilter
Go: Avoid using getTarget() as it may not exist
2023-08-02 15:40:40 +01:00
Alexandre Boulgakov
0dafe2d757 Swift: Mangle ArchetypeTypes with different superclasses in different extensions. 2023-08-02 15:18:52 +01:00
Mathias Vorreiter Pedersen
a5f521cfa4 DataFlow: Add change note. 2023-08-02 14:56:57 +02:00
Mathias Vorreiter Pedersen
3007fdab5e Sync identical files. 2023-08-02 14:33:33 +02:00
Mathias Vorreiter Pedersen
096eeeb549 C++: Handle 'isSink' without states in the backwards-compatibility code and in taint-tracking 2023-08-02 14:33:04 +02:00
Mathias Vorreiter Pedersen
b953c4a1cf DataFlow: Allow stateless sinks. 2023-08-02 14:31:18 +02:00
Anders Schack-Mulligen
7bc8bf616f Merge pull request #13863 from aschackmull/dataflow/pack4
Dataflow: Move the shared library to a properly shared qlpack.
2023-08-02 14:19:49 +02:00
Mathias Vorreiter Pedersen
7bea18773c Merge pull request #13857 from github/alexdenisov/unresolved-dot-exprs-patterns
Swift: SubExpr may yield unresolved nodes in certain cases while MatchedExpr is always resolved
2023-08-02 09:35:06 +02:00
Anders Schack-Mulligen
1ad51e754e Dataflow: Rename change note to proper format. 2023-08-02 08:50:51 +02:00
Sarita Iyer
0bd87f9f86 Merge pull request #13840 from github/si-10115-docs-update
Update supported frameworks
2023-08-01 13:05:32 -04:00
Max Schaefer
5124310f14 Update javascript/ql/src/Security/CWE-730/ServerCrash.qhelp
Co-authored-by: Asger F <asgerf@github.com>
2023-08-01 17:03:05 +01:00
Geoffrey White
5f7e5b946d Swift: Codegen. 2023-08-01 16:38:27 +01:00
Geoffrey White
e30ac42e3e Merge branch 'main' into typegetname 2023-08-01 16:36:31 +01:00
Geoffrey White
c8f5ada594 Swift: Fix errors in queries. 2023-08-01 15:50:15 +01:00
Stephan Brandauer
cb55b10edc Merge pull request #13788 from github/kaeluka/automodel-telemetry-testing
Java: Tests for Automodel Extraction Queries
2023-08-01 15:30:26 +02:00
Alex Denisov
9d643ae1ed Swift: record CFG incosistency 2023-08-01 15:06:04 +02:00
Geoffrey White
116006d280 Swift: Fix for type names containing '...'. 2023-08-01 13:57:46 +01:00
Anders Schack-Mulligen
405a3a73d1 Java: Remove irrelevant import. 2023-08-01 14:31:30 +02:00
Geoffrey White
40219aad88 Swift: More robust Type.getName(). 2023-08-01 13:24:10 +01:00
Anders Schack-Mulligen
15da4ee009 Merge pull request #13856 from aschackmull/java/maybebrokencrypto-barrier
Java: Make the barrier in java/potentially-weak-cryptographic-algorithm less restrictive
2023-08-01 14:20:44 +02:00
Alex Denisov
6667d9e45c Swift: SubExpr may yield unresolved nodes in certain cases while MatchedExpr is always resolved 2023-08-01 14:15:33 +02:00
Geoffrey White
655f238017 Swift: Accept test changes. 2023-08-01 13:14:14 +01:00
Anders Schack-Mulligen
199d1431d7 Dataflow: Add change note. 2023-08-01 14:02:34 +02:00
Anders Schack-Mulligen
5946d5e806 Dataflow: Remove sync. 2023-08-01 14:02:34 +02:00
Anders Schack-Mulligen
0544205594 Swift: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
73d4b126cf Ruby: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
b27a3a81bc Python: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
21eb78ea5e Go: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
fcb482b870 C/C++: Adjust to use the qlpack data-flow api. 2023-08-01 14:02:33 +02:00
Anders Schack-Mulligen
5c9a839ac7 C#: Adjust to use the qlpack data-flow api. 2023-08-01 13:47:09 +02:00
Anders Schack-Mulligen
c34c667e6b Java: Adjust to use the qlpack data-flow api. 2023-08-01 13:47:09 +02:00
Anders Schack-Mulligen
50e7892498 Dataflow: Autoformat/indent. 2023-08-01 13:47:08 +02:00
Anders Schack-Mulligen
d7ea60e137 Java: Move data flow lib. 2023-08-01 13:47:08 +02:00
Owen Mansel-Chan
dbc6868bc1 Update go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll
Co-authored-by: Chris Smowton <smowton@github.com>
2023-08-01 12:23:49 +01:00
Asger F
9326fbd1dd Merge pull request #13841 from jeongsoolee09/log-injection-mad
JS: Add support for log injection in MaD
2023-08-01 13:09:56 +02:00
Michael Nebel
4568cccd71 Java: Add some unit tests for sourceModelKindConfig. 2023-08-01 12:56:13 +02:00
Michael Nebel
a9bc23fa3e Java: Add threat model configuration related extensible predicates and some initial tuples. 2023-08-01 12:56:13 +02:00
Michael Nebel
7ba8a663bf C#: Base the CSI query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
c3c5fc0981 C#: Base the Configuration query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
324eac7718 C#: Base the Concurrency query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
cf8dc64842 C#: Base the Bad Practices query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
49c8daefca C#: Base the Architecture query test cases on stubs. 2023-08-01 12:55:35 +02:00
Michael Nebel
ab4e643bf8 C#: Turn RuntimeVersion into a record type. 2023-08-01 12:54:55 +02:00
Michael Nebel
ffd1456d67 Java: Update MaD external documentation related to With and Without Element. 2023-08-01 12:03:44 +02:00
Michael Nebel
a8ccc8d980 Java: Update MaD internal documentation. 2023-08-01 12:03:44 +02:00
Michael Nebel
fc66b6ef9c Java: Update test comments to reflect the MaD syntax. 2023-08-01 12:03:44 +02:00
Michael Nebel
99ac98bffc Java: Re-factor a model to use WithElement (this model is already tested in collections/B.java). 2023-08-01 12:03:44 +02:00
Michael Nebel
e97a4a1aea Java: Update telemetry test expected output. 2023-08-01 12:03:44 +02:00
Michael Nebel
0604a85bb1 Java: Add WithoutElement model for List.clear and add appropriate test. 2023-08-01 12:03:44 +02:00
Michael Nebel
21ec83a197 Java: Add MaD support for With[out]Element. 2023-08-01 12:03:44 +02:00
Geoffrey White
b500d8baa1 Swift: QLDoc TupleType. 2023-08-01 11:01:05 +01:00
Alex Ford
2b741448f4 Merge pull request #13309 from maikypedia/maikypedia/ldap-injection
Ruby: Add LDAP Injection query
2023-08-01 10:44:46 +01:00
Cornelius Riemenschneider
41487987b5 Merge pull request #13858 from github/criemen-update-bazel
Update bazel to 6.3.1
2023-08-01 10:44:36 +02:00
Mathias Vorreiter Pedersen
d111fa7e94 Merge pull request #13862 from jketema/ir-test
C++: Add IR test that shows dataflow regression after frontend update
2023-08-01 10:06:49 +02:00
Tony Torralba
b5d08ade59 Formatting 2023-08-01 09:35:25 +02:00
Anders Schack-Mulligen
e73e312e10 Java: Add change note. 2023-08-01 09:28:56 +02:00
Stephan Brandauer
621c05dc4b Java: format 2023-08-01 09:19:03 +02:00
Stephan Brandauer
bc3e78f034 Java: add automodel framework mode test case for newly supported interface-method parameter extraction 2023-08-01 09:18:58 +02:00
Stephan Brandauer
058236877e Java: Drive-by: fix oversight in #13823
In PR #13823, we had rewritten the endpoints that are being considered for framework mode. We used to use `DataFlow::ParameterNode` as endpoints.
However, `ParameterNode`s do not exist for the implicit `this` parameter; they also do not exist for bodiless interface-methods.

In PR #13823, we forgot to model that `this` only exists for non-static methods and to only consider parameters that we have source code for.
2023-08-01 09:18:58 +02:00
Stephan Brandauer
5ad984f22f Java: update text expectations after merging #13823 2023-08-01 09:18:58 +02:00
Stephan Brandauer
da87d82d08 Java: fix a comment 2023-08-01 09:18:58 +02:00
Stephan Brandauer
be629b27ed Java: Automodel package private test case 2023-08-01 09:18:57 +02:00
Stephan Brandauer
f5c4155d63 Java: Automodel tests: update after merging #13818 2023-08-01 09:18:57 +02:00
Stephan Brandauer
44b8ec642e Java: merge framework mode tests into one 2023-08-01 09:18:57 +02:00
Stephan Brandauer
8cc367c45e Java: merge application mode tests into one 2023-08-01 09:18:57 +02:00
Stephan Brandauer
37b6b46dbf Java: update extraction query tests after merging PR #13747 2023-08-01 09:18:57 +02:00
Stephan Brandauer
50603102d1 Java: tests for automodel application mode, test that local calls are not candidates 2023-08-01 09:18:57 +02:00
Stephan Brandauer
457604e37e Java: tests for automodel framework mode negative example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
938a7a788f Java: tests for automodel application mode negative example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
abed936556 Java: tests for automodel framework mode positive example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
1bc222ec40 Java: tests for automodel application mode positive example extraction 2023-08-01 09:18:57 +02:00
Stephan Brandauer
2e89a11949 Java: tests for automodel application mode candidate extraction 2023-08-01 09:18:56 +02:00
Stephan Brandauer
18fe587e75 Java: tests for automodel framework mode candidate extraction 2023-08-01 09:18:56 +02:00
Tony Torralba
2b3cab355d Merge pull request #13859 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-08-01 09:18:20 +02:00
Jeroen Ketema
ef8d95f87d C++: Add IR test that shows dataflow regression after frontend update 2023-08-01 09:01:39 +02:00
Owen Mansel-Chan
5a5e921ee7 Merge pull request #13846 from owen-mc/go/better-baselines
Go: Add language-specific baseline configuration
2023-08-01 07:14:43 +01:00
Owen Mansel-Chan
a8c64443e8 Merge pull request #13645 from porcupineyhairs/goTiming
Go : Improvements to Timing Attacks query
2023-08-01 07:10:42 +01:00
github-actions[bot]
b547ae7c2f Add changed framework coverage reports 2023-08-01 00:18:36 +00:00
Jeongsoo Lee
1d5eb4a960 Update javascript/ql/lib/change-notes/2023-07-28-mad-log-injection.md
Co-authored-by: Asger F <asgerf@github.com>
2023-07-31 15:38:35 -07:00
Cornelius Riemenschneider
caf2180bad Update .bazelversion 2023-08-01 00:15:53 +02:00
Paul Hodgkinson
3bc7cf6ac7 Merge branch 'main' into java/experimental/command-injection 2023-07-31 19:14:55 +01:00
Jeongsoo Lee
9ab2a28de0 Merge branch 'main' into log-injection-mad 2023-07-31 09:55:35 -07:00
Felicity Chapman
df1e8e263b Merge pull request #13854 from github/11185-add-note
CodeQL library update to use modular API interface - Add note and include in articles
2023-07-31 17:22:17 +01:00
Owen Mansel-Chan
d98079d72c Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-07-31 16:49:11 +01:00
Owen Mansel-Chan
216911dad9 Merge branch 'main' into goTiming 2023-07-31 16:15:10 +01:00
Owen Mansel-Chan
3d495bdd43 Add new files to CODEQL_TOOLS in Makefile 2023-07-31 16:12:52 +01:00
Owen Mansel-Chan
47a536c85d Always output valid JSON containing paths-ignore 2023-07-31 16:09:47 +01:00
Alex Ford
af854749d7 Ruby: update Ldapinjection test output 2023-07-31 16:08:15 +01:00
Alex Ford
f437a6f729 Merge branch 'main' into maikypedia/ldap-injection 2023-07-31 16:00:41 +01:00
Alex Ford
558238a9be Ruby: update TaintStep test output 2023-07-31 16:00:27 +01:00
Felicity Chapman
46f80dc5ca Put back a missing colon to fix the link 2023-07-31 15:56:24 +01:00
Alex Ford
f272b0786a Ruby: fix qldoc typo 2023-07-31 14:58:05 +01:00
Alex Ford
7f82aba7d4 qlformat 2023-07-31 14:57:14 +01:00
Alex Ford
2240e4bffb Ruby: fix changenote date format 2023-07-31 14:56:53 +01:00
Felicity Chapman
9a334d3300 Add shortened link to changelog 2023-07-31 14:13:52 +01:00
Anders Schack-Mulligen
e87b8ba3d7 Java: Make the barrier in java/potentially-weak-cryptographic-algorithm less restrictive. 2023-07-31 14:28:53 +02:00
Asger F
a148c7cc87 JS: Mention log-injection sink kind in docs 2023-07-31 14:04:16 +02:00
Geoffrey White
1c64fb16f1 Merge pull request #13756 from geoffw0/sources2
Swift: CustomUrlSchemes test enhancements and minor model improvement
2023-07-31 12:53:03 +01:00
Asger F
da3eb28767 Apply suggestions from code review
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-07-31 13:51:59 +02:00
Felicity Chapman
a0c0da78e9 Merge branch 'main' into 11185-add-note 2023-07-31 11:54:00 +01:00
Geoffrey White
c4b782407b Merge pull request #13853 from geoffw0/commandinject
Swift: Autoformat experimental query.
2023-07-31 11:30:20 +01:00
Felicity Chapman
4d05b742d6 Merge branch 'main' into 11185-add-note 2023-07-31 10:58:03 +01:00
Felicity Chapman
32da3c3730 Add main note and include in articles 2023-07-31 10:50:47 +01:00
Geoffrey White
f921076fca Swift: Autoformat. 2023-07-31 10:25:25 +01:00
Tony Torralba
5488abc512 Merge pull request #13850 from atorralba/atorralba/java/unimportant-generated-models
Java: Remove superfluous generated models
2023-07-31 11:25:03 +02:00
Tony Torralba
2cbb7ed296 Java: Add XXE sinks for MDHT 2023-07-31 11:13:17 +02:00
Tony Torralba
41f1315da9 Merge pull request #13772 from atorralba/atorralba/java/inputstream-wrapper-read-step
Java: Add taint steps for InputStream wrappers
2023-07-31 11:12:43 +02:00
Geoffrey White
e534afe634 Merge pull request #13726 from maikypedia/maikypedia/swift-command-injection
Swift: Add Command Injection query (CWE-078)
2023-07-31 10:06:22 +01:00
Geoffrey White
12f2539d1d Swift: Use flowTo. 2023-07-31 10:03:25 +01:00
Geoffrey White
20b0969a97 Swift: Restore original Type.toString() behaviour. 2023-07-31 09:51:55 +01:00
Mathias Vorreiter Pedersen
2562f8a297 Merge pull request #13844 from jketema/forgotten-paren
C++: Add forgotten parentheses in ternary IR test
2023-07-31 10:03:06 +02:00
Tony Torralba
3bd4d34a47 Java: Remove superfluous generated models 2023-07-31 09:48:03 +02:00
Porcupiney Hairs
74e5c15eaa Go : Improvements to Timing Attacks query 2023-07-31 06:30:47 +05:30
Owen Mansel-Chan
b5518047fa Go: Add language-specific baseline configuration 2023-07-30 21:52:33 +01:00
Mathias Vorreiter Pedersen
4656130dab Merge pull request #13843 from MathiasVP/revert-13792 2023-07-30 01:18:00 +02:00
Jeroen Ketema
0bc75ea9b7 C++: Add forgotten parentheses in ternary IR test
Without the parentheses, the expressions are parsed as `a ? x : (y = val)`.
2023-07-29 18:44:28 +02:00
Owen Mansel-Chan
93e5b2260e Merge pull request #13834 from owen-mc/go/fix-compiler-error-messages-for-1.20.6
Backport: Compiler error messages changed in Go 1.20.6
2023-07-29 13:45:19 +01:00
Mathias Vorreiter Pedersen
fd1949092c C++: Accept test changes. 2023-07-29 11:29:06 +02:00
Mathias Vorreiter Pedersen
ce9a14b692 Revert "Merge pull request #13792 from MathiasVP/swap-argument-order-in-invalid-ptr-deref"
This reverts commit 1fa6511482, reversing
changes made to 4676ca5a4a.
2023-07-29 11:26:41 +02:00
Jeongsoo Lee
4529d8b75a Add support for log injection in MaD 2023-07-28 22:37:56 +00:00
Sarita Iyer
f6b6a988ca Update supported-frameworks.rst 2023-07-28 17:21:55 -04:00
Robert Marsh
22ae430e65 Swift: accept more test changes from hiding InOutExpr 2023-07-28 20:43:25 +00:00
Robert Marsh
bb4fe2002f Merge branch 'main' into rdmarsh2/swift/array-content-flow 2023-07-28 20:41:23 +00:00
Alexandre Boulgakov
3e7a7fe54e Swift: Mangle ArchetypeTypes with different constraints in different extensions. 2023-07-28 21:39:52 +01:00
Ian Lynagh
01a512b677 Kotlin: Pass on a parentId 2023-07-28 17:46:05 +01:00
Owen Mansel-Chan
0895853a23 Delete unused testing predicate 2023-07-28 17:09:53 +01:00
Ian Lynagh
e8f4aee1cf Kotlin: Remove some redundant braces 2023-07-28 17:02:24 +01:00
Owen Mansel-Chan
00d5cb737c Different approach to avoiding getTarget() 2023-07-28 17:00:36 +01:00
Owen Mansel-Chan
d2b8d836e9 Avoid using getTarget() as it may not exist
Try to also deal with the case that we are calling a function
through a variable that it has been assigned to.
2023-07-28 17:00:34 +01:00
Stephan Brandauer
40eab180cc Merge pull request #13823 from github/kaeluka/support-argument-this-in-frameworkmode-metadata-extraction
Java: Support Argument[this] and parameters of bodiless interface methods in framework mode metadata extraction
2023-07-28 17:38:39 +02:00
Tony Torralba
08cba7dc5f Merge pull request #13713 from pwntester/java/struts2_source_taint_inheriting
[Java] Implement field taint inheritance for Struts2 unmarshalled objects
2023-07-28 16:46:27 +02:00
Robert Marsh
6039af0087 Swift: autoformat 2023-07-28 14:34:57 +00:00
Robert Marsh
7ed520ab54 Swift: update test expectations after hiding InOutExpr 2023-07-28 14:29:24 +00:00
Owen Mansel-Chan
a020189895 Merge pull request #13822 from owen-mc/dataflow/mergepathgraph3-signature-fix
Dataflow: MergePathGraph3 signature fix
2023-07-28 15:15:43 +01:00
Chris Smowton
f08879a2df Format; add change note 2023-07-28 14:16:30 +01:00
Chris Smowton
6fa2d2764d Don't treat logrus' WithContext method as a logging function
This isn't output by the default formatters (though a custom formatter could potentially output things stored in it)
2023-07-28 14:11:03 +01:00
Shati Patel
a98ae8941c Merge pull request #13832 from github/shati-patel/docs-indentation
Docs: Fix indentation in tutorial examples
2023-07-28 14:07:16 +01:00
Tony Torralba
2dff0ce5b4 Merge pull request #13712 from pwntester/java/new_struts2_models
[Java] New models for Struts2 framework
2023-07-28 14:31:25 +02:00
Stephan Brandauer
8bf960bd44 Java: fix QL-for-QL alert 2023-07-28 14:28:47 +02:00
Stephan Brandauer
021eedfdf1 Java: format 2023-07-28 14:26:34 +02:00
Owen Mansel-Chan
84dacbfbfd Compiler error messages changed in Go 1.20.6 2023-07-28 13:13:01 +01:00
Stephan Brandauer
82fd0e45aa Java: support Argument[this] in NotAModelApiParameter 2023-07-28 14:04:53 +02:00
Stephan Brandauer
a9d2f43538 Java: use a newtype for framework mode candidates 2023-07-28 13:51:25 +02:00
Stephan Brandauer
8ed773b240 Java: Framework mode extraction now uses a custom class for endpoints, so we can support both Argument[this] and interface-method parameters 2023-07-28 12:56:39 +02:00
Stephan Brandauer
09c64e8fee Java: Support Argument[this] in framework mode metadata extraction 2023-07-28 12:55:26 +02:00
shati-patel
1694915535 Docs: Fix indentation in tutorial examples 2023-07-28 11:45:39 +01:00
Ian Lynagh
499bd970d3 Merge pull request #13412 from igfoo/igfoo/json_escape
Kotlin: Tweak our JSON escaping
2023-07-28 11:13:51 +01:00
Alvaro Muñoz
c3a2ae2943 Account for public fields/setters 2023-07-28 12:12:07 +02:00
Alvaro Muñoz
c089368557 Merge branch 'java/struts2_source_taint_inheriting' of https://github.com/pwntester/codeql into java/struts2_source_taint_inheriting 2023-07-28 12:05:38 +02:00
Maiky
90ac5b905b 2023-07-28 00:21:02 +02:00
Maiky
2a49219127 Move query to experimental 2023-07-28 00:15:33 +02:00
Geoffrey White
beacade499 Swift: Autoformat. 2023-07-27 22:48:23 +01:00
Maiky
6274dfafdc typo
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-07-27 23:43:48 +02:00
Maiky
49aa3eb92b Update change note
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-07-27 23:43:39 +02:00
Geoffrey White
15244e0ee1 Swift: Expand NominalType.getFullName to Type.getFullName (so it is a suitble substitute for the old Type.getName behaviour). 2023-07-27 22:41:46 +01:00
Maiky
2d88ac1846 Suggested Changes 2023-07-27 23:40:52 +02:00
Geoffrey White
e2740fef73 Swift: Add explanatory comment. 2023-07-27 22:12:49 +01:00
Maiky
f5e17d7d39 Add additional Filter Methods 2023-07-27 23:04:55 +02:00
Geoffrey White
2ba983bf4a Swift: Change note. 2023-07-27 22:04:07 +01:00
Maiky
d9800c7bb6 Update CommandInjection.ql 2023-07-27 22:45:50 +02:00
Maiky
d0a912fb02 Update swift/ql/src/queries/Security/CWE-078/CommandInjection.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-27 22:45:05 +02:00
Geoffrey White
57a55eda75 Swift: QL solution (arguably clearer, seems more performant). 2023-07-27 20:51:49 +01:00
Geoffrey White
82057513c5 Swift: Implement Type.getName() as different from Type.getFullName() (regex solution). 2023-07-27 20:50:21 +01:00
Robert Marsh
c36ce785d8 Merge branch 'main' into rdmarsh2/swift/array-content-flow 2023-07-27 19:18:03 +00:00
Geoffrey White
aa6d7c088b Swift: Add some more diverse test cases. 2023-07-27 19:35:13 +01:00
Geoffrey White
9588e68115 Swift: Add detail and spacing to the NoominalType tests. 2023-07-27 19:17:51 +01:00
Geoffrey White
3eb1bac9df Swift: Update consistency test failure (line numbers). 2023-07-27 16:11:59 +01:00
Geoffrey White
44d785fabf Swift: Make QL-for-QL happy. 2023-07-27 15:37:13 +01:00
Tony Torralba
c239a4399c Changed Struts2ActionSupportClassFieldReadSource to be a FieldValueNode instead of a field read 2023-07-27 10:39:06 +02:00
Alvaro Muñoz
97a4230d5d add change note 2023-07-27 10:39:06 +02:00
Alvaro Muñoz
f3fc56294e implement field taint inheritance for Struts2 unmarshalled objects 2023-07-27 10:39:06 +02:00
Charis Kyriakou
8438fb2310 Merge pull request #13821 from github/charisk/remove-last-updated
Remove last updated information and sorting from MRVA views
2023-07-27 08:31:00 +01:00
Tony Torralba
9d6bc76dc0 Merge pull request #13817 from atorralba/atorralba/java/non-static-fieldvaluenode-step
Java: Allow flow out of FieldValueNodes for non-static fields
2023-07-27 09:14:04 +02:00
Owen Mansel-Chan
9b2b58a823 Sync files 2023-07-26 21:48:10 +01:00
Owen Mansel-Chan
e0cc337c71 Fix DataFlow::MergePathGraph3
Need to get the signatures correct.
2023-07-26 21:48:08 +01:00
Owen Mansel-Chan
f40bcd0cdd Merge pull request #13824 from owen-mc/go/fix-compiler-error-messages-for-1.20.6
Go: Compiler error messages changed in Go 1.20.6
2023-07-26 21:46:54 +01:00
Robert Marsh
bf5ba37348 Swift: Hide InOutExpr 2023-07-26 18:42:27 +00:00
Brandon Stewart
f241498cab correct additional pascalcase issue 2023-07-26 17:55:56 +00:00
Brandon Stewart
1a83554b0c correct typo 2023-07-26 17:54:42 +00:00
Brandon Stewart
346a2f269e Update UnsafeHmacComparison.ql 2023-07-26 13:48:42 -04:00
Brandon Stewart
42adbe0cd4 address linter 2023-07-26 17:43:34 +00:00
Brandon Stewart
adddc58b61 address linter 2023-07-26 17:38:06 +00:00
Brandon Stewart
494e7d9a3f add unsafe HMAC comparison query and qlhelp file 2023-07-26 17:28:22 +00:00
Robert Marsh
e54341a170 Swift: undo commented out line 2023-07-26 17:12:06 +00:00
Chris Smowton
c69a9ea032 Merge pull request #13793 from github/post-release-prep/codeql-cli-2.14.1
Post-release preparation for codeql-cli-2.14.1
2023-07-26 17:22:05 +01:00
Owen Mansel-Chan
778de6b5d2 Compiler error messages changed in Go 1.20.6 2023-07-26 16:55:26 +01:00
amammad
bee8e6ff0d remove unused saniter 2023-07-27 01:41:31 +10:00
Charis Kyriakou
536fd349bd Remove last updated information and sorting from MRVA views 2023-07-26 15:32:16 +01:00
Tony Torralba
8685242c16 Add tests 2023-07-26 14:13:43 +02:00
Stephan Brandauer
24cdc962c2 Merge pull request #13818 from github/kaeluka/fix-erroneous-endpoints-that-are-sinks-and-summary-neutrals
Java: Automodel Fix, Prevent Some Erroneous Endpoints
2023-07-26 12:45:29 +02:00
Jeroen Ketema
a4a492627d Merge pull request #13775 from jketema/print-global
C++: Support printing of global and namespace variables in `PrintAST`
2023-07-26 11:29:39 +02:00
Jeroen Ketema
409471c3b2 C++: Rename getEnclosingDeclaration to getAnEnclosingDeclaration 2023-07-26 09:44:47 +02:00
Tony Torralba
602eb43109 Update partial flow test expectations 2023-07-26 09:32:13 +02:00
Robert Marsh
358737452e Swift: reverse flow steps through InOutExpr 2023-07-25 20:34:36 +00:00
amammad
591d81b5f9 remove saniter which was responsible for a defensive technique 2023-07-26 02:39:10 +10:00
Michael B. Gale
aa59741c38 Merge pull request #13794 from github/mbg/csharp/improve-tracer-command-detection
C#: Limit detection of sub-command names in tracer configuration
2023-07-25 17:01:22 +01:00
Ian Lynagh
532552a7ac Merge pull request #13751 from igfoo/igfoo/getCompilationInfo
Java: Improve the diagnostics consistency query
2023-07-25 16:54:17 +01:00
yoff
2067d393e1 Update shared/yaml/codeql/serverless/ServerLess.qll
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-25 17:27:45 +02:00
Rasmus Lerchedahl Petersen
b2688bba7d Python: Relax module resolution
Do not require modules to reside in a package
2023-07-25 17:24:04 +02:00
Michael B. Gale
f3c6564dc3 Comment out test that fails on Windows 2023-07-25 16:15:51 +01:00
Stephan Brandauer
08f5774d13 Java: Automodel extraction fix for application mode 2023-07-25 17:11:07 +02:00
Geoffrey White
fbbc2938c3 Merge pull request #13816 from geoffw0/contig2
Swift: Use enum content in withContiguousStorageIfAvailable model.
2023-07-25 15:57:52 +01:00
Stephan Brandauer
698b8d3c5c Java: Automodel extraction fix; previously, we treated endpoints that were marked as sinks, as well as summary-neutrals as 'erroneous' 2023-07-25 16:52:27 +02:00
Geoffrey White
ac3c4fd5ef Swift: Actually I think this is value flow. 2023-07-25 14:44:21 +01:00
Tony Torralba
b8b38e4bbe Java: Allow flow out of FieldValueNodes for non-static fields 2023-07-25 15:37:41 +02:00
Geoffrey White
5188095529 Swift: Use enum content in withContiguousStorageIfAvailable model. 2023-07-25 14:33:20 +01:00
Geoffrey White
aedd073dad Merge pull request #12416 from geoffw0/contig
Swift: Model Sequence.withContiguousStorageIfAvailable
2023-07-25 14:05:07 +01:00
Mathias Vorreiter Pedersen
0a7eecf28c Merge pull request #13795 from geoffw0/enumcontent
Swift: Support EnumContent in models-as-data
2023-07-25 14:43:44 +02:00
Tony Torralba
c9fc5a54c7 Remove generated sinks and sources 2023-07-25 14:42:32 +02:00
Jeroen Ketema
4fcb576099 Merge branch 'main' into print-global 2023-07-25 14:10:33 +02:00
Mathias Vorreiter Pedersen
1f39ec3188 Merge pull request #13815 from MathiasVP/add-missing-result-test
C++: Add `cpp/invalid-pointer-deref` false negative
2023-07-25 13:12:44 +02:00
Mathias Vorreiter Pedersen
cd4ec6c996 C++: Add FN testcase. 2023-07-25 12:13:46 +02:00
Mathias Vorreiter Pedersen
60c7c84018 Merge pull request #13774 from MathiasVP/add-more-invalid-deref-documentation
C++: Add more documentation to the `cpp/invalid-pointer-deref` query
2023-07-25 12:07:25 +02:00
Mathias Vorreiter Pedersen
9f2ee0d7c2 C++: Rename 'delta' to 'deltaDerefSourceAndPai'. 2023-07-25 11:25:24 +02:00
Mathias Vorreiter Pedersen
b1c6ee4396 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:20:49 +02:00
Mathias Vorreiter Pedersen
13989dba91 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:20:03 +02:00
Mathias Vorreiter Pedersen
099e11fb0c Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:19:49 +02:00
Mathias Vorreiter Pedersen
997eb1caf2 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:19:14 +02:00
Mathias Vorreiter Pedersen
2caad67980 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:18:54 +02:00
Mathias Vorreiter Pedersen
99f6e685c7 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 11:18:46 +02:00
Mathias Vorreiter Pedersen
54afed6e1d C++: Rename 'delta' to 'deltaDerefSourceAndPai'. 2023-07-25 11:04:18 +02:00
Mathias Vorreiter Pedersen
46832d0b17 C++: Rename 'delta1' and 'delta2' in documentation. 2023-07-25 10:50:51 +02:00
Mathias Vorreiter Pedersen
e75f604172 C++: Replace more text with formulas. 2023-07-25 10:48:23 +02:00
Mathias Vorreiter Pedersen
7f7930b3bb Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:36:12 +02:00
Mathias Vorreiter Pedersen
af904f5cfe Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:33:57 +02:00
Mathias Vorreiter Pedersen
97809e7646 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:33:38 +02:00
Mathias Vorreiter Pedersen
e1f519fab7 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:33:17 +02:00
Mathias Vorreiter Pedersen
e1763db36c Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:31:37 +02:00
Mathias Vorreiter Pedersen
9f9cf9f765 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:31:06 +02:00
Mathias Vorreiter Pedersen
70ac0a5462 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:56 +02:00
Mathias Vorreiter Pedersen
2cfa14b91f Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:44 +02:00
Mathias Vorreiter Pedersen
5cad8ec0a2 Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:38 +02:00
Mathias Vorreiter Pedersen
a176ba262b Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:30:21 +02:00
Mathias Vorreiter Pedersen
6ebd5ab3ed Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:25:41 +02:00
Mathias Vorreiter Pedersen
0d116a00fb Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-25 10:25:34 +02:00
Arthur Baars
3767ce5a99 Merge pull request #13763 from aibaars/swift-print-cfg
Swift: improve print-cfg query
2023-07-25 10:02:18 +02:00
Mathias Vorreiter Pedersen
1612ee3e9a C++: Simplify the description of the sink. 2023-07-25 09:19:14 +02:00
Mathias Vorreiter Pedersen
55cfadb1f4 C++: Simplify the description of the source. 2023-07-25 09:13:27 +02:00
Mathias Vorreiter Pedersen
359a9e5fe8 C++: 'Step 1' does not make a lot of sense now that the files have been split. 2023-07-25 09:07:01 +02:00
Geoffrey White
374c157afe Swift: Update the taint aspect of the flowsources test to use sinks like the regular taint test. 2023-07-24 19:17:51 +01:00
Michael B. Gale
e27399c9ef Use --force for dotnet new to fix test 2023-07-24 17:59:44 +01:00
Geoffrey White
27c12de178 Merge pull request #13549 from geoffw0/badfilter
Swift: Query for bad HTML filtering regexps
2023-07-24 17:25:08 +01:00
jorgectf
8f8c064632 Modify test 2023-07-24 17:50:22 +02:00
Stephan Brandauer
2582b084f6 Merge pull request #13747 from github/tausbn/exclude-qualifier-argument-for-existing-models
Java: Exclude qualifier argument for existing models
2023-07-24 16:26:33 +02:00
amammad
1e1d42fa35 fix a mistake :( 2023-07-25 00:11:23 +10:00
amammad
7aff0079f5 better safe Flask example 2023-07-25 00:08:51 +10:00
Rasmus Lerchedahl Petersen
21937e6a27 python: address review comments
- rename `normalise` to `normalizePath`
- factor out `lookupValueOrEmpty`
2023-07-24 16:04:01 +02:00
yoff
c0407ae0be Apply suggestions from code review
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-24 15:51:27 +02:00
Mathias Vorreiter Pedersen
acb1310e99 C++: Add more documentation. 2023-07-24 15:28:36 +02:00
Geoffrey White
26d4f9f0fd Swift: Rephrase sentence that needed three commas. 2023-07-24 14:15:48 +01:00
Geoffrey White
cd3b519081 Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-07-24 14:11:21 +01:00
Mathias Vorreiter Pedersen
db8b506106 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 14:58:06 +02:00
Mathias Vorreiter Pedersen
88b78284ec Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 14:57:59 +02:00
Stephan Brandauer
13027a1094 Java: review suggestions from @atorralba 2023-07-24 14:09:10 +02:00
Stephan Brandauer
2f2f507a5d Java: drive-by change: remove obsolete custom queries from application mode characteristics 2023-07-24 13:55:53 +02:00
amammad
0e8f83460c a little bit change on flask example 2023-07-24 21:41:54 +10:00
amammad
bbba906ff1 a little bit change on flask example 2023-07-24 21:41:44 +10:00
Jeroen Ketema
0a0e34716e Merge pull request #13811 from jketema/ternary-tests
C++: Add more IR tests for the ternary operator
2023-07-24 12:50:01 +02:00
Mathias Vorreiter Pedersen
4a276c37ac C++: Remove 'TODO' now that the implementation has been fixed. 2023-07-24 12:24:46 +02:00
Mathias Vorreiter Pedersen
4345369e9b C++: Replace 'Barrier2' with 'SizeBarrier' in QLDoc. 2023-07-24 12:22:26 +02:00
Mathias Vorreiter Pedersen
d02a1c2840 C++: Remove paragraph. 2023-07-24 12:20:38 +02:00
Mathias Vorreiter Pedersen
5edc5e7c7b C++: Reflow comments in QLDoc. 2023-07-24 12:15:57 +02:00
Mathias Vorreiter Pedersen
a272eb8447 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:14:47 +02:00
Mathias Vorreiter Pedersen
9108982b07 C++: Update example in QLDoc. 2023-07-24 12:13:31 +02:00
Mathias Vorreiter Pedersen
9cb09d6e9a Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:12:00 +02:00
Mathias Vorreiter Pedersen
aa6bf67482 Merge branch 'main' into add-more-invalid-deref-documentation 2023-07-24 12:09:19 +02:00
Mathias Vorreiter Pedersen
1fa6511482 Merge pull request #13792 from MathiasVP/swap-argument-order-in-invalid-ptr-deref
C++: Swap argument order in `cpp/invalid-pointer-deref`
2023-07-24 12:05:38 +02:00
Mathias Vorreiter Pedersen
f0ab3a3c84 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:04:02 +02:00
Mathias Vorreiter Pedersen
8ab2f89d53 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-24 12:03:52 +02:00
Mathias Vorreiter Pedersen
786c6e1c5e Merge branch 'main' into swap-argument-order-in-invalid-ptr-deref 2023-07-24 11:26:27 +02:00
Jeroen Ketema
645028e219 C++: Add more IR tests for the ternary operator 2023-07-24 11:22:27 +02:00
Mathias Vorreiter Pedersen
4676ca5a4a Merge pull request #13789 from MathiasVP/better-names-in-invalid-ptr-deref
C++: Improve names of identifiers in `cpp/invalid-pointer-deref`
2023-07-24 11:17:09 +02:00
Mathias Vorreiter Pedersen
c44507cc42 C++: 'sizeAddend' instead of 'extra'. 2023-07-24 10:57:25 +02:00
Geoffrey White
39b6d927d6 Swift: Make QL-for-QL happy (this line will be deleted at some point anyway). 2023-07-24 09:23:07 +01:00
Geoffrey White
066a6ef7c4 Swift: Change note. 2023-07-24 09:13:56 +01:00
Geoffrey White
b8f67d7e8a Swift: Test changes (not affecting results). 2023-07-24 09:03:01 +01:00
Geoffrey White
b62c86d89c Swift: Autoformat. 2023-07-24 08:45:49 +01:00
Geoffrey White
dc89e0d2b0 Swift: Change note. 2023-07-24 08:28:37 +01:00
amammad
6f8ec118df fix qlhelp and qldoc bugs 2023-07-24 17:15:43 +10:00
Tony Torralba
af8612ecd2 Merge pull request #13797 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-07-24 09:12:25 +02:00
amammad
c704158150 remove sources which are contained from environment variables, fix some bugs thanks to @yoff 2023-07-24 17:06:27 +10:00
Tony Torralba
6c0d47f122 Update java/ql/lib/semmle/code/java/frameworks/InputStream.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-07-24 08:49:37 +02:00
Tony Torralba
4e7438ac5c Make sure that InputStreamWrapperCapturedLocalStep is indeed local 2023-07-24 08:49:37 +02:00
Tony Torralba
d3b3af8ae6 Re-adds jump step
Note that this causes FP flow in the call context test cases
2023-07-24 08:49:37 +02:00
Tony Torralba
36ff54b48b Convert jump step into local step
Note that this has FNs in the test cases where the source is used locally in the nested classes' methods
2023-07-24 08:49:37 +02:00
Tony Torralba
cc5a404149 Add more test cases 2023-07-24 08:49:36 +02:00
Tony Torralba
226103b246 Add local class test 2023-07-24 08:49:36 +02:00
Tony Torralba
f054f73836 Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-07-24 08:49:36 +02:00
Tony Torralba
1de68457ae Move steps to InputStream.qll 2023-07-24 08:49:36 +02:00
Tony Torralba
0156fcc381 Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2023-07-24 08:49:36 +02:00
Tony Torralba
3a6665b0ed Add change note 2023-07-24 08:49:36 +02:00
Tony Torralba
5330ce12cc Use new TypeInputStream 2023-07-24 08:49:34 +02:00
Tony Torralba
00e0e5a61a Java: Add taint step for InputStream wrappers 2023-07-24 08:48:04 +02:00
github-actions[bot]
419bbbc9ac Add changed framework coverage reports 2023-07-24 00:17:53 +00:00
Geoffrey White
94780aabec Swift: Effect on the taint/core test. 2023-07-21 22:34:59 +01:00
Geoffrey White
1259f8d596 Swift: Clearer syntax and a shortcut for Optional.some. 2023-07-21 22:34:59 +01:00
Geoffrey White
89e7b75ea1 Swift: Flow from optional content through "!". 2023-07-21 22:34:59 +01:00
Geoffrey White
d9187c62fe Swift: Parse MAD enum content. 2023-07-21 22:34:59 +01:00
Geoffrey White
1cfb9bbf34 Swift: Tests for enum content in MAD. 2023-07-21 22:34:58 +01:00
Michael B. Gale
a2f4628522 C#: Add integration test for tracing config fix 2023-07-21 20:14:46 +01:00
Michael B. Gale
ac389067fe C#: Limit detection of sub-command names 2023-07-21 19:05:22 +01:00
github-actions[bot]
f91b7a9342 Post-release preparation for codeql-cli-2.14.1 2023-07-21 16:16:25 +00:00
Mathias Vorreiter Pedersen
742f080a55 C++: This predicate is no longer used. 2023-07-21 16:54:46 +01:00
Mathias Vorreiter Pedersen
d350c0d5c8 C++: Accept test changes. 2023-07-21 16:54:46 +01:00
Mathias Vorreiter Pedersen
0859c4f926 C++: Fix swapped arguments in 'invalidPointerToDerefSource'. 2023-07-21 16:54:38 +01:00
Mathias Vorreiter Pedersen
69ea7d92cd Merge pull request #13790 from MathiasVP/add-invalid-ptr-false-positive
C++: Add false positive to `cpp/invalid-pointer-deref`
2023-07-21 16:42:53 +01:00
Mathias Vorreiter Pedersen
d905b1e006 C++: Add false positive. 2023-07-21 15:38:38 +01:00
Mathias Vorreiter Pedersen
83aef6fc16 C++: Write formulas instead of 'non-strictly upper bounded by'. 2023-07-21 14:56:40 +01:00
Mathias Vorreiter Pedersen
108cd7f078 C++: Use more descriptive names for identifiers in 'cpp/invalid-pointer-deref'. 2023-07-21 14:55:45 +01:00
Geoffrey White
d13170de98 Swift: Model return values. 2023-07-21 14:23:40 +01:00
Geoffrey White
52e84ba12b Swift: Add some more test cases, including handling return propagation. 2023-07-21 13:53:14 +01:00
Geoffrey White
7c0c820684 Swift: Accept fixed spurious result. 2023-07-21 11:26:11 +01:00
Geoffrey White
6110243306 Swift: Fix .expected and autoformat after merge. 2023-07-21 11:17:19 +01:00
Mathias Vorreiter Pedersen
5270cf6c41 C++: Update documentation based on PR feedback. 2023-07-21 11:09:01 +01:00
Geoffrey White
8a314dd2cf Merge branch 'main' into contig 2023-07-21 10:56:46 +01:00
Jeroen Ketema
4f57852ba0 Merge pull request #13787 from jketema/ssa-text-case
C++: Add IR SSA test case for the ternary operator
2023-07-21 11:26:26 +02:00
Mathias Vorreiter Pedersen
a7ee27ec22 C++: Fix 'begin'/'base' confusion. 2023-07-21 10:20:24 +01:00
Mathias Vorreiter Pedersen
6c3c4c302e Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-21 10:19:04 +01:00
Anders Schack-Mulligen
412cf558f2 Merge pull request #13743 from aschackmull/docs/dataflow-api
Docs: Update data flow documentation to the new API.
2023-07-21 11:07:52 +02:00
Mathias Vorreiter Pedersen
4075dacd52 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll 2023-07-21 09:55:23 +01:00
Stephan Brandauer
79da723878 Java: only assume that _manual_ MaD sinks have been fully modeled 2023-07-21 10:43:07 +02:00
Tony Torralba
3d515b18df Merge pull request #13769 from atorralba/atorralba/java/avoid-inputstream-low-confidence-dispatch
Java: Avoid low-confidence dispatch to InputStream methods
2023-07-21 10:42:34 +02:00
Mathias Vorreiter Pedersen
369cee9ed9 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-21 09:32:14 +01:00
Jeroen Ketema
4c9c5d8f0c C++: Add IR SSA test case for the ternary operator 2023-07-21 10:22:34 +02:00
Chris Smowton
b01ff3f689 Merge pull request #13786 from github/release-prep/2.14.1
Release preparation for version 2.14.1
2023-07-20 19:32:53 +01:00
github-actions[bot]
c936a920b0 Release preparation for version 2.14.1 2023-07-20 16:32:27 +00:00
Chris Smowton
b21580b71f Merge pull request #13784 from github/smowton/fix/go-change-note-format
Correct Golang change note format
2023-07-20 17:13:36 +01:00
Chris Smowton
8e63bd6c78 Correct Golang change note format 2023-07-20 16:40:18 +01:00
Geoffrey White
75c5d16406 Swift: Add a couple more test cases. 2023-07-20 16:13:57 +01:00
Geoffrey White
ec650b80fd Swift: Fix mistakes in ts in the tests and test comments. 2023-07-20 15:37:41 +01:00
Jeroen Ketema
7c429fb924 C++: Remove redundant case from shouldPrintDeclaration
A configuration should always exist, because it does not have a charpred
that could prevent this.
2023-07-20 16:11:17 +02:00
jorgectf
3ac94c33b2 Add change note 2023-07-20 15:47:18 +02:00
jorgectf
55648ac4de Add shlex.quote as sanitizer 2023-07-20 15:34:54 +02:00
Geoffrey White
61079e07c1 Swift: Effect of merging the regex parse mode improvements from main. 2023-07-20 14:18:48 +01:00
Chris Smowton
075633a817 Merge pull request #13780 from github/revert-13767-go/missing-flow-through-receiver
Revert "Go: Fix missing flow through receiver for function variable"
2023-07-20 14:07:26 +01:00
Geoffrey White
252d969efd Merge branch 'main' into badfilter 2023-07-20 14:03:57 +01:00
Owen Mansel-Chan
374f13e0dc Revert "Go: Fix missing flow through receiver for function variable" 2023-07-20 13:31:14 +01:00
Geoffrey White
6f5d58c479 Merge pull request #13770 from geoffw0/parsemode3
Swift: Track regular expression parse modes set in code
2023-07-20 13:18:41 +01:00
Geoffrey White
a0b784e7b1 Python: QLDoc. 2023-07-20 11:56:13 +01:00
Geoffrey White
45a9d5bc7d Java: QLDoc. 2023-07-20 11:53:52 +01:00
Geoffrey White
80cb386ffd Java: Change note. 2023-07-20 11:52:04 +01:00
Geoffrey White
369f88beda Java: Fix for multiple parse mode flags. 2023-07-20 11:49:54 +01:00
Geoffrey White
32c10885d4 Java: Add test case. 2023-07-20 11:43:11 +01:00
Maiky
6d6a243776 Update Change Note 2023-07-20 12:33:26 +02:00
Geoffrey White
aaf9907a27 Python: Change note. 2023-07-20 11:23:15 +01:00
Geoffrey White
bb16731b86 Python: Fix for multiple parse mode flags. 2023-07-20 11:16:14 +01:00
Geoffrey White
dbde99df91 Python: Add test cases. 2023-07-20 11:06:00 +01:00
Jeroen Ketema
e76dc4a1f9 C++: Support printing of global and namespace variables in PrintAST 2023-07-20 11:43:55 +02:00
Alexandre Boulgakov
eb0b485297 Merge pull request #13776 from github/sashabu/armclang
Docs: Add armclang as supported C++ compiler.
2023-07-20 09:53:20 +01:00
Maiky
1a1fee3088 Doc change 2023-07-20 03:28:13 +02:00
Maiky
a1782182dd Python: Add unsafe deserialization sinks (CWE-502) 2023-07-20 03:26:22 +02:00
Robert Marsh
41ad1ed8b4 Swift: fix cartesian product in array readStep 2023-07-19 19:12:34 +00:00
Robert Marsh
ec9997781c Swift: add test for assignment to nested arrays 2023-07-19 19:12:03 +00:00
Geoffrey White
cb6276e5e2 Python: Test layout. 2023-07-19 18:44:15 +01:00
Alexandre Boulgakov
a51ad1f417 Docs: Add armclang as supported C++ compiler. 2023-07-19 18:28:51 +01:00
Geoffrey White
7fa91570b4 Merge pull request #13757 from geoffw0/sources
Swift: Pragmatic fix for CustomUrlSchemes.qll.
2023-07-19 17:46:47 +01:00
Geoffrey White
b91468607b Swift: Reluctantly QLDoc the toString. 2023-07-19 17:45:26 +01:00
Robert Marsh
883543fd77 Swift: force high precision for arraycontent 2023-07-19 16:31:32 +00:00
Geoffrey White
6fa0445e0f Swift: Fix QL-for-QL warning. 2023-07-19 17:31:19 +01:00
Owen Mansel-Chan
5b0d4ce7cb Merge pull request #13644 from porcupineyhairs/dsnImprove
Go : Improvements to DSN Injection query
2023-07-19 16:10:34 +01:00
Jeroen Ketema
2a63116fc2 C++: Rename shouldPrintFunction to shouldPrintDeclaration 2023-07-19 16:55:43 +02:00
Mathias Vorreiter Pedersen
922f4d5496 C++: Add more documentation to the 'cpp/invalid-pointer-deref' query. 2023-07-19 14:42:20 +01:00
Tony Torralba
238cb26624 Add change note 2023-07-19 15:37:33 +02:00
Owen Mansel-Chan
0a0e9bb25b Merge pull request #13767 from owen-mc/go/missing-flow-through-receiver
Go: Fix missing flow through receiver for function variable
2023-07-19 13:52:25 +01:00
Geoffrey White
5c47ea0f91 Swift: Missing QLDoc / typos / missing private. 2023-07-19 13:51:37 +01:00
Tony Torralba
29543f5726 Change InputStream.read from neutral to summary 2023-07-19 14:44:18 +02:00
Max Schaefer
7823ff968c JavaScript: Improve query help for js/server-side-unvalidated-url-redirection. 2023-07-19 13:23:25 +01:00
Anders Schack-Mulligen
a9c76d4175 Merge pull request #13717 from aschackmull/dataflow/neverskipadditionalsteps
Dataflow: Add support for not skipping configuration-specific nodes in big-step
2023-07-19 14:06:54 +02:00
Owen Mansel-Chan
b9027a0806 Avoid using getTarget() as it may not exist 2023-07-19 12:48:34 +01:00
Owen Mansel-Chan
a1fdc6f438 Merge pull request #13599 from pwntester/ruby/gopg_improvements
Go: Improve go-pg support
2023-07-19 12:40:39 +01:00
Stephan Brandauer
5575fc65aa Merge pull request #13636 from github/tausbn/add-sink-alert-metrics-query
Java: Add metric queries for counting sinks coming from models
2023-07-19 13:12:32 +02:00
Mathias Vorreiter Pedersen
434815b9f7 Merge pull request #13764 from MathiasVP/fix-fp-in-missing-noinline
QL: Fix FP in `ql/missing-noinline`
2023-07-19 11:49:20 +01:00
Mathias Vorreiter Pedersen
475a892216 Merge pull request #13760 from MathiasVP/split-invalid-ptr-deref-into-more-files
C++: Split `cpp/invalid-pointer-deref` into more files
2023-07-19 11:36:35 +01:00
Mathias Vorreiter Pedersen
5fa70b0eb0 Update ql/ql/test/queries/performance/MissingNoInline/MissingNoInline.expected 2023-07-19 11:34:05 +01:00
Mathias Vorreiter Pedersen
b470dd7f00 Update ql/ql/src/queries/performance/MissingNoinline.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-19 11:33:16 +01:00
Owen Mansel-Chan
9b3ff82279 Address review comments 2023-07-19 11:18:20 +01:00
Owen Mansel-Chan
a3ba74a6a6 Cast to MethodCallNode before calling getReceiver()
This is not required, because getReceiver is still defined on CallNode,
but is done for consistency.
2023-07-19 11:17:38 +01:00
Anders Schack-Mulligen
8d365b04c1 C/C++: Adjust expected output. 2023-07-19 11:41:54 +02:00
Anders Schack-Mulligen
e72a0b2f8c Dataflow: Add change notes. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
c01a494ea5 C/C++: Don't force-include XxeFlowStateTransformer steps in XXE.ql. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
ae24d68b5d C/C++/C#/Java/Python/Ruby/Swift: Adjust expected output. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
941aa7ae28 C/C++: Don't force-include default steps in DefaultTaintTrackingImpl. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
95d17045c9 Dataflow: Sync. 2023-07-19 11:41:15 +02:00
Anders Schack-Mulligen
fd83b6afdb Dataflow: Add support for not skipping configuration-specific nodes in big-step. 2023-07-19 11:41:15 +02:00
Geoffrey White
0660f98a33 Swift: Change note. 2023-07-19 10:37:34 +01:00
Geoffrey White
420008aed7 Swift: Minor corrections / clarifications. 2023-07-19 10:36:01 +01:00
Tony Torralba
2dbbcc2413 Java: Avoid low-confidence dispatch to InputStream methods
Also adds a neutral model for `InputStream.read`, which offers a high-confidence alternative for this method.
2023-07-19 11:30:53 +02:00
Mathias Vorreiter Pedersen
2f48cde2e5 Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-19 10:28:05 +01:00
Mathias Vorreiter Pedersen
9a8fb0b93a Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-19 10:27:55 +01:00
Owen Mansel-Chan
de8794e9ba Make MethodCallNode char pred more accurate
When a function is assigned to a variable and called through that
variable then we previously didn't realise it was a function. With
this change we try use local flow to determine if the function being
called is a method.
2023-07-19 10:24:27 +01:00
James Fletcher
8a46ff344a Merge pull request #13768 from github/update-presentations
Remove mentions of LGTM from CodeQL training presentations
2023-07-19 09:54:02 +01:00
James Fletcher
a54b96cb8d Merge branch 'main' into update-presentations 2023-07-19 09:35:52 +01:00
james
70076fd3f0 remove lgtm from presentations 2023-07-19 09:33:13 +01:00
Geoffrey White
a58dbf26b5 Merge pull request #13759 from geoffw0/parsemode2
Swift: Refactor regex library
2023-07-19 08:36:28 +01:00
Geoffrey White
cf7311f3f1 Swift: Expand parse mode support to include NSRegularExpression options. 2023-07-19 08:34:30 +01:00
Geoffrey White
cd1e73bd65 Swift: Add some more test cases. 2023-07-19 08:34:29 +01:00
Geoffrey White
dc5f964ce0 Swift: Modify the test stubs to test flow models more robustly. 2023-07-19 08:34:29 +01:00
Geoffrey White
84f592b8a1 Swift: Add another test case. 2023-07-19 08:34:29 +01:00
Geoffrey White
f8b8c67813 Swift: Clean up and autoformat. 2023-07-19 08:34:27 +01:00
Geoffrey White
3c1f755580 Swift: Support other parse modes. 2023-07-19 08:33:48 +01:00
Geoffrey White
8273fa1a8c Swift: Track parse modes (prototype version). 2023-07-19 08:33:43 +01:00
Anders Schack-Mulligen
afc46576f0 Docs: Review fix. 2023-07-19 09:14:33 +02:00
Owen Mansel-Chan
9b0d7f3515 Merge pull request #13739 from owen-mc/go/extractor-use-origin
Use Origin() in Go extractor
2023-07-18 21:37:46 +01:00
Robert Marsh
093c6905dd Swift: only read ArrayContent from subscript keypaths 2023-07-18 19:42:54 +00:00
Jeroen Ketema
b72d89295a Merge pull request #13762 from jketema/fun-qual
C++: Handle `FunctionAccess`es with qualifiers
2023-07-18 21:17:30 +02:00
Mathias Vorreiter Pedersen
3e1b4d97fe C++: Add QLDoc. 2023-07-18 18:15:25 +01:00
Mathias Vorreiter Pedersen
576f021c25 C++: Fix Code Scanning errors. 2023-07-18 18:15:25 +01:00
Mathias Vorreiter Pedersen
4762e883fc C++: Add inline expectations tests for the invalid-pointer-to-dereference stage of the query. 2023-07-18 18:15:24 +01:00
Mathias Vorreiter Pedersen
a735d18a1b C++: Add inline expectations tests for the allocation-to-invalid-pointer stage of the query. 2023-07-18 18:15:24 +01:00
Mathias Vorreiter Pedersen
5099de5b3d C++: Split the query into 4 files. 2023-07-18 18:15:18 +01:00
Mathias Vorreiter Pedersen
5a15c19e4b QL: Accept test changes. 2023-07-18 18:04:46 +01:00
Mathias Vorreiter Pedersen
3b3f374223 QL: Fix FP in 'ql/missing-noinline'. 2023-07-18 17:55:44 +01:00
Geoffrey White
5dea539f3f Swift: Fix QL-for-QL suggestion. 2023-07-18 16:51:12 +01:00
Arthur Baars
99d8ae720f Swift: improve print-cfg query 2023-07-18 16:49:58 +02:00
Jeroen Ketema
aad094bdd0 C++: Handle FunctionAccesses with qualifiers
Also fix the IR generation for these and add more IR tests involving value
categories.
2023-07-18 16:35:39 +02:00
Robert Marsh
bcc45658b3 Swift: Change note for ArrayContent 2023-07-18 14:12:53 +00:00
Robert Marsh
1fac08ef6c Swift: add qldoc for ArrayContent and Array models 2023-07-18 14:08:33 +00:00
Robert Marsh
dfa5e18988 Swift: autoformat 2023-07-18 14:01:30 +00:00
Mathias Vorreiter Pedersen
a038b389c3 C++: More cleanup. 2023-07-18 14:03:04 +01:00
Mathias Vorreiter Pedersen
d41d2bc29e Merge pull request #13699 from MathiasVP/final-config-to-invalid-pointer-deref
C++: Handle call-contexts mismatches in `cpp/invalid-pointer-deref`
2023-07-18 13:08:21 +01:00
Geoffrey White
efea11fd0f Swift: getFullName. 2023-07-18 12:53:45 +01:00
Alex Ford
e803e98ee4 Merge pull request #13585 from alexrford/rb/rack-env-query-string
Ruby: add rack `env['QUERY_STRING']` as a remote flow input
2023-07-18 12:44:07 +01:00
yoff
a1aa16f901 Merge pull request #13745 from GeekMasher/py-mad-xss
Python - Add Models as Data support for Reflected XSS Query
2023-07-18 13:39:17 +02:00
Paul Hodgkinson
c7084b6d8e Merge branch 'main' into java/experimental/command-injection 2023-07-18 11:38:44 +01:00
Geoffrey White
1deacf40ca Merge pull request #13660 from geoffw0/regexinjection
Swift: Query for regular expression injection
2023-07-18 10:25:30 +01:00
Geoffrey White
96dece3c88 Swift: ReDoS query result changes. 2023-07-18 10:11:22 +01:00
Jeroen Ketema
5d8b203112 Merge pull request #13758 from jketema/val-cat-tests
C++: Add more IR tests
2023-07-18 11:02:27 +02:00
Geoffrey White
86c6960e2a Swift: Add RegexUseFlow and modify the role of StringLiteralUseFlow. 2023-07-18 09:49:47 +01:00
Geoffrey White
c76d85df1b Swift: Create a model for RegexCreation. 2023-07-18 09:49:47 +01:00
Geoffrey White
734a00d616 Swift: Rename so that different data flows will be clear. 2023-07-18 09:49:47 +01:00
Geoffrey White
f243e854ae Swift: Move regex dataflow code into a RegexTracking library (similar to the layout in Ruby and Python). 2023-07-18 09:49:36 +01:00
Anders Schack-Mulligen
e72366194b Merge pull request #13754 from aschackmull/java/remotesource-inbarrier
Java: Exclude source-to-source flow in 5 queries.
2023-07-18 10:33:44 +02:00
Geoffrey White
b5a8a8d431 Merge pull request #13715 from geoffw0/parsemode
Swift: Recognize regular expression parse mode flags
2023-07-18 09:09:56 +01:00
Jeroen Ketema
e2de94b233 C++: Add more IR tests
These show the value categories for more static member calls, and show that
a load occurs when a `volatile` variable is being used in an empty context.
2023-07-18 08:40:54 +02:00
Jeroen Ketema
a426010b06 Merge pull request #13621 from MathiasVP/deprecate-ast-dataflow
C++: Deprecate AST dataflow
2023-07-18 08:13:47 +02:00
Robert Marsh
81a25b23ba Swift: fix tests for array concatenation 2023-07-17 19:10:46 +00:00
Robert Marsh
d4b635d674 Swift: add ArrayContent summary support 2023-07-17 19:09:05 +00:00
Robert Marsh
169326ffe5 Swift: support array keypath reads in dataflow 2023-07-17 18:05:06 +00:00
Robert Marsh
0b35be284e Swift: additional dataflow tests for arrays 2023-07-17 18:03:20 +00:00
Owen Mansel-Chan
a7469ce4f1 Use Origin() 2023-07-17 16:11:25 +01:00
Geoffrey White
ddb499071c Swift: Pragmatic fix for CustomUrlSchemes.qll. 2023-07-17 16:10:37 +01:00
Mathias Vorreiter Pedersen
d63ead55dc C++: Remove barrier that's no longer needed. 2023-07-17 15:59:35 +01:00
Geoffrey White
05cb429635 Swift: Add CfgConsistency.expected. 2023-07-17 15:59:18 +01:00
Robert Marsh
ef9376d39c Swift: more ArrayContent tests 2023-07-17 14:58:40 +00:00
Mathew Payne
6ef55aa14f Update python/ql/lib/semmle/python/security/dataflow/ReflectedXSSCustomizations.qll
Co-authored-by: yoff <lerchedahl@gmail.com>
2023-07-17 15:44:38 +01:00
Geoffrey White
70a9fe3974 Swift: Change note. 2023-07-17 15:42:56 +01:00
Geoffrey White
eca2c21af5 Swift: Model referrerURL. 2023-07-17 15:42:51 +01:00
Geoffrey White
bc4724b1fb Swift: Test the customurlschemes fields that inherit taint. 2023-07-17 15:39:02 +01:00
Ian Lynagh
8a0286ec34 Java: Improve the diagnostics consistency query
Diagnostics can be easier to read if you see them in the order in which
they were generated. By selecting the compilation and indexes, they get
sorted by the testsuite driver.

d.getCompilationInfo(c, f, i) would be a bit more natural as
d = c.getDiagnostic(f, i), but currently we don't import Diagnostic into
the default ('import java') namespace, and I don't think it's worth
changing that for this.
2023-07-17 15:37:05 +01:00
Geoffrey White
869ad2eb65 Apply suggestions from code review
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
2023-07-17 15:17:24 +01:00
Max Schaefer
9432fec612 JavaScript: Improve qhelp for js/server-crash.
The examples now use `fs.access` instead of the deprecated `fs.exists`. I have also rewritten the async/await example, since as of Node.js v15 the default behaviour for uncaught exceptions has changed to terminating the process instead of logging a warning, making the previous advice incorrect.
2023-07-17 14:44:23 +01:00
Alex Ford
27ee72c265 Merge remote-tracking branch 'origin/main' into rb/rack-env-query-string 2023-07-17 14:11:25 +01:00
Alex Ford
06aefe01b8 Update ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-07-17 14:08:44 +01:00
Alex Ford
ab1f341aa6 Merge pull request #13566 from alexrford/rb/rack-params
Ruby: add `Rack::Request` params and cookies as remote input sources
2023-07-17 14:07:20 +01:00
Mathias Vorreiter Pedersen
11f2681904 Merge pull request #13740 from MathiasVP/unique-entry-point
C++: Exclude invalid functions from new range analysis
2023-07-17 13:32:50 +01:00
yoff
d032bf5c0e Merge pull request #13685 from RasmusWL/captured-variables-default-param-value
Python: Model parameter with default value as `DefinitionNode`
2023-07-17 14:25:13 +02:00
Mathias Vorreiter Pedersen
be95d29589 Documentation: Update version number. 2023-07-17 11:08:40 +01:00
Mathew Payne
e3d75c488e Merge branch 'main' into py-mad-xss 2023-07-17 11:08:09 +01:00
Mathias Vorreiter Pedersen
8c21699040 C++: Accept test changes. 2023-07-17 10:51:42 +01:00
Mathias Vorreiter Pedersen
f9db6a9868 C++: Don't do range analysis on malformed IR. 2023-07-17 10:15:01 +01:00
Geoffrey White
69b98c769c Merge pull request #13354 from geoffw0/sharedsensitive2
Swift: Improve SensitiveExprs.qll Heuristics
2023-07-17 09:16:09 +01:00
Geoffrey White
4644b7184b Swift: # -> // 2023-07-17 09:12:01 +01:00
Alvaro Muñoz
eacecab689 remove PrepareContext 2023-07-17 09:16:32 +02:00
Anders Schack-Mulligen
6770d2a49b Java: Exclude source-to-source flow in 5 queries. 2023-07-17 09:06:49 +02:00
Owen Mansel-Chan
a2a2e93cfd Fix printing when one obj is nil 2023-07-15 07:06:16 +01:00
Owen Mansel-Chan
0b8353eb64 Merge pull request #13602 from pwntester/ruby/add_gqlgen_support
Go: Add support for the gqlgen library
2023-07-15 07:04:09 +01:00
Maiky
3f36d3244b Fix singleton set literal 2023-07-15 00:18:21 +02:00
Alvaro Muñoz
0ea0d54050 gofmt -w . 2023-07-14 22:15:40 +02:00
Maiky
378313332b Fix sink 2023-07-14 20:55:24 +02:00
Alex Ford
bdf1aa0807 Merge pull request #13746 from asgerf/rb/fix-rack-todo
Ruby: Use API graphs asCallable() instead of Proc.new workaround
2023-07-14 16:29:00 +01:00
Alex Ford
d89c10dd85 Merge pull request #13130 from maikypedia/maikypedia/xpath-injection
Ruby :  XPath Injection Query (CWE-643)
2023-07-14 14:10:09 +01:00
Owen Mansel-Chan
cff09d28b8 Test if Origin() works (for Var and Func) 2023-07-14 13:52:50 +01:00
Rasmus Wriedt Larsen
13fa08a90a Python: Move source modeling to shared file 2023-07-14 14:47:50 +02:00
Rasmus Wriedt Larsen
aa8ed91993 Python: Accept .expected changes
but it's kinda bad, since it has paths to stdlib in there :(
2023-07-14 14:47:27 +02:00
Taus
6b425f1395 Java: Revert definition of isNeutral
Reverts the change made in
daf2743143

With the change in the aforementioned commit, we were extracting candidates for endpoints that
had a neutral _summary_ model. These are bad candidates, as they have already been triaged.
2023-07-14 14:45:22 +02:00
Rasmus Wriedt Larsen
9e0f985e23 Python: Fix qlref 2023-07-14 14:33:17 +02:00
Rasmus Wriedt Larsen
8279cf7c9c Merge branch 'main' into amammad-python-WebAppsConstatntSecretKeys 2023-07-14 14:32:43 +02:00
Taus
6793bc6c6b Java: Exclude qualifier argument for existing models
Excludes candadites for `Argument[this]` where we already have a model that covers a
different argument of the containing call.
2023-07-14 14:26:21 +02:00
Taus
895e829eb1 Java: Add QLDoc for query predicates 2023-07-14 14:22:10 +02:00
Taus
c4487673e8 Java: Swap input and ext 2023-07-14 14:21:59 +02:00
Taus
9193de6898 Merge pull request #13730 from github/tausbn/limit-number-of-candidates-in-application-mode
Java: Limit the number of samples extracted in application mode
2023-07-14 14:09:59 +02:00
Asger F
2962727f0f Ruby: Use API graphs asCallable() instead of Proc.new workaround 2023-07-14 13:50:07 +02:00
Alex Ford
dbb55ff2b4 Ruby: fix xpathinjection deprecation warnings 2023-07-14 12:45:27 +01:00
Mathew Payne
cf65ab834d fix: formatting issue 2023-07-14 12:31:40 +01:00
Mathew Payne
4c1612f2dd feat: add change log notes 2023-07-14 12:28:51 +01:00
Mathew Payne
c292984338 feat: add MaD to XSS query 2023-07-14 12:25:54 +01:00
Alex Ford
a524735236 Merge branch 'main' into maikypedia/ldap-injection 2023-07-14 12:05:17 +01:00
Alex Ford
c0009379d1 qlformat 2023-07-14 12:04:03 +01:00
Asger F
31bed36231 Merge pull request #13612 from asgerf/rb/api-graph-explicit-proc-lambda
Ruby: Improve support for explicit proc-creation
2023-07-14 13:02:44 +02:00
Rasmus Wriedt Larsen
0db535bdd7 Python: Minor naming update 2023-07-14 12:54:54 +02:00
Geoffrey White
1c8297b91b Merge pull request #13548 from geoffw0/redos
Swift: Query for REDOS (Regular Expression Denial Of Service)
2023-07-14 10:44:52 +01:00
Anders Schack-Mulligen
80a799df01 Merge pull request #13735 from aschackmull/dataflow/forcehighprecision-fix
Dataflow: Fix forceHighPrecision for length-2 prefixes.
2023-07-14 11:42:35 +02:00
Asger F
2c3117a981 JS: Add documentation for Fuzzy component 2023-07-14 11:33:06 +02:00
Geoffrey White
1274393c72 Swift: Remove 'cached' annotations. 2023-07-14 10:11:09 +01:00
Anders Schack-Mulligen
aaea1ad2fa Docs: Switch to PascalCase. 2023-07-14 10:18:42 +02:00
Chris Smowton
3d8b4d850a Merge pull request #13742 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-07-14 09:00:17 +01:00
Anders Schack-Mulligen
2947f176ef Docs: Update data flow documentation to the new API. 2023-07-14 09:59:08 +02:00
github-actions[bot]
b675a1e2fe Add changed framework coverage reports 2023-07-14 00:19:14 +00:00
Alvaro Muñoz
11a915dcd7 Merge branch 'ruby/add_gqlgen_support' of https://github.com/pwntester/codeql into ruby/add_gqlgen_support 2023-07-13 22:16:41 +02:00
Alvaro Muñoz
55366f6743 retab 2023-07-13 22:16:34 +02:00
Robert Marsh
42cc6448cc Swift: add DataFlow::Content for arrays 2023-07-13 20:16:21 +00:00
Alvaro Muñoz
9f6c7efd91 Update go/ql/test/library-tests/semmle/go/frameworks/gqlgen/gqlgen.ql
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 22:11:37 +02:00
Alvaro Muñoz
4111ed6653 retab generated.go 2023-07-13 22:10:19 +02:00
Alvaro Muñoz
d681094824 Fixup expected file 2023-07-13 21:42:16 +02:00
Alvaro Muñoz
1dedc0ae55 Update go/ql/test/library-tests/semmle/go/frameworks/gqlgen/graph/schema.resolvers.go
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 21:39:47 +02:00
Alvaro Muñoz
94628edf98 Merge branch 'ruby/add_gqlgen_support' of https://github.com/pwntester/codeql into ruby/add_gqlgen_support 2023-07-13 21:36:49 +02:00
Alvaro Muñoz
730781720d remove unnecessary file 2023-07-13 21:35:11 +02:00
Alvaro Muñoz
7a54755c1b Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 21:32:56 +02:00
Alvaro Muñoz
1b6308e32f Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-13 21:32:46 +02:00
Geoffrey White
962c16d918 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-07-13 19:20:49 +01:00
Geoffrey White
2b9d25b317 Swift: Additional test cases. 2023-07-13 17:30:03 +01:00
Asger F
d57276ca35 Merge pull request #13719 from asgerf/js/barrier-inout
JS: Replace barrier edges with barrier nodes
2023-07-13 16:36:52 +02:00
Asger F
eb5c600a6b Python: fix some whitespace 2023-07-13 15:42:34 +02:00
Asger F
2b0a8097e6 Python: implement Fuzzy for Python 2023-07-13 15:42:34 +02:00
Asger F
f1c82b650f Ruby: Implement Fuzzy for Ruby 2023-07-13 15:42:34 +02:00
Asger F
919cb07c1e Sync ApiGraphModels.qll 2023-07-13 15:42:33 +02:00
Mathias Vorreiter Pedersen
c13f015b95 C++: No need to select the 'instruction' as the sink when the dataflow node has a better 'toString'. 2023-07-13 14:17:43 +01:00
Mathias Vorreiter Pedersen
5e06043120 C++: Completely get rid of merged path nodes. 2023-07-13 14:15:14 +01:00
Erik Krogh Kristensen
4f1c12e9dc apply suggestion from review
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
2023-07-13 14:49:25 +02:00
Tony Torralba
cafc67e3be Merge pull request #13714 from pwntester/java/langs3_improvements
[Java] Add missing commons lang3 model for ToStringBuilder.reflectionToString
2023-07-13 14:45:33 +02:00
Max Schaefer
85991266da Merge pull request #13661 from github/max-schaefer/improve-command-injection-qhelp
JavaScript: Improve query help for js/command-line-injection
2023-07-13 13:34:10 +01:00
erik-krogh
1fe66232c6 suggestions based on review: add a popular library example for HTML-sanitization, and use the old text about ../ replacements 2023-07-13 14:28:11 +02:00
Erik Krogh Kristensen
9db970f055 apply suggestion from review
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
2023-07-13 14:17:33 +02:00
Asger F
f3fab587a9 JS: Add Fuzzy token in identifying access path 2023-07-13 14:01:06 +02:00
Anders Schack-Mulligen
a0e96594d8 Merge pull request #13736 from aschackmull/dataflow/remove-superfluous-module-members
C#/Java/Ruby: Remove superfluous module members.
2023-07-13 13:59:31 +02:00
Rasmus Wriedt Larsen
991d5cc54b Python: Fix test of HttpResponse.getBody() 2023-07-13 13:57:08 +02:00
Rasmus Wriedt Larsen
64a7206f3e Python: Improve aiohttp FileResponse/StreamResponse modeling
However, notice that the concepts tests use the HttpResponse location
for the `responseBody` tag, which seems a little odd in this situation,
where they are actually separate. Will fix in next commit.
2023-07-13 13:57:08 +02:00
Rasmus Wriedt Larsen
15269c9166 Python: Add StreamResponse test 2023-07-13 13:57:08 +02:00
Rasmus Wriedt Larsen
0f9ab8f53e Python: Fixup tests
But notice that keyword argument is not handled yet
2023-07-13 13:57:08 +02:00
Asger F
7c9e1ad6ec JS: Fix accidental recursion in Vue model
The API graph entry point depended on API::Node.

This was due to depending on the the TComponent newtype which has a branch that depends on API::Node
2023-07-13 13:41:21 +02:00
Alvaro Muñoz
a590c57174 add stubs 2023-07-13 13:31:15 +02:00
Alvaro Muñoz
362e8f7dd2 remove unrelated file 2023-07-13 13:29:06 +02:00
Max Schaefer
b8eb2ef8d8 Merge branch 'main' into max-schaefer/improve-command-injection-qhelp 2023-07-13 12:11:15 +01:00
Max Schaefer
ae237247f2 Apply suggestions from code review
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
2023-07-13 12:10:57 +01:00
Alvaro Muñoz
ee1ba71e5d add tests 2023-07-13 13:07:12 +02:00
Tamás Vajk
60af9b062c Merge pull request #13733 from tamasvajk/fix/test-path-combine
C#: Fix test expectations in `RuntimeVersion` tests to handle platfor…
2023-07-13 12:44:06 +02:00
Alvaro Muñoz
10cd649ba7 address code review feedback 2023-07-13 12:24:19 +02:00
Alvaro Muñoz
69efddbaef Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-07-13 12:23:00 +02:00
Alvaro Muñoz
aa2d61c7e3 replace deps with stubs 2023-07-13 12:18:12 +02:00
Asger F
18762db0fb Ruby: factor out isProcCreationCall 2023-07-13 11:53:16 +02:00
Asger F
8d2dba18c0 Ruby: change note 2023-07-13 11:53:16 +02:00
Asger F
f232669ea5 Ruby: support Proc.new alongside 'proc' and 'lambda' 2023-07-13 11:53:16 +02:00
Asger F
194fe85442 Ruby: Use asCallable() to generate epsilon edges 2023-07-13 11:53:16 +02:00
Asger F
452fbe7e8f Ruby: add test showing lack of lambda handling 2023-07-13 11:53:16 +02:00
Anders Schack-Mulligen
91de43f918 C#/Java/Ruby: Remove superfluous module members. 2023-07-13 11:38:35 +02:00
Stephan Brandauer
4391799b7e Merge pull request #13403 from github/java/update-mad-decls-after-triage-2023-06-08T08-51-47
Java: Update MaD Declarations after Triage
2023-07-13 11:15:41 +02:00
Anders Schack-Mulligen
837df2ad37 Dataflow: Sync. 2023-07-13 10:55:39 +02:00
Anders Schack-Mulligen
58cd16565f Dataflow: Fix forceHighPrecision for length-2 prefixes. 2023-07-13 10:55:39 +02:00
Anders Schack-Mulligen
d46b2a32ae Dataflow: Improve debug printing. 2023-07-13 10:55:39 +02:00
Jeroen Ketema
e6d7a83d41 Merge pull request #13732 from jketema/dataflow-default-none
C++/Swift: Remove `none()` dataflow configuration predicates
2023-07-13 10:42:39 +02:00
Tamas Vajk
35cc058474 C#: Fix test expectations in RuntimeVersion tests to handle platform dependent behaviour of Path.Combine 2023-07-13 09:50:26 +02:00
Tony Torralba
7204c30025 Update 2023-07-12-apache-commons-lang3-tostringbuilder.md 2023-07-13 09:38:33 +02:00
Owen Mansel-Chan
1767ca2682 Merge pull request #13728 from owen-mc/go/minor-cleanup-Twirp-models
Go: minor cleanup to Twirp models
2023-07-12 22:59:13 +01:00
Maiky
119a32fe0e fix naming error 2023-07-12 23:54:58 +02:00
Jeroen Ketema
52ab215560 C++/Swift: Remove none() dataflow configuration predicates
These now have default implementations that are also `none()`
2023-07-12 23:49:29 +02:00
Maiky
db0f38fe06 Update XpathInjectionQuery.qll 2023-07-12 23:46:47 +02:00
Edward Minnix III
541737d1a8 Merge pull request #13694 from egregius313/egregius313/add-default-isBarrier-2-isAdditionalFlowStep-4
DataFlow: Add default implementations of isBarrier/2 and isAddiitonalFlowStep/4
2023-07-12 17:10:17 -04:00
Alvaro Muñoz
4b85d54089 update tests and stubs 2023-07-12 22:21:49 +02:00
Alvaro Muñoz
300584c4bb Merge branch 'ruby/gopg_improvements' of https://github.com/pwntester/codeql into ruby/gopg_improvements 2023-07-12 22:09:27 +02:00
Alvaro Muñoz
53b27703cf replace deps with stubs 2023-07-12 22:09:16 +02:00
Geoffrey White
0bd522aa7b Merge branch 'main' into sharedsensitive2 2023-07-12 21:07:06 +01:00
Owen Mansel-Chan
8a573cca0f Merge pull request #13625 from GeekMasher/go-micro
[Go] GoMicro framework support
2023-07-12 20:57:01 +01:00
Ed Minnix
63299688d5 Add change notes for default implementations of isBarrier and isAdditionalFlowStep 2023-07-12 15:21:16 -04:00
Ed Minnix
3db2644008 Python: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
43f870e395 Python: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
e5ce78caab Go: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
0549b5da87 Go: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
18b606f930 Swift: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
b76b9812fd Swift: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
94638c9997 Ruby: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
8a7081753d Ruby: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
9618c0b0a1 C#: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:25 -04:00
Ed Minnix
a3c30992b1 C#: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:25 -04:00
Ed Minnix
2c0a456855 C++: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:24 -04:00
Ed Minnix
c73cd73001 C++: Add default implementation of StateConfigSig::isBarrier/2 2023-07-12 15:06:24 -04:00
Ed Minnix
1cd8922ab5 Java: Add default implementation of StateConfigSig::isAdditionalFlowStep/4 2023-07-12 15:06:24 -04:00
Ed Minnix
1835b40f7b Java: Add default impl to StateConfigSig::isBarrier/2 2023-07-12 15:06:24 -04:00
Geoffrey White
6d4c831ec5 Swift: Compute sensitive strings centrally (much more efficient evaluation). 2023-07-12 19:34:09 +01:00
Geoffrey White
02ddcab773 Swift: Cleanup / corrections. 2023-07-12 18:26:59 +01:00
Alvaro Muñoz
0180a482ce Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 18:27:45 +02:00
Geoffrey White
5c6b8bd36e Swift: Introduce EnumElmentDecl.hasQualifiedName and use it to clean up the code. 2023-07-12 17:18:04 +01:00
Mathew Payne
8d110ca2ac remove getName 2023-07-12 17:12:08 +01:00
Mathew Payne
18db525d18 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 17:11:40 +01:00
Maiky
1559b7da3c Update Frameworks.qll 2023-07-12 17:45:45 +02:00
Chris Smowton
5567d4d1b8 Merge pull request #13724 from Malayke/patch-1
Update CONTRIBUTING.md
2023-07-12 16:36:10 +01:00
Alvaro Muñoz
7a717555aa fix qldocs 2023-07-12 17:27:17 +02:00
Alvaro Muñoz
733e625080 fix change note 2023-07-12 17:26:12 +02:00
Alvaro Muñoz
f2cc2af276 aiohttp improvements 2023-07-12 17:19:56 +02:00
yoff
76455d628e Update python/ql/lib/semmle/python/frameworks/ServerLess.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-07-12 16:50:13 +02:00
Chris Smowton
64257eedae Fix count 2023-07-12 15:48:36 +01:00
Maiky
c9fadd98f4 Support CommandInjectionAdditionalFlowStep and fix doc errors 2023-07-12 16:48:27 +02:00
Chris Smowton
464ac60db1 Amend and order 2023-07-12 15:48:18 +01:00
Rasmus Lerchedahl Petersen
02c41f3dcf JavaScript: Use shared library for serverless 2023-07-12 16:46:34 +02:00
Maiky
d7d9ffc449 Doc error
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2023-07-12 16:44:17 +02:00
Ian Lynagh
fe24cc1900 Merge pull request #13718 from igfoo/igfoo/file_classes
Kotlin: Improve file class support
2023-07-12 15:42:16 +01:00
Rasmus Lerchedahl Petersen
4d2ce6b2e0 python: create shared serverless module and use it
Modelled on the javascript serverless module, but
- The predicate that reports YAML files is now public
  so languages can implement their own file conventions.
- It also reports framework and runtime.
- The conveninece predicates with files still exist,
  but they only report the path.
- Handler mapping conventions are now documented.
- Use parameterised serverless module in Python,
  tests now pass.
2023-07-12 16:42:01 +02:00
Rasmus Lerchedahl Petersen
a892e83c8e python: add simple test for AWS lambda
made space for other serverless frameworks in the directory `serverless`
2023-07-12 16:42:00 +02:00
Mathew Payne
3a1e3f71cc Update go/ql/lib/change-notes/2023-06-29-modelling-go-micro.md
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 15:09:56 +01:00
Owen Mansel-Chan
5f76cafc64 Merge pull request #13672 from owen-mc/go/make-parameter-nodes-for-unused-parameters-2
Go: make `ParameterNode`s for unused parameters #2 (make a disjoint class for unused ones)
2023-07-12 15:04:46 +01:00
Taus
49194a2af7 Java: Limit the number of samples extracted in application mode
Uses the same trick as for the negative examples, this time with a limit of 7
candidates for each endpoint signature.

As this duplicates some of the logic used in another query, it may be worthwhile
to consider extracting this into a shared parameterized module.
2023-07-12 15:13:10 +02:00
Mathew Payne
f2caf196b7 Update go/ql/test/library-tests/semmle/go/frameworks/GoMicro/gomicro.expected
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 13:09:02 +01:00
Mathew Payne
25e7ddec31 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 13:08:44 +01:00
Mathew Payne
e31cce56d1 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 13:00:21 +01:00
Mathew Payne
e951720573 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:59:45 +01:00
Mathew Payne
7f6067de42 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:59:01 +01:00
Mathew Payne
cefb914af6 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:58:23 +01:00
Mathew Payne
94e96cb7a8 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-12 12:57:32 +01:00
Ian Lynagh
af5cd7cf4f Merge pull request #13723 from igfoo/igfoo/kotlin-1.9.0
Kotlin: Run CI with 1.9.0
2023-07-12 12:24:04 +01:00
Mathias Vorreiter Pedersen
2c2f9b9e17 C++: Fix comment. 2023-07-12 11:59:29 +01:00
Mathias Vorreiter Pedersen
19872d5adf Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-12 11:58:07 +01:00
Mathias Vorreiter Pedersen
3d5414b84c Update cpp/ql/src/experimental/Security/CWE/CWE-193/InvalidPointerDeref.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-12 11:57:51 +01:00
Ian Lynagh
75c835c9d2 Add missing "a" to a qldoc comment
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
2023-07-12 11:24:42 +01:00
Malayke
827a2df631 Update CONTRIBUTING.md
add swift
2023-07-12 18:05:14 +08:00
Owen Mansel-Chan
78816f082e Make QLDoc comments more concise too 2023-07-12 11:01:54 +01:00
Owen Mansel-Chan
2ad12f18f1 Make QL more concise 2023-07-12 10:56:03 +01:00
Rasmus Wriedt Larsen
98ed5cf522 Python: Move not this instanceof ParameterDefinition logic 2023-07-12 11:31:27 +02:00
Alvaro Muñoz
ff1ae7d9c6 add change note 2023-07-12 11:05:25 +02:00
Alvaro Muñoz
0247278bad add change note 2023-07-12 11:03:24 +02:00
Alvaro Muñoz
07e25e36b3 Merge branch 'java/langs3_improvements' of https://github.com/pwntester/codeql into java/langs3_improvements 2023-07-12 11:00:04 +02:00
Alvaro Muñoz
46e326e106 add change note 2023-07-12 10:59:56 +02:00
Tony Torralba
c54e93f005 Merge pull request #13705 from atorralba/atorralba/java/android-unsafe-fetch-apply
Java: Add support for Kotlin's `apply` to java/android/unsafe-android-wevbiew-fetch
2023-07-12 09:45:54 +02:00
Asger F
c7abd4c2af JS: Remove the unused edge-sanitizer hook in UnvalidatedDynamicMethodCall 2023-07-12 09:26:37 +02:00
Alvaro Muñoz
51f7031416 Update java/ql/lib/ext/org.apache.commons.lang3.builder.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-07-12 09:06:05 +02:00
Maiky
cea3477ac2 Qhelp and examples 2023-07-12 02:13:07 +02:00
Maiky
c255f8717d Change hasFlowPath to flowPath
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-11 19:20:54 +02:00
Maiky
c4f72dd2f2 Change make to global
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com>
2023-07-11 19:20:34 +02:00
Geoffrey White
5f8f1b64c6 Swift: Model Connection.Location.uri sink. 2023-07-11 18:10:43 +01:00
Ian Lynagh
b83f0275e3 Kotlin: Accept test changes for Kotlin 1.9.0 2023-07-11 17:37:24 +01:00
Ian Lynagh
470e033090 Kotlin: Restrict a test's results to those in the test directory 2023-07-11 17:37:23 +01:00
Geoffrey White
ebb379f08c Swift: Fix sqlite3_temp_directory sink. 2023-07-11 16:50:42 +01:00
Malayke
bf1db35d87 Update CONTRIBUTING.md
add go
2023-07-11 23:32:58 +08:00
Ian Lynagh
6dedd9286c Kotlin: Record "file class" info from the compiler
We were making file classes when the parent was a file, but not when it
was a class marked as one.
2023-07-11 15:58:42 +01:00
Ian Lynagh
cfd29de677 Kotlin: Add Class.isFileClass() 2023-07-11 15:58:41 +01:00
Ian Lynagh
2162530729 Kotlin: Add an integration test for file classes 2023-07-11 15:58:41 +01:00
Owen Mansel-Chan
8e85f4d91c Merge pull request #13601 from pwntester/ruby/add_bun_support
Go: Add support for Bun library
2023-07-11 14:48:48 +01:00
Owen Mansel-Chan
84bfd10352 Merge pull request #13589 from owen-mc/go/tolerate-go-mod-not-in-project-root
Go: Deal better with a single go.mod file which is not in the project root
2023-07-11 14:32:10 +01:00
Asger F
c8af28c2ca Merge pull request #13700 from asgerf/js/path-join-spread
JS: Recognize 'fs/promises' alias and handle spread arguments in path.join()
2023-07-11 15:31:13 +02:00
Asger F
1a395c5b34 JS: Use sanitizerOut in PrototypePollutingAssignment 2023-07-11 15:24:10 +02:00
Asger F
03bdebe3b3 JS: Update a test.
The test had a bug on the line `src = src` so the new code is "more equivalent than usual"
2023-07-11 15:24:09 +02:00
Ian Lynagh
a603f21ce1 Kotlin: Use 1.9.0 for CI 2023-07-11 14:10:48 +01:00
Asger F
b09ed4b0e3 JS: Update UnsafeJQueryPlugin 2023-07-11 15:01:33 +02:00
Asger F
a1d8a05bcb JS: Update ResourceExhaustion 2023-07-11 14:56:53 +02:00
Asger F
58a557b18e JS: Update InsecureRandomness 2023-07-11 14:56:43 +02:00
Asger F
e863e2376d JS: Use sanitizerIn in ExtenralAPIUsedWithUntrustedData 2023-07-11 14:50:29 +02:00
Asger F
094302a27b JS: Replace sanitizing prefix edge with node 2023-07-11 14:48:13 +02:00
Ian Lynagh
c21797dd3c Kotlin: Add a test for file classes 2023-07-11 13:21:56 +01:00
Asger F
944a2ca825 JS: Replace ClearTextLogging::isSanitizerEdge with a node 2023-07-11 14:20:17 +02:00
Geoffrey White
cffdc0a8a7 Merge pull request #13698 from geoffw0/url2
Swift: Expand taint models for URL
2023-07-11 13:14:20 +01:00
Asger F
68584e549e JS: Replace isOptionallySanitizedEdge with a node 2023-07-11 12:57:33 +02:00
Asger F
3691b836cb JS: Add tests 2023-07-11 11:37:30 +02:00
Rasmus Wriedt Larsen
83ca47f32c Python: Add change-note 2023-07-11 11:33:06 +02:00
Rasmus Wriedt Larsen
a1225674ee Python: Add implementation note about why not targeting ESSA node 2023-07-11 11:32:26 +02:00
Jeroen Ketema
92ee31849c Merge pull request #13643 from jketema/inline-5
Rework the remaining inline expectation tests to use the parameterized module
2023-07-11 11:29:14 +02:00
Mathew Payne
3cc5ba1eed Remove un-needed code 2023-07-11 10:26:15 +01:00
Mathias Vorreiter Pedersen
63c5684fbb C++: Join with 'invalidPointerToDerefSource' in 'hasFlowPath' to prevent conflation of paths. 2023-07-11 10:24:01 +01:00
Asger F
0841677b14 JS: Add isSanitizerX variants in TaintTracking 2023-07-11 11:14:37 +02:00
Geoffrey White
fcc98f83c0 Swift: Autoformat. 2023-07-11 10:05:24 +01:00
Asger F
d53beb3784 JS: Embed check for in/out barriers in edge barrier check 2023-07-11 11:04:28 +02:00
Asger F
4964d811a5 JS: Add interface for isBarrier in/out 2023-07-11 11:04:28 +02:00
Geoffrey White
5ef097fd66 Swift: Update consistency check .expected to exactly match CI. 2023-07-11 09:54:39 +01:00
Alvaro Muñoz
e8563e5dfd fix row 2023-07-11 10:47:23 +02:00
Mathias Vorreiter Pedersen
a4c0063ab1 Merge pull request #13679 from MathiasVP/speedup-big-step
DataFlow: Speed up the big step relation
2023-07-11 09:44:17 +01:00
Geoffrey White
2d7166b903 Swift: Minor corrections. 2023-07-11 09:39:42 +01:00
Alvaro Muñoz
c2f1fbbf98 Add missing commons lang3 model for ToStringBuilder.reflectionToString 2023-07-11 10:34:17 +02:00
Jeroen Ketema
d217e1e87c Merge pull request #13647 from purs3lab/uninitialized-local
C++: exclude uninitialized uses inside pure expression statements
2023-07-11 10:31:33 +02:00
Jeroen Ketema
8cee4f37a4 Merge branch 'main' into inline-5 2023-07-11 10:30:11 +02:00
Alvaro Muñoz
2ce1192ee6 implement field taint inheritance for Struts2 unmarshalled objects 2023-07-11 10:28:14 +02:00
Geoffrey White
f45b89a3cc Swift: Add a few more variant test cases. 2023-07-11 09:26:37 +01:00
Alvaro Muñoz
047d486509 add new struts2 models 2023-07-11 10:23:26 +02:00
Tony Torralba
93ad204abd Merge pull request #13708 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-07-11 09:48:12 +02:00
github-actions[bot]
7b8cd77cec Add changed framework coverage reports 2023-07-11 00:19:16 +00:00
Jeroen Ketema
8cec884c59 Merge pull request #13701 from rdmarsh2/rdmarsh2/cpp/constant-array-overflow-tests-2
C++: more constant array off-by-one tests
2023-07-11 00:17:09 +02:00
Geoffrey White
07bbc0f537 Swift: Change note. 2023-07-10 19:28:11 +01:00
Geoffrey White
ef344c6a80 Swift: Match flag groups more strictly as other (? group types exist. 2023-07-10 19:22:53 +01:00
Geoffrey White
952a5d2aa2 Swift: Use accurate Swift regex mode flags. 2023-07-10 19:20:34 +01:00
Geoffrey White
6e80021c4e Swift: Support multiple parse mode flags. 2023-07-10 19:20:29 +01:00
Geoffrey White
f50345659e Swift: Fix parse failures due to mode flags. 2023-07-10 19:14:42 +01:00
Geoffrey White
a7a609d591 Swift: Add tests for parse modes. 2023-07-10 19:11:33 +01:00
Jeroen Ketema
3fe99dc4c7 Merge pull request #13704 from jketema/ir-test
C++: Add assignment operation IR test where the result is being used
2023-07-10 19:01:24 +02:00
Robert Marsh
5eea8e49b7 C++: more constant array off-by-one tests 2023-07-10 12:51:48 -04:00
Jeroen Ketema
de3251a634 C++: Add assignment operation IR test where the result is being used 2023-07-10 17:55:50 +02:00
Mathew Payne
20d4e53eaf Update go/ql/lib/change-notes/2023-06-29-modelling-go-micro.md
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-10 16:44:19 +01:00
Mathew Payne
ceade62f62 Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-10 16:44:11 +01:00
Mathew Payne
9c1a0225eb Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-10 16:43:54 +01:00
Tony Torralba
ce600367df Java: Add support for Kotlin's apply to java/android/unsafe-android-webview-fetch 2023-07-10 17:40:16 +02:00
Tony Torralba
16529cdd18 Add failing test 2023-07-10 17:40:15 +02:00
Tony Torralba
b70e21df4f Merge pull request #13702 from atorralba/atorralba/kotlin/apply
Kotlin: Support apply
2023-07-10 17:39:57 +02:00
Geoffrey White
7748a45c2f Swift: Initial implementation of regex mode flags. 2023-07-10 16:20:24 +01:00
Tony Torralba
0f18c0227b Kotlin: Support apply 2023-07-10 16:15:27 +02:00
Max Schaefer
63c45a0da3 Add another example of when and how to use shell-quote. 2023-07-10 14:02:17 +01:00
Mathias Vorreiter Pedersen
3fe58d97bd C++: Accept test changes. 2023-07-10 13:53:04 +01:00
Mathias Vorreiter Pedersen
ae8ecc9076 C++: Add a final configuration to preserve call contexts between configuration transitions. 2023-07-10 13:52:32 +01:00
Mathias Vorreiter Pedersen
055aea6e1a C++: Add FP caused by missing call context. 2023-07-10 13:52:30 +01:00
Geoffrey White
ce9c367e90 Swift: Add a .expected file for the consistency test failure. 2023-07-10 13:30:26 +01:00
Asger F
8234b8f175 JS: Change note 2023-07-10 13:19:44 +02:00
Asger F
d88f557dbe Merge pull request #13683 from asgerf/rb/api-graph-noobject
Ruby: exclude Object class from API graph
2023-07-10 12:51:15 +02:00
Asger F
27085b1fd0 JS: Fix whitespace 2023-07-10 12:07:13 +02:00
Asger F
fe90146a16 JS: Add test for path.join with spread argument 2023-07-10 12:07:07 +02:00
Asger F
06bc0f6957 JS: Add test for fs/promises 2023-07-10 12:05:03 +02:00
Erik Krogh Kristensen
e5cc5a1ede Merge pull request #13693 from github/dependabot/cargo/ql/regex-1.9.1
Bump regex from 1.9.0 to 1.9.1 in /ql
2023-07-10 10:08:52 +02:00
Alvaro Muñoz
b380853d1a remove already modeled stubs 2023-07-10 09:58:35 +02:00
AlexDenisov
408e7ad572 Merge pull request #13678 from github/alexdenisov/5.9-preparation
Swift: 5.9 preparation
2023-07-10 08:35:17 +02:00
dependabot[bot]
be71898a65 Bump regex from 1.9.0 to 1.9.1 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.0...1.9.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:42:24 +00:00
Maiky
e45a31744f Initial commit 2023-07-09 04:17:35 +02:00
Mathias Vorreiter Pedersen
44f23bfa59 Merge pull request #13690 from github/post-release-prep/codeql-cli-2.14.0
Post-release preparation for codeql-cli-2.14.0
2023-07-07 23:39:38 +01:00
Mingjie Shen
d8e0ffa52d Update cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-07-07 12:25:42 -04:00
github-actions[bot]
13cf054a9d Post-release preparation for codeql-cli-2.14.0 2023-07-07 14:55:41 +00:00
Tamás Vajk
4028a50c4c Merge pull request #13689 from tamasvajk/fix-conflict
C#: Add missing parameter to interface
2023-07-07 16:42:38 +02:00
Rasmus Wriedt Larsen
44c67171f2 Python: Fix default parameter value flow
Somehow the previous fix didn't work :O
2023-07-07 16:17:07 +02:00
Tamas Vajk
65ed244f34 C#: Add missing parameter to interface 2023-07-07 16:10:41 +02:00
Tamás Vajk
9cef290bc3 Merge pull request #13687 from tamasvajk/standalone/nugetconfig
C#: Use `nuget.config` file for `dotnet restore` fallback logic
2023-07-07 15:53:07 +02:00
Jeroen Ketema
c2be2c2738 Add change note for InlineExpectationsTest class deprecation 2023-07-07 15:26:47 +02:00
Michael Nebel
314ca79881 Merge pull request #13667 from michaelnebel/csharp/standalonescan
C#: Use dotnet --list-runtimes to find runtime locations.
2023-07-07 15:15:33 +02:00
Rasmus Wriedt Larsen
a850a481d0 Merge pull request #13676 from RasmusWL/aiohttp-ssrf-sink
Python: Relax restriction of flow through `async with`
2023-07-07 14:55:57 +02:00
Tamas Vajk
23f3e44fa1 C#: Use nuget.config file for dotnet restore fallback logic 2023-07-07 14:47:07 +02:00
Rasmus Wriedt Larsen
43b025015d Python: Avoid overlap between AssignmentDefinition and ParameterDefinition 2023-07-07 14:26:28 +02:00
Asger F
b14cac6b28 Merge pull request #12689 from asgerf/rb/perf-diagnostics
Ruby: performance diagnostics query
2023-07-07 14:25:56 +02:00
Rasmus Wriedt Larsen
4e8a1144f2 Python: Remove explicit jumpStep for default parameter values
tests added in https://github.com/github/codeql/pull/5238
functionality added in https://github.com/github/codeql/pull/6640
2023-07-07 14:24:51 +02:00
Asger F
965ca169e5 JS: Recognise fs/promises 2023-07-07 14:14:49 +02:00
Asger F
d49359a95c JS: Add step through spread arg to path.join() 2023-07-07 14:10:50 +02:00
Michael Nebel
e4aaa43c43 C#: Also support alpha, beta, rc candidates. 2023-07-07 14:06:11 +02:00
Mathias Vorreiter Pedersen
1af60aa9d4 Merge pull request #13684 from github/release-prep/2.14.0
Release preparation for version 2.14.0
2023-07-07 12:30:09 +01:00
Michael Nebel
f065ba9aa1 C#: Add unit tests for runtime version fetching. 2023-07-07 13:21:02 +02:00
Michael Nebel
4270425f14 C#: Cater for preview versions. 2023-07-07 13:16:35 +02:00
Michael Nebel
bffdbbcf95 C#: Address review comments. 2023-07-07 13:16:34 +02:00
Mathias Vorreiter Pedersen
a826c8327a Merge pull request #13682 from jketema/ptr-comp
C++: Support pointer addition and subtraction in the IRGuards library
2023-07-07 11:32:43 +01:00
Rasmus Wriedt Larsen
4920557c36 Merge pull request #13670 from jorgectf/seclab/xxe-sanitizer
Python: Add `markupsafe` as XXE sanitizer
2023-07-07 12:30:26 +02:00
Rasmus Wriedt Larsen
70994b9c57 Python: Accept points-to .expected changes
They look pretty safe to me, but haven't given them a whole lot of
thought.
2023-07-07 12:14:19 +02:00
Rasmus Wriedt Larsen
c5e8e232e5 Python: Fix dataflow consistencies for default parameter values 2023-07-07 11:55:07 +02:00
Rasmus Wriedt Larsen
6f3cb67050 Python: Model parameter with default value as DefinitionNode 2023-07-07 11:54:50 +02:00
Rasmus Wriedt Larsen
64a86e8fd7 Python: Update inline expectations 2023-07-07 11:32:05 +02:00
Jeroen Ketema
2c2903d58d C++: Add change note 2023-07-07 11:27:46 +02:00
Jeroen Ketema
f60f80fea9 Update swift/ql/lib/change-notes/released/0.2.0.md 2023-07-07 11:06:07 +02:00
Rasmus Wriedt Larsen
cfd2d09a61 Python: Add test for DefinitionNode default parameter value 2023-07-07 11:00:16 +02:00
Mathias Vorreiter Pedersen
1064efa8b3 Update python/ql/lib/change-notes/released/0.10.0.md 2023-07-07 09:25:03 +01:00
Mathias Vorreiter Pedersen
cc6ac812af Update swift/ql/lib/CHANGELOG.md 2023-07-07 09:24:56 +01:00
Mathias Vorreiter Pedersen
82ff045315 Update python/ql/lib/CHANGELOG.md 2023-07-07 09:24:50 +01:00
github-actions[bot]
6484ee106e Release preparation for version 2.14.0 2023-07-07 08:22:14 +00:00
Asger F
d8604ff390 Ruby: exclude Object class from API graph 2023-07-07 09:49:21 +02:00
Asger F
86b5f0adc7 Revert "Merge pull request #13620 from github/revert-13496-rb/tracking-on-demand"
This reverts commit 133de56ac2, reversing
changes made to 28a8e48351.
2023-07-07 09:42:34 +02:00
Mingjie Shen
4b4c0cd563 C++: add testcases for UninitializedLocal.ql 2023-07-06 20:07:58 -04:00
Mingjie Shen
9218afedbe C++: exclude uninitialized uses that are cast to void
This eliminates FPs caused by casting a variable explicitly to
void type. Developers use this cast to suppress compiler warnings
on unused variables, e.g.
   (void) x;
2023-07-06 17:43:42 -04:00
Dave Bartolomeo
139585fe5c Merge pull request #13681 from github/dbartol/mergeback-3.10
Mergeback `rc/3.10` -> `main`
2023-07-06 12:13:17 -04:00
Jeroen Ketema
572aa1330d Merge pull request #13680 from jketema/product-default
C++: Add more default predicates to product flow
2023-07-06 18:12:38 +02:00
Rasmus Wriedt Larsen
bea07002d3 Python: Expand captured-variable test with default param 2023-07-06 17:21:29 +02:00
Jeroen Ketema
8d05d8a4dc C++: Add change note 2023-07-06 17:14:49 +02:00
Taus
f666260cd8 Java: Add meta query for metrics gathering
Exposes the same information as the existing queries through two query
predicates instead. This makes the downstream data gathering a bit more
convenient to implement.
2023-07-06 16:59:15 +02:00
Taus
36c6c7235c Java: Move instance counting logic into utility library 2023-07-06 16:59:15 +02:00
Jeroen Ketema
8bc8ef4dda C++: Support pointer addition and subtraction in the IRGuards library
It seems this was something supported by the AST Guards library
2023-07-06 16:54:44 +02:00
Dave Bartolomeo
9631e9f2f1 Bump minor version numbers post-GHES 2023-07-06 10:10:01 -04:00
Jeroen Ketema
fa2ee26379 C++: Add more default predicates to product flow 2023-07-06 16:06:36 +02:00
Dave Bartolomeo
2bb9adfbf1 Merge remote-tracking branch 'origin/main' into dbartol/mergeback-3.10 2023-07-06 10:00:46 -04:00
Erik Krogh Kristensen
b2a60bf3d1 Merge pull request #13642 from erik-krogh/san-script
JS/RB: Fix FP in incomplete-multi-character-sanitization
2023-07-06 15:38:39 +02:00
Geoffrey White
b010de3cb0 Swift: Change note. 2023-07-06 14:06:17 +01:00
Rasmus Wriedt Larsen
30cf213372 Python: Add change-note 2023-07-06 15:04:49 +02:00
Rasmus Wriedt Larsen
a0dfbfd96f Python: Fix grammar in qldoc
Co-authored-by: Taus <tausbn@github.com>
2023-07-06 15:04:21 +02:00
Mathias Vorreiter Pedersen
83d0dec0fb DataFlow: Sync identical files. 2023-07-06 14:00:00 +01:00
Mathias Vorreiter Pedersen
4cc2771bbf C++: Speed up the big step relation by specializing the 'isUnrachableInCall' predicate. 2023-07-06 13:59:52 +01:00
Geoffrey White
dbb0333f97 Swift: Add a test case confirming a model works outside of closures. 2023-07-06 13:59:49 +01:00
Asger F
59c72836d3 Ruby: fix typo 2023-07-06 14:57:24 +02:00
Asger F
db58d32f7a Ruby: Add a query ID 2023-07-06 14:57:24 +02:00
Asger F
d123e5ba63 Ruby: add performance diagnostic query 2023-07-06 14:57:24 +02:00
Geoffrey White
507cf116e2 Swift: Add a test case for return values from closures. 2023-07-06 13:27:13 +01:00
Geoffrey White
8875487109 Swift: Expand the URL taint models. 2023-07-06 13:27:13 +01:00
Alex Denisov
c517fc6c6f Swift: 5.9 preparation 2023-07-06 14:02:37 +02:00
Max Schaefer
1d3e3440f2 Add example of manual sanitisation. 2023-07-06 12:54:30 +01:00
Max Schaefer
240e0799b0 Fix spurious character in code example. 2023-07-06 12:54:03 +01:00
Max Schaefer
83a854c3ff Update javascript/ql/src/Security/CWE-078/IndirectCommandInjection.qhelp
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-07-06 12:47:06 +01:00
Michael Nebel
6a87755ff1 C#: Use dotnet --list-runtimes to find runtime locations. 2023-07-06 13:27:22 +02:00
Max Schaefer
6fb41adc61 Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-07-06 12:02:44 +01:00
Mathias Vorreiter Pedersen
bb521d7c75 Merge pull request #13665 from MathiasVP/fix-join-in-isUse
C++: Fix join in `isUse`
2023-07-06 11:09:38 +01:00
Rasmus Wriedt Larsen
1f93e5b58d Python: Relax restriction of flow through async with 2023-07-06 11:51:58 +02:00
Rasmus Wriedt Larsen
43af8d7ac5 Python: Fix test to use async with
It doesn't work if just using plain `with`
2023-07-06 11:34:05 +02:00
Rasmus Wriedt Larsen
79039dc7b8 Python: Wrap aiohttp client request in async def
And I added `await` before all the `resp` assignments
2023-07-06 11:29:14 +02:00
Tamás Vajk
14caaf119c Merge pull request #13658 from tamasvajk/cs/standalone/restore-impr
C#: Improve dotnet restore success rate in standalone extraction
2023-07-06 10:10:05 +02:00
Erik Krogh Kristensen
fab231c284 Merge pull request #13674 from github/dependabot/cargo/ql/regex-1.9.0
Bump regex from 1.8.4 to 1.9.0 in /ql
2023-07-06 08:55:27 +02:00
dependabot[bot]
562270709c Bump regex from 1.8.4 to 1.9.0 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.4...1.9.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 03:24:52 +00:00
Maiky
a3c58c66e9 Using DataFlow::ConfigSig instead of TaintTracking::Configuration 2023-07-06 03:14:49 +02:00
Maiky
25814f76b9 Apply suggested changes 2023-07-06 02:20:42 +02:00
Owen Mansel-Chan
972aacc5da Accept test changes due to new paramater nodes 2023-07-05 22:25:47 +01:00
Owen Mansel-Chan
af5558a397 Add ParameterNodes for unused parameters 2023-07-05 22:25:44 +01:00
Owen Mansel-Chan
12723f5a7d Add change note 2023-07-05 22:10:54 +01:00
jorgectf
c82ab2b2ab Add markupsafe as XXE sanitizer
Co-authored-by: Kevin Stubbings <Kwstubbs@users.noreply.github.com>
2023-07-05 20:23:20 +02:00
Mathias Vorreiter Pedersen
3bbe95452a Merge branch 'main' into fix-join-in-isUse 2023-07-05 17:51:47 +01:00
Geoffrey White
45d32c3933 Swift: I'm not convinced these SPURIOUS tags are true and useful. 2023-07-05 17:50:48 +01:00
Joe Farebrother
c10a66809d Merge pull request #13094 from joefarebrother/csharp-missing-access-control
C#: Add query for missing function level access control
2023-07-05 17:40:59 +01:00
AlexDenisov
dbffe54b28 Merge pull request #13657 from github/alexdenisov/update-supported-swift-version
Docs: update supported Swift versions
2023-07-05 18:14:13 +02:00
Maiky
08c54767f2 Correct Ldap Unauth Bind Sink 2023-07-05 17:56:49 +02:00
Philip Ginsbach
2ec5e72e9b Merge pull request #13633 from github/ginsbach/SpecifyExtendsFinal
document final extensions in the language specification
2023-07-05 16:43:06 +01:00
Geoffrey White
aeb5199cd9 Swift: Expand the URL taint flow test. 2023-07-05 16:36:35 +01:00
Alex Ford
08784d24b4 Ruby: rack - add tests for env['QUERY_STRING'] 2023-07-05 15:49:00 +01:00
Alex Ford
ec2c9f20f6 Ruby: rack - env['QUERY_STRING'] changenote 2023-07-05 15:46:56 +01:00
Joe Farebrother
a53bf4ddd7 Apply doc review suggestions 2023-07-05 15:37:48 +01:00
Mathias Vorreiter Pedersen
93f1a3bdb9 C++: Fix join in 'isUse'. 2023-07-05 15:24:40 +01:00
Alex Ford
2b0b2855e1 Ruby: rack - Rack::Response changenote 2023-07-05 15:15:34 +01:00
Mathias Vorreiter Pedersen
b651c02dd9 Merge pull request #13653 from rdmarsh2/rdmarsh2/cpp/constant-array-overflow-tests
C++: more constant-array-overflow tests
2023-07-05 15:06:11 +01:00
Jeroen Ketema
dc6fd8fd7f Merge pull request #13666 from jketema/ir-test
C++: Add IR tests that cause regressions after extractor frontend update
2023-07-05 15:00:13 +02:00
Mathias Vorreiter Pedersen
d24a05a1b9 Merge branch 'main' into rdmarsh2/cpp/constant-array-overflow-tests 2023-07-05 13:49:17 +01:00
Mathias Vorreiter Pedersen
f714de0040 Merge pull request #13610 from MathiasVP/promote-overrun-write-again
C++: Move `cpp/overrun-write` back to `medium` precision
2023-07-05 13:39:12 +01:00
Tamas Vajk
d0b8b683af Adjust error handling when dotnet --info is called 2023-07-05 14:26:00 +02:00
Jeroen Ketema
7bb77abac7 C++: Add IR tests that cause regressions after extractor frontend update 2023-07-05 14:01:11 +02:00
Alex Ford
df62cf8a5a qlformat 2023-07-05 12:19:57 +01:00
Alex Ford
082f26bcb1 Ruby: update TaintStep.ql output 2023-07-05 12:19:55 +01:00
Alex Ford
9a263e12ec Ruby: rack - add some qldoc 2023-07-05 12:18:52 +01:00
Alex Ford
bf25b07c17 Ruby: rack - request input tests 2023-07-05 12:18:52 +01:00
Alex Ford
175d524146 Ruby: rack - add Rack#Utils.parse_query summary 2023-07-05 12:18:52 +01:00
Alex Ford
cc6f6418f5 Ruby: rack - start modelling request inputs 2023-07-05 12:18:52 +01:00
Mathias Vorreiter Pedersen
60c0226dce Update cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/constant-size/test.cpp
Co-authored-by: Calum Grant <42069085+calumgrant@users.noreply.github.com>
2023-07-05 12:03:47 +01:00
Max Schaefer
f89992eb16 Address more review feedback. 2023-07-05 12:02:11 +01:00
Alex Ford
9b2cd768e1 Ruby: rack - add env['QUERY_STRING'] as an http request input 2023-07-05 11:59:18 +01:00
Alex Ford
b6912decc1 Merge pull request #13483 from alexrford/rb/rack-extend-app-and-resp
Ruby: rack - model more responses and app types
2023-07-05 11:58:01 +01:00
Tamás Vajk
9eae9464c9 Merge pull request #13659 from tamasvajk/standalone-minor-fixes
C#: Minor fixes in standalone extraction
2023-07-05 12:22:16 +02:00
Max Schaefer
921d8de8dc Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-07-05 11:19:30 +01:00
Mathias Vorreiter Pedersen
5ea929dbdb Merge pull request #13662 from geoffw0/swapmodel
Swift: Add dataflow model for 'swap'
2023-07-05 09:44:51 +01:00
Geoffrey White
c1c605ebac Swift: Change note. 2023-07-04 17:42:40 +01:00
Geoffrey White
df816268cb Swift: Model swap. 2023-07-04 17:37:49 +01:00
Max Schaefer
5fb6b5810f Clarify that splitting arguments on space is not safe. 2023-07-04 15:58:37 +01:00
Max Schaefer
74af0b1f05 Improve command-injection example and provide a fixed version. 2023-07-04 15:58:37 +01:00
Geoffrey White
155122509c Swift: Add a dataflow test for swap. 2023-07-04 15:21:41 +01:00
Geoffrey White
2870bc2ee0 Swift: Use US spelling. 2023-07-04 13:35:26 +01:00
Taus
97610d2cac Java: Add query for counting sink model instances
Also adds a more sensible ordering to the existing queries.
2023-07-04 14:24:52 +02:00
Geoffrey White
6f3dba5f98 Swift: Tweak qhelp and example. 2023-07-04 13:21:51 +01:00
Tamas Vajk
9b2fd8df9f Add todo comment 2023-07-04 14:03:04 +02:00
Tamas Vajk
ffc09c44c2 Minor fixes in standalone extraction 2023-07-04 13:54:23 +02:00
Tamas Vajk
ef0e102cd7 Retrieve package IDs from files and restore the not yet restored ones
Read all files in the repo and look for `PackageReference` XML elements
to extract the package IDs, then restore the packages that are not yet
restored. This change improves the percentage of found assemblies on the
Powershell repo from 95% to 97% compared to a traced extraction. Also,
it increases the number of assemblied only referenced in the standalone
extraction from 79 to 134.
2023-07-04 13:52:12 +02:00
Tamas Vajk
cd6419503f Execute dotnet restore on all projects in standalone
Previously, we only did this for the solution files in the repository, but
there might be projects that are not added to any solution. This change
improves the percentage of found assemblies on the Powershell repo from
81% to 95%.
2023-07-04 13:52:12 +02:00
Tamas Vajk
728f3bce2d Refactor dotnet restore command invocation 2023-07-04 13:52:12 +02:00
Tamas Vajk
d2b0c872f5 Code quality improvements 2023-07-04 13:52:12 +02:00
Alex Ford
5fafd9ecc1 Merge branch 'main' into rb/rack-extend-app-and-resp 2023-07-04 11:43:30 +01:00
Geoffrey White
7f9cb16ab1 Swift: Add a test with multiple evaluations. 2023-07-04 11:34:10 +01:00
Geoffrey White
cb4139f173 Swift: Add test cases with sanitized inputs. 2023-07-04 11:19:15 +01:00
Geoffrey White
72f500b501 Swift: Change note. 2023-07-04 10:21:39 +01:00
Tom Hvitved
5f6586600e Merge pull request #13630 from github/post-release-prep/codeql-cli-2.13.5
Post-release preparation for codeql-cli-2.13.5
2023-07-04 10:58:44 +02:00
Alex Denisov
3b2bbcc95c Docs: update supported Swift versions 2023-07-04 10:09:28 +02:00
Michael Nebel
3cde59e409 Merge pull request #13651 from michaelnebel/telemetrytop100
Java/C#: Reduce the amount of telemetry being produced.
2023-07-04 08:33:53 +02:00
Michael Nebel
238f390738 Merge pull request #13452 from michaelnebel/refactorstackprinting
Re-factor printing of summary component stacks.
2023-07-04 08:29:10 +02:00
Taus
b7e4bd290d Java: Use an IPA type instead of a string
While the string representation is useful for quickly modifying queries, it's
a bit clunky when the data needs to be further parsed. Instead, the two queries
now select all of the columns of the sinkmodel separately (which makes it easy
to pull them out of the relevant output later on).
2023-07-03 23:17:55 +02:00
Robert Marsh
1c2c48c74a C++: more constant-array-overflow tests 2023-07-03 16:59:02 -04:00
Geoffrey White
a050de7e15 Swift: Grammar. 2023-07-03 17:11:49 +01:00
Michael Nebel
243c592447 Address review comments. 2023-07-03 17:01:08 +02:00
Michael Nebel
23a119b8c2 Java/C#: Reduce the amount of telemetry being produced. 2023-07-03 16:54:07 +02:00
Chuan-kai Lin
6912f7ed3a Merge pull request #13638 from cklin/remove-pragma-assume-small-delta
Remove pragma[assume_small_delta]
2023-07-03 07:00:36 -07:00
Geoffrey White
6c10b934ea Swift: Add examples as tests. 2023-07-03 13:39:14 +01:00
Geoffrey White
373eb00975 Swift: Add qhelp and examples. 2023-07-03 13:39:13 +01:00
Michael Nebel
b942cd9085 C#: Address review comments. 2023-07-03 14:36:07 +02:00
Michael Nebel
e06bc8fd8d Ruby: Use serialize to for the string representation of ConstantValue. 2023-07-03 14:36:07 +02:00
Michael Nebel
bddd22f522 Sync files and make language specific adjustments. 2023-07-03 14:36:07 +02:00
Michael Nebel
62fc1b641c C#: Adjust the model generator to produce kinds for neutrals. 2023-07-03 14:36:06 +02:00
Michael Nebel
d62a5524f8 Python: Improve AccessPath printing. 2023-07-03 14:36:06 +02:00
Michael Nebel
0665f4f004 Ruby: Update TaintStep expected test output. 2023-07-03 14:36:06 +02:00
Michael Nebel
6aded7b461 Ruby: Improve AccessPath printing. 2023-07-03 14:36:06 +02:00
Michael Nebel
e73d6d5ee4 Go: Update expected test output to reflect the new printing of summary component stacks. 2023-07-03 14:36:06 +02:00
Michael Nebel
c18f4b1604 Sync files and make language specific rename. 2023-07-03 14:36:06 +02:00
Michael Nebel
4ee2d628fe C#: Re-factor printing of summary component stacks. 2023-07-03 14:36:06 +02:00
Geoffrey White
4cdc257a06 Swift: Add more sinks. 2023-07-03 12:34:28 +01:00
Erik Krogh Kristensen
8676516cb9 recursively -> repeatedly
Co-authored-by: Asger F <asgerf@github.com>
2023-07-03 13:17:13 +02:00
Ian Lynagh
d90ddf1b43 Merge pull request #13639 from igfoo/igfoo/revert
Revert "Kotlin: Remove a use of ObsoleteDescriptorBasedAPI"
2023-07-03 11:42:32 +01:00
Geoffrey White
315cae21ce Swift: Tests for regex injection query. 2023-07-03 11:35:55 +01:00
Asger F
4c9501eba5 Merge pull request #13529 from jorgectf/seclab/webix-modeling
JS: Add models for `webix`
2023-07-03 12:03:18 +02:00
Geoffrey White
b41fd52be5 Swift: First version swift/regex-injection query. 2023-07-03 10:37:54 +01:00
Jeroen Ketema
5d855594ba Python: Use correct class in inline expectation test
These were missed earlier, and still referred to the classes from the legacy
interface and not the parameterized module.
2023-07-03 10:23:26 +02:00
Jeroen Ketema
e26336af21 Deprecate the class-based inline expectation test interface 2023-07-03 10:22:56 +02:00
Jeroen Ketema
abe06e5b95 Python: Update remaining inline expectation tests to use the paramterized module 2023-07-03 10:22:35 +02:00
erik-krogh
3e2b8124c9 apply suggestions from review 2023-07-03 10:03:45 +02:00
Philip Ginsbach
cff886177f Update docs/codeql/ql-language-reference/ql-language-specification.rst
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-07-03 08:59:57 +01:00
erik-krogh
bea4162736 delete multi-char note from the incomplete-sanitization qhelp 2023-07-03 09:10:54 +02:00
erik-krogh
a60478ba8a write qhelp for js/incomplete-multi-character-sanitization 2023-07-03 09:07:13 +02:00
Porcupiney Hairs
dc0deb5e49 Go : Improvements to DSN Injection query 2023-07-02 17:38:01 +05:30
erik-krogh
8c871621f1 sync to ruby 2023-07-01 20:33:02 +02:00
erik-krogh
f9eee906cf fix FP by requiring that the regular expression mention on of the chars important in the prefix 2023-07-01 20:30:09 +02:00
erik-krogh
bd400be6ec add FP for incomplete-multi-char-sanitization 2023-07-01 20:28:31 +02:00
Taus
6f24d939f6 Java: Also select query id 2023-07-01 15:04:06 +02:00
Alvaro Muñoz
5788292eb7 use depstubber 2023-06-30 23:13:30 +02:00
Alvaro Muñoz
db33d7f2cf remove vendor/ 2023-06-30 22:38:29 +02:00
amammad
2ba83022c7 delete old qhelp file 2023-07-01 04:49:35 +10:00
Ian Lynagh
fcf003ceb5 Revert "Kotlin: Remove a use of ObsoleteDescriptorBasedAPI"
This reverts commit a50d804ad7.
2023-06-30 19:32:37 +01:00
Chuan-kai Lin
ce464a7d69 Remove pragma[assume_small_delta] 2023-06-30 11:09:29 -07:00
Mathias Vorreiter Pedersen
95ddc01ccb Merge pull request #13502 from rvermeulen/rvermeulen/compare-using-integer-precision
C++: Account for the signedness of the lesser operand in `cpp/comparison-with-wider-type`
2023-06-30 17:44:28 +01:00
Mathew Payne
67160f4663 fix: update stubs and fix import issues 2023-06-30 15:14:56 +01:00
Mathew Payne
2007e81089 fix: update stubs 2023-06-30 14:50:09 +01:00
Mathias Vorreiter Pedersen
32045f87f1 Merge pull request #13635 from MathiasVP/dont-barrier-on-valid-state-config
C++: Revert parts of #13623
2023-06-30 14:33:21 +01:00
Mathew Payne
0b696c962e feat: add stubs for Protobuf and go-micro.api 2023-06-30 14:23:42 +01:00
Taus
dca227389d Java: Add metric queries for counting sinks coming from models
Adds two queries for gathering metrics on the number of alerts (for a selection of queries)
that arise from models with the `ai-generated` provenance.
2023-06-30 15:07:13 +02:00
amammad
931f492df2 cleaning up mistakes 2023-06-30 23:03:29 +10:00
amammad
9fc28d5aba Merge branch 'github:main' into amammad-python-WebAppsConstatntSecretKeys 2023-06-30 22:54:22 +10:00
Philip Ginsbach
c977bd13dd Merge pull request #13631 from github/ginsabch/DocumentExtendsFinal
document final extensions in the language reference
2023-06-30 13:41:52 +01:00
amammad
6f34c3225b Merge branch 'github:main' into amammad-python-WebAppsConstatntSecretKeys 2023-06-30 22:36:45 +10:00
Mathew Payne
75a8ccac8d feat: update go:generate and expected files 2023-06-30 13:30:31 +01:00
Mathew Payne
1084e300b1 fix: update vendor and use depstubber 2023-06-30 13:29:48 +01:00
amammad
a988ccb7d5 Merge branch 'main' of https://github.com/amammad/codeql into amammad-python-WebAppsConstatntSecretKeys 2023-06-30 22:24:08 +10:00
Philip Ginsbach
621eca88e5 Update docs/codeql/ql-language-reference/types.rst
Co-authored-by: Kasper Svendsen <kaspersv@github.com>
2023-06-30 13:17:14 +01:00
amammad
816799c4ba upgrade query to detect redash CVE too 2023-06-30 22:14:50 +10:00
AlexDenisov
634c838b45 Merge pull request #13632 from github/alexdenisov/add-buildifier
Misc: add bazel buildifer pre-commit hook
2023-06-30 13:52:54 +02:00
Mathias Vorreiter Pedersen
518a3729ca C++: Accept test changes. 2023-06-30 12:51:55 +01:00
Mathew Payne
ce2ee8d38e Merge branch 'github:main' into go-micro 2023-06-30 12:50:13 +01:00
Philip Ginsbach
2a8b216b55 update section on class bodies for extends final 2023-06-30 12:49:07 +01:00
Mathew Payne
7331bcb022 feat: update tests to support client service 2023-06-30 12:47:47 +01:00
Mathew Payne
48966d65dd feat: client service support 2023-06-30 12:44:09 +01:00
Philip Ginsbach
fe93ddbaf1 rename OneTwoFinalExtension to distinguish from other example 2023-06-30 12:43:21 +01:00
Philip Ginsbach
0b4b2d0139 document final extensions in the language reference 2023-06-30 12:40:21 +01:00
Philip Ginsbach
9ccbe73750 document final extensions in the language specification 2023-06-30 12:38:45 +01:00
Mathew Payne
62bad6c02f feat: add log injection query to testing GoMicro 2023-06-30 12:26:16 +01:00
Alex Ford
9d36ab9204 Merge pull request #13606 from alexrford/rb/sqlite3-getSql
Ruby: fix sqlite3 `PreparedStatementExecution.getSql()` predicate
2023-06-30 12:18:46 +01:00
Mathew Payne
b3df568550 fix: Update docs and import 2023-06-30 12:08:58 +01:00
Alex Denisov
d744b218f6 Misc: add bazel buildifer pre-commit hook 2023-06-30 13:07:04 +02:00
Mathias Vorreiter Pedersen
42356a899a Merge pull request #13603 from MathiasVP/implement-is-unreachable-in-call-2 2023-06-30 12:00:15 +01:00
Tamás Vajk
4e4c5f858e Merge pull request #13619 from tamasvajk/remove-rename-standalone
C#: Remove the renaming of `Directory.Build.props` from standalone extraction
2023-06-30 12:24:05 +02:00
Mathew Payne
5178df0b4a feat: add missing docs 2023-06-30 11:13:35 +01:00
Mathias Vorreiter Pedersen
a4d03371e5 Update cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-30 11:10:15 +01:00
Owen Mansel-Chan
5864bdc1af Modify buildInfo inside function fixGoVendorIssues 2023-06-30 11:02:24 +01:00
Owen Mansel-Chan
6c89c60900 Put DepMode, ModMode and BaseDir into a struct 2023-06-30 11:00:16 +01:00
Alvaro Muñoz
fc527ae7e4 address code review feedback 2023-06-30 11:40:21 +02:00
Owen Mansel-Chan
47e6d3719f Fix absolute path removal on windows 2023-06-30 10:36:05 +01:00
Alvaro Muñoz
a975314679 Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2023-06-30 10:58:00 +02:00
github-actions[bot]
668aaa2dc8 Post-release preparation for codeql-cli-2.13.5 2023-06-30 08:51:48 +00:00
Asger F
133de56ac2 Merge pull request #13620 from github/revert-13496-rb/tracking-on-demand
Revert "Ruby: overhaul API graphs"
2023-06-30 10:41:34 +02:00
Mathias Vorreiter Pedersen
67e3ef7b09 C++: Revert the barrier added in #13623. 2023-06-30 09:39:37 +01:00
Tony Torralba
28a8e48351 Merge pull request #13627 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-30 08:51:02 +02:00
github-actions[bot]
cf83baeead Add changed framework coverage reports 2023-06-30 00:17:47 +00:00
Remco Vermeulen
a6469e4588 Add changenote 2023-06-29 12:38:05 -07:00
Robert Marsh
cf6bdc21d7 Merge pull request #13623 from MathiasVP/speed-up-overrun-write
C++: Speed up `cpp/overrun-write`
2023-06-29 15:35:01 -04:00
Mathew Payne
427a1585ea feat: update change notes and add to go.qll 2023-06-29 18:33:07 +01:00
Mathew Payne
1ba619f3f2 feat: vendor modules 2023-06-29 18:29:07 +01:00
Mathew Payne
08a68b5330 feat: add initial tests for GoMicro 2023-06-29 18:28:45 +01:00
Mathew Payne
14eda73f85 feat: GoMicro test code 2023-06-29 18:28:27 +01:00
Mathew Payne
236e81da45 feat: initial GoMicro modelling 2023-06-29 18:27:58 +01:00
jorgectf
f1f3d8e18a Add dot.jssupport
Co-authored-by: Kevin Stubbings <Kwstubbs@users.noreply.github.com>
2023-06-29 19:17:37 +02:00
Owen Mansel-Chan
8269bffbdb Use filepath.Join more 2023-06-29 16:56:41 +01:00
Owen Mansel-Chan
90b79011a0 Add integration test for single go.mod in root 2023-06-29 16:56:40 +01:00
Owen Mansel-Chan
a1838f48c1 Add test for go files outside of go modules 2023-06-29 16:56:38 +01:00
Owen Mansel-Chan
f1a9f3163c Remove absolute paths from test output 2023-06-29 16:56:36 +01:00
Owen Mansel-Chan
50343b3b56 Add extra integration test and rename some 2023-06-29 16:56:35 +01:00
Owen Mansel-Chan
bbbdc47dd5 Preserve behaviour for nested go.mods when one is in root 2023-06-29 16:56:32 +01:00
Owen Mansel-Chan
ae7adc999c Rename return variable 2023-06-29 16:56:29 +01:00
Owen Mansel-Chan
dce17aa49b Fix package clause in test file 2023-06-29 16:56:27 +01:00
Owen Mansel-Chan
964ca33445 Fix cases where we can't yet use go.mod 2023-06-29 16:56:24 +01:00
Owen Mansel-Chan
7c9e28d291 Update diagnostics.expected for existing integration tests 2023-06-29 16:56:23 +01:00
Owen Mansel-Chan
c766f68b93 Fix bug detecting if go.mod files are nested 2023-06-29 16:56:20 +01:00
Owen Mansel-Chan
1a80ba0821 Name return values of findGoModFiles 2023-06-29 16:56:17 +01:00
Owen Mansel-Chan
a0f470b01a Change bazel check to look in subdirs 2023-06-29 16:56:15 +01:00
Owen Mansel-Chan
193edda2c1 Add non-functional bazel tests
They don't build with bazel. They are only there to check that we emit
the right diagnostic.
2023-06-29 16:56:14 +01:00
Owen Mansel-Chan
a852173e22 Fix behaviour for single non-root go.mod
Also add telemetry so we can prioritise future work on the autobuilder.
2023-06-29 16:56:11 +01:00
Owen Mansel-Chan
e43fd72fc1 Fix log message about Glide 2023-06-29 16:56:09 +01:00
Owen Mansel-Chan
8726b3a00e Change how we deal with singular/plural 2023-06-29 16:56:07 +01:00
Owen Mansel-Chan
6eda207997 Add integration tests 2023-06-29 16:56:06 +01:00
Mathias Vorreiter Pedersen
97916407c2 C++: Accept test changes. 2023-06-29 16:51:08 +01:00
Mathias Vorreiter Pedersen
59d9c6e3f2 C++: Use the pruning stage in the product-flow configuration. 2023-06-29 16:50:57 +01:00
Mathias Vorreiter Pedersen
364a8e729d Documentation: Mention that the old library is now deprecated. 2023-06-29 15:50:55 +01:00
Mathias Vorreiter Pedersen
8d3e845474 C++: Add change note. 2023-06-29 15:32:48 +01:00
Mathias Vorreiter Pedersen
cd2f0ecbc8 C++: Deprecate AST dataflow. 2023-06-29 15:13:36 +01:00
Jorge
e210b0d0a7 Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-29 16:06:34 +02:00
Mathias Vorreiter Pedersen
90336705e1 C++: Accept test changes after merge. 2023-06-29 14:48:17 +01:00
Jeroen Ketema
f8b1dc9f59 Merge pull request #13617 from jketema/pointer-deref-barrier-fps
C++: Add more `cpp/invalid-pointer-deref` FP test cases
2023-06-29 15:48:15 +02:00
Mathias Vorreiter Pedersen
e4126ae6d4 Merge branch 'main' into implement-is-unreachable-in-call-2 2023-06-29 14:46:28 +01:00
Robert Marsh
e428502f4b Merge pull request #13598 from MathiasVP/add-constant-size-array-fp
C++: Add `cpp/constant-array-overflow` FPs
2023-06-29 09:44:04 -04:00
Asger F
5d1a437e9c Revert "Ruby: overhaul API graphs" 2023-06-29 15:39:19 +02:00
Kasper Svendsen
f9afea8c48 Merge pull request #13616 from kaspersv/kaspersv/enable-implicit-this
Enable implicit this warning CI checks
2023-06-29 15:09:09 +02:00
Tamas Vajk
2de356dbfe C#: Remove the renaming of Directory.Build.props from standalone extraction 2023-06-29 15:06:46 +02:00
Jeroen Ketema
2c8d4724d5 C++: Add more cpp/invalid-pointer-deref FP test cases 2023-06-29 14:45:09 +02:00
Kasper Svendsen
dd548945c7 Enable checks for implicit this warnings 2023-06-29 14:25:44 +02:00
Tom Hvitved
7bc549103a Merge pull request #13613 from github/release-prep/2.13.5
Release preparation for version 2.13.5
2023-06-29 14:19:22 +02:00
Tony Torralba
b2e8167407 Merge pull request #13587 from github/koesie10/update-java-external-api-name
Java: Fix external API name for nested types
2023-06-29 13:23:20 +02:00
Tony Torralba
1f4af5fda5 Merge pull request #13605 from jorgectf/jorgectf/javax-portlet-models
Java: Add models for `javax.portlet`
2023-06-29 13:22:46 +02:00
amammad
7a17b99c17 V2 2023-06-29 20:55:51 +10:00
Kasper Svendsen
94e0a986ce Merge pull request #13584 from kaspersv/kaspersv/misc-remaining-implicit-this
Misc: Enable implicit this warnings for remaining packs
2023-06-29 12:41:06 +02:00
Koen Vlaswinkel
6806b8750d Java: Use getSourceDeclaration to handle generic types 2023-06-29 11:49:16 +02:00
Alvaro Muñoz
a26bdda668 Add QLdocs for gqlgen.qll 2023-06-29 11:26:36 +02:00
github-actions[bot]
9d7987f822 Release preparation for version 2.13.5 2023-06-29 09:26:18 +00:00
Paul Hodgkinson
bfbb77a796 Merge branch 'main' into java/experimental/command-injection 2023-06-29 09:51:14 +01:00
aegilops
8dbb0a51c0 Rewrote tests to work 2023-06-29 09:47:03 +01:00
AlexDenisov
9057f3e7cf Merge pull request #13597 from github/alexdenisov/bump-swift-build
Swift: bump Swift build, NFC
2023-06-29 10:44:41 +02:00
Mathias Vorreiter Pedersen
285112f4cd C++: Move 'cpp/overrun-write' back to medium precision. 2023-06-29 08:18:47 +01:00
Tom Hvitved
9a26fc3178 Merge pull request #13573 from hvitved/ruby/inline-late-members
Ruby/Python: Use `inline_late` on member predicates
2023-06-29 09:07:14 +02:00
Mathias Vorreiter Pedersen
76956941ff Merge pull request #13604 from jketema/annotation
C++: Fix test annotation for `cpp/invalid-pointer-deref` test
2023-06-28 17:54:43 +01:00
aegilops
01798f63f8 Switched to new dataflow and added a test (but it doesn't produce results yet) 2023-06-28 17:14:39 +01:00
Alex Ford
ede6b262cd Ruby: fix sqlite3 PreparedStatementExecution.getSql() predicate 2023-06-28 17:09:43 +01:00
Jeroen Ketema
527b908bda C++: Fix test annotation for cpp/invalid-pointer-deref test 2023-06-28 17:54:12 +02:00
jorgectf
9d8ae5039a Add models for javax.portlet 2023-06-28 17:53:56 +02:00
Jeroen Ketema
43a8119091 Merge pull request #13591 from jketema/pointer-deref-barrier
C++: Add barrier to `InvalidPointerToDerefConfig` in `cpp/invalid-pointer-deref`
2023-06-28 17:46:41 +02:00
Ian Lynagh
641f186afc Merge pull request #13600 from igfoo/igfoo/fake_fun
Kotlin: Remove a use of ObsoleteDescriptorBasedAPI
2023-06-28 15:50:27 +01:00
Mathias Vorreiter Pedersen
34abab031b Merge pull request #13596 from MathiasVP/fix-join-in-argumentnode
C++: Fix join in `argumentOf`
2023-06-28 14:57:54 +01:00
Mathias Vorreiter Pedersen
655f1feac0 C++: Accept test changes. 2023-06-28 14:40:50 +01:00
Mathias Vorreiter Pedersen
9e82ce8a13 C++: Implement 'isUnreachableInCall'. 2023-06-28 14:37:35 +01:00
Mathias Vorreiter Pedersen
25be9d48bc C++: Add tests with FPs that need call contexts. 2023-06-28 14:37:04 +01:00
jorgectf
2ac334bf15 Adapt Webix modeling to support HTML use-cases 2023-06-28 15:26:30 +02:00
Alvaro Muñoz
0332c52e77 Update go/ql/lib/semmle/go/frameworks/SQL.qll 2023-06-28 15:20:02 +02:00
Alvaro Muñoz
0043acb8e8 Update go/ql/lib/semmle/go/frameworks/SQL.qll 2023-06-28 15:19:31 +02:00
Alvaro Muñoz
c5c6766960 Remove unnecessary imports 2023-06-28 15:17:48 +02:00
Alvaro Muñoz
5174c734fa Fix tests 2023-06-28 15:16:19 +02:00
Alvaro Muñoz
fe4ddab7e4 Add support for the gqlgen library 2023-06-28 15:05:25 +02:00
Alvaro Muñoz
d2412a0989 remove database 2023-06-28 15:02:10 +02:00
Asger F
f0517028b9 Merge pull request #13496 from asgerf/rb/tracking-on-demand
Ruby: overhaul API graphs
2023-06-28 15:01:37 +02:00
Alvaro Muñoz
03d0000739 Add support for Bun library 2023-06-28 14:59:38 +02:00
Alvaro Muñoz
f3d979be7a Improve go-pg support 2023-06-28 14:49:25 +02:00
Ian Lynagh
a50d804ad7 Kotlin: Remove a use of ObsoleteDescriptorBasedAPI
This isn't supported in Kotlin 2 mode, but removing this code doesn't
affect any tests.
2023-06-28 13:48:43 +01:00
Kasper Svendsen
7c59f5ac18 Merge pull request #13578 from kaspersv/kaspersv/java-remaining-implicit-this
Java: Enable implicit this warnings for remaining packs
2023-06-28 14:27:24 +02:00
Alexandre Boulgakov
30615308b4 Swift: Mangle AssociatedTypeDecl. 2023-06-28 13:09:09 +01:00
Jeroen Ketema
14609a9795 C++: Add barrier to InvalidPointerToDerefConfig in cpp/invalid-pointer-deref 2023-06-28 14:04:45 +02:00
Alexandre Boulgakov
b807d005ec Swift: Add missing #include. 2023-06-28 12:50:01 +01:00
Asger F
39789d4050 Ruby: use a valid change note category 2023-06-28 13:42:05 +02:00
Asger F
2f1223426a Ruby: add change note 2023-06-28 13:36:47 +02:00
Alexandre Boulgakov
4ed90d5234 Swift: Remove AbstractTypeParamDecl mangling.
AbstractTypeParamDecl itself was removed in 36b3f0ee12.
2023-06-28 12:34:01 +01:00
Alexandre Boulgakov
81372d0b63 Merge commit '36d86787e6fbbb158a148f93eb63f829134fd6b1' into alexdenisov+redsun82/tuple-mangling 2023-06-28 12:21:59 +01:00
Asger F
7af3d226c9 Ruby: simplify Twirp model 2023-06-28 13:20:59 +02:00
Asger F
129e6349f7 Ruby: expand Twirp test 2023-06-28 13:20:59 +02:00
Asger F
423da55fb9 Ruby: use asCallable() in Twirp model 2023-06-28 13:20:59 +02:00
Asger F
dd868437ce Ruby: add asCallable() 2023-06-28 13:20:59 +02:00
Asger F
6feda75dd6 Ruby: preserve comment in SQLite3 2023-06-28 13:20:58 +02:00
Asger F
f171c21002 Ruby: remove forwarder for getADescendentModule 2023-06-28 13:20:58 +02:00
Asger F
67032b5d73 Ruby: add test for self.class call 2023-06-28 13:20:58 +02:00
Asger F
174ab25867 Ruby: address some review comments 2023-06-28 13:20:58 +02:00
Mathias Vorreiter Pedersen
ae098822c3 C++: Add 'cpp/constant-array-overflow' FP. 2023-06-28 11:22:53 +01:00
Alex Denisov
dbdd654465 Swift: bump Swift build, NFC 2023-06-28 12:11:17 +02:00
Koen Vlaswinkel
36d86787e6 Merge pull request #13588 from github/koesie10/update-csharp-external-api-name
C#: Fix external API name for nested types
2023-06-28 11:14:29 +02:00
Mathias Vorreiter Pedersen
78f2fe8d5e C++: Fix join in 'argumentOf'.
Before:
```
[2023-06-28 09:29:51] Evaluated non-recursive predicate DataFlowImplCommon#59e7a193::Cached::argumentNode#3#fff@8606bd35 in 1945ms (size: 1366058).
Evaluated relational algebra for predicate DataFlowImplCommon#59e7a193::Cached::argumentNode#3#fff@8606bd35 with tuple counts:
      764401   ~0%    {3} r1 = JOIN DataFlowPrivate#fbdd7bd7::DirectPosition#ff_10#join_rhs WITH Instruction#577b6a83::CallInstruction::getArgumentOperand#fff_102#join_rhs ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Rhs.1
      764401   ~0%    {3} r2 = JOIN r1 WITH DataFlowPrivate#fbdd7bd7::PrimaryArgumentNode#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1

          65   ~0%    {3} r3 = SCAN DataFlowPrivate#fbdd7bd7::IndirectionPosition#fff OUTPUT In.2, In.0, In.1
  180518864   ~0%    {3} r4 = JOIN r3 WITH project#DataFlowPrivate#fbdd7bd7::IndirectOperands::IndirectOperand::hasOperandAndIndirectionIndex#2#dispred#fff#3_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1
      601657   ~1%    {2} r5 = JOIN r4 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#2 ON FIRST 2 OUTPUT Lhs.0, Lhs.2
      601657   ~0%    {3} r6 = JOIN r5 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#3 ON FIRST 1 OUTPUT Lhs.0, Rhs.1, Lhs.1

    1366058   ~0%    {3} r7 = r2 UNION r6
                      return r7
```

After:
```
Tuple counts for DataFlowImplCommon#59e7a193::Cached::argumentNode#3#fff/3@d2b091vc after 1.1s:
  764381  ~2%     {3} r1 = JOIN DataFlowPrivate#fbdd7bd7::DirectPosition#ff_10#join_rhs WITH Instruction#577b6a83::CallInstruction::getArgumentOperand#fff_102#join_rhs ON FIRST 1 OUTPUT Rhs.2, Lhs.1 'pos', Rhs.1 'call'
  764381  ~0%     {3} r2 = JOIN r1 WITH DataFlowPrivate#fbdd7bd7::PrimaryArgumentNode#fff_20#join_rhs ON FIRST 1 OUTPUT Rhs.1 'n', Lhs.2 'call', Lhs.1 'pos'

  65      ~3%     {3} r3 = SCAN num#DataFlowPrivate#fbdd7bd7::TIndirectionPosition#fff OUTPUT In.0, In.2 'pos', In.1
  1798930 ~1%     {3} r4 = JOIN r3 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#2_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'n', Lhs.2, Lhs.1 'pos'
  601641  ~1%     {2} r5 = JOIN r4 WITH project#DataFlowPrivate#fbdd7bd7::IndirectOperands::IndirectOperand::hasOperandAndIndirectionIndex#2#dispred#fff#3 ON FIRST 2 OUTPUT Lhs.0 'n', Lhs.2 'pos'
  601641  ~0%     {3} r6 = JOIN r5 WITH project#DataFlowUtil#47741e1f::SideEffectOperandNode#fff#3 ON FIRST 1 OUTPUT Lhs.0 'n', Rhs.1 'call', Lhs.1 'pos'

  1366022 ~1%     {3} r7 = r2 UNION r6
                  return r7
```
2023-06-28 10:13:03 +01:00
Mathias Vorreiter Pedersen
2c99009c1a Merge pull request #13117 from rdmarsh2/rdmarsh2/cpp/cobo-handle-array-casts
C++: handle cast arrays properly in off-by-one query
2023-06-28 09:25:12 +01:00
Koen Vlaswinkel
51af03d2bc Java: Add tests for names of nested classes 2023-06-28 09:52:25 +02:00
Koen Vlaswinkel
e4d2c51ff8 C#: Add tests for names of nested classes 2023-06-28 09:40:31 +02:00
Tony Torralba
249f9f863d Merge pull request #13594 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-28 09:39:18 +02:00
AlexDenisov
9094f9aa9c Merge pull request #13567 from github/alexdenisov/extend-observer
Swift: extend frontend observer
2023-06-28 09:35:27 +02:00
AlexDenisov
113408e878 Merge pull request #13569 from github/redsun82/swift-fix-inclusion-of-sil
Swift: fix all upstream headers for C++20
2023-06-28 09:35:08 +02:00
Tom Hvitved
fa92e79bea Ruby/Python: Use inline_late on member predicates 2023-06-28 09:04:06 +02:00
Mathias Vorreiter Pedersen
368846621e Merge pull request #13592 from rdmarsh2/rdmarsh2/range-analysis-back-edge-2
C++: fix irreducible control flow logic
2023-06-28 07:49:49 +01:00
Paolo Tranquilli
6352399645 Swift: fix all upstream headers for C++20 2023-06-28 08:25:29 +02:00
github-actions[bot]
0749af79d7 Add changed framework coverage reports 2023-06-28 00:18:40 +00:00
Robert Marsh
e90153fc47 C++: fix irreducible control flow logic 2023-06-27 16:52:45 -04:00
Alex Denisov
ea5eda0f22 Swift: adjust test expectations 2023-06-27 17:21:56 +02:00
Alex Denisov
af41dabc14 Swift: extend the frontend observer 2023-06-27 16:57:44 +02:00
Kasper Svendsen
656b4fc1aa Merge pull request #13574 from kaspersv/kaspersv/cpp-remaining-implicit-this
CPP: Enable implicit this warnings for remaining packs
2023-06-27 16:56:28 +02:00
Rasmus Wriedt Larsen
91b8ef6540 Merge pull request #13580 from kaspersv/kaspersv/python-remaining-implicit-this
Python: Enable implicit this warnings for remaining packs
2023-06-27 16:42:03 +02:00
Ian Lynagh
4adecf0d15 Merge pull request #13586 from igfoo/igfoo/diag-limit
Kotlin: Remove an out-of-date comment
2023-06-27 15:41:47 +01:00
Ian Lynagh
b0d2ca5df4 Merge pull request #13568 from igfoo/igfoo/android_lint
Java: Tweak some android tests
2023-06-27 15:41:37 +01:00
Ian Lynagh
4415c364ac Merge pull request #13542 from igfoo/igfoo/modality_final
Kotlin: Remove an expected-no-getter exception
2023-06-27 15:41:27 +01:00
Koen Vlaswinkel
6812389fc8 C#: Fix external API name for nested types
This fixes the name of reported external APIs for nested types. The
`getDeclaringType().getUnboundDeclaration()`'s `toString()` method
reports the name of the type, but not the name of the declaring type.
This results in missing information in the
`UnsupportedExternalAPIs.ql` query.

For example, previously it would report:

```
GitHub.Nested#NestedClass.Test()
```

However, the `NestedClass` class does not exist in the namespace and is
only a nested type within `MyFirstClass`. The correct name should be:

```
GitHub.Nested#MyFirstClass+NestedClass.Test()
```

This name also matches the format of MaD.
2023-06-27 16:31:06 +02:00
Koen Vlaswinkel
fcb2f1082c Java: Fix external API name for nested types
This fixes the name of reported external APIs for nested types.
The `toString()` method of `getSourceDeclaration()` would report the
name of a type, but not the name of the enclosing type. This results
in missing information in the `UnsupportedExternalAPIs.ql` query.

For example, previously it would report:

```
org.zapodot.junit.db.Builder#build()
```

However, the `Builder` class does not exist in the package and is only
a nested type within `EmbeddedDatabaseRule`. The correct name should be:

```
org.zapodot.junit.db.EmbeddedDatabaseRule$Builder#build()
```

This name also matches the format of MaD.
2023-06-27 15:23:55 +02:00
Kasper Svendsen
085c85fe32 Merge pull request #13564 from kaspersv/kaspersv/ci-warn-on-implicit-this
Add workflow to check for warnOnImplicitThis
2023-06-27 15:15:23 +02:00
Jeroen Ketema
bf771a1537 Merge pull request #13563 from jketema/clears-content
C++: Implement `clearsContent` for IR dataflow
2023-06-27 15:13:47 +02:00
Kasper Svendsen
d1979197c7 CPP: Enable implicit this warnings for remaining packs 2023-06-27 14:44:24 +02:00
Ian Lynagh
d588f52262 Kotlin: Remove an out-of-date comment 2023-06-27 13:33:52 +01:00
Tony Torralba
a7c2a25cac Merge pull request #12879 from atorralba/atorralba/java/command-injection-mad-sinks
Java: Convert all command injection sinks to MaD format
2023-06-27 14:06:45 +02:00
Tony Torralba
6e20bd04e9 Merge pull request #13539 from atorralba/atorralba/java/url-to-string-model
Java: Add URL.toString summary
2023-06-27 14:05:47 +02:00
Mathias Vorreiter Pedersen
51176bdff3 C++: Add Geoffrey's testcases. 2023-06-27 12:59:22 +01:00
Kasper Svendsen
62e2bea757 Merge pull request #13577 from kaspersv/kaspersv/go-remaining-implicit-this
Go: Enable implicit this warnings for remaining packs
2023-06-27 13:51:05 +02:00
Kasper Svendsen
b4ef243733 Add workflow to check for warnOnImplicitThis 2023-06-27 13:48:04 +02:00
Jeroen Ketema
b1ae3a0a7b Merge remote-tracking branch 'upstream/main' into clears-content 2023-06-27 13:45:33 +02:00
Tom Hvitved
df61eaf59f Merge pull request #13565 from hvitved/csharp/gvn-blowup
C#: Avoid combinatorial explosions in GVN construction for types
2023-06-27 13:31:36 +02:00
Erik Krogh Kristensen
e9102bbdf2 Merge pull request #13579 from kaspersv/kaspersv/javascript-remaining-implicit-this
Javascript: Enable implicit this warnings for remaining packs
2023-06-27 13:09:55 +02:00
Mathias Vorreiter Pedersen
f2cbbab419 Merge branch 'main' into rdmarsh2/cpp/cobo-handle-array-casts 2023-06-27 12:03:42 +01:00
Kasper Svendsen
9202708719 Misc: Enable implicit this warnings for remaining packs 2023-06-27 13:03:11 +02:00
Mathias Vorreiter Pedersen
8cf66d22f0 Merge pull request #13583 from kaspersv/kaspersv/swift-remaining-implicit-this
Swift: Enable implicit this warnings for remaining packs
2023-06-27 11:57:57 +01:00
Mathias Vorreiter Pedersen
985650cb04 Merge pull request #13559 from MathiasVP/add-barrier-to-invalid-deref-query
C++: Add barriers to `cpp/invalid-pointer-deref`
2023-06-27 11:56:58 +01:00
Kasper Svendsen
29f5c78a60 Merge pull request #13581 from kaspersv/kaspersv/ql-remaining-implicit-this
QL: Enable implicit this warnings for remaining packs
2023-06-27 12:35:19 +02:00
Kasper Svendsen
c77c455546 Merge pull request #13582 from kaspersv/kaspersv/ruby-remaining-implicit-this
Ruby: Enable implicit this warnings for remaining packs
2023-06-27 12:33:16 +02:00
Kasper Svendsen
1aea7d0c79 Merge pull request #13575 from kaspersv/kaspersv/csharp-remaining-implicit-this
C#: Enable implicit this warnings for remaining packs
2023-06-27 12:11:23 +02:00
Kasper Svendsen
8ce09438a0 Swift: Enable implicit this warnings for remaining packs 2023-06-27 12:09:27 +02:00
Kasper Svendsen
41c071ff74 Ruby: Enable implicit this warnings for remaining packs 2023-06-27 12:07:05 +02:00
Kasper Svendsen
c9cf0744c0 QL: Enable implicit this warnings for remaining packs 2023-06-27 12:04:29 +02:00
Kasper Svendsen
f41276cb7f Python: Enable implicit this warnings for remaining packs 2023-06-27 12:00:13 +02:00
Jeroen Ketema
2628552ef4 C++: Fix join-order problem in clearsContent 2023-06-27 11:59:26 +02:00
Kasper Svendsen
ab5e241310 Javascript: Enable implicit this warnings for remaining packs 2023-06-27 11:56:29 +02:00
Kasper Svendsen
7fcdefbe70 Java: Enable implicit this warnings for remaining packs 2023-06-27 11:54:20 +02:00
Kasper Svendsen
ab797065ab Go: Enable implicit this warnings for remaining packs 2023-06-27 11:49:37 +02:00
Kasper Svendsen
6869f03cca C#: Enable implicit this warnings for remaining packs 2023-06-27 11:27:16 +02:00
Tony Torralba
3c3b53001f Merge pull request #13550 from jorgectf/jorgectf/lang2-models
Java: Add models for `org.apache.commons.lang`
2023-06-27 11:20:59 +02:00
Kasper Svendsen
0f3128d18c Merge pull request #13572 from kaspersv/kaspersv/deprecated-imports-docs
Document deprecated imports
2023-06-27 10:49:35 +02:00
Mathias Vorreiter Pedersen
06bc460868 Merge pull request #13528 from rdmarsh2/rdmarsh2/cpp/range-analysis-back-edge
C++: fix range analysis back edge detection for irreducible CFGs
2023-06-27 09:14:44 +01:00
Tom Hvitved
160771e673 C#: Avoid combinatorial explosions in GVN construction for types 2023-06-27 10:08:53 +02:00
Kasper Svendsen
d42f6a08be Document deprecated imports 2023-06-27 10:08:36 +02:00
Tony Torralba
a17c812118 Merge pull request #13358 from jorgectf/jorgectf/deserialization-lookahead
Java: Model `SerialKiller`
2023-06-27 09:20:50 +02:00
Tom Hvitved
56a5a576a8 Merge pull request #13536 from hvitved/ql/dead-code-fps
QL: Improve dead-code query
2023-06-27 09:01:59 +02:00
Robert Marsh
dcb349434c C++: fix comment formatting 2023-06-26 15:52:32 -04:00
Robert Marsh
aff4066020 C++: improve irreducible back edge detection 2023-06-26 15:39:09 -04:00
Robert Marsh
757f40c0cb Merge pull request #13116 from rdmarsh2/rdmarsh2/cpp/cobo-array-vars
C++: include stack-allocated arrays in off-by-one query
2023-06-26 15:26:45 -04:00
Mathias Vorreiter Pedersen
ef383a135d C++: Prune the set of interesting pointer-arithmetic instructions by another flow. 2023-06-26 19:09:43 +01:00
Jeroen Ketema
54632cd474 C++: Replace not exists by forex in clearsContent 2023-06-26 20:05:35 +02:00
Joe Farebrother
c419e8d24a Fix test 2023-06-26 18:05:11 +01:00
Joe Farebrother
1d64d1297c Update tests to use stubs 2023-06-26 16:51:07 +01:00
Joe Farebrother
938a996322 Add test case for Authorize attribute 2023-06-26 15:57:57 +01:00
Ian Lynagh
8a43fc81ee Java: Tweak some android tests
They were all failing for me like:

[autobuild] /home/ian/code/dev/target/codeql-java-integration-tests/ql/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/src/main/AndroidManifest.xml:5: Error: Main must extend android.app.Activity [Instantiatable]
[autobuild]         <activity android:name="Main" android:exported="true">
[autobuild]                                 ~~~~
[autobuild]    Explanation for issues of type "Instantiatable":
[autobuild]    Activities, services, broadcast receivers etc. registered in the manifest
[autobuild]    file (or for custom views, in a layout file) must be "instantiatable" by
[autobuild]    the system, which means that the class must be public, it must have an
[autobuild]    empty public constructor, and if it's an inner class, it must be a static
[autobuild]    inner class.

I'm not sure why it works on CI but not locally, but either way this
works around the issue.
2023-06-26 15:52:52 +01:00
Alex Ford
9cf165ac55 Ruby: rack - update a deprecation notice 2023-06-26 15:37:34 +01:00
Alex Ford
8fdc48753c Ruby: rack - replace RackApplication with just the rack RequestHandler 2023-06-26 15:36:37 +01:00
Asger F
f6e244995a Update ruby/ql/lib/codeql/ruby/ApiGraphs.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-26 15:32:11 +02:00
Asger F
b61e823cab Ruby: clarify qldoc for getADescendentModule 2023-06-26 15:31:18 +02:00
Asger F
ef9d910a07 Update ruby/ql/lib/codeql/ruby/ApiGraphs.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-26 15:28:30 +02:00
Rasmus Wriedt Larsen
9c5aff395a Merge pull request #12581 from yoff/python/enable-summaries-from-models
python: enable summaries from model
2023-06-26 14:39:27 +02:00
jorgectf
1e663b8889 Update HeuristicSourceCodeInjection.expected 2023-06-26 13:32:20 +02:00
jorgectf
bb67a9000e Fix WebixTemplateSink 2023-06-26 13:32:00 +02:00
Jorge
5bd044211e Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-26 13:27:23 +02:00
Jeroen Ketema
527b537fee Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-06-26 12:57:43 +02:00
Ian Lynagh
65dee80b36 Merge pull request #13547 from igfoo/igfoo/dead-code
Kotlin: Build: Remove some dead code
2023-06-26 11:50:50 +01:00
Mathias Vorreiter Pedersen
d68b0605cd C++: Use 'arrayTypeCand' in 'isSourceImpl' instead of checking for array size explicitly. 2023-06-26 11:37:35 +01:00
Mathias Vorreiter Pedersen
3b4f2b22d6 C++: Fix Code Scanning errors. 2023-06-26 11:36:56 +01:00
Mathias Vorreiter Pedersen
b87bf46c30 C++: Fix joins. 2023-06-26 11:28:32 +01:00
Jeroen Ketema
c7e5dc2e9e C++: Fix QLDoc issues 2023-06-26 12:18:05 +02:00
Jeroen Ketema
458522a656 C++: Implement clearsContent for IR dataflow 2023-06-26 12:11:03 +02:00
Rasmus Wriedt Larsen
257f9912dd Python: Remove one more unnecessary taint test 2023-06-26 12:00:55 +02:00
Rasmus Wriedt Larsen
6cb03190fa Python: Updates from inline test being parameterized 2023-06-26 11:43:51 +02:00
Rasmus Wriedt Larsen
0121263e03 Merge branch 'main' into python/enable-summaries-from-models 2023-06-26 11:34:12 +02:00
Tony Torralba
55280e523a Update java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll 2023-06-26 11:14:31 +02:00
Tom Hvitved
3c72ac2f9b Merge pull request #13544 from hvitved/csharp/to-string-consistency
C#: Add `toString` functionality consistency queries
2023-06-26 10:50:23 +02:00
Tom Hvitved
e6ca5dff87 Merge pull request #13543 from hvitved/ruby/to-string-constincy-queries
Ruby: Add `toString` functionality consistency queries
2023-06-26 09:38:53 +02:00
Tom Hvitved
c6eff8dbe9 Merge pull request #13545 from hvitved/ruby/reduce-string-pool
Ruby: Reduce string pool pressure by late-inlining `locationRelativePathToString`
2023-06-26 08:57:06 +02:00
amammad
e3e0307db7 V1 2023-06-25 20:36:28 +10:00
Mathias Vorreiter Pedersen
e32f7d84a5 C++: Speed up analysis on 'Samate' by avoiding the 'Variable' column in the dataflow stages of the query. 2023-06-25 00:35:43 +01:00
Mathias Vorreiter Pedersen
e0f5c584b9 C++: Fix Code Scanning error. 2023-06-24 19:38:22 +01:00
Mathias Vorreiter Pedersen
c1077fe75d C++: Accept test changes. 2023-06-24 19:12:03 +01:00
Mathias Vorreiter Pedersen
9d5b8cff2e C++: Add a barrier to the 'cpp/invalid-pointer-deref' query. 2023-06-24 19:12:03 +01:00
Mathias Vorreiter Pedersen
fba753ce61 C++: Add more test cases to 'cpp/invalid-pointer-deref'. 2023-06-24 18:59:25 +01:00
Jorge
08b9a5e2b2 Add missing ; 2023-06-23 23:10:06 +02:00
Robert Marsh
69ee615119 Merge pull request #13515 from MathiasVP/dataflow-fix-for-self-iterators
C++: Dataflow fix for the self-iterators issue
2023-06-23 13:50:23 -04:00
jorgectf
2dc4f23dbb Add models for org.apache.commons.lang 2023-06-23 19:34:21 +02:00
Jorge
7d0b880bf7 Merge branch 'main' into jorgectf/deserialization-lookahead 2023-06-23 18:24:39 +02:00
jorgectf
b6e4ba6f9d Add SerialKiller model 2023-06-23 18:19:43 +02:00
Geoffrey White
922fc3aba7 Swift: Correct qhelp link to example. 2023-06-23 17:10:31 +01:00
Jorge
3c980db93a Format webix.js 2023-06-23 18:08:01 +02:00
Jorge
8ff525933e Merge branch 'main' into seclab/webix-modeling 2023-06-23 18:06:26 +02:00
Joe Farebrother
b2d54842a6 Apply review suggestion
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2023-06-23 17:00:52 +01:00
Geoffrey White
c11ce4ce68 Swift: Add change note. 2023-06-23 16:59:26 +01:00
Geoffrey White
958ae24a61 Swift: Update the qhelp and example. 2023-06-23 16:59:25 +01:00
Geoffrey White
e74eccdd97 Swift: Get the query 'working' (though lots of issues with results right now). 2023-06-23 16:59:25 +01:00
Geoffrey White
38ecfd8233 Swift: Copy the query, qhelp, example from Ruby. 2023-06-23 16:59:25 +01:00
Geoffrey White
df58902674 Swift: Duplicate some of the Regex cases with different constructions. 2023-06-23 16:59:25 +01:00
Geoffrey White
ddd3e88256 Swift: Change note. 2023-06-23 16:49:01 +01:00
Geoffrey White
bf1254fdb7 Swift: Add query tests. 2023-06-23 16:49:01 +01:00
Geoffrey White
d5f4939719 Swift: Add tests for bad tag filter query. 2023-06-23 16:21:10 +01:00
Alex Ford
6008c7bee4 Ruby: rack - change note for response and app recognition improvements 2023-06-23 16:16:15 +01:00
Alex Ford
b67b80ca2a Ruby: rack - rename App as RackApplication 2023-06-23 16:12:23 +01:00
Geoffrey White
1f581525ff Swift: Revise the qhelp. 2023-06-23 16:04:32 +01:00
Geoffrey White
54a8f9e697 Swift: Copy qhelp from Ruby. 2023-06-23 16:04:31 +01:00
Geoffrey White
4a469469c4 Swift: Trivial fixes for the query. 2023-06-23 16:04:31 +01:00
Geoffrey White
a957ce4cdd Swift: Copy query from Ruby. 2023-06-23 16:04:31 +01:00
Geoffrey White
ca71d48e4a Merge pull request #13470 from geoffw0/swiftregex
Swift: Regular expressions library.
2023-06-23 15:51:43 +01:00
Geoffrey White
5cffa59476 Swift: Make the RegexEval interface cleaner. 2023-06-23 14:33:30 +01:00
Geoffrey White
987ca61ef5 Swift: Fix typo in a comment. 2023-06-23 14:14:53 +01:00
Geoffrey White
8f69b2afa8 Swift: Add some test cases aimed at regex parsing correctness. 2023-06-23 14:11:34 +01:00
Ian Lynagh
5da377b46a Kotlin: Build: Remove some dead code 2023-06-23 13:51:35 +01:00
Alex Ford
de6547341f qlformat 2023-06-23 13:36:39 +01:00
Alex Ford
29844e61e4 Ruby: rack - test for response tracking 2023-06-23 13:16:04 +01:00
Alex Ford
4b3d99529a Ruby: rack - rename getResponse as getAResponse 2023-06-23 13:13:07 +01:00
Alex Ford
4f9f41acd5 Ruby: rack - fix qldoc 2023-06-23 13:11:00 +01:00
Tom Hvitved
f28aefad8b Ruby: Reduce string pool preasure by late-inlining locationRelativePathToString
```
[2023-06-23 13:48:23] Evaluated non-recursive predicate Sinatra#e09174a3::Sinatra::locationRelativePathToString#1#ff@683a25ce in 34682ms (size: 8048121).
Evaluated relational algebra for predicate Sinatra#e09174a3::Sinatra::locationRelativePathToString#1#ff@683a25ce with tuple counts:
        8048122  ~0%    {6} r1 = SCAN locations_default OUTPUT In.1, In.0, toString(In.5), toString(In.2), toString(In.3), toString(In.4)
        8048121  ~0%    {2} r2 = JOIN r1 WITH FileSystem#df18ed9a::Make#FileSystem#e91ad87f::Input#::Container::getRelativePath#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, (Rhs.1 ++ "@" ++ Lhs.3 ++ ":" ++ Lhs.4 ++ ":" ++ Lhs.5 ++ ":" ++ Lhs.2)
                        return r2
```
2023-06-23 14:01:16 +02:00
Tom Hvitved
0cb27e7511 C#: Add toString functionality consistency queries 2023-06-23 13:28:11 +02:00
Asger F
0039cb141e Merge branch 'main' into rb/tracking-on-demand 2023-06-23 12:55:54 +02:00
Mathias Vorreiter Pedersen
600c60af8b Merge branch 'main' into rdmarsh2/cpp/cobo-array-vars 2023-06-23 10:54:46 +01:00
yoff
26856a82a6 Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-23 10:15:20 +02:00
Tom Hvitved
79ee5112fc Ruby: Add toString functionality consistency queries 2023-06-23 09:42:03 +02:00
Rasmus Lerchedahl Petersen
86dfc7b66e python: format 2023-06-23 08:18:06 +02:00
Kevin Stubbings
3605269e13 Add webix copy function 2023-06-22 22:16:28 -07:00
Mathias Vorreiter Pedersen
b615e98cc1 Merge pull request #13425 from MathiasVP/fix-more-conflation-in-dataflow 2023-06-22 22:53:34 +01:00
Mathias Vorreiter Pedersen
79fb6a6079 C++: Accept test changes. 2023-06-22 19:34:05 +01:00
Mathias Vorreiter Pedersen
0839c1aad1 C++: Allow self-flow through indirect parameters. 2023-06-22 19:33:18 +01:00
Mathias Vorreiter Pedersen
da54751d85 C++: Add testcase that demonstrate the need for self-flow out of indirect parameters. 2023-06-22 19:33:13 +01:00
Ian Lynagh
0d05f50aaa Kotlin: Remove an expected-no-getter exception
We're not sure why it was necessary.
2023-06-22 18:12:13 +01:00
Geoffrey White
a8aa33510d Shared: QLDoc NfaUtils::Make::State::hasLocationInfo. 2023-06-22 17:19:43 +01:00
Mathias Vorreiter Pedersen
d3bc99a9ee Merge pull request #13533 from MathiasVP/hide-summarized-nodes-from-path-graph
Swift: Hide summarized nodes from path graphs
2023-06-22 16:44:19 +01:00
Tony Torralba
d07e2862f9 Java: Add URL.toString summary
This adds coverage for CVE-2023-35149.
2023-06-22 17:39:30 +02:00
Jami
3fed2798c8 Merge pull request #13093 from GeekMasher/csharp-ext
[CSharp] Additional data extensions for sink models
2023-06-22 10:22:32 -04:00
Geoffrey White
fe71207475 Merge pull request #13537 from geoffw0/regexqldoc
Ruby: Fix some QLDoc errors in ParseRegExp.qll
2023-06-22 14:55:39 +01:00
Geoffrey White
c17de99c86 Swift: Correct QLDoc error. 2023-06-22 13:59:16 +01:00
Geoffrey White
d06f4b9567 Ruby: Correct QLDoc for qualifiedPart. 2023-06-22 13:56:42 +01:00
Geoffrey White
1c1637a886 Ruby: Correct QLDoc for charRange. 2023-06-22 13:56:06 +01:00
Alex Ford
f8140bcad3 Ruby: rack - improve performance of trackRackResponse 2023-06-22 13:45:44 +01:00
Alex Ford
b8f537a437 Ruby: update rack tests 2023-06-22 13:45:44 +01:00
Alex Ford
e8079727ee Ruby: rack - extend rack tests 2023-06-22 13:45:44 +01:00
Alex Ford
4d59181571 Ruby: rack - Rack::Response#finish constructs a valid rack response 2023-06-22 13:45:44 +01:00
Alex Ford
521e65c5bd Ruby: rack - extend rack applications to include instance methods, lambdas, and procs 2023-06-22 13:45:44 +01:00
Alex Ford
7a3b6f107b Ruby: add predicates to DataFlow::ModuleNode to get singleton methods 2023-06-22 13:45:44 +01:00
Alex Ford
24e83165ee Merge pull request #13289 from alexrford/rb/rack-redirect
Ruby: rack - model redirect responses
2023-06-22 13:45:02 +01:00
Mathew Payne
0fcc1cb588 Merge branch 'main' into csharp-ext 2023-06-22 13:30:08 +01:00
Ian Lynagh
7efbd8828b Merge pull request #13526 from igfoo/igfoo/diagwriter
Kotlin: Define DiagnosticTrapWriter, for type safety
2023-06-22 12:39:48 +01:00
Tom Hvitved
104dab4b66 QL: Improve dead-code query 2023-06-22 13:37:42 +02:00
Geoffrey White
e6695e3780 Merge branch 'main' into swiftregex 2023-06-22 12:21:58 +01:00
Geoffrey White
90499c0b17 Update swift/ql/lib/codeql/swift/regex/internal/ParseRegex.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-06-22 12:09:22 +01:00
AlexDenisov
9ab7a83e3f Merge pull request #13532 from github/alexdenisov/bump-cmake-c++
Swift: bump C++ version in CMake
2023-06-22 12:56:34 +02:00
Joe Farebrother
52841e9005 Apply review suggestions - minor fixes 2023-06-22 11:30:58 +01:00
Joe Farebrother
bdaeeeadee Add good/bad indicators to tests 2023-06-22 11:21:30 +01:00
Joe Farebrother
270bcc3740 fix qhelp and remove commented out code 2023-06-22 11:20:58 +01:00
Mathias Vorreiter Pedersen
fe97572f70 C++: Fix strncpy model. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
273e5bc21f C++: Add testcase demonstrating that the model for 'strncpy' is broken. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
ff3c76c1fa Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
4f1b2c6194 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
a8a04c8588 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
6528985a27 C++: Add QLDoc to 'hasAddressOperandAndIndirectionIndex'. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
c7cff373de C++: Add another testcase with conflation. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
3365ff0d95 C++: Ensure that 'PrintIR' for dataflow still compiles. 2023-06-22 10:59:12 +01:00
Mathias Vorreiter Pedersen
6543da9990 C++: Accept test changes. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
3b0a286d8e C++: Adjust the rest of the library to the new API. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
6034eb07af C++: Change the API for indirect operands and indirection instructions to not allow pointer conflation. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
9e9c811eb3 C++: Fix conflation bug in 'getIRRepresentationOfIndirectInstruction'. 2023-06-22 10:59:11 +01:00
Mathias Vorreiter Pedersen
5816f177c9 C++: Add failing test. 2023-06-22 10:59:11 +01:00
Rasmus Lerchedahl Petersen
2264b119a6 python: more consistent tests
- do not test taint flow whne dataflow is established
- test taint of both the collection and the expected element
2023-06-22 11:52:25 +02:00
Owen Mansel-Chan
b3a19ef7b2 Merge pull request #13461 from owen-mc/go/show-functionmodel-steps-to-path-summaries
Go: show FunctionModel steps in path summaries
2023-06-22 10:46:12 +01:00
yoff
0f8ebd1519 Update python/ql/test/experimental/dataflow/model-summaries/model_summaries.py
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-22 11:31:21 +02:00
Tom Hvitved
04f388f8c4 QL: Add more dead-code tests 2023-06-22 11:30:38 +02:00
Tom Hvitved
7c2f26e0c3 Merge pull request #13534 from hvitved/ql/fix-bad-join
QL: Fix bad join
2023-06-22 11:24:51 +02:00
Mathias Vorreiter Pedersen
d48f7f59c1 Swift: Add change note. 2023-06-22 09:54:00 +01:00
Tom Hvitved
6942925899 QL: Fix bad join
```
[2023-06-22 10:44:20] (92s) Tuple counts for Predicate#23818b54::Cached::resolveSelfClassCalls#2#ff/2@06fd3bf5 after 1m9s:
                      30500      ~567%     {3} r1 = JOIN Ast#8e1d5bcf::ClassPredicate::getName#0#dispred#ff WITH Ast#8e1d5bcf::PredicateOrBuiltin::getArity#0#dispred#ff ON FIRST 1 OUTPUT Lhs.0 'p', Lhs.1, Rhs.1
                      26500      ~573%     {4} r2 = JOIN r1 WITH Ast#8e1d5bcf::Class::getAClassPredicate#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.2, Lhs.0 'p', Lhs.1, Rhs.1
                      3059915597 ~605%     {4} r3 = JOIN r2 WITH Ast#8e1d5bcf::Call::getNumberOfArguments#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'mc', Lhs.2, Lhs.1 'p', Lhs.3
                      20999389   ~701%     {3} r4 = JOIN r3 WITH Ast#8e1d5bcf::MemberCall::getMemberName#0#dispred#ff ON FIRST 2 OUTPUT Lhs.0 'mc', Lhs.2 'p', Lhs.3
                      20995877   ~711%     {4} r5 = JOIN r4 WITH Ast#8e1d5bcf::MemberCall::getBase#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'p', Lhs.2, Lhs.0 'mc'
                      1240332    ~700%     {3} r6 = JOIN r5 WITH Ast#8e1d5bcf::ThisAccess#ff ON FIRST 1 OUTPUT Lhs.3 'mc', Lhs.1 'p', Lhs.2
                      1236711    ~716%     {4} r7 = JOIN r6 WITH Ast#8e1d5bcf::AstNode::getEnclosingPredicate#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1 'p', Lhs.0 'mc'
                      4476       ~347%     {2} r8 = JOIN r7 WITH Ast#8e1d5bcf::AstNode::getParent#0#dispred#ff ON FIRST 2 OUTPUT Lhs.3 'mc', Lhs.2 'p'
                                           return r8
```
2023-06-22 10:53:10 +02:00
Mathias Vorreiter Pedersen
c50a0419e2 Swift: Accept test changes. 2023-06-22 09:46:10 +01:00
Mathias Vorreiter Pedersen
36f980f4bf Swift: Hide summarized nodes from paths. 2023-06-22 09:46:02 +01:00
Jeroen Ketema
277dbdf410 Merge pull request #13498 from jketema/inline-4
Rework more inline expectation tests to use the parameterized module
2023-06-22 10:01:07 +02:00
Geoffrey White
f52f4504c3 Swift: License/licence. 2023-06-22 08:49:58 +01:00
Alex Denisov
ade4d68793 Swift: bump C++ version in CMake 2023-06-22 09:26:29 +02:00
jorgectf
7e7e2aaac7 Remove non-existing import 2023-06-22 01:15:08 +02:00
jorgectf
868129c7e7 Add change note 2023-06-22 01:14:06 +02:00
jorgectf
6947e99c15 Add models for webix
Co-authored-by: Kevin Stubbings <Kwstubbs@users.noreply.github.com>
2023-06-22 01:07:33 +02:00
Robert Marsh
ba7cb8f4ae C++: fix range analysis back edge detection for irreducible CFGs 2023-06-21 17:54:52 -04:00
Geoffrey White
d3af8c5123 Swift: The perf. issue is fixed by above commit "Do regex locations more like Ruby does them." 2023-06-21 19:00:27 +01:00
Ian Lynagh
bfd0a19d85 Kotlin: Define DiagnosticTrapWriter, for type safety
In some cases, we were writing diagnostics to TRAP files where they
shouldn't be written. Such TRAP files don't define #compilation, so TRAP
import gave errors.

Now we use DiagnosticTrapWriter to get the type system to check that we
are writing diagnostics to the right place.
2023-06-21 18:38:27 +01:00
Geoffrey White
925477ed66 Swift: Remove another bit of code that doesn't currently make sense in Swift. 2023-06-21 18:29:10 +01:00
Geoffrey White
5449bdc993 Swift: Do regex locations more like Ruby does them. 2023-06-21 18:25:48 +01:00
Geoffrey White
5a99007ab1 Swift: We don't need the location components logic inRegExpTerm, at least, not yet. 2023-06-21 18:11:53 +01:00
Geoffrey White
e127030b5c Swift: Test some edge cases for locations. 2023-06-21 18:11:53 +01:00
Geoffrey White
58c9bf4b12 Swift: Copy the 'parse' test from Ruby. 2023-06-21 18:05:17 +01:00
Geoffrey White
2b99344aa7 Swift: Add some cached annotations for sensitive exprs. 2023-06-21 17:52:00 +01:00
Henry Mercer
5afdaf8fe1 Merge pull request #13525 from github/rc/3.10
Merge `rc/3.10` back to `main`
2023-06-21 17:13:36 +01:00
Geoffrey White
bc16fb5b01 Swift: Small possible improvements. 2023-06-21 16:17:50 +01:00
Erik Krogh Kristensen
3b0220d556 Merge pull request #13501 from adrienpessu/main
JS: Add another example the Hardcoded credential help
2023-06-21 17:02:22 +02:00
Ian Lynagh
18a5c48c79 Merge pull request #13508 from igfoo/igfoo/rc_kot
Kotlin: Backport some Kotlin 1.9 fixes to the rc/3.10 branch
2023-06-21 15:26:41 +01:00
Kasper Svendsen
eca3df2a16 Merge pull request #13523 from kaspersv/kaspersv/ql-lang-spec-polish
Polish QL language spec "Call with results" section
2023-06-21 15:57:25 +02:00
Kasper Svendsen
6d3f9fc67e Polish QL language spec "Call with results" section 2023-06-21 14:29:16 +02:00
Tom Hvitved
039bbb6288 Merge pull request #13521 from hvitved/ql/final-extends
QL: Model `final extends`
2023-06-21 14:18:31 +02:00
Adrien Pessu
5541fe79a8 Merge branch 'main' into main 2023-06-21 12:55:48 +01:00
Adrien Pessu
e332a4348d Update javascript/ql/src/Security/CWE-798/HardcodedCredentials.qhelp
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-21 12:55:33 +01:00
Kasper Svendsen
a4ee152efb Merge pull request #13512 from kaspersv/rc/3.10
QL language ref: explain implicit this receivers
2023-06-21 12:02:02 +02:00
Michael Nebel
3a81d21c1c Merge pull request #13520 from michaelnebel/csharp/usestubs3
C#: Use stubs for query test cases.
2023-06-21 11:41:26 +02:00
Kasper Svendsen
8015c3cf28 QL language ref: explain implicit this receivers 2023-06-21 11:07:16 +02:00
Michael Nebel
27ee4241e8 C#: Remove unused test assemblies. 2023-06-21 10:45:08 +02:00
Tom Hvitved
e6e966bd22 QL: Model final extends 2023-06-21 10:40:12 +02:00
Tom Hvitved
0edd80001b QL: Add tests for AbstractClassImport.ql 2023-06-21 10:40:12 +02:00
Michael Nebel
34e50de76d C#: Only use the dll's that are strictly needed in the API Abuse/NoDisposeCallOnLocalIDisposable test case. 2023-06-21 10:39:52 +02:00
Adrien Pessu
4d1bbe36a9 Merge branch 'main' into main 2023-06-21 09:11:57 +01:00
Adrien Pessu
7dfb404fd7 clean examples 2023-06-21 08:11:39 +00:00
Adrien Pessu
e85987bfc5 remove useless phrase 2023-06-21 07:59:24 +00:00
Erik Krogh Kristensen
12b3913a4b Merge pull request #13511 from tspascoal/patch-1
JS: Single quote was preventing the shell from expanding the BODY variable in Expression injection in Actions example
2023-06-21 09:57:20 +02:00
Michael Nebel
82bf27c7b2 C#: Base the remaining API Abuse query test cases on stubs. 2023-06-21 09:52:35 +02:00
Michael Nebel
52323d3990 C#: Base API Abuse/IncorrectCompareToSignature test case on stubs and update expected test output. 2023-06-21 09:40:37 +02:00
Michael Nebel
0e263fb744 C#: Base API Abuse/DisposeNotCalledOnException test case on stubs. Since the stubs requires C# 11 the language version has been removed from the options (also it doesn't affect the output). 2023-06-21 09:40:37 +02:00
Michael Nebel
4546d8f0bf C#: Base API Abuse/UncheckedReturnValue test case on stubs, clean up test and update expected output. 2023-06-21 09:40:37 +02:00
Michael Nebel
ada49dbb2c C#: Specific language version not needed in options file for API Abuse/NoDisposeCallOnLocalIDisposable. 2023-06-21 09:40:19 +02:00
Michael Nebel
d1184f0b3c C#: Base the AlertSupression test on stubs. 2023-06-21 07:59:56 +02:00
Jami
622cd05b77 Merge branch 'main' into java/update-mad-decls-after-triage-2023-06-08T08-51-47 2023-06-20 21:58:15 -04:00
Remco Vermeulen
c0884432e8 Format query 2023-06-20 10:38:08 -07:00
Tom Hvitved
59147ad674 QL: Add more tests for MissingOverride.ql 2023-06-20 19:30:30 +02:00
Adrien Pessu
9cb12cdcbe Merge branch 'main' of https://github.com/adrienpessu/codeql 2023-06-20 17:28:28 +00:00
Adrien Pessu
2a2f6de78c fixed text not in a tag 2023-06-20 17:27:37 +00:00
Adrien Pessu
77077da20c Merge branch 'main' into main 2023-06-20 18:24:44 +01:00
Adrien Pessu
36cb60c746 Add fixed proposition for NodeJS 2023-06-20 17:22:56 +00:00
Joe Farebrother
8fdec4f116 Add documentation 2023-06-20 17:18:04 +01:00
Jami
5259a6ecfc Merge pull request #13324 from jcogs33/jcogs33/shared-sink-kind-validation
Shared: share MaD kind validation across languages
2023-06-20 11:56:12 -04:00
Mathias Vorreiter Pedersen
865c050226 Merge pull request #13517 from hvitved/ql/field-only-used-in-charpred-fix
QL: Exclude overridden fields from `FieldOnlyUsedInCharPred.ql`
2023-06-20 16:28:23 +01:00
Mathew Payne
62b3d5ea19 Merge branch 'main' into csharp-ext 2023-06-20 16:17:35 +01:00
Geoffrey White
c501fa5289 Swift: Add more test cases exploring the timeout. 2023-06-20 15:27:54 +01:00
Rasmus Lerchedahl Petersen
cb2de69f5a python: consolidate tests
also change `Foo` -> `foo`
2023-06-20 16:13:38 +02:00
Tony Torralba
19de7cd54b Merge pull request #13507 from atorralba/atorralba/ql/android-ids-check
QL: Add query to find Android queries with improper ids
2023-06-20 16:08:09 +02:00
Alex Ford
8ef8a0d2f6 qlformat 2023-06-20 14:59:13 +01:00
Alex Ford
7aec22c1e4 Ruby: rack - remove MIME modelling 2023-06-20 14:57:23 +01:00
Tony Torralba
3c60f52a1b Update ql/ql/src/queries/style/AndroidIdPrefix.ql
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-20 15:41:30 +02:00
Owen Mansel-Chan
0baf78f8fa Add change note 2023-06-20 14:33:29 +01:00
Tony Torralba
c230c9f793 Consider only Java files in importsAndroidModule 2023-06-20 15:30:46 +02:00
Erik Krogh Kristensen
2341c82450 Merge pull request #13342 from erik-krogh/once-again-deps
Py: delete more old deprecations
2023-06-20 15:29:17 +02:00
Owen Mansel-Chan
cdc1c2c1aa Merge pull request #13454 from owen-mc/go/add-mad-content-for-pointer-content
Go: Add models-as-data content for pointer content
2023-06-20 14:26:07 +01:00
Tom Hvitved
d296256920 QL: Exclude overridden fields from FieldOnlyUsedInCharPred.ql 2023-06-20 15:24:09 +02:00
Tom Hvitved
12c810c63d QL: Add tests for FieldOnlyUsedInCharPred.ql 2023-06-20 15:23:08 +02:00
Tony Torralba
768478103c Add another exception 2023-06-20 15:16:37 +02:00
Tony Torralba
818c312a56 Add exception for java/improper-intent-verification
As suggested by @igfoo.
2023-06-20 14:50:41 +02:00
Tony Torralba
41534803e5 Refactor to use QueryDoc
Kudos to @erik-krogh for the suggestion.
2023-06-20 14:41:57 +02:00
Rasmus Wriedt Larsen
47d0a6d2e3 Python: Restore rest of experimental files 2023-06-20 14:30:43 +02:00
Owen Mansel-Chan
c0fea85380 Accept test changes 2023-06-20 13:25:49 +01:00
Owen Mansel-Chan
cc320c5e9c Never skip functionmodel inputs and outputs in path summaries 2023-06-20 13:25:47 +01:00
Owen Mansel-Chan
d7c97f8759 Merge pull request #13455 from owen-mc/dataflow/add-flowCheckNodeSpecific
Dataflow: add language-specific hook for breaking up big step relation
2023-06-20 13:24:26 +01:00
Mathias Vorreiter Pedersen
2b0282ca12 C++: Accept test changes. 2023-06-20 13:05:25 +01:00
Mathias Vorreiter Pedersen
952dbd69e9 C++: Default to one indirection in the case of self iterators. 2023-06-20 12:59:27 +01:00
Robert Marsh
971456c725 C++: add a test for self-valued iterators 2023-06-20 12:59:27 +01:00
Philip Ginsbach
2187e56376 Merge pull request #13513 from github/ginsbach/EvaluationOfInstantiations
mention how instantiation-nested predicates are treated in stratification and evaluation
2023-06-20 12:46:18 +01:00
Arthur Baars
1f6fae88ab Merge pull request #13510 from github/post-release-prep/codeql-cli-2.13.4
Post-release preparation for codeql-cli-2.13.4
2023-06-20 13:30:40 +02:00
Philip Ginsbach
e4e91c7ab0 mention how instantiation-nested predicates are treated in stratification and evaluation 2023-06-20 12:29:52 +01:00
Philip Ginsbach
f09c44f8a2 Merge pull request #13443 from github/ginsbach/SpecifyInstantiations
add QL specification section on module instantiations
2023-06-20 12:02:52 +01:00
Tiago Pascoal
150854603b Single quote was preventing the shell from expanding the BODY variable
While this prevents the attack highlighted in the query help it also prevents it from working.

Double quotes will allow the expansion of the variable while still preventing the attack
2023-06-20 11:38:27 +01:00
Tony Torralba
7837959bdf QL: Add query to find Android queries with improper ids 2023-06-20 12:37:24 +02:00
github-actions[bot]
18b678e69e Post-release preparation for codeql-cli-2.13.4 2023-06-20 10:20:05 +00:00
Owen Mansel-Chan
04ff89e1fe Update access path documentation 2023-06-20 11:05:05 +01:00
Owen Mansel-Chan
732b14ee38 Update pretty printing predicates 2023-06-20 11:04:03 +01:00
Ian Lynagh
293f90333d Kotlin: Avoid another cause of ConcurrentModificationException with 1.9 2023-06-20 10:59:24 +01:00
Ian Lynagh
0076d8aac1 Java: Add up/downgrade scripts 2023-06-20 10:59:13 +01:00
Ian Lynagh
81142f51fb Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
Generated by Kotlin 1.9 for some of our tests.
2023-06-20 10:59:04 +01:00
Rasmus Lerchedahl Petersen
5ceac5a771 python: add changenote 2023-06-20 11:53:31 +02:00
Owen Mansel-Chan
a01169eec2 add "Dereference" content for PointerContent 2023-06-20 10:49:37 +01:00
yoff
579c56c744 Merge pull request #13178 from yoff/python-ruby/track-through-summaries-pm
ruby/python: Shared module for typetracking through flow summaries
2023-06-20 11:19:45 +02:00
Owen Mansel-Chan
d28c4203db Merge pull request #13453 from owen-mc/go/test-mad-pointer-content
Go: Add failing tests for MaD with pointer content
2023-06-20 09:55:06 +01:00
Rasmus Lerchedahl Petersen
e111a19524 python: split tests into taint and value
and add summaries
2023-06-20 10:46:27 +02:00
Erik Krogh Kristensen
7387653bd7 Merge pull request #13504 from github/rc/3.10
Merge rc/3.10 into main
2023-06-20 10:42:44 +02:00
Jeroen Ketema
dba4460526 Python: Update more inline expectation tests to use the paramterized module 2023-06-20 10:16:15 +02:00
Jeroen Ketema
c53e529bac Ruby: Update remaining inline expectation tests to use the paramterized module 2023-06-20 10:16:01 +02:00
Jeroen Ketema
d6d21e3928 Go: Update remaining inline expectation tests to use the paramterized module 2023-06-20 10:15:46 +02:00
Jeroen Ketema
890a67d2ee Introduce modules to merge 3, 4, and 5 inline expectation tests 2023-06-20 10:13:21 +02:00
Philip Ginsbach
0c4eb68921 introduce concept of fully instantiated entity 2023-06-20 09:07:38 +01:00
Philip Ginsbach
6848cba685 use more consistent terminology 2023-06-20 09:06:16 +01:00
Tony Torralba
54db4cc107 Merge pull request #13503 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-20 09:51:07 +02:00
github-actions[bot]
6da5ec8196 Add changed framework coverage reports 2023-06-20 00:15:43 +00:00
Remco Vermeulen
32d7faa3b8 Account for the signedness of the lesser operand 2023-06-19 16:57:36 -07:00
Jeroen Ketema
b500bbba76 Merge pull request #13460 from erik-krogh/rest-of-cpp
CPP: delete the deprecated Container::getURL predicates
2023-06-20 01:32:25 +02:00
erik-krogh
2104507cec add change-note 2023-06-19 23:11:38 +02:00
erik-krogh
5fdfd98a1d delete the deprecated Conatiner::getURL predicates 2023-06-19 23:11:38 +02:00
Henry Mercer
790d42b42c Merge pull request #13500 from github/henrymercer/release-prep-swift
Release preparation for Swift
2023-06-19 18:14:10 +01:00
Adrien Pessu
eb28266bcb improv example the help file 2023-06-19 17:00:52 +00:00
Geoffrey White
9f58d961f2 Swift: Remove TODO about a n unknown failure as it's now diagnosed and planned. 2023-06-19 17:49:27 +01:00
Henry Mercer
ead79c98d8 Run pack release for Swift packs 2023-06-19 17:35:58 +01:00
Henry Mercer
f90586bc90 Bump Swift pack versions 2023-06-19 17:35:26 +01:00
aegilops
23bf8470ce Removed .md and made class change 2023-06-19 17:29:17 +01:00
Geoffrey White
76e51eeaa2 Swift: Add change note. 2023-06-19 17:14:14 +01:00
Geoffrey White
2ba231549f Merge branch 'main' into sharedsensitive2 2023-06-19 16:44:27 +01:00
Jeroen Ketema
9c774ac97f Merge pull request #13426 from jketema/inline-3
Update inline flow tests to use parameterized module
2023-06-19 17:39:29 +02:00
Geoffrey White
b50801ba6a Swift: Attempt to improve performance. 2023-06-19 16:17:39 +01:00
Alexandre Boulgakov
61a3f86f0f Merge pull request #13447 from github/sashabu/windows2
Swift: Bare-bones extractor pack for Windows.
2023-06-19 15:39:54 +01:00
AlexDenisov
21ad3e851a Merge pull request #13497 from github/redsun82/swift-remove-result-of
Swift: remove `std::result_of` from swift headers
2023-06-19 16:31:26 +02:00
Jean Helie
423336310c Merge pull request #13480 from github/jhelie/clean-up-mad-kinds-use
Java: clean up mad kinds use
2023-06-19 16:21:20 +02:00
Paolo Tranquilli
592e7f0b56 Swift: add TODO for later swift updates 2023-06-19 15:52:16 +02:00
Paolo Tranquilli
3ff7148147 Swift: remove std::result_of from swift headers
`std::result_of` was removed in C++20, though the actual removal from
the STL library implementations seems to depend on the version. For
example using xcode 14.2 one gets away with a deprecation warning, but
xcode 14.3 will fail.

As Swift 5.8.1 is still compiled with C++14, we cannot replace
`std::result_of` with `std::invoke_result` in the prebuilding patches
just yet, but we can do that for the extractor itself, patching the
prebuilt package.
2023-06-19 15:29:45 +02:00
Tony Torralba
c62689022e Merge pull request #13256 from atorralba/atorralba/java/stapler-models
Java: Model the Stapler framework
2023-06-19 15:27:19 +02:00
Geoffrey White
0973fb33b9 Swift: Model UnsafeMutablePointer.init(mutating:). 2023-06-19 14:08:03 +01:00
Tony Torralba
00fe8adc09 Fix name clash 2023-06-19 15:04:33 +02:00
Tony Torralba
5cb451b040 Merge pull request #13475 from atorralba/atorralba/many/zipslip-docs-update
C#/Go/Java/JS/Python/Ruby: Update the description and qhelp of the Zipslip query
2023-06-19 14:33:44 +02:00
Mathew Payne
8347a410b7 Merge branch 'main' into csharp-ext 2023-06-19 13:25:07 +01:00
Ian Lynagh
64e591a823 Merge pull request #13482 from igfoo/igfoo/conc
Kotlin: Avoid another cause of ConcurrentModificationException with 1.9
2023-06-19 12:57:25 +01:00
Ian Lynagh
ec73f28d09 Merge pull request #13479 from igfoo/igfoo/ENUM_ENTRIES
Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
2023-06-19 12:57:10 +01:00
Mathew Payne
a6a86acd9a Fix formatting for ExternalFlow 2023-06-19 12:44:01 +01:00
Mathew Payne
4597210519 Update csharp/ql/lib/semmle/code/csharp/dataflow/ExternalFlow.qll
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-19 12:03:46 +01:00
Mathew Payne
861ac177b8 Update csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-19 12:03:38 +01:00
aegilops
8c9ccab9c9 Autoformat 2023-06-19 11:53:53 +01:00
Paul Hodgkinson
72d9d4736e Merge branch 'main' into java/experimental/command-injection 2023-06-19 11:51:45 +01:00
aegilops
2112d73a6a Autoformat 2023-06-19 11:50:54 +01:00
aegilops
1a108fb1c9 Changed to for constant string 2023-06-19 11:46:08 +01:00
aegilops
7c235e3786 Fixed linting issues. Will not fix instanceof, that is necessary 2023-06-19 11:41:23 +01:00
Asger F
8539db07c4 Ruby: Update ActiveDispatch due to change in toString 2023-06-19 12:16:07 +02:00
Asger F
f392af220b Ruby: benign changes to SQLi tests (fixed FNs) 2023-06-19 12:15:57 +02:00
Asger F
ce0073b30c Ruby: update StoredXSS test results
These results were previously flagged for the wrong reason.

Calls to a user-define method were seen as ORM calls. The real source is inside the user-defined method, but we miss that due to lack of 'self' handling in ORM tracking.
2023-06-19 12:15:57 +02:00
Asger F
e3a04499f6 Ruby: minor overhaul of ActiveResource model 2023-06-19 12:15:57 +02:00
Asger F
8bc4193ce0 Ruby: minor overhaul of ActiveRecord model
Old version had scalability issues when adding taking more interprocedural flow and inheritance into account.
2023-06-19 12:15:44 +02:00
Asger F
bb3b973b32 Ruby: use new features in ActionController 2023-06-19 12:06:35 +02:00
Asger F
fbfa31937f Ruby: use new features in ActionMailer 2023-06-19 12:05:57 +02:00
Asger F
1ae41484da Ruby: Use new features in ActionMailbox model 2023-06-19 12:05:15 +02:00
Asger F
f8ae5301a4 Ruby: update Twirp
This used right-to-left evaluation for API graphs, which is not supported anymore
2023-06-19 12:04:53 +02:00
Asger F
b305c13b65 Ruby: update SQLite3 model 2023-06-19 12:04:12 +02:00
Asger F
2ef010f1c0 Ruby: update GraphQL model 2023-06-19 12:04:00 +02:00
Asger F
61cda97163 Ruby: rename some call sites 2023-06-19 12:03:25 +02:00
Asger F
5b05e72d27 Ruby: switch to local dataflow when dealing with Kernel/IO 2023-06-19 12:02:39 +02:00
Asger F
0110610c6a Ruby: overhaul API graphs 2023-06-19 12:01:42 +02:00
Rasmus Lerchedahl Petersen
eb3c33dfe2 python: remove erronous getACall()
`base` is already the `CallNode` we want.
2023-06-19 11:41:06 +02:00
Ian Lynagh
ca5bc6f224 Java: Add up/downgrade scripts 2023-06-19 10:36:29 +01:00
Ian Lynagh
1f538cced3 Kotlin: Handle IrSyntheticBodyKind.ENUM_ENTRIES
Generated by Kotlin 1.9 for some of our tests.
2023-06-19 10:36:29 +01:00
Arthur Baars
ea97c3ea83 Merge pull request #13423 from aibaars/update-grammar-3
Ruby: update grammar
2023-06-19 10:54:12 +02:00
Jeroen Ketema
bc42308bd3 Java: fix formatting 2023-06-19 10:31:49 +02:00
Jeroen Ketema
b420455e2b C#: Update InlineFlowTests to use the merged path graph 2023-06-19 10:28:54 +02:00
Jeroen Ketema
6a84e6cbfd Add the merged PathGraph to all copies of the InlineFlowTest library 2023-06-19 10:28:10 +02:00
Tony Torralba
8f6d2ed2f9 Adjust ZipSlip query description according to review suggestions. 2023-06-19 10:27:41 +02:00
Erik Krogh Kristensen
c289f66692 Merge pull request #13469 from erik-krogh/redos-3.10
ReDoS: stop spuriously matching everything when encountering an unsupported charclass
2023-06-19 10:21:00 +02:00
Tony Torralba
3c4d938cf1 Apply code review suggestions.
Co-authored-by: Asger F <asgerf@github.com>
2023-06-19 10:20:19 +02:00
Tony Torralba
433fc680ec Apply suggestions from code review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2023-06-19 10:17:40 +02:00
Tom Hvitved
2253761eb0 Merge pull request #13494 from maikypedia/maikypedia/typo
Ruby : Naming error
2023-06-19 09:50:45 +02:00
Michael Nebel
1338261f04 Merge pull request #13472 from michaelnebel/csharp/usestubs2
C#: Use stubs in the Security feature related tests.
2023-06-19 09:34:19 +02:00
Maiky
849e732c48 typos 2023-06-19 01:16:27 +02:00
Maiky
d654e98650 Add empty string as source 2023-06-18 22:21:12 +02:00
Rasmus Lerchedahl Petersen
229641070f python: rename summaries 2023-06-18 22:01:47 +02:00
Rasmus Lerchedahl Petersen
6554e804dd python: add test for model summaries
(but no summaries yet)
2023-06-18 21:52:49 +02:00
Rasmus Lerchedahl Petersen
3cf9e3e692 Py/js/ruby: sync files 2023-06-18 21:52:49 +02:00
Rasmus Lerchedahl Petersen
18f4b75f8b python: enable summaries from model
This requires a change to the shared interface:
Making `getNodeFromPath` public.

This because Python is doing its own thing and identifying call-backs.
2023-06-18 21:52:49 +02:00
Mathias Vorreiter Pedersen
cc09715ba7 Merge pull request #13466 from jketema/pointer-deref-fp 2023-06-18 00:51:59 +01:00
Aditya Sharad
08ac56579c Merge pull request #13485 from github/jketema/codeql-cli-2.13.4-disable-overrun
Exclude `cpp/overrun-write` from `cpp-security-extended.qls`
2023-06-16 11:05:09 -07:00
Jeroen Ketema
0bb67e45b3 C++: lower the precision of cpp/overrun-write to exclude it from our query suites 2023-06-16 19:07:56 +02:00
Jeroen Ketema
000add206c Revert "Exclude cpp/overrun-write from cpp-security-extended.qls"
This reverts commit 3aaa649076.
2023-06-16 19:05:04 +02:00
aegilops
8c73fbeabe Formatted 2023-06-16 17:33:21 +01:00
aegilops
55eeb00309 Added experimental tag 2023-06-16 17:27:01 +01:00
Alexandre Boulgakov
abc6d62b6f Swift: Use platform-specific Bazel config. 2023-06-16 17:24:04 +01:00
Alexandre Boulgakov
679df1e61b Swift: Add "autobuilder" on Windows that simply shows an error. 2023-06-16 17:23:50 +01:00
Alexandre Boulgakov
2bb3101316 Swift: Rename incompatible OS diagnostic to clarify that it's for the autobuilder. 2023-06-16 17:22:43 +01:00
Alexandre Boulgakov
bc48968def Swift: Build incompatible OS diagnostic on all platforms. 2023-06-16 17:22:43 +01:00
aegilops
b6c35dd88c Added experimental version of Java Command Injection query, to be more sensitive to unusual code constructs 2023-06-16 17:12:53 +01:00
Ian Lynagh
04a7ff7f76 Merge pull request #13477 from igfoo/igfoo/diags_classes
Kotlin: Remove diags.ql from classes test
2023-06-16 17:07:38 +01:00
Ian Lynagh
096e9a4ba4 Kotlin: Avoid another cause of ConcurrentModificationException with 1.9 2023-06-16 17:06:54 +01:00
Philip Ginsbach
1ed3baea17 mention instantiation in the section on module resolution 2023-06-16 17:02:17 +01:00
Philip Ginsbach
45426b9289 mention parameters and instantiation-nested types 2023-06-16 17:02:17 +01:00
Philip Ginsbach
aedd9f5f6b add QL specification section on module instantiations 2023-06-16 17:02:15 +01:00
Jeroen Ketema
9ff5754473 C++: Add cpp/invalid-pointer-def FP test case 2023-06-16 16:48:24 +02:00
Jeroen Ketema
0e68767efc C++: Add more cpp/invalid-pointer-deref FPs 2023-06-16 15:28:05 +02:00
Rasmus Wriedt Larsen
fb6955edf9 Python: Add tests of methods in summaries 2023-06-16 14:43:45 +02:00
Rasmus Wriedt Larsen
afafaac0d7 Python: Fix typo 2023-06-16 14:41:36 +02:00
Jean Helie
baf6b74945 use new sink mad kinds and simplify isKnownKind predicate 2023-06-16 13:58:23 +02:00
Jean Helie
daf2743143 only use neutral models of kind "sink" 2023-06-16 13:58:23 +02:00
Ian Lynagh
a8acf16088 Kotlin: Remove diags.ql from classes test
The diags consistency test already handles this for us.
2023-06-16 12:57:19 +01:00
AlexDenisov
b572974536 Merge pull request #13476 from github/alexdenisov/rc3.10_mergeback
rc3.10 mergeback: getting Swift changes back to main
2023-06-16 11:59:23 +02:00
Alex Denisov
0479ef5b9c Merge remote-tracking branch 'origin/rc/3.10' into alexdenisov/rc3.10_mergeback 2023-06-16 10:13:23 +02:00
Michael Nebel
f4f195c837 C#: Base tests for CWE-807 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
52c4a47a61 C#: Base tests for CWE-798 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
6058cfc037 C#: Base tests for CWE-730 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
5483756f17 C#: Base tests for CWE-643 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
2857145bba C#: Base tests for CWE-614 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
58d469b932 C#: Make path relative to testdir explicit in CWE-601 testcase. 2023-06-16 10:08:40 +02:00
Michael Nebel
d414ce046f C#: Base tests for CWE-548 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
7766aaeb1e C#: Base tests for CWE-539 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
5e4d31c10d C#: Base tests for CWE-502 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
faaf26157b C#: Base tests for CWE-451 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
33e798418e C#: Base tests for CWE-384 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
6ec4338cca C#: Base tests for CWE-359 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
b35af64a9d C#: Base tests for CWE-352 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
ae5c149150 C#: Base tests for CWE-338 on stubs. 2023-06-16 10:08:40 +02:00
Michael Nebel
4500170bb4 C#: Base tests for CWE-312 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
02dbc600a4 C#: Base tests for CWE-248 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
680762572a C#: Base tests for CWE-209 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
596a8ecf97 C#: Base tests for CWE-201 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
e0b661c555 C#: Base tests for CWE-134 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
d1b704fb45 C#: Base tests for CWE-119 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
b726fe8735 C#: Base tests for CWE-114 on stubs. 2023-06-16 10:08:39 +02:00
Michael Nebel
6028f4b76f C#: Base tests for CWE-112 on stubs. 2023-06-16 10:08:39 +02:00
AlexDenisov
22124409fe Merge pull request #13458 from github/alexdenisov/swift-5.8-against-3.10
Swift: upgrade extractor to support Swift 5.8.1
2023-06-16 10:07:02 +02:00
Tony Torralba
c97868f774 Add change notes 2023-06-16 09:01:02 +02:00
Tony Torralba
3e96fe60c5 Go/Java/JS/Python/Ruby: Update the description and qhelp of the ZipSlip query
All filesystem operations, not just writes, with paths built from untrusted archive entry names are dangerous
2023-06-16 08:52:44 +02:00
Geoffrey White
df38a12b84 Swift: Complete the escape sequences fix. 2023-06-15 21:18:15 +01:00
Geoffrey White
39302c62bd Swift: Add support for isDigit and similar. 2023-06-15 21:18:15 +01:00
Geoffrey White
355793f6ca Swift: Add support for \u{hhhhhh} escaped characters in regular expressions. 2023-06-15 21:18:15 +01:00
Geoffrey White
49dfe5d22b Swift: Add support for \Uhhhhhhhh escaped characters in regular expressions. 2023-06-15 21:18:14 +01:00
Geoffrey White
05939bd90a Swift: Add a test case for \Uhhhhhhhh character escapes. 2023-06-15 20:51:21 +01:00
Jeroen Ketema
3aaa649076 Exclude cpp/overrun-write from cpp-security-extended.qls 2023-06-15 16:50:42 +02:00
Tony Torralba
1b39faaded QLDoc correction 2023-06-15 16:20:39 +02:00
Michael Nebel
981468f64e C#: Base tests for CWE-099 on stubs. 2023-06-15 16:05:46 +02:00
Michael Nebel
95fddaebef C#: Base tests for CWE-094 on stubs. 2023-06-15 16:05:46 +02:00
Michael Nebel
7d58a9c3d3 C#: Base tests for CWE-091 on stubs. 2023-06-15 16:05:46 +02:00
Michael Nebel
f4b5cbf7eb C#: Base tests for CWE-090 on stubs. 2023-06-15 16:05:45 +02:00
Michael Nebel
8e36a880f2 C#: Adjust paths relative to the test directory for CWE-089 test dependencies. 2023-06-15 16:05:45 +02:00
Michael Nebel
b674a8eab7 C#: Split the StoredXss test from XSS Asp test. Make the former based on stubs. 2023-06-15 16:05:45 +02:00
Michael Nebel
0d10f5ca2a C#: Base tests for CWE-078 on stubs. 2023-06-15 16:05:45 +02:00
Michael Nebel
47621ca602 C#: Base tests for CWE-022 on stubs. 2023-06-15 16:05:45 +02:00
Geoffrey White
9b9b4a1fd7 Swift: Fix QL-for-QL warnings. 2023-06-15 14:31:49 +01:00
Michael Nebel
d0844bbe6e C#: Base tests for CWE-020 on stubs. 2023-06-15 15:22:43 +02:00
Michael Nebel
3e8102a0c8 C#: Base tests for CWE-016 on stubs. 2023-06-15 15:22:43 +02:00
Michael Nebel
7dd88ddff6 C#: Base tests for CWE-011 on stubs. 2023-06-15 15:22:42 +02:00
Tony Torralba
7cbc13db40 Update java/ql/lib/change-notes/2023-06-08-new-models.md 2023-06-15 15:14:12 +02:00
Geoffrey White
9e9ef42054 Swift: Add another test case. 2023-06-15 13:25:02 +01:00
erik-krogh
087e6d1c15 fix QL-for-QL warning 2023-06-15 14:14:34 +02:00
erik-krogh
21b55ce0cf stop spuriously matching everything when encountering an unsupported charclass 2023-06-15 14:14:34 +02:00
Geoffrey White
4a06394d51 Swift: Autoformat + fix test indentation. 2023-06-15 13:09:46 +01:00
Geoffrey White
91b2de2b61 Swift: Lots of small fixes / cleanup. 2023-06-15 13:04:26 +01:00
Michael Nebel
47638123d0 Merge pull request #13150 from michaelnebel/csharp/removejumpstep
C#: Remove jump step
2023-06-15 12:53:37 +02:00
Tony Torralba
dcd180f3f6 Remove model 2023-06-15 12:00:46 +02:00
Tony Torralba
af240ff533 Apply suggestions from code review 2023-06-15 11:58:53 +02:00
Ian Lynagh
b7e9915151 Merge pull request #13463 from igfoo/igfoo/AccessControlException
Kotlin: Remove use of AccessControlException
2023-06-15 10:53:28 +01:00
Jeroen Ketema
d82c3ce11a Ruby: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:52:23 +02:00
Jeroen Ketema
742eb8dd12 Java: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:52:10 +02:00
Jeroen Ketema
853bf2ae4e C#: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:51:59 +02:00
Jeroen Ketema
eb62df6ece Go: Rewrite InlineFlowTest as a parameterized module 2023-06-15 10:51:29 +02:00
Tony Torralba
ad2b020b06 Merge pull request #13465 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-15 10:04:20 +02:00
Jeroen Ketema
8fb3d838c9 C++: Add FP test case for cpp/invalid-pointer-deref 2023-06-15 10:03:31 +02:00
Michael Nebel
04736b6e10 C#: Add lost QL Doc. 2023-06-15 10:00:09 +02:00
github-actions[bot]
e6160b8e49 Add changed framework coverage reports 2023-06-15 00:18:04 +00:00
Maiky
f6887c86b3 Rename Libxml.qll to LibXml.qll 2023-06-15 00:19:23 +02:00
Maiky
e5fe5403b7 Apply requested changes 2023-06-14 22:55:14 +02:00
Rasmus Lerchedahl Petersen
b7bf750174 python: use updated names in test 2023-06-14 22:23:21 +02:00
Rasmus Lerchedahl Petersen
4fded84a49 python: implement missing predicates 2023-06-14 21:30:58 +02:00
Rasmus Lerchedahl Petersen
0267b32904 fix eol 2023-06-14 21:17:12 +02:00
Rasmus Lerchedahl Petersen
2491fda58e python: update comment 2023-06-14 21:16:39 +02:00
Rasmus Lerchedahl Petersen
6521a51d93 python: unique strings in tests 2023-06-14 21:14:50 +02:00
Rasmus Lerchedahl Petersen
0e713e6fc1 ruby/python: more consistent naming of parameters 2023-06-14 21:02:42 +02:00
yoff
af72509ce6 Update python/ql/lib/semmle/python/dataflow/new/internal/TypeTrackerSpecific.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-14 20:57:14 +02:00
yoff
2ae5dae474 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-14 20:55:45 +02:00
Geoffrey White
8e8a9c8018 Swift: Annotate tests based on real ereal execution findings. Add some
relevant variants, remove some duplicates, add the testing script also.
2023-06-14 19:23:06 +01:00
Geoffrey White
f93bf6ad22 Swift: Escape the test cases in a better way (so escape characters don't obscure what's going on). 2023-06-14 18:51:57 +01:00
Asger F
318a60b208 Merge pull request #13456 from asgerf/js/vuex-perf
JS: Restrict length of state path in vuex model
2023-06-14 19:50:06 +02:00
Geoffrey White
63ab4788e0 Swift: Flag parse failures in the test. 2023-06-14 18:23:06 +01:00
Geoffrey White
44eb7bf642 Swift: Import more test cases from other languages (this highlights some issues). 2023-06-14 18:23:05 +01:00
Geoffrey White
c5405688f4 Swift: Add real world test cases. 2023-06-14 18:23:05 +01:00
Geoffrey White
2ccbdbdf87 Swift: Identify strings that are used in regular expressions properly. 2023-06-14 18:23:05 +01:00
Geoffrey White
712c3cc698 Swift: Add the cases from the (Ruby) qhelp to the library tests. 2023-06-14 18:23:05 +01:00
Geoffrey White
7e9d73b6b2 Swift: Add regex sources to the library. 2023-06-14 18:23:05 +01:00
Geoffrey White
1e290b48bb Swift: Add REDOS analysis to the library test. 2023-06-14 18:23:04 +01:00
Geoffrey White
d4c3e9eb16 Swift: Include the shared regex pack in Swift. 2023-06-14 18:23:04 +01:00
Geoffrey White
5f85b7419f Swift: Trivial changes to get it compiling. 2023-06-14 18:23:04 +01:00
Geoffrey White
8ec377997d Swift: Copy some library files from Ruby (as advised). 2023-06-14 18:23:04 +01:00
Geoffrey White
9601134ec0 Swift: Create library test cases for REDOS vulnerable regexs. 2023-06-14 18:23:04 +01:00
Geoffrey White
f7860a3ce5 Swift: Add regular expressions to SummaryStats.ql. 2023-06-14 18:23:03 +01:00
Geoffrey White
053bf9a668 Swift: Test the library. 2023-06-14 18:23:03 +01:00
Ian Lynagh
0419b6e505 Kotlin: Remove use of AccessControlException
We were getting warnings about it being deprecated, and it was all dead
code anyway.
2023-06-14 17:45:58 +01:00
Nora Dimitrijević
4d2e304799 Merge pull request #13240 from d10c/swift/brace-stmt-variables
Swift: reorganize `VarDecl` instances within `BraceStmt`
2023-06-14 18:23:25 +02:00
yoff
f5f822ca2d Merge pull request #13395 from yoff/python/container-summaries-3 2023-06-14 17:13:49 +02:00
Joe Farebrother
12bb418375 Add change note 2023-06-14 16:12:34 +01:00
Joe Farebrother
9b31b61143 Broaden the scope of checks for authorization attributes 2023-06-14 16:07:41 +01:00
Joe Farebrother
7eea191005 Add tests for MVC cases 2023-06-14 16:07:41 +01:00
Joe Farebrother
1500089b86 Add test cases for webforms auth via web.config files 2023-06-14 16:07:41 +01:00
Joe Farebrother
1b6e7f9140 Add unit tests for webform case with auth in code 2023-06-14 16:07:41 +01:00
Joe Farebrother
57b3b2b2e3 Add qldoc + exclude empty methods 2023-06-14 16:07:40 +01:00
Joe Farebrother
582c4a7fbc Support virtual route mappings for webforms actions 2023-06-14 16:07:40 +01:00
Joe Farebrother
63b3e16a54 Support Authorize attribute 2023-06-14 16:07:40 +01:00
Joe Farebrother
29b5f14283 Add support for auth via xml using the physical path 2023-06-14 16:07:40 +01:00
Joe Farebrother
e93f3186fe Add missing function level access control query 2023-06-14 16:07:40 +01:00
Alexandre Boulgakov
354ebc2cb9 Merge pull request #13459 from github/sashabu/no-path-hash
Swift: Don't use `std::hash<fs::path>`.
2023-06-14 16:05:07 +01:00
Alexandre Boulgakov
afb7070fd3 Swift: Don't use std::hash<fs::path>. 2023-06-14 15:50:45 +01:00
Owen Mansel-Chan
74b39b42a1 Accept test changes 2023-06-14 15:47:25 +01:00
Owen Mansel-Chan
3ff6d033d3 Rename to neverSkipInPathGraph 2023-06-14 15:29:54 +01:00
Alex Denisov
c080cba88d Swift: add database migration scripts 2023-06-14 16:17:44 +02:00
Alex Denisov
526f6cd5b5 Swift: skip print_unextracted 2023-06-14 16:17:44 +02:00
Alex Denisov
2daa001109 Swift: setup Swift 5.8 unconditionally 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
17111c96e4 Swift: accept test expectation changes 2023-06-14 16:17:44 +02:00
Alex Denisov
93b9115217 Swift: package resource dir from precomiled toolchain 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
c945d65b2d Swift: add clang ignored flag 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
b9c4adee31 Swift: print only toBeTested errors in Errors.ql test 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
75684eebe9 Swift: add 5.8 update QL test 2023-06-14 16:17:44 +02:00
Paolo Tranquilli
396b57696c Swift: minimal 5.8 compatibility 2023-06-14 16:17:44 +02:00
Tony Torralba
37a62d3021 Merge pull request #13227 from atorralba/atorralba/java/jenkins-generated-models
Java: Add autogenerated models for frameworks related to Jenkins
2023-06-14 15:59:28 +02:00
Asger F
22b98c8959 JS: Restrict length of state path in vuex model 2023-06-14 15:48:58 +02:00
Owen Mansel-Chan
e34bcef2bd Ruby: Move path summary visibility code into flowCheckNodeSpecific 2023-06-14 14:46:41 +01:00
Owen Mansel-Chan
ee185ae204 Python: Move hack from CastNode into flowCheckNodeSpecific 2023-06-14 14:46:39 +01:00
Owen Mansel-Chan
5f72ce0935 Add stub implementations of flowCheckNodeSpecific 2023-06-14 14:46:35 +01:00
Owen Mansel-Chan
e0f7437d40 Sync dataflow library 2023-06-14 14:29:56 +01:00
Owen Mansel-Chan
dd57d9fd55 Add flowCheckNodeSpecific
This allows individual languages to specify `FlowCheckNode`s, which
break up the big step relation and make sure that those nodes appear in
path summaries.
2023-06-14 14:27:58 +01:00
Owen Mansel-Chan
d071b463a3 Add failing tests for MaD with pointer content 2023-06-14 14:14:37 +01:00
Nora Dimitrijević
0db321c724 Merge branch 'main' into swift/brace-stmt-variables 2023-06-14 14:57:46 +02:00
Nora Dimitrijević
77f52e4e01 Swift: better join order fix for NamedPattern.getVarDecl
This brings it down to 85ms when run from a query, not just from quick-eval:

```

[2023-06-14 14:47:06] Evaluated non-recursive predicate NamedPattern#1696c0d8::NamedPattern::getVarDecl#0#dispred#ff@04392e6o in 85ms (size: 91309).
Evaluated relational algebra for predicate NamedPattern#1696c0d8::NamedPattern::getVarDecl#0#dispred#ff@04392e6o with tuple counts:
        1310544   ~9%    {2} r1 = SCAN var_decls OUTPUT In.0, In.1
        1209062   ~0%    {2} r2 = STREAM DEDUP r1
        1209062   ~0%    {2} r3 = JOIN r2 WITH Synth#5f134a93::Synth::convertVarDeclToRaw#1#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1
          91309   ~0%    {3} r4 = JOIN r3 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0

          69599   ~0%    {3} r5 = JOIN r4 WITH #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#bf_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2

         160908   ~1%    {3} r6 = r4 UNION r5
          94246   ~0%    {4} r7 = JOIN r6 WITH Synth#5f134a93::Synth::convertNamedPatternToRaw#1#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.0
          91309   ~1%    {2} r8 = JOIN r7 WITH named_patterns ON FIRST 2 OUTPUT Lhs.3, Lhs.2
                         return r8
```
2023-06-14 14:52:10 +02:00
Rasmus Lerchedahl Petersen
9a1e895fdc Python: missed removing these
`set.add` and `list.append` do not return a value
2023-06-14 14:51:21 +02:00
Tony Torralba
7c4cdbf0d6 Remove badly generated models 2023-06-14 14:20:16 +02:00
Jami
35591113c2 Merge branch 'main' into jcogs33/shared-sink-kind-validation 2023-06-14 08:06:34 -04:00
Michael Nebel
f26c514426 C#: Remove the JumpReturnKind and the related summary component stack. 2023-06-14 14:00:19 +02:00
Michael Nebel
afec9b05e9 Merge pull request #13147 from michaelnebel/csharp/entityframeworkrefactor
C#: Use synthetic global in the EntityFramework code instead of jump steps.
2023-06-14 13:47:56 +02:00
Rasmus Lerchedahl Petersen
3b558a0044 python: remove spurious return flow 2023-06-14 13:35:37 +02:00
yoff
38cca08a86 Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-14 13:27:33 +02:00
Asger F
f737054216 Merge pull request #13380 from asgerf/js/fix-sink-kind
JS: Fix invalid source kind in test
2023-06-14 12:56:58 +02:00
Tony Torralba
5e3d9d8136 Java: Model the Stapler framework 2023-06-14 12:34:52 +02:00
Tony Torralba
182513a981 Merge pull request #13235 from atorralba/atorralba/java/hudson-models
Java: Add Hudson models
2023-06-14 12:33:18 +02:00
Taus
e5b17af9b5 Java: Fix bad tool output 2023-06-14 12:16:44 +02:00
Ian Lynagh
36e8441ed7 Merge pull request #13427 from igfoo/igfoo/references
Kotlin: Avoid using deprecated APIs
2023-06-14 11:15:35 +01:00
Jean Helie
209f3e26d4 Merge pull request #13239 from github/tausbn/automodel-application-mode
Java: Add QL support for automodel application mode
2023-06-14 11:42:26 +02:00
Michael Nebel
2200a2ae79 C#: Address review comments. 2023-06-14 11:25:31 +02:00
Asger F
5aea6fc16c JS: Remove dataExtensions clause from test qlpack 2023-06-14 10:42:31 +02:00
Asger F
21831516f4 JS: use test-local data extensions 2023-06-14 10:38:33 +02:00
Tony Torralba
8bafc22add Replace open-url sink kinds with request-forgery 2023-06-14 09:59:59 +02:00
Tony Torralba
73d2ab7d66 Add change note 2023-06-14 09:58:30 +02:00
Tony Torralba
686c35e210 Add autogenerated models 2023-06-14 09:58:30 +02:00
Anders Schack-Mulligen
1a4fca334f Merge pull request #13273 from aschackmull/dataflow/summarynode-refactor
Dataflow: Refactor FlowSummaryImpl to synthesize nodes independently from DataFlow::Node.
2023-06-14 09:38:36 +02:00
erik-krogh
8663a8ba1c add change-note 2023-06-14 08:31:57 +02:00
erik-krogh
df61c4dd62 reintroduce the experiemental queries that use deprecated features 2023-06-14 08:31:57 +02:00
erik-krogh
bfe7e62f35 update some expected outputs - some tests no longer have an edges relation - and XsltSinks lost a result 2023-06-14 08:31:57 +02:00
erik-krogh
1f8f111ef6 reintroduce DataFlowType - otherwise nothing in the old DataFlow library would compile 2023-06-14 08:31:57 +02:00
erik-krogh
6e001ec062 deprecate SqlInjectionSink - it's not used anywhere 2023-06-14 08:31:57 +02:00
erik-krogh
e463819bc2 get ParamSource.ql to compile by deleting import that got deleted - I have no if this is a good change 2023-06-14 08:31:57 +02:00
erik-krogh
3a436d1f84 do a quick-and-dirty conversion of py/hardcoded-credentials to the new dataflow library 2023-06-14 08:31:56 +02:00
erik-krogh
ae8bf5ed3c delete old deprecations 2023-06-14 08:31:51 +02:00
Rasmus Lerchedahl Petersen
f1de753400 python: add changenote 2023-06-13 21:59:51 +02:00
Rasmus Lerchedahl Petersen
4b4b9bf9da python: add missing summaries
For append/add:
The new results in the experimental tar slip query
show that we do not recognize the sanitisers.
2023-06-13 20:22:21 +02:00
Rasmus Lerchedahl Petersen
b72c93ff4f python: remove remaining explicit taint steps 2023-06-13 20:22:20 +02:00
yoff
1d65284011 Merge pull request #13209 from yoff/python/container-summaries-2
python: Container summaries, part 2
2023-06-13 18:17:09 +02:00
Rasmus Lerchedahl Petersen
775f3eaf56 python: make copy a dataflow step 2023-06-13 17:07:41 +02:00
Taus
b860b21ced Update MaD Declarations after Triage 2023-06-13 16:50:58 +02:00
Alexandre Boulgakov
7280f07611 Merge pull request #13336 from github/sashabu/c++20-todos
Swift: Fix some C++20 todos.
2023-06-13 15:25:29 +01:00
Alexandre Boulgakov
f5d6f50851 Merge pull request #13335 from github/sashabu/c++20
Build: Bump build mode to C++20.
2023-06-13 15:03:01 +01:00
yoff
4056358863 Merge pull request #13438 from RasmusWL/flask-render-string
Python: Add modeling of `flask.render_template_string`
2023-06-13 14:56:43 +02:00
Michael Nebel
9690ff6177 C#: Address review comments. 2023-06-13 14:19:17 +02:00
Alex Ford
75ccbe58ee Ruby: rack - use Mimetype rather than MimeType in predicate names for consistency with concepts 2023-06-13 12:44:29 +01:00
Alex Ford
977ceb89fd Ruby: rack - remove PotentialResponseNode#getAStatusCode 2023-06-13 12:42:46 +01:00
Alex Ford
af1ca7fec7 Update ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-06-13 12:37:31 +01:00
Rasmus Wriedt Larsen
2b7fc94aef Python: Fix validTest.py expectation 2023-06-13 12:11:28 +02:00
Erik Krogh Kristensen
4dc596f0fb Merge pull request #13381 from erik-krogh/mongooseFindByIdAndUpdate
JS: remove the second argument of findByIdAndUpdate as a NoSQL sink
2023-06-13 11:59:58 +02:00
Rasmus Lerchedahl Petersen
33ad15e989 ruby: use aliases 2023-06-13 11:49:30 +02:00
Rasmus Lerchedahl Petersen
e11f6b5107 ruby/python: adjust shared file
- move `isNonLocal` to the top
- missing backtics
2023-06-13 11:49:30 +02:00
Rasmus Lerchedahl Petersen
b5961c7f6b ruby: move to internal folder 2023-06-13 11:49:30 +02:00
Rasmus Lerchedahl Petersen
203f8226cb ruby/python: make SummaryTypeTracker private 2023-06-13 11:32:06 +02:00
Anders Schack-Mulligen
2d616d494e C#/Ruby: Add fields as per review comments. 2023-06-13 11:26:30 +02:00
yoff
8cae151883 Update python/ql/test/experimental/dataflow/typetracking-summaries/TestSummaries.qll
Co-authored-by: Asger F <asgerf@github.com>
2023-06-13 11:22:54 +02:00
Rasmus Lerchedahl Petersen
b709ed47e1 python: add test 2023-06-13 11:20:15 +02:00
Jeroen Ketema
6413fcc0f9 Merge pull request #13439 from jketema/go-dead
Go: Remove commented out code from test
2023-06-13 10:33:51 +02:00
Michael Nebel
577bbd531d C#: Base tests on stubs, move extractor options to options file and updated expected test output. 2023-06-13 10:17:42 +02:00
Jeroen Ketema
d035491c6f Go: Remove commented out code from test 2023-06-13 10:13:42 +02:00
Jeroen Ketema
c3ba206b6a Merge pull request #13346 from jketema/inline-2
Update inline expectation tests to use parameterized module
2023-06-13 10:10:55 +02:00
yoff
2a5173c331 Update python/ql/lib/semmle/python/frameworks/Stdlib.qll
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-06-13 10:04:46 +02:00
Asger F
0d45074caa Merge pull request #13422 from asgerf/rb/map_filter
Ruby: fix bug in filter_map summary
2023-06-13 09:43:47 +02:00
Tamás Vajk
aed6a75cd4 Merge pull request #13420 from tamasvajk/feature/standalone-mscorlib
C#: Make sure System.Private.CoreLib is added only once as a reference in standalone extraction
2023-06-13 09:29:16 +02:00
Tony Torralba
ffe67689ec Merge branch 'main' into atorralba/java/command-injection-mad-sinks 2023-06-13 09:27:33 +02:00
Tony Torralba
29d4b6fadc Re-add public classes that shouldn't be removed yet 2023-06-13 09:24:27 +02:00
Tony Torralba
2fd2c434f2 Apply suggestions from code review
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-13 09:24:15 +02:00
Rasmus Wriedt Larsen
6526364045 Python: Add modeling of flask.render_template_string 2023-06-12 21:18:31 +02:00
Sarita Iyer
1073a2838c Merge pull request #13424 from github/si-10647-docs-update
Multi-variant repository analysis docs update
2023-06-12 11:51:42 -04:00
Paolo Tranquilli
c612a7a16b Revert "Swift: deduplicate accessors and params correctly"
This reverts commit bab4eeeb55.
2023-06-12 17:14:20 +02:00
Paolo Tranquilli
1d32f6efc3 Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-06-12 16:49:45 +02:00
Paolo Tranquilli
bab4eeeb55 Swift: deduplicate accessors and params correctly 2023-06-12 16:48:03 +02:00
erik-krogh
3fd9f26b52 use consistent indentation in mongoose.js 2023-06-12 16:40:42 +02:00
erik-krogh
cd6f738f72 add mongoose.Types.ObjectId.isValid as a sanitizer-guard for NoSQL injection 2023-06-12 16:38:11 +02:00
Anders Schack-Mulligen
bc7cb1ec47 C#: Fix some qltests. 2023-06-12 16:19:04 +02:00
Sarita Iyer
2e2a03dec2 Merge branch 'si-10647-docs-update' of https://github.com/github/codeql into si-10647-docs-update 2023-06-12 10:00:08 -04:00
Sarita Iyer
8c59ec2ec7 revise maximum info 2023-06-12 09:59:58 -04:00
Sarita Iyer
082c9a26d8 Update docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-06-12 09:22:42 -04:00
Anders Schack-Mulligen
949d4491f9 C#: Remove summaries for void-returning Reverse methods. 2023-06-12 13:18:28 +02:00
Anders Schack-Mulligen
eec012d308 Java: Fix test 2023-06-12 13:18:13 +02:00
Anders Schack-Mulligen
88fe0f089e C#: Fix expected output. 2023-06-12 13:17:55 +02:00
Anders Schack-Mulligen
f8ff575ff0 C#: Fix bugs in misc models. 2023-06-12 11:37:57 +02:00
Erik Krogh Kristensen
798f3880c9 Merge pull request #13402 from erik-krogh/deps-some-py
Py: delete some old deprecations
2023-06-12 11:29:44 +02:00
Calum Grant
0163fb8d9f Merge pull request #13391 from github/RasmusWL/experimental-query-id
Python: Avoid duplicated query-id
2023-06-12 10:10:51 +01:00
Tamas Vajk
cdf1c2639d C#: Only include CoreLib.dll when UseMscorlib option is set 2023-06-12 11:03:26 +02:00
Arthur Baars
fad73d71e5 Merge pull request #13307 from hmac/amammad-ruby-YAMLunsafeLoad
Ruby: Add YAML unsafe deserialization sinks
2023-06-12 10:43:37 +02:00
Felicity Chapman
68b6d6207e Update docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst 2023-06-12 09:35:20 +01:00
Asger F
452af312ff Ruby: change note 2023-06-12 10:07:26 +02:00
Tony Torralba
6b9c00e9cc Merge pull request #13429 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-12 08:47:40 +02:00
github-actions[bot]
a628384d83 Add changed framework coverage reports 2023-06-12 00:18:38 +00:00
Sarita Iyer
c30f259f9d provide more info 2023-06-09 16:28:34 -04:00
Sarita Iyer
52acf5e8be updates based on feedback 2023-06-09 16:08:30 -04:00
Jami Cogswell
9abe3e3da4 Shared: use a module as input to 'KindValidation' 2023-06-09 14:35:37 -04:00
Sarita Iyer
d81ba80406 Update docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2023-06-09 14:27:26 -04:00
Ian Lynagh
d3941ae935 Kotlin: Avoid using deprecated APIs 2023-06-09 18:14:09 +01:00
Sarita Iyer
427f2a488c fix 2023-06-09 11:31:27 -04:00
Sarita Iyer
a602e9e9b4 fix format 2023-06-09 11:31:14 -04:00
Sarita Iyer
112a4adaf2 update image 2023-06-09 11:25:38 -04:00
Sarita Iyer
c741fb49be updates 2023-06-09 10:42:02 -04:00
Sarita Iyer
96bce2a4fc mrva docs update 2023-06-09 10:30:33 -04:00
Arthur Baars
dbcb1c2224 Ruby: update grammar 2023-06-09 16:23:28 +02:00
Anders Schack-Mulligen
5062442982 Go/Python/Ruby/Swift: Add stub. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
2ecce575a9 C#: Fix types of summary parameter nodes. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
98f51d7f29 Dataflow: Sync. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
97b2bdaa9f Java: Fix types of summary parameter nodes. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
b2d3f29ef3 Swift: Fix tests. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
5eb278095c Go: Fix tests. 2023-06-09 15:39:28 +02:00
Anders Schack-Mulligen
0c62901a67 Ruby: Fix tests. 2023-06-09 15:39:18 +02:00
Anders Schack-Mulligen
6020e4d0e3 C#/Go/Python/Ruby/Swift: Fix some more references. 2023-06-09 15:30:38 +02:00
Anders Schack-Mulligen
1c3b8e2b96 Swift: Adjust to FlowSummaryImpl changes. 2023-06-09 15:30:38 +02:00
Anders Schack-Mulligen
4e531af71b Ruby: Adjust to FlowSummaryImpl changes. 2023-06-09 15:30:35 +02:00
Rasmus Lerchedahl Petersen
7e87a7c1f7 python: rewrite argumentPositionMatch
to not use the call graph.
2023-06-09 15:29:13 +02:00
Anders Schack-Mulligen
1e3b960c1b Python: Adjust to FlowSummaryImpl changes. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
e6e4cef35e Go: Adjust to FlowSummaryImpl changes. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
5e6031724a C#: Adjust to FlowSummaryImpl changes. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
2cc5bde925 Dataflow: Sync. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
254d60c826 Dataflow: Refactor FlowSummaryImpl to synthesize nodes independently from DataFlow::Node. 2023-06-09 15:27:17 +02:00
Anders Schack-Mulligen
59636c43ca Dataflow: Rename two private predicates. 2023-06-09 15:27:17 +02:00
erik-krogh
42d67d0137 add change-note 2023-06-09 15:24:12 +02:00
erik-krogh
6dfeb2536b delete old deprecations 2023-06-09 15:12:23 +02:00
Stephan Brandauer
b38bc52019 Java: fix bug in ExcludedFromModeling Characteristic 2023-06-09 14:57:56 +02:00
Asger F
d47477bd3b Ruby: update line numbers in expectation file 2023-06-09 14:52:21 +02:00
Paolo Tranquilli
c42e65cbaf Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-06-09 14:37:20 +02:00
Asger F
a50d91ea48 Ruby: fix bug in filter_map summary 2023-06-09 14:31:10 +02:00
Jami
f222cce2e5 Merge pull request #13418 from jcogs33/jcogs33/fix-typo-in-parameterized-module-docs
Docs: fix typo in spelling of keyword
2023-06-09 08:17:07 -04:00
Rasmus Lerchedahl Petersen
b294f48dbe Merge branch 'main' of https://github.com/github/codeql into python-ruby/track-through-summaries-pm 2023-06-09 14:16:34 +02:00
Stephan Brandauer
1ae2fee309 Java: Update java/ql/lib/ext/okhttp3.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-06-09 13:48:16 +02:00
Stephan Brandauer
44785b72ce Java: Update java/ql/lib/ext/okhttp3.model.yml
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-06-09 13:46:09 +02:00
Anders Schack-Mulligen
1b7bbf6320 Merge pull request #13083 from aschackmull/dataflow/typestrengthen
Dataflow: Strengthen tracked types.
2023-06-09 13:23:30 +02:00
Mathias Vorreiter Pedersen
74ed9f535c Merge pull request #13406 from MathiasVP/fix-++-problem
C++: Fix the `++` problem
2023-06-09 11:20:00 +01:00
Michael Nebel
5510d050c1 C#: Synthetic names only needs to rely on the output stack. 2023-06-09 11:40:04 +02:00
Tamas Vajk
bf3677df16 C#: Make sure System.Private.CoreLib is added only once as a reference in standalone extraction 2023-06-09 11:29:44 +02:00
Arthur Baars
a5410bd52d Merge pull request #13419 from asgerf/rb/restrict-orm-tracking
Ruby: restrict ORM tracking to calls
2023-06-09 11:01:05 +02:00
Jeroen Ketema
4485560f43 Ruby: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:43:05 +02:00
Jeroen Ketema
9633f00ed1 QL-for-QL: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:42:46 +02:00
Jeroen Ketema
8f599faf85 Python: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:42:29 +02:00
Jeroen Ketema
49993b023e Java: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:42:17 +02:00
Jeroen Ketema
97c4f497bc Go: Rewrite inline expectation tests to use parameterized module 2023-06-09 10:41:21 +02:00
Tony Torralba
0cef5651e2 Merge pull request #13417 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-09 09:27:03 +02:00
Michael Nebel
7620c051d3 C#: Remove the savechanges origin name from the synthetic name (this is not needed). 2023-06-09 09:15:45 +02:00
Asger F
bdbbde347e Merge pull request #13407 from asgerf/rb/restrict-orm-tracking
Ruby: restrict ORM tracking to calls
2023-06-09 09:13:01 +02:00
Anders Schack-Mulligen
44b09507ab Merge pull request #13408 from aschackmull/java/loginjection-perf
Java: Add more negation context to reduce string ops and improve perf.
2023-06-09 08:44:27 +02:00
Anders Schack-Mulligen
68f1e40370 Java/C#: Add change notes. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
85d6b44d92 Java: Fix test output. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
d230509905 Dataflow: Address review comments. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
95afd551ff Java: Fix qltest 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
4399138c82 Dataflow: Fix QL4QL alert. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
53f2b8aab0 Dataflow: Sync. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
8a584b78ac Dataflow: Enable type strengthening in partial flow. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
441ccef6c4 Dataflow: Bugfix, use arg type rather than strengthened param type. 2023-06-09 08:37:36 +02:00
Anders Schack-Mulligen
a0a9d30286 Java: Fix qltests. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
21dea62e99 C#: Fix qltests. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
4633abe19e Java: Autoformat 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
fd832416d8 Dataflow: Add empty type strengthening predicate for languages without type pruning. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
96c1b5b0a9 C#: Enable type strengthening. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
e8cea79f1d Dataflow: Sync. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
ad461a87b4 Dataflow: Strengthen tracked types. 2023-06-09 08:37:35 +02:00
Anders Schack-Mulligen
1d87f0793b Dataflow: Minor refactor. 2023-06-09 08:37:35 +02:00
Arthur Baars
bd583ca28f Merge pull request #13416 from github/release-prep/2.13.4
Release preparation for version 2.13.4
2023-06-09 08:33:27 +02:00
Jami
7aede5034d Docs: fix typo 2023-06-08 22:52:34 -04:00
Jami Cogswell
bcba1f3a4d Shared: update pack files 2023-06-08 21:51:24 -04:00
github-actions[bot]
81b08b4399 Add changed framework coverage reports 2023-06-09 00:18:12 +00:00
Jami Cogswell
3bfb5f9ac4 Shared: update comment and remove 'remote-flow' as a source kind 2023-06-08 20:15:13 -04:00
Jami Cogswell
da58b2afc8 Shared: move shared file to 'shared' folder and add parameterized module for 'getInvalidModelKind' 2023-06-08 20:05:27 -04:00
Jeroen Ketema
bff11c3d23 Apply suggestions from code review 2023-06-08 22:33:50 +02:00
github-actions[bot]
e4be303a23 Release preparation for version 2.13.4 2023-06-08 19:57:37 +00:00
Arthur Baars
e8b12ce416 Merge pull request #13414 from github/mbg/csharp/fix/dotnet_test_mstest
C#: Pass architecture to `dotnet test` in `dotnet_test_mstest`
2023-06-08 20:11:59 +02:00
Michael Nebel
2a1c0e8ba6 C#: Re-factor. 2023-06-08 19:02:07 +02:00
Arthur Baars
f945e30bb4 Merge pull request #13410 from github/revert-13399-update-ruby-grammar
Revert "Ruby: update tree-sitter-ruby"
2023-06-08 18:24:36 +02:00
Michael B. Gale
a961fffda8 Pass architecture to dotnet test 2023-06-08 16:51:57 +01:00
Tony Torralba
abb775c616 Merge pull request #13409 from atorralba/atorralba/java/fix-gson-models
Java: Fix more problems in the Gson models
2023-06-08 17:36:40 +02:00
Tony Torralba
3c579b6c7d Merge pull request #13411 from github/atorralba/workflow/run-csv-coverage-on-yml-changes
Run "Check framework coverage changes" workflow when models-as-data files change
2023-06-08 17:18:51 +02:00
Ian Lynagh
22fe055e53 Kotlin: Tweak our JSON escaping
We were escaping '/', but I don't think there is any need to do so. It
just happens to have a nice escape in the spec. Escaping it might
filenames annoying to work with.

I've also added escaping for the other control characters that we're
meant to escape.
2023-06-08 15:20:30 +01:00
Tony Torralba
8401793755 Run "Check framework coverage changes" workflow when models-as-data files change 2023-06-08 15:57:38 +02:00
Alexandre Boulgakov
9ec09000e5 Swift: Remove no longer needed code. 2023-06-08 14:52:58 +01:00
Asger F
74a9d9fa37 Revert "Ruby: update tree-sitter-ruby" 2023-06-08 15:29:36 +02:00
Geoffrey White
0a6edd345a Merge pull request #13405 from geoffw0/swiftloc
Swift: Improve SummaryStats.ql
2023-06-08 14:02:03 +01:00
Anders Schack-Mulligen
65a68f5092 Merge pull request #13404 from aschackmull/java/functionalinterface-perf
Java: Improve join-order for FunctionalInterface.
2023-06-08 15:00:22 +02:00
Tony Torralba
0e242cba7e Update java/ql/lib/ext/retrofit2.model.yml 2023-06-08 14:59:10 +02:00
Tony Torralba
4608481d7b Java: Fix more problems in the Gson models
Found during type strengthening work by @aschackmull
2023-06-08 14:53:09 +02:00
Alexandre Boulgakov
5450585c1c Swift: Remove SwiftDiagnostic constructor (C++20 todo). 2023-06-08 13:11:14 +01:00
Alexandre Boulgakov
838130ca3a Swift: Fix some C++20 todos. 2023-06-08 13:11:14 +01:00
Alexandre Boulgakov
5952a729df Build: Bump build mode to C++20. 2023-06-08 13:10:43 +01:00
Tom Hvitved
a896be7eb8 Merge pull request #13387 from michaelnebel/csharp/dotnettest
C#: Dotnet test tracer improvements.
2023-06-08 14:05:29 +02:00
Anders Schack-Mulligen
5a2ac1b5ca Java: Add more negation context to reduce string ops and improve perf. 2023-06-08 14:04:57 +02:00
Asger F
d6741f655d Ruby: restrict ORM tracking to calls 2023-06-08 14:01:51 +02:00
Mathias Vorreiter Pedersen
a357eeedac C++: Accept test changes. 2023-06-08 12:50:16 +01:00
Mathias Vorreiter Pedersen
afb1129f27 C++: Ensure that postfix crement operations are handled properly in dataflow SSA. 2023-06-08 12:50:05 +01:00
Mathias Vorreiter Pedersen
57ae1e9ff7 C++: Add a testcase that started to fail in #13326. 2023-06-08 12:49:08 +01:00
Alex Ford
b4620042a5 Ruby: fix use of deprecated predicate 2023-06-08 12:09:22 +01:00
Alex Ford
397a809426 Merge remote-tracking branch 'origin/main' into rb/rack-redirect 2023-06-08 12:07:57 +01:00
Geoffrey White
5727d49cce Swift: Take out common code for lines of code. 2023-06-08 12:03:03 +01:00
Geoffrey White
a3ef5c6918 Swift: QLDoc Diagnostics.qll. 2023-06-08 12:03:02 +01:00
Anders Schack-Mulligen
dabb4dd643 Java: Improve join-order for FunctionalInterface. 2023-06-08 13:02:54 +02:00
Alex Ford
21b4f885a6 ruby: fix qldoc 2023-06-08 12:01:42 +01:00
Alex Ford
c531b94594 Ruby: add a change note for rack redirect support 2023-06-08 11:59:10 +01:00
Geoffrey White
e0f16f46d2 Swift: Add compile errors / warnings to SummaryStats.ql. 2023-06-08 11:48:57 +01:00
Geoffrey White
dc7a286948 Swift: Add lines of code to SummaryStats.ql. 2023-06-08 11:29:04 +01:00
Alex Ford
22b9ab43c6 Merge pull request #13259 from alexrford/rb/actiondispatch-refactor
Ruby: Refactor and slightly expand `ActionDispatch` modelling
2023-06-08 11:08:36 +01:00
Erik Krogh Kristensen
d9e3569fe5 Merge pull request #13350 from erik-krogh/once-again-deps-not-py
C++: delete old deprecations
2023-06-08 12:08:09 +02:00
Nora Dimitrijević
e93022d649 Merge branch 'main' into swift/brace-stmt-variables 2023-06-08 12:04:25 +02:00
Nora Dimitrijević
a5e0669981 Swift: fix bad join order in NamedPattern.getVarDecl()
Ideally the EDB itself should contain a direct
reference from NamedPattern to VarDecl, not just a name,
but oh well, this join order works fine.

BEFORE:

```
[2023-06-08 11:40:01] Evaluated non-recursive predicate quick_eval#ff@60fe07kr in 6533ms (size: 91309).
Evaluated relational algebra for predicate quick_eval#ff@60fe07kr with tuple counts:
          1209062   ~3%    {2} r1 = SCAN VarDecl#914e0d1e::Generated::VarDecl::getName#0#dispred#ff OUTPUT In.1, In.0
        234687793   ~0%    {2} r2 = JOIN r1 WITH NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
         19112791   ~0%    {3} r3 = JOIN r2 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1

         19112791   ~0%    {3} r4 = JOIN r3 WITH Element#e67432df::Generated::Element::resolve#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1
            24647   ~0%    {2} r5 = JOIN r4 WITH Element#d22cfd66::Element::getFullyUnresolved#bf ON FIRST 2 OUTPUT Lhs.1, Lhs.2

         19112791   ~0%    {3} r6 = JOIN r3 WITH Element#e67432df::Generated::Element::resolve#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
         19112791   ~3%    {3} r7 = JOIN r6 WITH Element#d22cfd66::Element::getFullyUnresolved#bf ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
            66662   ~4%    {2} r8 = JOIN r7 WITH #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#bf ON FIRST 2 OUTPUT Lhs.0, Lhs.2

            91309   ~2%    {2} r9 = r5 UNION r8
                           return r9
```

AFTER:

```
[2023-06-08 11:55:26] Evaluated non-recursive predicate quick_eval#ff@fe906afo in 26ms (size: 91309).
Evaluated relational algebra for predicate quick_eval#ff@fe906afo with tuple counts:
         92048   ~0%    {3} r1 = SCAN NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff OUTPUT In.0, In.1, In.0

         82893   ~0%    {2} r2 = SCAN #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#fb#flipped OUTPUT In.1, In.0
         66417   ~1%    {3} r3 = JOIN r2 WITH NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.0

        158465   ~0%    {3} r4 = r1 UNION r3
         94246   ~3%    {3} r5 = JOIN r4 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
         91309   ~2%    {2} r6 = JOIN r5 WITH VarDecl#914e0d1e::Generated::VarDecl::getName#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.0
                        return r6
```
2023-06-08 12:03:58 +02:00
Stephan Brandauer
8f697ac1ee Java: fix broken MaD export format 2023-06-08 12:02:50 +02:00
Stephan Brandauer
c6f10519fa Merge branch 'main' into java/update-mad-decls-after-triage-2023-06-08T08-51-47 2023-06-08 12:00:07 +02:00
Mathew Payne
8052b35e62 Merge branch 'main' into csharp-ext 2023-06-08 10:58:02 +01:00
Mathew Payne
c493e276ec Update MaD sink kinds from main 2023-06-08 10:57:12 +01:00
Anders Schack-Mulligen
cc45db7c76 Merge pull request #13394 from atorralba/atorralba/java/fix-gson-jsonarray-models
Java: Fix Gson's JsonArray.add models
2023-06-08 11:05:40 +02:00
Stephan Brandauer
bda938c544 Update MaD Declarations after Triage 2023-06-08 10:51:48 +02:00
Asger F
76a8e9827e Merge pull request #13283 from asgerf/js/restrict-regex-search-function
JS: Be more conservative about flagging "search" call arguments as regex
2023-06-08 10:50:51 +02:00
erik-krogh
39438c6196 add change-note 2023-06-08 10:15:32 +02:00
yoff
d59263af0e Merge pull request #13398 from github/tausbn/python-update-syntax-error-expected-files
Python: Update expected output for syntax error queries
2023-06-08 10:10:42 +02:00
erik-krogh
2241350d32 wait with deprecating Container::getURL() 2023-06-08 10:10:21 +02:00
erik-krogh
a4ef8619c6 delete old deprecations 2023-06-08 10:10:21 +02:00
Tom Hvitved
cee70883f0 Merge pull request #12964 from hvitved/ruby/remove-synth-returns
Ruby: Remove canonical return nodes
2023-06-08 10:07:48 +02:00
Tony Torralba
fd8112f692 Merge pull request #13400 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-08 10:04:26 +02:00
Michael Nebel
2fece9d721 C#: Add MSTEST test project and check that the call to vstest doesn't get the UseSharedCompilation=false flag forwarded. 2023-06-08 10:01:00 +02:00
Anders Schack-Mulligen
f004fcf926 Merge pull request #13388 from hvitved/type-back-tracking-inline-late
Type tracking: Use `noopt`+`inline_late` in `TypeBackTracker::[small]step`
2023-06-08 09:55:18 +02:00
Michael Nebel
65e651506c C#: Address review comments. 2023-06-08 08:51:21 +02:00
github-actions[bot]
cbbd885e22 Add changed framework coverage reports 2023-06-08 00:17:14 +00:00
Arthur Baars
dcd254adf8 Merge pull request #13399 from aibaars/update-ruby-grammar
Ruby: update tree-sitter-ruby
2023-06-07 19:53:33 +02:00
Arthur Baars
0efa212c40 Ruby: update tree-sitter-ruby 2023-06-07 19:27:46 +02:00
Owen Mansel-Chan
55fe318f5a Merge pull request #13397 from owen-mc/go/document-build-environment-recommendations
Add Go version table for --identify-environment
2023-06-07 17:06:13 +01:00
Ian Lynagh
1b83aeb25d Merge pull request #13393 from igfoo/igfoo/remove_explorer
Kotlin: Remove kotlin-explorer
2023-06-07 16:32:00 +01:00
Ian Lynagh
c4e829f1d4 Merge pull request #13385 from igfoo/igfoo/kotlin_version_relax
Kotlin: Relax version requirements
2023-06-07 16:31:49 +01:00
Alex Ford
0a7ae58710 Ruby: revert to simpler Rack PotentialResponseNode def and use TypeBackTracker to track instances 2023-06-07 16:30:53 +01:00
Taus
19e1bab102 Python: Update expected output for syntax error queries 2023-06-07 15:26:52 +00:00
Alex Ford
a5d8db6317 Ruby: fix qldoc 2023-06-07 15:55:28 +01:00
Alex Ford
57508b2b3b ruby: Limit rack PotentialResponseNode to things that look like they occur in a rack application 2023-06-07 15:55:05 +01:00
Owen Mansel-Chan
69854638b6 Add Go version table for --identify-environment 2023-06-07 15:51:21 +01:00
Tony Torralba
c0135673fa Fix JsonArray.addAll model
Properly test JsonArray.add(String) and JsonArray.addAll(JsonArray) as well
2023-06-07 16:18:32 +02:00
Stephan Brandauer
2921df41da Java: fix import 2023-06-07 15:22:59 +02:00
Stephan Brandauer
ec3a7e39ad Java: qldoc style 2023-06-07 14:57:38 +02:00
Stephan Brandauer
715b1351f3 Java: share considerSubtypes predicate between Java modes 2023-06-07 14:55:00 +02:00
Michael Nebel
f9c890be35 C#: Address review comments. 2023-06-07 14:53:41 +02:00
Stephan Brandauer
7e77e2ea82 Java: comment why we're using erased types in MaD 2023-06-07 14:42:20 +02:00
Stephan Brandauer
a8799fe981 Java: share getCallable interface between automodel extraction modes 2023-06-07 14:38:52 +02:00
Tamás Vajk
ccb622348b Merge pull request #13382 from tamasvajk/feature/standalone-dll-unsafe
C#: Change standalone extraction to allow unsafe code
2023-06-07 14:37:11 +02:00
Tony Torralba
6d7234f8ed Merge pull request #13225 from atorralba/atorralba/java/path-injection-mad-sinks-2
Java: Migrate path injection sinks to models-as-data (simplified)
2023-06-07 14:27:36 +02:00
Tony Torralba
35b4c438ff Fix Gson's JsonArray.add models
When the type of the argument isn't JsonElement, the summary must be taint flow instead of value flow
2023-06-07 14:12:20 +02:00
yoff
911835c30e Merge pull request #13392 from yoff/java/test-type-tracking-through-flow-summaries
java: test type tracking through flow summaries
2023-06-07 14:10:23 +02:00
Stephan Brandauer
92ad02a752 Java: update getRelatedLocation qldoc 2023-06-07 14:09:07 +02:00
Rasmus Lerchedahl Petersen
6ddf1f7eaf ruby/python: remove predicates from interface 2023-06-07 14:07:08 +02:00
Stephan Brandauer
be6b1d8aaf Java: remove SkipFrameworkModeling characteristic in favour of later evaluation 2023-06-07 13:58:56 +02:00
yoff
7ab3cde3aa Apply suggestions from code review
Co-authored-by: Asger F <asgerf@github.com>
2023-06-07 13:54:31 +02:00
Stephan Brandauer
2e16b71215 Java: update qldoc of ClassQualifierCharacteristic 2023-06-07 13:52:57 +02:00
Stephan Brandauer
1bfbfec1bc Java: use problem.severity in automodel extraction queries 2023-06-07 13:44:52 +02:00
Ian Lynagh
d6ac5cdc94 Kotlin: Remove kotlin-explorer
This was an exploration tool that I don't think has been used for some
time.
2023-06-07 12:39:00 +01:00
Erik Krogh Kristensen
6ba7f9a238 Merge pull request #13352 from erik-krogh/once-again-deps-not-py-cpp
delete old deprecations
2023-06-07 13:00:57 +02:00
Michael Nebel
d4d571e435 C#: Better change note.
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-06-07 12:44:36 +02:00
Michael Nebel
3eb3178ba5 C#: Add change note. 2023-06-07 12:43:31 +02:00
Michael Nebel
5c9b0b9b76 C#: Address review comments. 2023-06-07 12:43:31 +02:00
Tony Torralba
46b30453e3 Merge pull request #13386 from github/java/update-mad-decls-after-triage-2023-06-06T14-38-29
Java: Update MaD Declarations after Triage
2023-06-07 12:33:26 +02:00
Tamás Vajk
8fe025eb64 Merge pull request #13384 from tamasvajk/fix/standalone-explicit-interface-error
C#: Improve error message for missing explicit interface implementation
2023-06-07 12:19:08 +02:00
Rasmus Lerchedahl Petersen
aec1e4a713 java: address ql alert 2023-06-07 11:40:50 +02:00
Rasmus Lerchedahl Petersen
76e1c6f76f java: test type tracking through flow summaries 2023-06-07 11:18:53 +02:00
Nora Dimitrijević
cad6582701 Merge branch 'main' into swift/brace-stmt-variables 2023-06-07 10:51:58 +02:00
Tamas Vajk
0f75449abb Improve code quality 2023-06-07 10:40:58 +02:00
Paolo Tranquilli
0b09fdae43 Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-06-07 10:40:38 +02:00
Tony Torralba
416d3d587d Accept test changes
An uncovered test case is now correctly covered
2023-06-07 10:33:17 +02:00
Paolo Tranquilli
357542a160 Merge pull request #13258 from github/redsun82/swift-synth-properties
Codegen: allow `synth` properties of non-`synth` classes
2023-06-07 10:31:06 +02:00
Geoffrey White
aa8878ba86 Merge pull request #13356 from geoffw0/qualname
Swift: Add FieldDecl.getQualifiedName
2023-06-07 09:08:16 +01:00
Rasmus Wriedt Larsen
0c8b4251cf Python: Avoid duplicated query-id 2023-06-07 10:07:01 +02:00
Tony Torralba
b5bbe63144 Merge pull request #13389 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-07 09:48:44 +02:00
Tony Torralba
27763d6bbe Improve ZipSlip exclusion to take varargs into account 2023-06-07 09:25:56 +02:00
Paolo Tranquilli
700e3d5e53 Codegen: rename ipa to synth 2023-06-07 09:12:39 +02:00
Tony Torralba
8001ae9669 Update java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-07 09:08:24 +02:00
Tony Torralba
60725e9580 Update java/ql/lib/ext/org.springframework.core.io.model.yml 2023-06-07 09:07:22 +02:00
Tom Hvitved
48ac3e58ee Python: Use CallGraphConstruction in call graph construction 2023-06-07 09:02:03 +02:00
Tom Hvitved
88c5700c24 Ruby: Use CallGraphConstruction in call graph construction 2023-06-07 09:02:03 +02:00
Tom Hvitved
4bf124bffe Ruby/Python: Add CallGraphConstruction module for recursive type-tracking based call graph construction 2023-06-07 09:02:03 +02:00
Tony Torralba
2f12ae2e0d Update java/ql/lib/ext/okhttp3.model.yml 2023-06-07 08:57:12 +02:00
github-actions[bot]
a14e7fa694 Add changed framework coverage reports 2023-06-07 00:16:58 +00:00
Tom Hvitved
322b254cba Type tracking: Use noopt+inline_late in TypeBackTracker::[small]step 2023-06-06 20:46:14 +02:00
Nora Dimitrijević
189dee69bc Merge branch 'main' into swift/brace-stmt-variables 2023-06-06 17:40:25 +02:00
Nora Dimitrijević
03e94c7137 Swift: add library pack change note 2023-06-06 17:37:02 +02:00
Michael Nebel
4dae7ad35a C#: Only inject the shared compilation flag, if argument is not exe or dll. 2023-06-06 17:22:52 +02:00
Stephan Brandauer
b31131d33a Merge pull request #13344 from github/java/update-mad-decls-after-triage-2023-06-01T12-58-13
Java: Update MaD Declarations after Triage
2023-06-06 17:08:50 +02:00
Nora Dimitrijević
a831456e94 Swift: make BraceStmt's variable a synth property 2023-06-06 16:54:47 +02:00
Nora Dimitrijević
4a29087ce7 Swift: update Cfg test: VarDecls no longer in BraceStmt basic blocks
This is a consequence of VarDecls not being Elements of BraceStmts. =
2023-06-06 16:54:47 +02:00
Nora Dimitrijević
8ccbad601b Swift: PrintAst test changes 2023-06-06 16:54:47 +02:00
Nora Dimitrijević
026492836c Swift: codegen 2023-06-06 16:54:46 +02:00
Nora Dimitrijević
387cde5972 Swift: add BraceStmt.getVariable(_) child with logic in QL. 2023-06-06 16:54:46 +02:00
Michael Nebel
0f010afce1 C#: Add dotnet test that targets dll. 2023-06-06 16:53:26 +02:00
Stephan Brandauer
75cbcdd72e Update MaD Declarations after Triage 2023-06-06 16:38:31 +02:00
Tamás Vajk
e8f56f2981 Update csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs
Co-authored-by: Michael B. Gale <mbg@github.com>
2023-06-06 16:20:48 +02:00
Nora Dimitrijević
2529312d1d Codegen: fix test.qlgen failure 2023-06-06 15:58:19 +02:00
Nora Dimitrijević
928da77d10 Merge branch 'main' into redsun82/swift-synth-properties 2023-06-06 15:34:02 +02:00
Ian Lynagh
ca63122ce4 Kotlin: Relax version requirements
If the latest version we know about is 1.9, and we are faced with 1.10,
then we try 1.9 rather than failing with an exception.
2023-06-06 14:09:55 +01:00
Tamas Vajk
a4dec591c7 C#: Improve error message for missing explicit interface implementation 2023-06-06 15:01:54 +02:00
Tamas Vajk
75bc8756f2 C#: Change standalone extraction to allow unsafe code 2023-06-06 14:43:09 +02:00
Tony Torralba
49c6ea27a0 Merge pull request #13379 from atorralba/atorralba/kotlin/use-with-flow
Kotlin: Add flow through kotlin.io.use and kotlin.with
2023-06-06 13:44:14 +02:00
Asger F
17f9239c33 JS: Fix invalid source kind in test 2023-06-06 13:40:06 +02:00
Taus
f4fd908f7f Java: Comment out sinks for which no query exists 2023-06-06 13:01:59 +02:00
Ian Lynagh
f690d150b0 Merge pull request #13373 from igfoo/igfoo/kotlin-loc
Java/Kotlin: Split lines of code by language
2023-06-06 11:49:18 +01:00
Arthur Baars
7324d1705e Merge branch 'main' into amammad-ruby-YAMLunsafeLoad 2023-06-06 12:09:06 +02:00
Taus
c4bfb21f0f Merge pull request #13371 from github/nickrolfe/python-location-tostring
Python: avoid selecting `getLocation()`
2023-06-06 12:05:51 +02:00
Erik Krogh Kristensen
0e6693bdea Merge pull request #12874 from erik-krogh/ts51
JS: Add support for TS 5.1
2023-06-06 11:51:51 +02:00
Rasmus Wriedt Larsen
a1f20f84d4 Merge pull request #13359 from jorgectf/jorgectf/unsafe-deserialization-name-convention
Python: Make `py/unsafe-deserialization` `@name` consistent with other languages
2023-06-06 11:28:41 +02:00
Tony Torralba
1d8ca88aca Add change note 2023-06-06 11:25:07 +02:00
Tony Torralba
72af634575 Kotlin: Add flow through use and with 2023-06-06 11:22:16 +02:00
Nick Rolfe
6c5c338e6b Merge pull request #13348 from github/nickrolfe/java-location-tostring
Java: avoid call to `Location.toString()`
2023-06-06 09:55:42 +01:00
Nick Rolfe
3d0ecbed39 Merge pull request #13361 from github/nickrolfe/csharp-location-tostring
C#: avoid calls to `Location::toString()`
2023-06-06 09:55:09 +01:00
Tony Torralba
1601846478 Add exclusion to the ZipSlip query to avoid FPs 2023-06-06 10:28:49 +02:00
Tony Torralba
0065e6e1d6 Apply suggestions from code review
Fix incorrect models-as-data rows
2023-06-06 10:04:22 +02:00
Tony Torralba
1ccec90c6f Apply suggestions from code review
Co-authored-by: Jami <57204504+jcogs33@users.noreply.github.com>
2023-06-06 09:10:18 +02:00
Erik Krogh Kristensen
b78cd48954 Merge pull request #13329 from erik-krogh/sqlhelp
JS: improve the sql-injection help page
2023-06-06 08:44:44 +02:00
Erik Krogh Kristensen
29bbf58a29 Merge pull request #13377 from github/dependabot/cargo/ql/regex-1.8.4
Bump regex from 1.8.3 to 1.8.4 in /ql
2023-06-06 07:57:04 +02:00
dependabot[bot]
d38bca1e8c Bump regex from 1.8.3 to 1.8.4 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.3...1.8.4)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 04:02:46 +00:00
Geoffrey White
e04f6bff27 Swift: Add a simple Regex library. 2023-06-05 23:55:01 +01:00
Geoffrey White
c994b4b9dd Swift: Create test cases for a regular expression library. 2023-06-05 23:55:01 +01:00
Jami Cogswell
5a23421d9a Shared: minor updates to comments 2023-06-05 13:46:56 -04:00
Jeroen Ketema
272ced6ea5 Merge pull request #13374 from jketema/ptr-deref-min
C++: Remove `cpp/invalid-pointer-deref` results duplicating ones with smaller `k`
2023-06-05 19:31:24 +02:00
Jami Cogswell
7a4b74dd6a C#: fix typo with outdated sink msg location 2023-06-05 13:21:39 -04:00
Jami Cogswell
6c46cd9c21 Java/C#/Go/Swift: move 'SharedModelValidation.qll' to internal folder 2023-06-05 13:11:08 -04:00
erik-krogh
3cb2ec4e87 fix nits from doc review 2023-06-05 19:06:07 +02:00
Jami Cogswell
9d5972acc2 Shared: update qldocs 2023-06-05 12:18:34 -04:00
Jami Cogswell
3f1dc8e5c7 Shared: add outdated Swift sink kinds 2023-06-05 12:18:34 -04:00
Jami Cogswell
62ac0dc471 Shared: add outdated sink kind msg to 'getInvalidModelKind' for all languages 2023-06-05 12:18:33 -04:00
Jami Cogswell
76f5dca861 Shared: move 'OutdatedSinkKind' to shared file and add outdated JS and C# sink kinds 2023-06-05 12:18:33 -04:00
Jami Cogswell
7b629f5d63 Shared: include 'qltest%' and 'test-%' 2023-06-05 12:18:33 -04:00
Jami Cogswell
76508d17c6 Go/Swift: validate source/sink kinds 2023-06-05 12:18:33 -04:00
Jami Cogswell
254e447923 JS/Python/Ruby: update getInvalidModelKind 2023-06-05 12:18:33 -04:00
Jami Cogswell
615f2a573b Java/C#/Go/Swift: remove commented-out code 2023-06-05 12:18:33 -04:00
Jami Cogswell
9f42ae3f29 Shared: remove cpp note 2023-06-05 12:18:33 -04:00
Jami Cogswell
7317c29eea Shared: update kind information 2023-06-05 12:18:33 -04:00
Jami Cogswell
79f61cc645 Java/C#/Go/Swift: use 'SharedModelValidation' file 2023-06-05 12:18:33 -04:00
Jami Cogswell
0ab1848b70 JS/Python/Ruby: use 'SharedModelValidation' file 2023-06-05 12:18:33 -04:00
Jami Cogswell
ddb5d92ef8 Shared: add source, summary, and neutral shared valid kinds 2023-06-05 12:18:33 -04:00
Jami Cogswell
869f820fcf Shared: add 'SharedModelValidation' file as experiment 2023-06-05 12:18:33 -04:00
Jami Cogswell
e24e3a6115 JS/Python/Ruby: add getInvalidModelKind as experiment 2023-06-05 12:18:33 -04:00
Taus
7ad860fc98 Java: Update MaD declarations after triage
Co-authored-by: Stephan Brandauer <kaeluka@github.com>
2023-06-05 18:00:40 +02:00
Ian Lynagh
e49b278d61 Java/Kotlin: Add a changenote for the lines-of-code changes. 2023-06-05 16:33:12 +01:00
Jeroen Ketema
93215ba7e1 Merge pull request #13355 from jketema/ptr-deref-forward
C++: Ensure that the sink instruction occurs last in `cpp/invalid-pointer-deref`
2023-06-05 15:56:50 +02:00
Jeroen Ketema
86df424fca C++: Fix query formatting 2023-06-05 15:10:54 +02:00
Jeroen Ketema
4a27028768 C++: Remove cpp/invalid-pointer-deref results duplicating ones with smaller k 2023-06-05 15:03:58 +02:00
Jeroen Ketema
90f0209095 C++: Add cpp/invalid-pointer-deref test case with almost duplicated results 2023-06-05 15:03:57 +02:00
Jeroen Ketema
7f7b048f50 C++: Update expected test results 2023-06-05 15:00:11 +02:00
Ian Lynagh
a4a7ad8f99 Java/Kotlin: Split lines of code by language
We were giving the sum of all lines for both languages, but labelling it
as "Total lines of Java code in the database", which was confusing.

Now we give separate sums for Kotlin and Java lines.
2023-06-05 13:57:47 +01:00
Paolo Tranquilli
dc26dc81a9 Merge pull request #13370 from github/redsun82/swift-fix-cmake
Swift: fix cmake generation
2023-06-05 14:52:40 +02:00
Nick Rolfe
02395867c8 Python: avoid selecting getLocation() in py/truncated-division 2023-06-05 13:42:46 +01:00
Mathias Vorreiter Pedersen
52fb00cac3 Merge pull request #12036 from nmouha/patch-1
CPP: Add query for CVE-2022-37454: Integer addition may overflow inside if statement
2023-06-05 12:13:27 +01:00
Jeroen Ketema
11182e4ee4 C++: Move location where getASuccessor is used to avoid join order problems 2023-06-05 12:36:25 +02:00
Nick Rolfe
c67a350e36 Python: avoid selecting getLocation() in py/unnecessary-delete 2023-06-05 11:16:13 +01:00
Paolo Tranquilli
be9d32a6c1 Bazel/CMake: make include not use cmake include
...but rather just pass along targets. This is required to fix CMake
generation in the internal repository.
2023-06-05 11:43:48 +02:00
Michael B. Gale
06d48dca67 Merge pull request #13211 from github/mbg/identify-environment-stubs
Shared: Add stubs for `identify-environment` scripts
2023-06-05 10:29:06 +01:00
Nick Rolfe
dadb5b34e6 C#: avoid call to Location::toString() in cs/expose-implementation 2023-06-05 10:19:27 +01:00
Paolo Tranquilli
400176f677 Swift: fix cmake generation
The bazel -> cmake generator is currently not capable of handling
separate included generated cmake files making use of common C/C++
dependencies.

To work around this limitation, a single generated cmake is now in
place. Long-term, we should either:
* make the cmake generator handle common dependencies gracefully, or
* make the cmake generation aspect travel up `pkg_` rules `srcs`
  attributes
so to avoid having to list the targets to be generated in the top-level
`BUILD` file.

Other things fixed:
* removed some warning spam about redefined `BAZEL_CURRENT_REPOSITORY`
* fixed the final link step, that was failing because `libswiftCore.so`
  was not being linked.
2023-06-05 11:12:11 +02:00
Michael B. Gale
5d89b0739b Swift: Remove .cmd script 2023-06-05 09:12:21 +01:00
Maiky
1a9bfb38aa Correct barrier 2023-06-05 01:25:17 +02:00
Maiky
bf9d0b93d7 Add Improper LDAP Auth Query (CWE-287) 2023-06-03 23:20:11 +02:00
Nick Rolfe
79b3a8c955 C#: avoid call to Location::toString() 2023-06-02 19:39:24 +01:00
Jami
64830809a6 Merge pull request #13228 from jcogs33/jcogs33/deprecated-sink-error-message
Java: add error message for outdated sink kinds in `getInvalidModelKind`
2023-06-02 13:44:18 -04:00
jorgectf
3e8c7f72b6 Add changenote 2023-06-02 18:20:55 +02:00
Alex Ford
c95cf5ad6f Merge pull request #13062 from maikypedia/maikypedia/sqli-sink
Ruby: Add MySQL as SQL Injection Sink
2023-06-02 17:06:35 +01:00
jorgectf
5608082f35 Update py/unsafe-deserialization name 2023-06-02 17:57:24 +02:00
Jeroen Ketema
8ac1d56a7f C++: Fix join order in cpp/invalid-pointer-deref 2023-06-02 16:37:35 +02:00
Erik Krogh Kristensen
219ec9d05d Merge pull request #13127 from erik-krogh/polReDoS
ReDoS: revert new superlinear algorithm.
2023-06-02 16:10:24 +02:00
Geoffrey White
4c8225724b Swift: Fix QL-for-QL warnings. 2023-06-02 12:21:17 +01:00
Geoffrey White
14d193383e Swift: Put the change note in the right place. 2023-06-02 12:03:22 +01:00
Geoffrey White
8e8696a8ed Swift: Autoformat. 2023-06-02 12:02:33 +01:00
Geoffrey White
c7c8807f40 Swift: Use FieldDecl.hasQualifiedName. 2023-06-02 11:56:16 +01:00
Jeroen Ketema
ac4933a9cc C++: Ensure that the sink instruction occurs last in cpp/invalid-pointer-deref
This avoids some counter-intuitive paths where we would seemingly jump back
to an earlier instruction, which might actually have been in bounds.
2023-06-02 12:36:34 +02:00
Jeroen Ketema
5f64354a70 Merge pull request #13353 from jketema/expecation
Fix typo in spelling of expectation
2023-06-02 12:29:49 +02:00
Mathias Vorreiter Pedersen
05e5ebe4f4 Merge pull request #13331 from aibaars/use-shortest-distances-to-count-indirections
C++: Use the shortestDistances HOP to count indirections (rebased copy of #13323)
2023-06-02 11:22:59 +01:00
Geoffrey White
5bf82aeddf Swift: Add FieldDecl.hasQualifiedName. 2023-06-02 11:13:57 +01:00
erik-krogh
ac9ede4ec0 add change-notes 2023-06-02 11:58:11 +02:00
erik-krogh
f61b781386 JS: delete effectively empty file 2023-06-02 11:58:09 +02:00
erik-krogh
5cbe6db37d C++: sync files from C# 2023-06-02 11:58:08 +02:00
erik-krogh
3584e85fe8 JS: fix tutorial 2023-06-02 11:58:08 +02:00
erik-krogh
3dfe2b30b1 C#: delete override where the parent predicate no longer existed 2023-06-02 11:58:08 +02:00
erik-krogh
c3e57382f7 Ruby: fix compilation 2023-06-02 11:58:08 +02:00
erik-krogh
9000243828 JS: fix compilation 2023-06-02 11:58:08 +02:00
erik-krogh
44b6366586 delete old deprecations 2023-06-02 11:58:08 +02:00
Geoffrey White
d7e4c5f044 Swift: Change note. 2023-06-02 10:42:52 +01:00
Geoffrey White
00cd347117 Swift: Add more heuristic expressions. 2023-06-02 10:42:52 +01:00
Geoffrey White
bc57e464e5 Swift: Add some more test cases. 2023-06-02 10:42:51 +01:00
Mathias Vorreiter Pedersen
0adff53afd Merge pull request #13190 from geoffw0/sharedsensitive
Swift: Adopt the shared sensitive data library
2023-06-02 10:36:22 +01:00
Tony Torralba
41bd1ae54e Merge pull request #13351 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-02 11:19:04 +02:00
Mathias Vorreiter Pedersen
cc8aac5435 C++: Use the 'shortestDistances' HOP to count indirections instead of manual recursion. This avoids cyclic problems when we have invalid types. 2023-06-02 11:17:08 +02:00
Tony Torralba
ad2f558002 Add Hudson models
Includes models-as-data rows, flow sources, and XSS sanitizers.

Tests for models-as-data rows not included.
2023-06-02 11:06:24 +02:00
Michael Nebel
3a3f9a2655 Merge pull request #13298 from michaelnebel/csharp/paramdefaultimplicitconversion
C#: Extract default parameter values.
2023-06-02 10:52:24 +02:00
Erik Krogh Kristensen
d7c3ac4830 Merge pull request #13349 from erik-krogh/stopRecLaterAccess
JS: stop recursive fromRhs related to getLaterBaseAccess
2023-06-02 10:39:14 +02:00
Jeroen Ketema
7b17b92aca Fix typo in spelling of expectation 2023-06-02 10:36:11 +02:00
Asger F
77d2799278 Update javascript/ql/lib/semmle/javascript/Regexp.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-06-02 10:33:44 +02:00
Tony Torralba
527fe523a8 Add PathCreation.qll sinks to models-as-data
The old PathCreation sinks can't be removed because doing so would cause alert wobble in the path injection queries. See their getReportingNode predicates.
2023-06-02 09:14:35 +02:00
Tony Torralba
c3b1ef2cdf Merge branch 'main' into atorralba/java/command-injection-mad-sinks 2023-06-02 08:57:24 +02:00
github-actions[bot]
ef7e9a674c Add changed framework coverage reports 2023-06-02 00:16:55 +00:00
erik-krogh
1b44b59842 add stress test 2023-06-01 23:20:23 +02:00
erik-krogh
8eed1a95f6 stop recursive fromRhs related to getLaterBaseAccess 2023-06-01 23:16:52 +02:00
erik-krogh
97afa5733b add support for namespaced JSX attributes 2023-06-01 21:52:14 +02:00
erik-krogh
f4b68fb8c3 bump TypeScript to stable version 2023-06-01 21:51:43 +02:00
Jami
84a7b3ca52 Merge pull request #13157 from jcogs33/jcogs33/update-javascript-sink-kinds
JS: update MaD sink kinds
2023-06-01 15:04:19 -04:00
Jami
1a82e21fdb Merge pull request #13136 from jcogs33/jcogs33/revamp-java-source-kinds
Java: change `android-widget` MaD source kind to `remote`
2023-06-01 14:18:02 -04:00
Jami
3886ebffa9 Merge branch 'main' into jcogs33/update-javascript-sink-kinds 2023-06-01 14:09:10 -04:00
Jami Cogswell
b8cedfa817 Java: switch 'deprecated' to 'outdated' 2023-06-01 13:30:27 -04:00
Jami Cogswell
d10857fbdb Java: fix typo blank qldoc 2023-06-01 12:57:06 -04:00
Jami Cogswell
0355b78f13 Java: add deprecation deletion comment 2023-06-01 12:57:06 -04:00
Jami Cogswell
b3d218a503 Java: condense 'replacementKind' code 2023-06-01 12:57:06 -04:00
Jami Cogswell
06c83ee14d Java: add error message for deprecated sink kinds to 'getInvalidModelKind' 2023-06-01 12:57:05 -04:00
Robert Marsh
c9c93ca701 C++: test for strncmp false positives 2023-06-01 12:52:17 -04:00
Jami
617107de35 Merge pull request #12916 from jcogs33/jcogs33/revamp-java-sink-kinds
Java: revamp MaD sink kinds
2023-06-01 12:48:30 -04:00
Jami Cogswell
de15013715 Java: remove RemoteFlowSources module 2023-06-01 12:25:26 -04:00
Jami Cogswell
5700a6eea4 Java: remove DefaultAndroidWidgetSources class 2023-06-01 12:25:26 -04:00
Jami Cogswell
119b446dbc Java: add change note 2023-06-01 12:25:26 -04:00
Jami Cogswell
d035a29b4d Java: update source kind documentation 2023-06-01 12:25:26 -04:00
Jami Cogswell
6722892828 Java: switch 'android-widget' source kind to 'remote' 2023-06-01 12:25:25 -04:00
Nick Rolfe
7290e2bfd9 Java: avoid call to Location.toString() 2023-06-01 17:06:34 +01:00
Robert Marsh
df4d156a36 C++: remove unneeded exists variables 2023-06-01 11:28:12 -04:00
Alex Ford
6fa9e13a2e Ruby: update TaintStep output 2023-06-01 16:27:20 +01:00
Alex Ford
606d601923 qlformat 2023-06-01 16:26:05 +01:00
erik-krogh
9aeba4f31e changes based on review 2023-06-01 17:24:44 +02:00
Alex Ford
d09f6d318c Merge branch 'main' into maikypedia/sqli-sink 2023-06-01 15:02:44 +01:00
Alex Ford
40cf09996a Merge pull request #13066 from maikypedia/maikypedia/sqli-sink-2
Ruby: Add Sequel as SQL Injection Sink
2023-06-01 15:01:38 +01:00
Erik Krogh Kristensen
96a720cfa0 Merge pull request #13285 from erik-krogh/redoshelp
ReDoS: fix whitespace in the samples in ReDoS.qhelp
2023-06-01 15:53:58 +02:00
Rasmus Lerchedahl Petersen
6755bb32fb Python: do not add read steps for collections 2023-06-01 15:18:05 +02:00
Alex Ford
b62a02f0ad ruby: remove unused field 2023-06-01 14:01:40 +01:00
Alex Ford
23e22799a9 ruby: rack - modelling -> modeling 2023-06-01 14:01:40 +01:00
Alex Ford
24635df1a3 ruby: add some qldoc for rack 2023-06-01 14:01:40 +01:00
Alex Ford
40da7d45c2 ruby: make a predicate private 2023-06-01 14:01:40 +01:00
Alex Ford
4905a70e21 Ruby: update rack test output 2023-06-01 14:01:40 +01:00
Alex Ford
19664879c8 ruby: slightly expand a TODO 2023-06-01 14:01:40 +01:00
Alex Ford
a5a15f3804 Ruby: restructure rack model 2023-06-01 14:01:40 +01:00
Alex Ford
b2958f87b2 ruby: rack - add redirect responses 2023-06-01 14:01:40 +01:00
Alex Ford
c3ab867595 ruby: start restructuring rack 2023-06-01 14:01:40 +01:00
Alex Ford
f8d2cbbe79 ruby: rack responses implement are HTTP responses 2023-06-01 14:01:39 +01:00
Alex Ford
c87c266871 ruby: add Rack::ResponseNode#getAStatusCode 2023-06-01 14:01:39 +01:00
Alex Ford
e7e0cf5cb3 ruby: add Rack::ResponseNode class 2023-06-01 14:01:39 +01:00
Alex Ford
7d943c7621 Ruby: update test output 2023-06-01 13:50:32 +01:00
Jami Cogswell
58845eca7c Java: update recently added 'open-url' sinks to 'request-forgery' 2023-06-01 08:10:44 -04:00
Asger F
baef99995d JS: Change note 2023-06-01 14:10:11 +02:00
Alex Ford
4794066d3c Merge branch 'main' into maikypedia/sqli-sink-2 2023-06-01 13:04:54 +01:00
Ian Lynagh
c28af7672d Merge pull request #13286 from igfoo/igfoo/kotlin-1.9b
Kotlin: Support 1.9.0
2023-06-01 13:02:04 +01:00
Jami
10bab71c60 Merge pull request #12249 from jcogs33/jcogs33/add-heuristic-neutral-models
Java: add some neutral models discovered with heuristics
2023-06-01 07:51:55 -04:00
Geoffrey White
edfdddb24a Swift: Tweak and update the qldoc string. 2023-06-01 11:47:05 +01:00
Geoffrey White
d68f602124 Merge branch 'main' into sharedsensitive 2023-06-01 11:11:42 +01:00
Maiky
7579f182ad Add requested changes 2023-06-01 11:00:35 +02:00
Tony Torralba
c1bd04e802 Merge pull request #13332 from atorralba/atorralba/java/gson-serializability
Java: Fix GsonDeserializableField
2023-06-01 10:45:32 +02:00
Tony Torralba
aecaf82405 Merge pull request #13340 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-06-01 10:43:32 +02:00
Michael Nebel
9aeb2384f3 C#: Improve LINQ expression based on review comments. 2023-06-01 10:20:54 +02:00
Michael Nebel
d882fe1ea8 C#: Update expected test output. 2023-06-01 09:30:31 +02:00
Michael Nebel
d12dfabf9d C#: Use synthetic globals instead of jump returns in the EntityFramework implementation. 2023-06-01 09:30:31 +02:00
Michael Nebel
cd251f4b36 C#: Make example classes public to allow printing of summaries in test. 2023-06-01 09:30:31 +02:00
Michael Nebel
93d9783940 C#: Expose a synthetic global singleton stack. 2023-06-01 09:30:31 +02:00
Michael Nebel
06b02eb3ce Sync files. 2023-06-01 09:30:31 +02:00
Michael Nebel
3862f8e3c0 C#: Expose synthetic globals for use in C#, allow printing of summaries that uses synthetic globals. 2023-06-01 09:30:31 +02:00
github-actions[bot]
3ef08d5baf Add changed framework coverage reports 2023-06-01 00:20:17 +00:00
Maiky
13ce6a6d8e Update Frameworks.qll 2023-06-01 00:53:01 +02:00
Jami Cogswell
82f208ca7a Java: add isNeutralSink test case 2023-05-31 17:47:36 -04:00
Mathias Vorreiter Pedersen
4497aa5eb1 Merge pull request #13333 from geoffw0/macroname
C++: Make Macro.getName() more efficient.
2023-05-31 13:56:58 -07:00
Jami Cogswell
51f8f98118 Java: update recently added 'sql' sinks 2023-05-31 15:51:07 -04:00
Jami Cogswell
ca8ac0c93f Java: add comment about request-forgery sinks 2023-05-31 15:51:07 -04:00
Jami Cogswell
9853a66b32 Java: update change note 2023-05-31 15:51:07 -04:00
Jami Cogswell
3e5dc28c0a Java: update more recently added sinks: path-injection and request-forgery 2023-05-31 15:51:07 -04:00
Jami Cogswell
6bb6802fb8 Java: add change note draft 2023-05-31 15:51:07 -04:00
Jami Cogswell
e28ce959a3 Java: update CaptureSinkModels test case 2023-05-31 15:51:07 -04:00
Jami Cogswell
ad771984f1 Java: update recently added path-injection sinks 2023-05-31 15:51:07 -04:00
Jami Cogswell
36e467e74a Java: update cwe-sink.csv 2023-05-31 15:51:07 -04:00
Jami Cogswell
0a8c0f58b2 Java: add sink kinds documentation 2023-05-31 15:51:07 -04:00
Jami Cogswell
5dbb698481 Java: update open/jdbc-url sink kinds to request-forgery 2023-05-31 15:50:31 -04:00
Jami Cogswell
cb10f4976b Java: update create/read-file sink kinds to path-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
eb1a8e2189 Java: update write-file sink kind to file-system-store 2023-05-31 15:49:07 -04:00
Jami Cogswell
ac8d985a63 Java: update xss sink kind to html-injection and js-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
041caa7405 Java: update header-splitting sink kind to response-splitting 2023-05-31 15:49:07 -04:00
Jami Cogswell
51df84ed1c Java: update set-hostname-verifier sink kind to hostname-verification 2023-05-31 15:49:07 -04:00
Jami Cogswell
b23f384a50 Java: update intent-start sink kind to intent-redirection 2023-05-31 15:49:07 -04:00
Jami Cogswell
5aa3e57ff3 Java: update pending-intent-sent sink kind to pending-intents 2023-05-31 15:49:07 -04:00
Jami Cogswell
3ff4c7de8f Java: update ldap sink kind to ldap-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
6d2d25406c Java: update xslt sink kind to xslt-injection 2023-05-31 15:49:07 -04:00
Jami Cogswell
cea97b3f2a Java: update mvel sink kind to mvel-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
6cee0c4c75 Java: update jexl sink kind to jexl-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
6431d370c1 Java: update groovy sink kind to groovy-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
430010daa3 Java: update logging sink kind to log-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
8c4b394e1a Java: update ssti sink kind to template-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
fc58d10a4e Java: update xpath sink kind to xpath-injection 2023-05-31 15:49:06 -04:00
Jami Cogswell
55be2e5b67 Java: update url-redirect sink kind to url-redirection 2023-05-31 15:49:06 -04:00
Jami Cogswell
d24d8b1626 Java: update sql sink kind to sql-injection 2023-05-31 15:49:06 -04:00
Ian Lynagh
82578af349 Kotlin: Use @files for compiler arguments
Avoids problems with large line lengths.
2023-05-31 19:43:45 +01:00
Ian Lynagh
a13678c35c Kotlin: Update expected test output 2023-05-31 19:43:45 +01:00
Ian Lynagh
0090429d53 Kotlin: Support 1.9.0 2023-05-31 19:43:45 +01:00
Alexandre Boulgakov
67cd6b7fa6 Merge pull request #13337 from MathiasVP/revert-13207
Revert #13207
2023-05-31 19:41:01 +01:00
Mathias Vorreiter Pedersen
52eb7aee5e Revert "Merge pull request #13207 from MathiasVP/use-equiv-class-in-getInstruction"
This reverts commit 5bc844c4c6, reversing
changes made to b2fb2aa0d1.
2023-05-31 11:26:09 -07:00
Mathias Vorreiter Pedersen
3d9c282f48 Merge pull request #13320 from jketema/ptr-deref-dedup 2023-05-31 10:12:05 -07:00
erik-krogh
1e08105863 less duplicated headers in the sql-injection samples 2023-05-31 18:04:34 +02:00
erik-krogh
98820780af show how to use mysql.escape in the sql-injection qhelp 2023-05-31 18:04:34 +02:00
erik-krogh
7d801e05ee add an example of using dollar eq 2023-05-31 18:04:23 +02:00
Arthur Baars
e93b44670f Ruby: printCfg: only show graph for selected CfgScope 2023-05-31 16:08:01 +02:00
Arthur Baars
c211b704f3 Merge pull request #13272 from github/post-release-prep/codeql-cli-2.13.3
Post-release preparation for codeql-cli-2.13.3
2023-05-31 15:33:12 +02:00
Michael Nebel
83a8e3bdbc C#: Add some more testcases. 2023-05-31 14:47:45 +02:00
Michael Nebel
43d6bf04b5 C#: Make synthetic implicit casts when values are provided using the DefaultParameterValue attribute. 2023-05-31 14:45:19 +02:00
Stephan Brandauer
5de56db3af Java: QlDoc for isKnownKind 2023-05-31 14:13:14 +02:00
Stephan Brandauer
03051dde7f Java: spelling 2023-05-31 14:13:14 +02:00
Geoffrey White
caf250cc1b Swift: Update the QLdoc on Callable. 2023-05-31 13:01:20 +01:00
Geoffrey White
02cae30270 Merge branch 'main' into sharedsensitive 2023-05-31 12:57:33 +01:00
Geoffrey White
daad2e1bd3 Swift: Use regexp for function name. 2023-05-31 12:55:09 +01:00
Taus
ea5c36491b Java: Improve documentation of sampling strategy 2023-05-31 11:39:54 +00:00
Stephan Brandauer
5a9d09c49e Java: docs update
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-05-31 13:36:58 +02:00
Tony Torralba
282ee08ba9 Java: Fix GsonDeserializableField 2023-05-31 13:26:35 +02:00
Charis Kyriakou
24b99aef7a Merge pull request #13206 from github/charisk/mrva-remove-token-perms
Remove GITHUB_TOKEN permissions note since it's no longer required
2023-05-31 12:22:49 +01:00
Arthur Baars
5981ce4cb1 Swift: accept test output from failed CFG consistency queries 2023-05-31 12:15:21 +02:00
Jeroen Ketema
ace7b6b711 C++: Add cpp/invalid-pointer-deref FP test case 2023-05-31 11:54:53 +02:00
Geoffrey White
a9811fe2c3 Swift: Make Macro.getName() more efficient. 2023-05-31 10:53:02 +01:00
Stephan Brandauer
12ea5e0e90 Java: fix sanitizer bug 2023-05-31 11:53:02 +02:00
Stephan Brandauer
86559317d7 Java: update comments 2023-05-31 11:52:26 +02:00
Taus
b39a5a64af Merge pull request #13317 from github/java/update-mad-decls-after-triage-2023-05-30T14-11-29
Java: Update MaD Declarations after Triage
2023-05-31 11:40:49 +02:00
Tony Torralba
482bb94ad9 Merge pull request #13179 from pwntester/java_gson
[Java] Add basic support for Google's Gson library
2023-05-31 11:16:19 +02:00
Stephan Brandauer
96bae2d5ec Java: avoid downcasting to DollarAtString 2023-05-31 10:41:52 +02:00
Paolo Tranquilli
edb822279b Swift: update comments to the mangler 2023-05-31 10:12:31 +02:00
erik-krogh
e24b45b423 elaborate on both SQL and NoSQL injection in the js/sql-injection qhelp 2023-05-31 09:57:38 +02:00
Paolo Tranquilli
70ff401f21 Swift: replace internal swift mangler with our own
Our mangler is split in two version:
* `SwiftTrapMangler`, with the same behaviour as the previous
  `SwiftMangler`, constructing mangled names with trap label references
* `SwiftRecursiveMangler` that replaces trap label references with
  recursive calls to its own `mangle` functions, effectively rolling out
  the entire chain of references

The latter is used to create lazy trap file names. Hashing is used to
avoid excessively long filenames.
2023-05-31 09:52:20 +02:00
Paolo Tranquilli
ab3b87a3f2 Swift: add nested generic function to test 2023-05-31 09:52:20 +02:00
Tony Torralba
fe26aca238 Remove non-ASCII character 2023-05-31 09:25:37 +02:00
Tony Torralba
6f302a43ea Merge pull request #13297 from atorralba/atorralba/java/playmvc-models
Java: Add models for the Play Framework
2023-05-31 09:02:17 +02:00
Michael Nebel
2266e28583 Merge pull request #13262 from michaelnebel/flowsummary/refactorgetcomponentstack
C#: Re-factor getComponent.
2023-05-31 08:22:44 +02:00
erik-krogh
b343dcaadd put string/object in the alert-message for sql-injection 2023-05-31 08:06:04 +02:00
Erik Krogh Kristensen
b9ffa11915 Merge pull request #13328 from github/dependabot/cargo/ql/chrono-0.4.26
Bump chrono from 0.4.25 to 0.4.26 in /ql
2023-05-31 07:42:37 +02:00
dependabot[bot]
75f6355bd6 Bump chrono from 0.4.25 to 0.4.26 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.25 to 0.4.26.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.25...v0.4.26)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 04:06:22 +00:00
Mathias Vorreiter Pedersen
a646749380 Merge pull request #13318 from MathiasVP/exclude-std-in-constant-size-array-off-by-one
C++: Exclude `StdNamespace` sources in `cpp/constant-size-array-off-by-one`
2023-05-30 14:31:18 -07:00
Mathias Vorreiter Pedersen
65eebf1f40 Merge branch 'main' into exclude-std-in-constant-size-array-off-by-one 2023-05-30 13:40:01 -07:00
Arthur Baars
490d22d123 Merge remote-tracking branch 'upstream/main' into post-release-prep/codeql-cli-2.13.3 2023-05-30 21:31:28 +02:00
Arthur Baars
60a5ef744f Merge pull request #13319 from aibaars/print-cfg
Ruby: add print-cfg query
2023-05-30 21:15:06 +02:00
Jeroen Ketema
dd30acf1e3 C++: Add nodes query predicate to cpp/invalid-pointer-deref 2023-05-30 18:43:01 +02:00
Jeroen Ketema
f5ed02a433 C++: Take into account the delta at the final sink in cpp/invalid-pointer-deref 2023-05-30 18:33:20 +02:00
Jeroen Ketema
de974cc18a C++: Add cpp/invalid-pointer-deref test case that shows some duplicate results 2023-05-30 18:18:13 +02:00
Jeroen Ketema
a8c76388c0 C++: Fix configuration names in comments in cpp/invalid-pointer-deref 2023-05-30 18:15:37 +02:00
Tony Torralba
70138448c3 Visibility 2023-05-30 17:54:59 +02:00
Tony Torralba
0151a728f8 Add change note 2023-05-30 17:53:03 +02:00
Tony Torralba
d3d67f0fb0 Add tests & stubs 2023-05-30 17:52:00 +02:00
Tony Torralba
977263a126 Use container flow for more precision 2023-05-30 17:51:41 +02:00
Tony Torralba
54e011188d Formatting 2023-05-30 17:50:50 +02:00
Andrew Eisenberg
6ba8f9eb36 Merge pull request #13314 from github/aeisenberg/adds-to-pack
Fix `addsTo.pack` references
2023-05-30 08:30:16 -07:00
Arthur Baars
d91fa2d038 Ruby: add print-cfg query 2023-05-30 17:30:04 +02:00
Mathias Vorreiter Pedersen
f00b29d3d2 C++: The small-string optimization commonly used inside 'std::string' is causing a lot of FPs. Let's exclude this for now to reduce the number of results for this query. 2023-05-30 07:33:07 -07:00
Robert Marsh
2afda5f3f1 Merge pull request #13305 from MathiasVP/fix-join-of-pointerArithOverflow0
C++: Fix join in `pointerArithOverflow0`
2023-05-30 10:24:35 -04:00
Taus
00e4c455b5 Update MaD Declarations after Triage 2023-05-30 16:11:30 +02:00
Asger F
d7f747e684 Merge pull request #13195 from asgerf/js/no-globals-in-example
JS: Avoid using global vars in documentation examples
2023-05-30 15:44:38 +02:00
Tamás Vajk
19f1d2b116 Merge pull request #13290 from tamasvajk/feature/source-generators
C#: Extract source files generated by source generators
2023-05-30 15:40:46 +02:00
Geoffrey White
560aa43953 Swift: Repair for AccountID / AccountKey. 2023-05-30 14:20:17 +01:00
Rasmus Lerchedahl Petersen
820b5f235e python: add change note 2023-05-30 13:36:10 +02:00
Rasmus Lerchedahl Petersen
2daa9577bb ruby/python: implement shared module
ruby:
- create new shared file `SummaryTypeTracker.qll`
- move much logic into the module
- instantiate the module
- remove old logic, now provided by module

python:
- clone shared file
- instantiate module
- use (some of the) steps provided by the module
2023-05-30 13:31:24 +02:00
Taus
73aa790cdd Java: Improve sampling strategy
Instead of the "random" sampling used before (which could -- in rare circumstances -- end up sampling fewer points than we want) we now sample an equally distributed set of points.
2023-05-30 11:22:26 +00:00
Rasmus Lerchedahl Petersen
47b2d48da2 python: add tests
- add `getACallSimple` to `SummarizedCallable`
  (by adding it to `LibraryCallable`)
2023-05-30 13:16:04 +02:00
Tamas Vajk
138bfad3d0 Add change note 2023-05-30 12:00:31 +02:00
Jeroen Ketema
16bc584bd1 Merge pull request #13294 from MathiasVP/better-test-for-range-analysis
C++: Change range-analysis test to not use `getAst`
2023-05-30 10:49:58 +02:00
Geoffrey White
d506172027 Swift: Change note. 2023-05-30 09:41:11 +01:00
Paolo Tranquilli
2183d380db Swift: implement review suggestions 2023-05-30 10:30:44 +02:00
Stephan Brandauer
d4b964c849 add support for sanitizers 2023-05-30 10:25:52 +02:00
Tony Torralba
db4e82e2f3 Merge pull request #13301 from atorralba/atorralba/java/stub-generator-perf-fix
Java: Fix performance issue in the stub generator
2023-05-30 10:21:16 +02:00
Geoffrey White
4a8320fafd Merge pull request #13287 from geoffw0/stringfp
Swift: Fix some string length conflation false positives
2023-05-30 08:57:48 +01:00
Michael Nebel
e764b46c88 Merge pull request #13306 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-30 09:23:09 +02:00
Erik Krogh Kristensen
073e31917a Merge pull request #13315 from github/dependabot/cargo/ql/chrono-0.4.25
Bump chrono from 0.4.24 to 0.4.25 in /ql
2023-05-30 07:53:01 +02:00
dependabot[bot]
39a07d42a1 Bump chrono from 0.4.24 to 0.4.25 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.24 to 0.4.25.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.24...v0.4.25)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-30 04:03:50 +00:00
github-actions[bot]
53aecb1949 Add changed framework coverage reports 2023-05-30 00:17:04 +00:00
Andrew Eisenberg
2d81e30d81 Fix addsTo.pack references
This change is a prerequisite for a CLI change where there will be
strict testing of the `addsTo.pack` values. It must resolve to a pack
reference that is a transitive dependency of the current query's pack.
2023-05-29 13:45:41 -07:00
Maiky
345f43fbae fix concepts 2023-05-29 21:17:48 +02:00
Maiky
62353122c0 Add Improper LDAP Authentication query (CWE-287) 2023-05-29 21:16:13 +02:00
Maiky
03b7c5e5e8 naming error 2023-05-29 16:34:40 +02:00
Maiky
a8f887e3f9 naming error 2023-05-29 16:33:58 +02:00
Tony Torralba
6386ef3b96 Further perf improvements 2023-05-29 09:58:52 +02:00
Harry Maclean
e70e3e52dc Ruby: fix typo in qhelp 2023-05-29 04:05:42 +00:00
Harry Maclean
ca1024e285 Ruby: Reword unsafe deserialization qhelp 2023-05-29 03:46:30 +00:00
Maiky
2d8318dc02 remove unnecessary imports and edit .qhelp 2023-05-28 17:40:31 +02:00
Maiky
065b69460d remove space 2023-05-28 17:34:16 +02:00
Maiky
5e33f14ff1 Undo Concepts changes 2023-05-28 17:33:05 +02:00
Maiky
d45d046fa7 Add test file and .expected 2023-05-28 17:29:34 +02:00
Maiky
d8bc818d5a add Change note 2023-05-28 16:50:36 +02:00
Harry Maclean
e515981c81 Ruby: Remove unused examples 2023-05-27 12:01:00 +00:00
Harry Maclean
562065f29e Ruby: Add change note 2023-05-27 01:20:09 +00:00
Harry Maclean
b8c3cba4ff Ruby: Consolidate unsafe deserialization queries
Merge the experimental YAMLUnsafeDeserialization and
PlistUnsafeDeserialization queries into the generate
UnsafeDeserialization query in the default suite.

These queries look for some specific sinks that we now find in the
general query.

Also apply some small code and comment refactors.
2023-05-27 01:20:04 +00:00
amammad
d727d573d5 v4.2 write exact version of yaml.load default loader change 2023-05-27 01:15:29 +00:00
amammad
40e24b6b94 v4.1 fix file names in qhelp 2023-05-27 01:15:29 +00:00
amammad
335441ce04 v4: make variable names camelCase, some inhancement, remove some duplicates 2023-05-27 01:15:29 +00:00
amammad
e76ed9454a v3 add global taint steps for to_ruby of YAML/Psych 2023-05-27 01:15:24 +00:00
amammad
ad7e107ff5 add the new YAML/PLIST sinks into the existing rb/unsafe-deserialization query 2023-05-27 01:14:36 +00:00
amammad
b9296d3df8 v2.1 fix file names 2023-05-27 01:14:36 +00:00
amammad
4360a56b45 v2 add plist.parse_xml as a dangerous sink and enhancements on documents 2023-05-27 01:14:36 +00:00
amammad
0521ffe175 v1.4 correct dirs uppercase issue 2023-05-27 01:14:36 +00:00
amammad
0e343e5a12 v1.3 2023-05-27 01:14:36 +00:00
amammad
d96153a05e v1.2 change to PascalCase 2023-05-27 01:14:36 +00:00
amammad
e4b8a0e06d v1.1 2023-05-27 01:14:36 +00:00
amammad
486a5ac96f v1 2023-05-27 01:14:36 +00:00
Jami Cogswell
24fc4ba2d4 Java: add tests 2023-05-26 18:55:13 -04:00
Jami Cogswell
f255b6acb8 Java: fix typos 2023-05-26 18:55:13 -04:00
Jami Cogswell
7e6913af62 Java: update provenance to 'hq-manual' 2023-05-26 18:55:13 -04:00
Jami Cogswell
60b07083c3 Java: add 'sink' kind 2023-05-26 18:55:13 -04:00
Jami Cogswell
65dd7eb8e7 Java: add neutral models discovered with path-inj and ssrf heuristics 2023-05-26 18:55:13 -04:00
Mathias Vorreiter Pedersen
9828af45a1 C++: Change separator from ':' to '|'. 2023-05-26 15:23:48 -07:00
Mathias Vorreiter Pedersen
0f08642653 C++: Fix join in 'pointerArithOverflow0'. 2023-05-26 11:16:44 -07:00
Robert Marsh
d18fb646d1 C++: handle cast arrays properly in off-by-one query 2023-05-26 13:16:21 -04:00
Robert Marsh
5bc844c4c6 Merge pull request #13207 from MathiasVP/use-equiv-class-in-getInstruction
C++: Reduce memory pressure from `getInstruction`
2023-05-26 13:13:57 -04:00
Robert Marsh
6e230e10f8 C++: include stack-allocated arrays in off-by-one query 2023-05-26 13:04:51 -04:00
Robert Marsh
b2fb2aa0d1 Merge pull request #13045 from rdmarsh2/rdmarsh2/cpp/improve-constant-off-by-one
C++: stitch paths and ignore cast arrays in constant off-by-one query
2023-05-26 12:47:08 -04:00
Maiky
dfbf259e2d typo 2023-05-26 18:14:49 +02:00
Maiky
9ab6eabd15 add filterTaintStep, qhelp file and test files 2023-05-26 18:13:58 +02:00
Philip Ginsbach
ded98c5a5f Merge pull request #13304 from github/ginsbach/SmallSpecificationFixes
two small QL specification fixes
2023-05-26 16:18:36 +01:00
Taus
227c5fab40 Java: Get location ordering without toString 2023-05-26 14:52:08 +00:00
Paolo Tranquilli
ddf45b27ca Merge pull request #13300 from github/redsun82/swift-fix-autobuild-corner-case
Swift: exclude unknown type targets ending in `Tests` or `Test` from autobuilding
2023-05-26 16:49:01 +02:00
Philip Ginsbach
47a0d4b774 more explicit mentioning of QLL files 2023-05-26 15:03:34 +01:00
Philip Ginsbach
ba51ded516 bindingset is not really a pragma 2023-05-26 15:03:34 +01:00
Geoffrey White
32c113bc38 Swift: Fix following merge with main. 2023-05-26 14:41:48 +01:00
Geoffrey White
68354c09bf Merge branch 'main' into sqlpathinject 2023-05-26 14:33:05 +01:00
Paolo Tranquilli
15047368e8 Swift: add a warning to unmangled types 2023-05-26 15:12:21 +02:00
Paolo Tranquilli
3f7c4dec25 Swift: add a header comment to SwiftMangler 2023-05-26 15:05:40 +02:00
Asger F
3831dc7785 Merge pull request #13288 from asgerf/rb/super-and-flow-through
Ruby: two bug fixes
2023-05-26 15:04:52 +02:00
Paolo Tranquilli
d81dc274f6 Swift: make a TODO more assertive as there is a draft PR already 2023-05-26 14:45:29 +02:00
Asger F
cfaa27ab5d Ruby: change note 2023-05-26 14:44:00 +02:00
Paolo Tranquilli
05ed66ad8f Swift: remove debugging print 2023-05-26 14:42:02 +02:00
Paolo Tranquilli
c5cee0d419 Swift: exclude targets ending in Tests or Test from autobuilding 2023-05-26 14:19:07 +02:00
Stephan Brandauer
efe539eb32 Java: better sampling of negative examples 2023-05-26 14:15:32 +02:00
Asger F
c637b6f59a JS: Update test for RegExpAlwaysMatches 2023-05-26 14:10:26 +02:00
Asger F
9df9ca2916 JS: Update test and expectations for MissingRegExpAnchor 2023-05-26 14:07:34 +02:00
Asger F
40daa9c906 JS: Update RegExpInjection test and expectations 2023-05-26 14:05:36 +02:00
Rasmus Lerchedahl Petersen
9cb83fcdc9 python: add summaries for
copy, pop, get, getitem, setdefault

Also add read steps to taint tracking.

Reading from a tainted collection can be done in two situations:
1. There is an acces path
    In this case a read step (possibly from a flow summary)
    gives rise to a taint step.
2. There is no access path
    In this case an explicit taint step (possibly via a flow
    summary) should exist.
2023-05-26 14:04:15 +02:00
Jami
6867e94ed5 Merge pull request #13158 from jcogs33/jcogs33/update-csharp-sink-kinds
C#: update MaD sink kinds
2023-05-26 08:03:21 -04:00
yoff
af1f4c30fb Merge pull request #13299 from asgerf/rb/meta-query-summarised-callable-sites
Ruby/Python: add meta-queries for calls to summarised callables
2023-05-26 13:27:56 +02:00
Rasmus Lerchedahl Petersen
144df9a39e python: remove explicit dataflow steps 2023-05-26 13:24:22 +02:00
Rasmus Lerchedahl Petersen
8d4f9447b1 python: remove explicit steps
copy, pop, get, popitem
2023-05-26 13:22:54 +02:00
Stephan Brandauer
a89378d86d Java: add extra known frameworks and sample negative samples to manage sarif file sizes 2023-05-26 13:20:04 +02:00
Arthur Baars
e0466900ad Merge pull request #12992 from Sim4n6/ruby-UBV
[Ruby] Add Unicode Bypass Validation query, test and help file
2023-05-26 13:00:21 +02:00
Tony Torralba
4dfc9b13cd Java: Fix performance issue in the stub generator 2023-05-26 12:44:53 +02:00
Tony Torralba
8e16a0d144 Add tests and stubs for the summaries 2023-05-26 12:43:58 +02:00
Alex Ford
baabd2d1fa Merge pull request #12832 from maikypedia/maikypedia/pg-sqli
Ruby: Add SQL Injection Sinks
2023-05-26 11:36:17 +01:00
Michael Nebel
915042a881 Minor cleanup and sync files. 2023-05-26 12:25:00 +02:00
Michael Nebel
783d560e7d Swift: Re-factor getComponent. 2023-05-26 12:25:00 +02:00
Michael Nebel
58fcbc136c Ruby: Re-factor getComponent. 2023-05-26 12:25:00 +02:00
Michael Nebel
811eee1f0d Python: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Michael Nebel
b794627335 Go: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Michael Nebel
b7a8660375 Java: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Michael Nebel
066554cee6 C#: Re-factor getComponent. 2023-05-26 12:24:59 +02:00
Paolo Tranquilli
a6e21dac8f Merge pull request #13284 from github/redsun82/swift-remove-property-wrapper-inconsistencies
Swift: remove some AST and CFG inconsistencies
2023-05-26 12:22:56 +02:00
Geoffrey White
57d6505ee3 Swift: Move change note. 2023-05-26 11:10:29 +01:00
Asger F
2629ec1b1d JS: Be more conservative about flagging "search" call arguments as regex 2023-05-26 11:55:53 +02:00
Asger F
75fd20b3b8 Python: add meta-query for calls to summarized callables 2023-05-26 11:40:58 +02:00
Jeroen Ketema
63657396c5 Merge pull request #13267 from MathiasVP/promote-overrun-write
C++: Promote `cpp/overrun-write` out of experimental
2023-05-26 11:34:26 +02:00
Asger F
1c7f6dc32e Ruby: add meta-query for calls to summarized callables 2023-05-26 11:34:23 +02:00
Michael B. Gale
631ba6584d Go: Update identify-environment JSON format
The spec changed after this was implemented and merged
2023-05-26 10:13:40 +01:00
Michael B. Gale
af803c8886 Go: include new scripts in Makefile 2023-05-26 10:13:40 +01:00
Michael B. Gale
e48fc66782 Swift: Add identify-environment script 2023-05-26 10:13:39 +01:00
Tony Torralba
903fdb0cb8 Java: Add models for the Play Framework 2023-05-26 10:23:43 +02:00
Tamas Vajk
918cfd6f44 Add integration test 2023-05-26 09:50:06 +02:00
Geoffrey White
736f2871f9 Swift: Tweak private info regexps to restore 'account_no' results. 2023-05-26 08:43:32 +01:00
Tamas Vajk
74a585222c C#: Extract source files generated by source generators 2023-05-26 09:13:41 +02:00
Paolo Tranquilli
5a2433244e Swift: remove now passing PrintAstConsistency check 2023-05-26 08:58:49 +02:00
Paolo Tranquilli
b0882a9e5f Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-05-26 08:40:16 +02:00
Paolo Tranquilli
192c0d5e83 Swift: simplify change note
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2023-05-26 08:20:58 +02:00
Esben Sparre Andreasen
081c069b3c Merge pull request #13295 from github/dependabot/cargo/ql/regex-1.8.3
Bump regex from 1.8.2 to 1.8.3 in /ql
2023-05-26 08:13:41 +02:00
dependabot[bot]
4ab389bf1a Bump regex from 1.8.2 to 1.8.3 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.2...1.8.3)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-26 04:02:31 +00:00
Mathias Vorreiter Pedersen
0d1d20c75b C++: Change range-analysis test to not use 'getAst'. This was creating confusing test expectation annotations. 2023-05-25 15:50:29 -07:00
Mathias Vorreiter Pedersen
960e6521a4 Revert "C++: Whitespace commit to make qhelp show up in diff."
This reverts commit ec192d621c.
2023-05-25 15:21:09 -07:00
Mathias Vorreiter Pedersen
c6275bfa28 Merge pull request #13293 from MathiasVP/fix-performance-of-dtt
C++: Fix result duplication on `DefaultTaintTracking`
2023-05-25 15:20:02 -07:00
Mathias Vorreiter Pedersen
e7f82a3571 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2023-05-25 13:56:01 -07:00
Geoffrey White
0e443da710 Swift: Remove id() categorization due to accuracy, and repair the old bank.?account case. 2023-05-25 21:51:27 +01:00
Maiky
026d94c457 Add LDAP Injection query (incomplete) 2023-05-25 22:51:25 +02:00
Mathias Vorreiter Pedersen
384ca0c31f C++: Respond to review comments. 2023-05-25 13:50:35 -07:00
Mathias Vorreiter Pedersen
c3fdc83af6 C++: Also add an out barrier on all sinks. 2023-05-25 12:23:50 -07:00
Mathias Vorreiter Pedersen
7361ad977a Merge pull request #13291 from geoffw0/correction
Swift: Promote some Data models to DataProtocol
2023-05-25 11:28:42 -07:00
Mathias Vorreiter Pedersen
a7252e625e C++: Fix result duplication on 'cpp/unbounded-write' on 'kirxkirx/vast'. 2023-05-25 11:12:01 -07:00
Alex Ford
609319da20 ruby: update TaintStep.ql test output 2023-05-25 17:53:01 +01:00
Geoffrey White
3f3a5d39e5 Swift: Fix the SQL injection test. 2023-05-25 17:13:51 +01:00
Geoffrey White
85a1ab0264 Swift: Undo autocorrect. 2023-05-25 16:10:31 +01:00
Stephan Brandauer
5ca2221097 remove some of the biggest frameworks from application mode consideration 2023-05-25 17:06:02 +02:00
Geoffrey White
98e5f0fc4f Swift: Add change note. 2023-05-25 16:04:18 +01:00
Geoffrey White
51321a218b Swift: Correct models in Data.qll. 2023-05-25 15:55:45 +01:00
Geoffrey White
5dfb07ce37 Swift: Test DataProtocol. 2023-05-25 15:51:21 +01:00
Stephan Brandauer
db77c6b9a3 Java: mark functional expressions as likely not sinks 2023-05-25 16:39:27 +02:00
Stephan Brandauer
76d731a61d improve CannotBeTaintedCharacteristic 2023-05-25 16:28:07 +02:00
Paolo Tranquilli
cc271d682e Codegen: ignore synth properties in cppgen 2023-05-25 16:05:25 +02:00
Paolo Tranquilli
b09386a2c8 Codegen: ignore synth properties in Raw.qll 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
00fb796f3b Codegen: ignore synth properties in dbschemegen 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
d2c9847a79 Codegen: parse synth property modifier 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
165ac3eeaa Codegen: define and propagate synth property flag 2023-05-25 16:05:12 +02:00
Paolo Tranquilli
242d263e8a Codegen: move ipa info from ql.Class to ql.Property 2023-05-25 16:05:11 +02:00
Asger F
9e8cef5e1b Ruby: fix type-tracking flow-through for new->initialize calls 2023-05-25 15:03:38 +02:00
Asger F
93678e5d36 Ruby: fix name of super calls in singleton methods 2023-05-25 15:03:34 +02:00
Geoffrey White
791ba81403 Swift: Add change note. 2023-05-25 13:27:23 +01:00
Stephan Brandauer
9a041243ff Java: fine-tune characteristics 2023-05-25 14:16:32 +02:00
Stephan Brandauer
f224a40dec Java: use containing call as call context, not argument 2023-05-25 14:16:23 +02:00
Stephan Brandauer
33fdb0fc52 Java: remove superfluous characteristic 2023-05-25 14:16:23 +02:00
Taus
2000f22533 Java: Port over characteristics from codex branch 2023-05-25 14:16:23 +02:00
Taus
11ab7e2e71 Java: Share argument indexing logic
Adds a utility predicate for turning integer indices into the desired string representation.
2023-05-25 14:16:23 +02:00
Taus
04b8bf35d4 Java: Avoid overlapping import
Importing `AutomodelEndpointTypes` inside `AutomodelSharedUtil` non-privately made it overlap with the imports in the candidate extraction queries.
2023-05-25 14:16:23 +02:00
Stephan Brandauer
db61a2d099 Java: share isKnownKind between modes 2023-05-25 14:16:16 +02:00
Stephan Brandauer
d93ad9b398 Java: remove unneeded abstract metadata extractor classes and fix some names 2023-05-25 14:16:11 +02:00
Stephan Brandauer
6e21f14c09 Java: update extraction query metadata 2023-05-25 14:16:03 +02:00
Stephan Brandauer
7c3bc26c41 Java: make input an actual string, not an integer 2023-05-25 14:15:59 +02:00
Stephan Brandauer
185ad101b3 Java: add application-mode and framework-mode tags to extraction queries 2023-05-25 14:15:50 +02:00
Taus
9b30f9a476 Java: Add negative characteristic for static calls 2023-05-25 14:15:49 +02:00
Taus
6fc16574b3 Java: Add QL support for automodel application mode 2023-05-25 14:15:49 +02:00
Paolo Tranquilli
5e66885a8e Swift: add change note 2023-05-25 14:00:04 +02:00
erik-krogh
9f5bf8fb22 also fix the first code-block 2023-05-25 13:56:29 +02:00
erik-krogh
765076bcba fix whitespace in the samples in ReDoS.qhelp 2023-05-25 13:28:39 +02:00
Paolo Tranquilli
51f1a5dcc8 Swift: remove getOpaqueExpr from OpenExistentialExpr's children 2023-05-25 13:05:21 +02:00
Paolo Tranquilli
7b76aa34bd Swift: fix CFG inconsistency on TapExpr 2023-05-25 13:05:21 +02:00
Paolo Tranquilli
b26b0a6e43 Swift: remove property wrapper CFG inconsistencies 2023-05-25 13:05:21 +02:00
Sim4n6
52dd247a81 Removed redundant cast 2023-05-25 11:55:13 +01:00
Paolo Tranquilli
7878bc3cc1 Swift: remove property wrapper AST inconsistencies 2023-05-25 12:15:22 +02:00
Paolo Tranquilli
5de8934525 Merge pull request #13277 from github/redsun82/swift-consistency-accept
Swift: add consistency check and accept results for the moment
2023-05-25 11:56:54 +02:00
Tony Torralba
a276cc3094 Convert all command injection sinks to MaD format 2023-05-25 11:41:32 +02:00
Paolo Tranquilli
f5070bb082 Merge pull request #13282 from github/redsun82/swift-change-note-check
Swift: turn change note check on
2023-05-25 11:23:10 +02:00
Paolo Tranquilli
d1be942f04 Swift: turn change note check on 2023-05-25 11:04:21 +02:00
Paolo Tranquilli
ac31209233 Swift: add change notes to consistency queries 2023-05-25 10:56:25 +02:00
Sim4n6
09c97ce0da Added one more example to the qhelp 2023-05-25 09:41:22 +01:00
Sim4n6
7d68f6afc9 added ActiveSupport::Multibyte::Chars normalize() sink 2023-05-25 09:21:55 +01:00
Paolo Tranquilli
8d656a996b Swift: add QLdoc to AST consistency checks 2023-05-25 09:56:39 +02:00
Tony Torralba
ca83b7c0f2 Merge pull request #13280 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-25 09:33:09 +02:00
Sim4n6
d772bb213a Added three more Unicode Normalization sinks 2023-05-25 03:10:00 +01:00
github-actions[bot]
5be4f6e58b Add changed framework coverage reports 2023-05-25 00:16:11 +00:00
Mathias Vorreiter Pedersen
ec192d621c C++: Whitespace commit to make qhelp show up in diff. 2023-05-24 16:13:42 -07:00
Mathias Vorreiter Pedersen
ebc1d5feff Merge branch 'main' into rdmarsh2/cpp/improve-constant-off-by-one 2023-05-24 16:07:08 -07:00
Mathias Vorreiter Pedersen
298013a57e C++: Add in-barrier on sources to reduce duplication. 2023-05-24 16:02:27 -07:00
Mathias Vorreiter Pedersen
64d7b4923d C++: Prune flow states based on 'PointerArithmeticToDerefConfig'. 2023-05-24 16:02:17 -07:00
Mathias Vorreiter Pedersen
f9a464605b Merge pull request #13226 from rdmarsh2/rdmarsh2/cpp/cobo-neq-refinement
C++: fix equality refinement in new range analysis
2023-05-24 15:19:02 -07:00
Mathias Vorreiter Pedersen
90824d01b4 C++: Add change note. 2023-05-24 14:39:05 -07:00
Robert Marsh
7404bd9c4b Merge branch 'main' into rdmarsh2/cpp/cobo-neq-refinement 2023-05-24 14:13:38 -04:00
Paolo Tranquilli
63fb0581c2 Swift: accept inconsistencies for now 2023-05-24 20:09:46 +02:00
Geoffrey White
d8cc8bd520 Swift: Fix indentation. 2023-05-24 18:43:48 +01:00
Geoffrey White
6d2800c117 Swift: Add change note. 2023-05-24 18:32:04 +01:00
Paolo Tranquilli
67a9141e8c Swift: make AST printer consistency query more helpful 2023-05-24 18:10:08 +02:00
Paolo Tranquilli
b9fe056d81 Swift: add qlpack.yml to consistency-queries 2023-05-24 18:10:08 +02:00
Paolo Tranquilli
85fdcd9912 Swift: move consistency queries 2023-05-24 18:10:08 +02:00
Paolo Tranquilli
e513af1bcf Swift: add CFG and PrintAst consistency queries, enabling them in CI 2023-05-24 18:10:08 +02:00
Mathias Vorreiter Pedersen
fca5fb6177 Merge pull request #13269 from jketema/inline-module
C++/Swift: Rewrite inline expectation tests to use the parameterized module
2023-05-24 08:10:42 -07:00
Mathias Vorreiter Pedersen
4496fd58ae Merge pull request #13271 from jketema/invalid-pointer-deref-fp-2
C++: Add `cpp/invalid-pointer-deref` FP test case
2023-05-24 08:05:58 -07:00
Maiky
40450a2792 typo 2023-05-24 17:02:48 +02:00
Kasper Svendsen
92b408fbc1 Merge pull request #13274 from kaspersv/kaspersv/late-inline-member-preds-doc
Docs: Late inlining now supported for member predicates
2023-05-24 16:19:42 +02:00
Kasper Svendsen
770e76a04d Docs: Late inlining now supported for member predicates 2023-05-24 14:02:58 +02:00
Jeroen Ketema
9a467f9d4e C++: Add cpp/invalid-pointer-deref FP test case 2023-05-24 13:52:19 +02:00
github-actions[bot]
d2e192020b Post-release preparation for codeql-cli-2.13.3 2023-05-24 11:26:12 +00:00
Jeroen Ketema
af378df712 C++: Add cpp/invalid-pointer-deref FP test case 2023-05-24 12:29:55 +02:00
Jeroen Ketema
3a3d9bc505 Swift: Rewrite inline expectation tests to use the parameterized module 2023-05-24 11:38:22 +02:00
Paolo Tranquilli
2fb6cdc19b Merge branch 'main' into alexdenisov+redsun82/tuple-mangling 2023-05-24 11:16:59 +02:00
Tom Hvitved
1788c54bd8 Python: Avoid calling TypeTracker::step in call graph construction 2023-05-24 11:11:54 +02:00
Tom Hvitved
13ada1e6ad Ruby: Remove canonical return nodes 2023-05-24 11:11:50 +02:00
Tom Hvitved
deee314370 Python/Ruby: Optimize join-order in TypeTracker::[small]step 2023-05-24 11:11:07 +02:00
Tom Hvitved
05f3934042 Merge pull request #13251 from hvitved/ruby/call-graph-self-param
Ruby: Include both `self` parameters and SSA definitions in call graph construction
2023-05-24 11:10:34 +02:00
Jeroen Ketema
2276890cec C++: Rewrite inline expectation tests to use the parameterized module 2023-05-24 11:10:05 +02:00
Asger F
818753e922 Merge pull request #13265 from asgerf/rb/delete-name-clash
Ruby: fix some name clashes between summarized callables
2023-05-24 11:08:56 +02:00
Erik Krogh Kristensen
796e71f8be Merge pull request #13176 from MaxSchlueter/fixquery12
Fix "Introducing the JavaScript libraries" query12.qll and add test case
2023-05-24 10:56:53 +02:00
Tony Torralba
7d0b02e267 Merge pull request #13248 from atorralba/atorralba/java/nio-files-copy-models-fix
Java: Tweak java.nio.file.Files.copy models
2023-05-24 10:55:15 +02:00
Jeroen Ketema
5dc3789df2 Merge pull request #13266 from MathiasVP/modernize-print-ir-local-flow
C++: Modernize `PrintIR` for local dataflow
2023-05-24 10:54:10 +02:00
Michael Nebel
95916450d8 Merge pull request #13085 from michaelnebel/csharp/dbsetsummaries
C#: Entity framework. Convert DbSet summaries to MaD models.
2023-05-24 10:45:40 +02:00
Tom Hvitved
b486a4d52c Merge pull request #13255 from hvitved/ruby/ssa-param-capture-input
Ruby: Include underlying SSA parameter definition in `localFlowSsaParamCaptureInput`
2023-05-24 10:40:54 +02:00
Asger F
8bd6f6c450 Ruby: change note 2023-05-24 10:22:22 +02:00
Asger F
6d1a4451fb Ruby: update a test expectation 2023-05-24 10:15:51 +02:00
Jeroen Ketema
eea972b205 Merge pull request #13261 from jketema/inline-legacy-classes
Add forgotten classes related to the legacy `InlineExpectationsTest`class
2023-05-24 10:13:19 +02:00
Asger F
5b7f69cf0a QL4QL: Fix a warning about repeating alert location 2023-05-24 09:55:09 +02:00
Maiky
27c1e47ece Update ruby/ql/lib/change-notes/2023-05-06-pg.md
Co-authored-by: Jorge <46056498+jorgectf@users.noreply.github.com>
2023-05-24 01:44:51 +02:00
Mathias Vorreiter Pedersen
e1223d0b21 C++: Add security severity. 2023-05-23 15:01:33 -07:00
Mathias Vorreiter Pedersen
0dfc9b996d C++: Promote 'cpp/overrun-write' out of experimental. 2023-05-23 14:57:42 -07:00
Robert Marsh
bad72c42c5 Merge pull request #13244 from MathiasVP/promote-product-flow
C++: Promote the product-dataflow library out of experimental
2023-05-23 16:23:59 -04:00
Robert Marsh
86ab9608cd C++: add test comments 2023-05-23 16:15:43 -04:00
Mathias Vorreiter Pedersen
8daa8d78ff Merge pull request #13246 from MathiasVP/fix-pointer-pointee-conflation-2
C++: Fix more pointer/pointee conflation
2023-05-23 12:03:29 -07:00
Maiky
8dca585207 Expected 2023-05-23 20:04:34 +02:00
Maiky
ad5355a04a Pg Library, change note and Frameworks.qll 2023-05-23 19:49:03 +02:00
Arthur Baars
e33f3a6668 Merge pull request #13154 from aibaars/sync-dbscheme-py
JS/Ruby/QL/Python: sync dbscheme fragments
2023-05-23 19:14:29 +02:00
Mathias Vorreiter Pedersen
4b92a2a3d0 C++: Fix Code Scanning error. 2023-05-23 10:13:19 -07:00
Geoffrey White
2c5202018d Swift: Add sinks. 2023-05-23 18:11:33 +01:00
Mathias Vorreiter Pedersen
43459c16fd C++: Modernize the PrintIRStoreSteps (and rename it to PrintIRFieldFlowSteps) after the use-use flow changes. 2023-05-23 10:02:54 -07:00
Mathias Vorreiter Pedersen
8ee7694e7d C++: Modernize the PrintIRLocalFlow after the use-use flow changes. 2023-05-23 10:02:30 -07:00
Mathias Vorreiter Pedersen
0519ceeeaa C++/C#: Sync identical files. 2023-05-23 10:00:26 -07:00
Mathias Vorreiter Pedersen
ccc9e09dbd C++: Add mechanism to hide specific instructions and operands from PrintIR. 2023-05-23 10:00:09 -07:00
Mathias Vorreiter Pedersen
81dbfecbfc C++: Promote the product-dataflow library out of experimental. 2023-05-23 09:48:50 -07:00
Mathias Vorreiter Pedersen
6fca8dfd39 Merge pull request #13260 from jketema/test-config-sig
C++: Rewrite flow test common to use inline expectation test module
2023-05-23 09:38:43 -07:00
Sim4n6
90c174de4e Updated the .expected file accordingly 2023-05-23 17:36:50 +01:00
Geoffrey White
8573b30239 Swift: Add test cases. 2023-05-23 17:29:51 +01:00
Philip Ginsbach
71a6e62c75 Merge pull request #13264 from github/ginsbach/MoveSignaturesSection
move section on signatures in the QL specification
2023-05-23 17:22:01 +01:00
Philip Ginsbach
1179f20d88 Merge pull request #13263 from github/ginsbach/DocumentAnnotationsForParameterised
update QL specification on annotations for parameterised modules
2023-05-23 17:20:26 +01:00
Asger F
e4e52e77f7 QL4QL: Add query to warn about name clashes between summarized callables 2023-05-23 18:01:31 +02:00
Jeroen Ketema
1be9463297 Add forgotten classes related to the legacy InlineExpectationsTest class 2023-05-23 17:39:01 +02:00
Asger F
0592c8ba99 Ruby: avoid name clash for "assoc" summary 2023-05-23 17:34:19 +02:00
Philip Ginsbach
3e7389e1f8 move section on signatures in the QL specification 2023-05-23 16:29:35 +01:00
Philip Ginsbach
f884473447 be more explicit about annotation caveats 2023-05-23 16:23:17 +01:00
Philip Ginsbach
10a02d6387 Signatures column for pragmas table 2023-05-23 16:23:17 +01:00
Philip Ginsbach
846dffb5ff Signatures column for simple annotations table 2023-05-23 16:23:16 +01:00
Philip Ginsbach
6f4b02ef14 add documentation for extensible annotation 2023-05-23 16:08:38 +01:00
Philip Ginsbach
89d246ba34 add documentation for additional annotation 2023-05-23 16:06:57 +01:00
Edward Minnix III
52340802bb Merge pull request #13097 from egregius313/egregius313/java/webgoat/ssrf-regex-fix
Java: Add constraint to `HostnameSanitizingPrefix` to prevent false negatives in SSRF queries
2023-05-23 10:50:43 -04:00
Asger F
50a7b21928 Ruby: fix a name clash for summaries called "delete" 2023-05-23 16:49:17 +02:00
Jeroen Ketema
aeb6293757 C++: Rewrite flow test common to use inline expectation test module
This also rewrites all uses of flow test common to use `DataFlow::ConfigSig`.

Note that the removed deprecated aliases are 14 months old by now and, hence,
can be safely removed.
2023-05-23 16:34:41 +02:00
Alex Ford
9ccfec0571 Ruby: move actiondispatch components to an internal subdirectory 2023-05-23 15:26:52 +01:00
Alex Ford
9f5c73cf63 Ruby: add a test case for instantiating ActionDispatch::Request directly 2023-05-23 15:18:32 +01:00
Alex Ford
1c9e4c0f0b Ruby: test for RequestInputAccess instances in ActionDispatch 2023-05-23 15:17:38 +01:00
Alex Ford
c2f5bacc47 Ruby: consider more calls to e.g. ActionDispatch::Request#params as remote input sources 2023-05-23 14:50:16 +01:00
Alex Ford
27729af088 Ruby: move ActionDispatch::Request logic out of ActionController.qll 2023-05-23 14:49:57 +01:00
Alex Ford
9b4914c3f6 Ruby: split ActionDispatch modelling into multiple component files 2023-05-23 14:48:45 +01:00
Jeroen Ketema
ee36d32ef0 Merge pull request #12789 from jketema/inline
Turn inline expectation test into a parameterized module
2023-05-23 14:58:48 +02:00
Tom Hvitved
eaa84cb819 Ruby: Include underlying SSA parameter definition in localFlowSsaParamCaptureInput 2023-05-23 13:56:29 +02:00
Tony Torralba
6f012d51c0 Merge pull request #13091 from atorralba/atorralba/java/inputstreamwrapper-transitive
Java: Make inputStreamWrapper consider supertypes transitively
2023-05-23 13:28:17 +02:00
Michael Nebel
8cef798a6f Merge pull request #13202 from michaelnebel/csharp/systemdatetimedefaults
C#: System.DateTime defaults.
2023-05-23 13:11:20 +02:00
Jeroen Ketema
3efc78ed49 Add default for hasOptionalResult 2023-05-23 12:32:11 +02:00
Jeroen Ketema
adbf66a365 C++: Rewrite inline expectation test to demonstrate MergeTests 2023-05-23 12:29:06 +02:00
Jeroen Ketema
04beeef777 Add convenience module that merges two inline expectation tests 2023-05-23 12:29:06 +02:00
Jeroen Ketema
9228e0deed C++: Rewrite local flow test to use TestSig 2023-05-23 12:29:06 +02:00
Jeroen Ketema
b96bfea590 Turn inline expectation test into a parameterized module 2023-05-23 12:29:06 +02:00
Tom Hvitved
349de77474 Ruby: Include both self parameters and SSA definitions in call graph construction 2023-05-23 12:28:06 +02:00
Rasmus Wriedt Larsen
5c77edecf7 Merge pull request #12991 from Sim4n6/python-UBV
[Python] Add Unicode Bypass Validation query tests and help
2023-05-23 12:21:55 +02:00
Michael Nebel
d28316d397 C#: Update the flow summaries expected test output. 2023-05-23 12:07:08 +02:00
Michael Nebel
2b8bbfe888 C#: Add the EntityFramework stub to the general flow summaries test. 2023-05-23 12:05:23 +02:00
Michael Nebel
dea8f576ad C#: Update the EntityFramework stubs to align with the real implementation. 2023-05-23 12:04:50 +02:00
Michael Nebel
97a0e44d43 C#: Update the DbSet models to target the actual Microsoft implementation instead of the stub. 2023-05-23 12:04:08 +02:00
Max Schlueter
40aa9417d0 Fix query12 and add test case 2023-05-23 11:52:51 +02:00
Tony Torralba
5c5f910130 Add change note 2023-05-23 10:31:28 +02:00
Tony Torralba
654bb00946 Java: Tweak java.nio.files.Files.copy models 2023-05-23 10:27:19 +02:00
erik-krogh
f7419c9250 add expected output 2023-05-23 09:56:06 +02:00
erik-krogh
c7e21ee9ae add really long regex as a test-case 2023-05-23 09:56:06 +02:00
erik-krogh
f85b3e13c2 update expected output 2023-05-23 09:56:06 +02:00
erik-krogh
efa53d21fa rename succ to pumpEnd 2023-05-23 09:56:06 +02:00
erik-krogh
36147e7afc revert the better super-linear algorith, 2023-05-23 09:56:06 +02:00
Michael Nebel
b4481f25a9 C#: Re-write some of the summaries to use .WithElement. 2023-05-23 09:46:18 +02:00
Michael Nebel
455e3e569c C#: Update expected test output (the summaries are no longer added via EFSummariedCallable). 2023-05-23 09:46:18 +02:00
Michael Nebel
7a9820cc1b C#: Convert Entity Framework summaries for DbSet into MaD models. 2023-05-23 09:46:18 +02:00
Tony Torralba
0ff90df497 Merge pull request #13245 from github/workflow/coverage/update
Update CSV framework coverage reports
2023-05-23 09:38:01 +02:00
Erik Krogh Kristensen
50cb5ea184 Merge pull request #13164 from erik-krogh/polyQhelp
ReDoS: add another example to the qhelp in poly-redos, showing how to just limit the length of the input
2023-05-23 09:25:15 +02:00
Erik Krogh Kristensen
e658177c31 Merge pull request #12975 from tyage/support-sub-modules
JS: Support sub modules
2023-05-23 09:24:43 +02:00
Erik Krogh Kristensen
4540ac88ad Merge pull request #13247 from github/dependabot/cargo/ql/regex-1.8.2
Bump regex from 1.8.1 to 1.8.2 in /ql
2023-05-23 08:19:18 +02:00
dependabot[bot]
3a39e8badf Bump regex from 1.8.1 to 1.8.2 in /ql
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.8.1...1.8.2)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 04:14:09 +00:00
Mathias Vorreiter Pedersen
b32d55a21d C++: Accept test changes. 2023-05-22 18:26:29 -07:00
Mathias Vorreiter Pedersen
36285ba2c5 C++: Fix pointer/pointee conflation. 2023-05-22 17:39:43 -07:00
github-actions[bot]
abcece88f5 Add changed framework coverage reports 2023-05-23 00:16:20 +00:00
Ed Minnix
2d69f81d85 Add change note 2023-05-22 15:57:15 -04:00
Ed Minnix
43966ebaeb Change regex used in HostnameSanitizingPrefix 2023-05-22 15:57:15 -04:00
Ed Minnix
774baead60 Add test case based on missing result 2023-05-22 15:57:15 -04:00
Erik Krogh Kristensen
653cd86c13 update qldoc 2023-05-22 20:48:21 +02:00
Arthur Baars
bec2b7fef9 QL/Ruby: update dbscheme stats 2023-05-22 19:37:58 +02:00
Arthur Baars
e6d29af5a4 sync-dbscheme-fragments: add files argument 2023-05-22 19:37:58 +02:00
Arthur Baars
2416568489 Tree-sitter-xtractor: fix clippy warnings 2023-05-22 19:37:58 +02:00
Arthur Baars
5e279f2898 Python: add upgrade/downgrade scripts 2023-05-22 19:37:58 +02:00
Arthur Baars
ef3005ea9e Python: sync shared dbscheme fragments 2023-05-22 19:37:58 +02:00
Arthur Baars
294cc930e6 Ruby: add upgrade/downgrade scripts 2023-05-22 19:37:51 +02:00
Arthur Baars
d2bc66e393 QL: switch to shared YAML extractor 2023-05-22 19:28:59 +02:00
Arthur Baars
6d7e95a142 QL/Ruby: included shared extractor code in cache key 2023-05-22 19:28:59 +02:00
Arthur Baars
7978c65467 JS: add upgrade/downgrade scripts 2023-05-22 19:28:59 +02:00
Arthur Baars
9f83dd5c7a Tree-sitter extractor: extract shared dbscheme fragments into 'prefix.dbscheme' 2023-05-22 19:28:51 +02:00
Robert Marsh
681cc4c755 C++: add neq refinement test for range analysis 2023-05-22 11:49:37 -04:00
Robert Marsh
6a997aba3b C++: fix equality refinement in new range analysis 2023-05-22 11:11:51 -04:00
Robert Marsh
4ed7450689 C++: remove unneeded pragma 2023-05-22 11:09:44 -04:00
Robert Marsh
604affdeb0 C++: autoformat 2023-05-22 09:31:39 -04:00
Tony Torralba
183915410d Add change note 2023-05-22 15:01:25 +02:00
Michael Nebel
2c37cb7ac5 C#: Add more default parameter test-cases. 2023-05-22 14:24:46 +02:00
Sim4n6
e300816b72 Merge branch 'python-UBV' of https://github.com/sim4n6/codeql-pun into python-UBV 2023-05-22 13:18:40 +01:00
Michael Nebel
6cb2ce5a38 C#: Update tests to exclude autogenerated parameterizables in attributes as these appears to give OS dependent results. 2023-05-22 14:16:37 +02:00
Michael Nebel
5a57d47b6c C#: Add more testcases, a new test, update the compiled test code and updated expected results. 2023-05-22 14:16:37 +02:00
Michael Nebel
2ca543e217 C#: Synthetic DateTime object creation for DateTime defaults via attributes. 2023-05-22 14:16:37 +02:00
Rasmus Wriedt Larsen
c1b90c8f05 Python: Apply suggested change 2023-05-22 11:58:32 +02:00
Rasmus Wriedt Larsen
a057365b7e Python: Accept .expected changes 2023-05-22 11:54:50 +02:00
Rasmus Wriedt Larsen
44d806507d Merge branch 'main' into python-UBV 2023-05-22 11:53:56 +02:00
erik-krogh
708a99528f initial implementation of TS 5.1 2023-05-22 10:11:32 +02:00
erik-krogh
710b309142 apply suggestions from doc review 2023-05-21 22:18:48 +02:00
erik-krogh
10bf17c33e Merge branch 'main' into polyQhelp 2023-05-21 22:17:06 +02:00
Sim4n6
97e8e0bd8e Add String Manipulation Method Calls & CGI.escapeHTML() support 2023-05-21 11:52:29 +01:00
Sim4n6
f7f0564e36 added one more test 2023-05-20 18:00:27 +01:00
Sim4n6
0a0a6dde40 Replaced CGI.escapeHTML() with the html_escape() 2023-05-20 17:59:39 +01:00
Sim4n6
ad754f1385 use of all normalization forms without the ":" prefix 2023-05-20 17:59:08 +01:00
Sim4n6
f5ff50880c Updated qhelp for the use of html_escape() 2023-05-20 17:58:24 +01:00
Sim4n6
cc3cc1faef Merge branch 'ruby-UBV' of https://github.com/sim4n6/codeql-pun into ruby-UBV 2023-05-20 12:59:50 +01:00
Sim4n6
d11cb9195c Use of CGI.escapeHTML() in test samples 2023-05-20 12:57:50 +01:00
Sim4n6
e345d7dca4 Update ruby/ql/src/experimental/cwe-176/examples/unicode_normalization.rb
Co-authored-by: Arthur Baars <aibaars@github.com>
2023-05-20 12:54:03 +01:00
Sim4n6
7cd1fd4bbf CWE-179 and CWE-180 are included in metadata 2023-05-20 12:51:45 +01:00
Sim4n6
957023ec44 nfd and nfkd are considered 2023-05-20 12:51:24 +01:00
Sim4n6
c9c7179a0b Deleted the ugly flowchart. 2023-05-20 12:49:46 +01:00
Sim4n6
c3c65ca712 Qhelp formatting 2023-05-20 12:48:26 +01:00
Sim4n6
8dcf139b45 Update ruby/ql/src/experimental/cwe-176/UnicodeBypassValidation.qhelp
Co-authored-by: Arthur Baars <aibaars@github.com>
2023-05-20 12:46:54 +01:00
Sim4n6
eb7e1de65b Update ruby/ql/lib/codeql/ruby/experimental/UnicodeBypassValidationQuery.qll
Co-authored-by: Arthur Baars <aibaars@github.com>
2023-05-20 12:43:05 +01:00
Sim4n6
69ca49f168 Deleted the UBV query change note. 2023-05-20 12:39:54 +01:00
Sim4n6
be3f59afab Replaced StringMethod() with a restrained String method calls 2023-05-20 12:17:33 +01:00
Sim4n6
d939f192d5 Deleted the UBV query change note. 2023-05-20 11:46:18 +01:00
Sim4n6
21e99d52c7 Fix a redundant import 2023-05-20 10:23:04 +01:00
Sim4n6
b8969707c5 Delete the vulnerability flow image from the QHelp file. 2023-05-20 10:21:38 +01:00
Sim4n6
16ce024429 Update python/ql/src/experimental/Security/CWE-176/UnicodeBypassValidation.qhelp
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-05-20 10:13:23 +01:00
Sim4n6
8462b14b54 Update python/ql/src/experimental/Security/CWE-176/UnicodeBypassValidation.qhelp
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2023-05-20 10:12:55 +01:00
Sim4n6
2a8645c447 Fix 'Singleton set literal' warning 2023-05-20 10:11:26 +01:00
Sim4n6
58be109a70 Moved UnicodeBypassValidation Customizations & Query.qll to src/experimental 2023-05-20 10:08:56 +01:00
Robert Marsh
bf07b0f97b C++: fix cxartesian product in constant off-by-one query 2023-05-19 18:32:09 -04:00
Geoffrey White
b6122d01fc Swift: Clean up the query somewhat. 2023-05-19 22:40:53 +01:00
Geoffrey White
2028b5ef95 Swift: Fix imprecise sinks. 2023-05-19 22:23:26 +01:00
Geoffrey White
19080333b9 Swift: Add a few test cases. 2023-05-19 22:18:34 +01:00
Alvaro Muñoz
bf3fb09dfd Apply suggestions from code review
Co-authored-by: Tony Torralba <atorralba@users.noreply.github.com>
2023-05-18 12:39:41 +02:00
Nicky Mouha
27519ce3ea Create IfStatementAdditionOverflow.qhelp 2023-05-17 15:27:19 -04:00
Nicky Mouha
187299fcaf Update test.cpp 2023-05-17 15:20:54 -04:00
Nicky Mouha
ef57861789 Update IfStatementAdditionOverflow.expected 2023-05-17 15:19:52 -04:00
Nicky Mouha
5c6fc2ff01 Update IfStatementAdditionOverflow.ql 2023-05-17 15:18:52 -04:00
Jami Cogswell
be84fc2eac C#: add change note 2023-05-17 10:52:16 -04:00
Mathias Vorreiter Pedersen
9e05569121 C++/C#: Sync identical files. 2023-05-17 15:42:44 +01:00
Mathias Vorreiter Pedersen
57cc316ecd C++: Fix bug for single-instruction basic blocks. 2023-05-17 15:42:38 +01:00
Alvaro Muñoz
b235b1cbb9 improve yaml models 2023-05-17 16:40:28 +02:00
Alvaro Muñoz
7baf244ac6 remove test predicate 2023-05-17 16:18:46 +02:00
Alvaro Muñoz
8cd85a5676 add flow support for unmarshaled object fields 2023-05-17 16:16:30 +02:00
Mathias Vorreiter Pedersen
771abf4f97 C++/C#: Sync identical files. 2023-05-17 13:47:01 +01:00
Mathias Vorreiter Pedersen
3b2c3f6f40 C++: Use an 'EquivalenceRelation' instead of the 'shortestDistances' HOP in 'getInstruction'. This reduces the memory pressure when generating the CFG for Wireshark. 2023-05-17 13:46:51 +01:00
Charis Kyriakou
0f93f3a5ad Remove GITHUB_TOKEN permissions note since it's no longer required 2023-05-17 12:34:47 +01:00
Asger F
9ec6c7daea JS: Avoid using global vars in documentation examples 2023-05-17 10:47:25 +02:00
erik-krogh
480e71fd69 avoid contractions 2023-05-17 08:42:45 +02:00
Jami Cogswell
003bb2f6f5 JS: add change note 2023-05-16 15:45:55 -04:00
Jami Cogswell
359f6ffd1e JS: update 'credentials[%]' sink kind to 'credentials-%' 2023-05-16 15:45:55 -04:00
Jami Cogswell
7880e9e92c JS: update 'command-line-injection' sink kind to 'command-injection' 2023-05-16 15:45:55 -04:00
Jami Cogswell
588a62c3a4 C#: update CaptureSinkModels test case 2023-05-16 14:07:20 -04:00
Jami Cogswell
06a28f6221 C#: update 'remote' sink kind to 'file-content-store' 2023-05-16 14:07:20 -04:00
Jami Cogswell
d3da5a7b28 C#: update cwe-sink.csv file 2023-05-16 14:07:20 -04:00
Jami Cogswell
74cd2407fb C#: update 'xss' sink kind to 'js-injection' 2023-05-16 14:07:20 -04:00
Jami Cogswell
a0b502fa44 C#: update 'html' sink kind to 'html-injection' 2023-05-16 14:07:20 -04:00
Jami Cogswell
f76563d6e9 C#: update some test cases 2023-05-16 14:07:19 -04:00
Jami Cogswell
b6d011b187 C#: update 'sql' sink kind to 'sql-injection' 2023-05-16 14:07:19 -04:00
Jami Cogswell
613077c7a9 C#: update 'code' sink kind to 'code-injection' 2023-05-16 14:07:19 -04:00
Arthur Baars
2911a6cc30 JS: remove unused tables 2023-05-16 17:03:41 +02:00
Arthur Baars
fef0e1f1c8 JS: sync shared dbscheme fragments 2023-05-16 17:03:41 +02:00
Arthur Baars
7225ef09ba Script for detecting out-of-sync dbscheme fragments 2023-05-16 17:03:41 +02:00
Alvaro Muñoz
d17199a9e1 add gson models 2023-05-16 15:00:26 +02:00
Geoffrey White
5019d3befa Swift: Update test annotations. 2023-05-15 18:23:48 +01:00
Geoffrey White
3f206cce00 Swift: Simplify out toLowerCase(). 2023-05-15 18:23:33 +01:00
Geoffrey White
047494dc95 Swift: Bank account numbers are a credential now, I guess they don't need to be private data as well. 2023-05-15 18:22:55 +01:00
Geoffrey White
252b72b573 Swift: Add some special cases to preserve (for now) result quality. 2023-05-15 18:22:50 +01:00
Geoffrey White
245e8fbc92 Swift: Use SensitiveDataHeuristics.qll in SensitiveCredential. 2023-05-15 18:14:52 +01:00
Geoffrey White
a91c45049e Swift: Add some special cases to preserve (for now) result quality. 2023-05-15 18:06:33 +01:00
Geoffrey White
e2080c5d00 Swift: SensitiveDataHeuristics.qll expects function names without an (argument:list:). 2023-05-15 17:45:56 +01:00
Geoffrey White
35e2e5d785 Swift: Use SensitiveDataHeuristics.qll in regexpProbablySafe. 2023-05-15 17:44:54 +01:00
Geoffrey White
cc72bfbbbb Swift: Add the shared SensitiveDataHeuristics.qll to Swift. 2023-05-15 17:38:14 +01:00
erik-krogh
83ca1495e0 trim the whitespace in the poly-redos examples 2023-05-15 16:47:24 +02:00
erik-krogh
d989359656 add another example to the qhelp in poly-redos, showing how to just limit the length of the input 2023-05-15 16:47:02 +02:00
Maiky
3c00235375 Add SqlSanitization to Concepts and turn private 2023-05-15 15:56:52 +02:00
Maiky
f46620c455 Var only used in one side of disjunct 2023-05-15 15:09:44 +02:00
tyage
93af0d0c2f formatting 2023-05-13 17:37:31 +00:00
tyage
6f66c047d0 JS: ignoresub pkgs in node_modules directory 2023-05-13 09:12:28 +00:00
Robert Marsh
584adf843a C++: restrict flowstates in constant off-by-one query 2023-05-12 12:43:10 -04:00
Tony Torralba
549fa7e288 Java: make inputStreamWrapper only act on constructors from outside of source 2023-05-12 17:47:56 +02:00
Maiky
0227b94ab5 Edit change note 2023-05-11 15:40:36 +02:00
Maiky
071a77cedc Ruby : XPath Injection Query (CWE-643) 2023-05-11 15:29:54 +02:00
Robert Marsh
f77c77fdf9 C++: refactor off-by-one query to use flowstate 2023-05-10 15:01:01 -04:00
Tony Torralba
aa14105e1c Don't use the reflexive transitive closure, so that the predicate becomes a little more efficient 2023-05-10 16:45:07 +02:00
tyage
f6a8cd27ca Update javascript/ql/lib/semmle/javascript/NPM.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
2023-05-10 19:36:49 +09:00
Mathew Payne
bffc233d86 Update release notes 2023-05-10 10:09:19 +01:00
Mathew Payne
681623d631 Update kind model validation 2023-05-10 10:06:22 +01:00
Mathew Payne
0f85b98cc7 Update models to match new data extensions names 2023-05-10 10:00:16 +01:00
Mathew Payne
0e932574f4 Fix Ldap class name 2023-05-09 17:42:17 +01:00
Mathew Payne
7b55955fac Update change notes 2023-05-09 17:40:12 +01:00
Mathew Payne
e84657242c Fix names 2023-05-09 17:38:15 +01:00
Mathew Payne
632e487458 Add Command Injection support 2023-05-09 17:37:00 +01:00
Mathew Payne
8f39f028e6 feat: Additional models as data extensions
- `logging`, `ldap`, and `url-redirect` sinks
2023-05-09 17:31:51 +01:00
Tony Torralba
2c41c5b0e2 Make inputStreamWrapper consider supertypes transitively 2023-05-09 17:27:16 +02:00
Maiky
3960853af0 CWE-089 Add Sequel SQL Injection Sink 2023-05-07 23:56:56 +02:00
Maiky
6a3d995b35 Add Mysql2 as SQL Injection Sink 2023-05-06 12:25:25 +02:00
Robert Marsh
b7653ec92d C++: ignore cast arrays in constant off-by-one query 2023-05-04 16:39:02 -04:00
Robert Marsh
d9665e1678 C++: add case test for constant off-by-one query 2023-05-04 16:34:29 -04:00
Robert Marsh
3abf5d1bd2 C++: stitch paths in array off-by-one query 2023-05-04 16:28:05 -04:00
Sim4n6
1247403d43 Updated expected results file 2023-05-04 08:56:45 +01:00
Sim4n6
14ca20e782 removed redundant imports 2023-05-03 17:43:54 +01:00
tyage
22f5b7a18b JS: check scoped package and normal package 2023-05-03 13:19:59 +09:00
Sim4n6
6d3fdc3a07 all forms considered+ more unicode normalize sink 2023-05-02 21:18:37 +01:00
Sim4n6
019b85beb6 Add Unicode Bypass Validation query, test and help file 2023-05-02 15:36:39 +01:00
Sim4n6
083cd612cd add a change note markdown 2023-05-02 15:17:03 +01:00
Sim4n6
1fa1a4e268 Add Unicode Bypass Validation query tests and help 2023-05-02 15:09:16 +01:00
Paolo Tranquilli
c65c65557d Swift: accept string representation changes in test 2023-05-02 10:49:31 +02:00
Paolo Tranquilli
3685590a12 Swift: remove version control markers 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
7adcd0d043 Swift: small tweak to visitBuiltinType 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
87c73879cb Swift: add explanation to getExtensionIndex 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
826d7c7dbe Swift: preload extension indexes
Finding each extension declaration separately within its parent seemed
to create an `O(n^2)` noticeable performance problem. This is solved
by preloading indexes and storing them in a map, so as to iterate
through the parent of an extension only once per parent instead of once
per extension.
2023-05-02 10:45:43 +02:00
Paolo Tranquilli
146591934a Swift: clean up SwiftMangler 2023-05-02 10:45:43 +02:00
Paolo Tranquilli
f6a6958c03 Swift: mangle ParameterizedProtocolType 2023-05-02 10:45:43 +02:00
Alex Denisov
92c20be038 Swift: change indexing for extension declarations to make them more stable 2023-05-02 10:45:42 +02:00
Alex Denisov
6c954eae3c Swift: handle isolated types 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
dfbc248e78 Swift: mangle opened archetype and fix global actor 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
0aed7d56c2 Swift: more mangling 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
2592129d83 Swift: mangle remaining unmangled types appearing during test run 2023-05-02 10:45:42 +02:00
Paolo Tranquilli
c8ca6057d3 Swift: mangle several new things 2023-05-02 10:45:40 +02:00
Paolo Tranquilli
4ac91ea1b2 Swift: mangle function types, type paramters, metatypes, dependent member types 2023-05-02 10:39:46 +02:00
Paolo Tranquilli
dcca0278b8 Swift: add more functions to deduplication test 2023-05-02 09:54:59 +02:00
Paolo Tranquilli
ab5b267a39 Swift: add GenericFunctionType to deduplication test 2023-05-02 09:54:04 +02:00
Paolo Tranquilli
2eb82fede7 Swift: restrict Type.ql for deduplication test 2023-05-02 09:52:34 +02:00
Paolo Tranquilli
b6146478dc Swift: mangle nominal and bound generic types 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
1274aaaf9c Swift: mangle GenericTypeDecl 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
476cf72710 Swift: mangle AnyGenericType 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
348bc964be Swift: turn current decl mangling into visitor 2023-05-02 09:49:48 +02:00
Paolo Tranquilli
b269bd5010 Swift: mangle builtin and tuple types 2023-05-02 09:49:48 +02:00
tyage
be9c8d28b5 JS: drop string comparison 2023-05-02 12:41:03 +09:00
tyage
0d991574ec Fix typo in test 2023-05-02 12:00:42 +09:00
tyage
f52c845663 Fix comment. 2023-04-30 19:52:11 +09:00
tyage
80d401fba8 JS: change note 2023-04-30 18:26:46 +09:00
tyage
71952fe551 JS: Add test for sub module 2023-04-30 18:18:35 +09:00
tyage
c0cf0b430e JS: support submodules 2023-04-30 18:07:52 +09:00
Sam Browning
1a51c015b4 Add requirements.txt 2023-04-27 15:19:45 -04:00
Nicky Mouha
2de0e2209e Update test.cpp 2023-03-16 02:34:40 -04:00
Geoffrey White
9a27016663 Swift: Make QL-for-QL happy. 2023-03-14 10:24:55 +00:00
Nicky Mouha
a2b5fbf24c Create IfStatementAdditionOverflow.expected 2023-03-12 03:31:48 -04:00
Nicky Mouha
66710ad5a0 Create IfStatementAdditionOverflow.qlref 2023-03-12 03:30:26 -04:00
Nicky Mouha
59c1ae7734 Update test.cpp 2023-03-12 03:27:10 -04:00
Nicky Mouha
2477c3a1c2 Update test.cpp 2023-03-12 03:25:52 -04:00
Nicky Mouha
91a9a7eb32 Create test.cpp 2023-03-12 01:13:32 -05:00
Nicky Mouha
dc09c9218e Update IfStatementAdditionOverflow.ql 2023-03-12 01:05:18 -05:00
Geoffrey White
f1905f21b2 Swift: Remove special case from swift/unsafe-js-eval. 2023-03-06 21:02:42 +00:00
Geoffrey White
4380495eed Swift: Model Sequence.withContiguousSrtorageIfAvailable. 2023-03-06 20:59:17 +00:00
Nicky Mouha
08f04d5386 Update IfStatementAdditionOverflow.ql 2023-02-23 17:50:02 -05:00
Nicky Mouha
ed75172bdd Update IfStatementAdditionOverflow.ql 2023-02-21 18:11:22 -05:00
Nicky Mouha
f577a04eab Update IfStatementAdditionOverflow.ql 2023-02-18 21:34:03 -05:00
Nicky Mouha
5a4a63f8a9 Create IfStatementAdditionOverflow.ql 2023-01-30 18:52:35 -05:00
12062 changed files with 1137249 additions and 454752 deletions

View File

@@ -1,3 +1,9 @@
build --repo_env=CC=clang --repo_env=CXX=clang++ --cxxopt="-std=c++17"
common --enable_platform_specific_config
build --repo_env=CC=clang --repo_env=CXX=clang++
build:linux --cxxopt=-std=c++20
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
try-import %workspace%/local.bazelrc

View File

@@ -1 +1 @@
6.1.2
6.3.1

1
.clang-format Normal file
View File

@@ -0,0 +1 @@
DisableFormat: true

3
.gitattributes vendored
View File

@@ -71,3 +71,6 @@ go/extractor/opencsv/CSVReader.java -text
# `javascript/ql/experimental/adaptivethreatmodeling/test/update_endpoint_test_files.py`.
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.js linguist-generated=true -merge
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.ts linguist-generated=true -merge
# Auto-generated modeling for Python
python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true

View File

@@ -17,3 +17,26 @@ updates:
ignore:
- dependency-name: '*'
update-types: ['version-update:semver-patch', 'version-update:semver-minor']
- package-ecosystem: "gomod"
directory: "go/extractor"
schedule:
interval: "daily"
allow:
- dependency-name: "golang.org/x/mod"
- dependency-name: "golang.org/x/tools"
groups:
extractor-dependencies:
patterns:
- "golang.org/x/*"
reviewers:
- "github/codeql-go"
- package-ecosystem: "gomod"
directory: "go/ql/test"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
reviewers:
- "github/codeql-go"

9
.github/labeler.yml vendored
View File

@@ -11,7 +11,7 @@ Go:
- change-notes/**/*go.*
Java:
- any: [ 'java/**/*', '!java/kotlin-extractor/**/*', '!java/kotlin-explorer/**/*', '!java/ql/test/kotlin/**/*' ]
- any: [ 'java/**/*', '!java/kotlin-extractor/**/*', '!java/ql/test/kotlin/**/*' ]
- change-notes/**/*java.*
JS:
@@ -20,7 +20,6 @@ JS:
Kotlin:
- java/kotlin-extractor/**/*
- java/kotlin-explorer/**/*
- java/ql/test/kotlin/**/*
Python:
@@ -46,11 +45,7 @@ documentation:
# Since these are all shared files that need to be synced, just pick _one_ copy of each.
"DataFlow Library":
- "java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll"
- "shared/dataflow/**/*"
"ATM":
- javascript/ql/experimental/adaptivethreatmodeling/**/*

View File

@@ -9,27 +9,42 @@ on:
- "*/ql/lib/**/*.ql"
- "*/ql/lib/**/*.qll"
- "*/ql/lib/**/*.yml"
- "shared/**/*.ql"
- "shared/**/*.qll"
- "!**/experimental/**"
- "!ql/**"
- "!swift/**"
- ".github/workflows/check-change-note.yml"
jobs:
check-change-note:
env:
REPO: ${{ github.repository }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Fail if no change note found. To fix, either add one, or add the `no-change-note-required` label.
if: |
github.event.pull_request.draft == false &&
!contains(github.event.pull_request.labels.*.name, 'no-change-note-required')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' |
grep true -c
change_note_files=$(gh api "repos/$REPO/pulls/$PULL_REQUEST_NUMBER/files" --paginate --jq '.[].filename | select(test("/change-notes/.*[.]md$"))')
if [ -z "$change_note_files" ]; then
echo "No change note found. Either add one, or add the 'no-change-note-required' label."
exit 1
fi
echo "Change notes found:"
echo "$change_note_files"
- name: Fail if the change note filename doesn't match the expected format. The file name must be of the form 'YYYY-MM-DD.md', 'YYYY-MM-DD-{title}.md', where '{title}' is arbitrary text, or released/x.y.z.md for released change-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))] | all(test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$"))' |
grep true -c
bad_change_note_file_names=$(gh api "repos/$REPO/pulls/$PULL_REQUEST_NUMBER/files" --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))][] | select((test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$")) | not)')
if [ -n "$bad_change_note_file_names" ]; then
echo "The following change note file names are invalid:"
echo "$bad_change_note_file_names"
exit 1
fi

View File

@@ -0,0 +1,29 @@
name: "Check implicit this warnings"
on:
workflow_dispatch:
pull_request:
paths:
- "**qlpack.yml"
branches:
- main
- "rc/*"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check that implicit this warnings is enabled for all packs
shell: bash
run: |
EXIT_CODE=0
packs="$(find . -iname 'qlpack.yml')"
for pack_file in ${packs}; do
option="$(yq '.warnOnImplicitThis' ${pack_file})"
if [ "${option}" != "true" ]; then
echo "::error file=${pack_file}::warnOnImplicitThis property must be set to 'true' for pack ${pack_file}"
EXIT_CODE=1
fi
done
exit "${EXIT_CODE}"

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@@ -16,6 +16,6 @@ jobs:
name: Check query IDs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check for duplicate query IDs
run: python3 misc/scripts/check-query-ids.py

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Comment or remove the `Stale` label in order to avoid having this issue closed in 7 days.'

View File

@@ -28,12 +28,12 @@ jobs:
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.102
dotnet-version: 8.0.101
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
with:
@@ -29,9 +29,9 @@ jobs:
# run with --check-only if running in a PR (github.sha != main)
if : ${{ github.event_name == 'pull_request' }}
shell: bash
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500
- name: compile queries - full
# do full compile if running on main - this populates the cache
if : ${{ github.event_name != 'pull_request' }}
shell: bash
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500

View File

@@ -29,7 +29,7 @@ jobs:
qlupgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/fetch-codeql
- name: Check DB upgrade scripts
run: |
@@ -52,8 +52,7 @@ jobs:
matrix:
slice: ["1/2", "2/2"]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/fetch-codeql
- uses: actions/checkout@v4
- uses: ./csharp/actions/create-extractor-pack
- name: Cache compilation cache
id: query-cache
@@ -62,25 +61,41 @@ jobs:
key: csharp-qltest-${{ matrix.slice }}
- name: Run QL tests
run: |
CODEQL_PATH=$(gh codeql version --format=json | jq -r .unpackedLocation)
# The legacy ASP extractor is not in this repo, so take the one from the nightly build
mv "$CODEQL_PATH/csharp/tools/extractor-asp.jar" "${{ github.workspace }}/csharp/extractor-pack/tools"
# Safe guard against using the bundled extractor
rm -rf "$CODEQL_PATH/csharp"
codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path "${{ github.workspace }}/csharp/extractor-pack" --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path extractor-pack --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
env:
GITHUB_TOKEN: ${{ github.token }}
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.102
dotnet-version: 8.0.101
- name: Extractor unit tests
run: |
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/extractor/Semmle.Util.Tests"
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/extractor/Semmle.Extraction.Tests"
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests"
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Util.Tests
dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Extraction.Tests
dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.CSharp.Tests
dotnet test -p:RuntimeFrameworkVersion=8.0.1 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
shell: bash
stubgentest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./csharp/actions/create-extractor-pack
- name: Run stub generator tests
run: |
# Generate (Asp)NetCore stubs
STUBS_PATH=stubs_output
python3 scripts/stubs/make_stubs_nuget.py webapp Swashbuckle.AspNetCore.Swagger 6.5.0 "$STUBS_PATH"
rm -rf ql/test/resources/stubs/_frameworks
# Update existing stubs in the repo with the freshly generated ones
mv "$STUBS_PATH/output/stubs/_frameworks" ql/test/resources/stubs/
git status
codeql test run --threads=0 --search-path extractor-pack --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries -- ql/test/library-tests/dataflow/flowsources/aspremote
env:
GITHUB_TOKEN: ${{ github.token }}

View File

@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
- name: Create empty database
@@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
- name: Create empty database

View File

@@ -10,6 +10,7 @@ on:
- "*/ql/src/**/*.qll"
- "*/ql/lib/**/*.ql"
- "*/ql/lib/**/*.qll"
- "*/ql/lib/ext/**/*.yml"
- "misc/scripts/library-coverage/*.py"
# input data files
- "*/documentation/library-coverage/cwe-sink.csv"
@@ -30,11 +31,11 @@ jobs:
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
run: echo "$GITHUB_CONTEXT"
- name: Clone self (github/codeql) - MERGE
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: merge
- name: Clone self (github/codeql) - BASE
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
path: base
@@ -88,9 +89,32 @@ jobs:
- name: Save PR number
run: |
mkdir -p pr
echo ${{ github.event.pull_request.number }} > pr/NR
echo ${PR_NUMBER} > pr/NR
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Upload PR number
uses: actions/upload-artifact@v3
with:
name: pr
path: pr/
- name: Save comment ID (if it exists)
run: |
# Find the latest comment starting with COMMENT_PREFIX
COMMENT_PREFIX=":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports."
COMMENT_ID=$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" --paginate | jq --arg prefix "${COMMENT_PREFIX}" 'map(select(.body|startswith($prefix)) | .id) | max // empty')
if [[ -z ${COMMENT_ID} ]]
then
echo "Comment not found. Not uploading 'comment/ID' artifact."
else
mkdir -p comment
echo ${COMMENT_ID} > comment/ID
fi
env:
GITHUB_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Upload comment ID (if it exists)
uses: actions/upload-artifact@v3
with:
name: comment
path: comment/
if-no-files-found: ignore

View File

@@ -20,7 +20,7 @@ jobs:
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
run: echo "$GITHUB_CONTEXT"
- name: Clone self (github/codeql)
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:

View File

@@ -9,11 +9,11 @@ jobs:
steps:
- name: Clone self (github/codeql)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: script
- name: Clone self (github/codeql) for analysis
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: codeqlModels
fetch-depth: 0

View File

@@ -17,7 +17,7 @@ jobs:
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
run: echo "$GITHUB_CONTEXT"
- name: Clone self (github/codeql)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ql
fetch-depth: 0

View File

@@ -13,11 +13,11 @@ jobs:
steps:
- name: Clone self (github/codeql)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: script
- name: Clone self (github/codeql) for analysis
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: codeqlModels
ref: ${{ github.event.inputs.qlModelShaOverride || github.ref }}

View File

@@ -25,7 +25,7 @@ jobs:
exit 1
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Git config
shell: bash

View File

@@ -7,19 +7,21 @@ on:
- .github/workflows/go-tests-other-os.yml
- .github/actions/**
- codeql-workspace.yml
env:
GO_VERSION: '~1.21.0'
jobs:
test-mac:
name: Test MacOS
runs-on: macos-latest
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up CodeQL CLI
uses: ./.github/actions/fetch-codeql
@@ -47,14 +49,14 @@ jobs:
name: Test Windows
runs-on: windows-latest-xl
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up CodeQL CLI
uses: ./.github/actions/fetch-codeql

View File

@@ -15,19 +15,21 @@ on:
- .github/workflows/go-tests.yml
- .github/actions/**
- codeql-workspace.yml
env:
GO_VERSION: '~1.21.0'
jobs:
test-linux:
name: Test Linux (Ubuntu)
runs-on: ubuntu-latest-xl
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up CodeQL CLI
uses: ./.github/actions/fetch-codeql

View File

@@ -1,65 +0,0 @@
name: JS ML-powered queries tests
on:
push:
paths:
- "javascript/ql/experimental/adaptivethreatmodeling/**"
- .github/workflows/js-ml-tests.yml
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml
branches:
- main
- "rc/*"
pull_request:
paths:
- "javascript/ql/experimental/adaptivethreatmodeling/**"
- .github/workflows/js-ml-tests.yml
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml
workflow_dispatch:
defaults:
run:
working-directory: javascript/ql/experimental/adaptivethreatmodeling
jobs:
qltest:
name: Test QL
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/fetch-codeql
- name: Install pack dependencies
run: |
for pack in modelbuilding src test; do
codeql pack install --mode verify -- "${pack}"
done
- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
key: js-ml-test
- name: Check QL compilation
run: |
codeql query compile \
--check-only \
--ram 50000 \
--additional-packs "${{ github.workspace }}" \
--threads=0 \
--compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" \
-- \
lib modelbuilding src
- name: Run QL tests
run: |
codeql test run \
--threads=0 \
--ram 50000 \
--additional-packs "${{ github.workspace }}" \
--compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" \
-- \
test

View File

@@ -12,6 +12,7 @@ on:
- main
paths:
- "java/ql/src/utils/modelgenerator/**/*.*"
- "misc/scripts/models-as-data/*.*"
- ".github/workflows/mad_modelDiff.yml"
permissions:
@@ -27,12 +28,12 @@ jobs:
slug: ${{fromJson(github.event.inputs.projects || '["apache/commons-codec", "apache/commons-io", "apache/commons-beanutils", "apache/commons-logging", "apache/commons-fileupload", "apache/commons-lang", "apache/commons-validator", "apache/commons-csv", "apache/dubbo"]' )}}
steps:
- name: Clone github/codeql from PR
uses: actions/checkout@v3
uses: actions/checkout@v4
if: github.event.pull_request
with:
path: codeql-pr
- name: Clone github/codeql from main
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: codeql-main
ref: main
@@ -61,8 +62,9 @@ jobs:
DATABASE=$2
cd codeql-$QL_VARIANT
SHORTNAME=`basename $DATABASE`
python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE ${SHORTNAME}.temp.model.yml
mv java/ql/lib/ext/generated/${SHORTNAME}.temp.model.yml $MODELS/${SHORTNAME}Generated_${QL_VARIANT}.model.yml
python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT
mkdir -p $MODELS/$SHORTNAME
mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
cd ..
}
@@ -85,16 +87,16 @@ jobs:
set -x
MODELS=`pwd`/tmp-models
ls -1 tmp-models/
for m in $MODELS/*_main.model.yml ; do
for m in $MODELS/*/main/*.model.yml ; do
t="${m/main/"pr"}"
basename=`basename $m`
name="diff_${basename/_main.model.yml/""}"
name="diff_${basename/.model.yml/""}"
(diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true
done
- uses: actions/upload-artifact@v3
with:
name: models
path: tmp-models/*.model.yml
path: tmp-models/**/**/*.model.yml
retention-days: 20
- uses: actions/upload-artifact@v3
with:

View File

@@ -27,11 +27,11 @@ jobs:
ref: "placeholder"
steps:
- name: Clone self (github/codeql)
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup CodeQL binaries
uses: ./.github/actions/fetch-codeql
- name: Clone repositories
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: repos/${{ matrix.ref }}
ref: ${{ matrix.ref }}

View File

@@ -43,7 +43,7 @@ jobs:
if-no-files-found: error
retention-days: 1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
persist-credentials: false

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest-xl
steps:
### Build the queries ###
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Find codeql
@@ -32,7 +32,7 @@ jobs:
path: |
ql/extractor-pack/
ql/target/release/buramu
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('ql/**/Cargo.lock') }}-${{ hashFiles('ql/**/*.rs') }}
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-extractor-${{ hashFiles('ql/**/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ql/**/*.rs') }}
- name: Cache cargo
if: steps.cache-extractor.outputs.cache-hit != 'true'
uses: actions/cache@v3

View File

@@ -21,7 +21,7 @@ jobs:
- github/codeql
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Find codeql
id: find-codeql
@@ -42,7 +42,7 @@ jobs:
env:
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
- name: Checkout ${{ matrix.repo }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
path: ${{ github.workspace }}/repo
@@ -71,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
needs: measure
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: measurements

View File

@@ -21,7 +21,7 @@ jobs:
qltest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Find codeql
id: find-codeql
uses: github/codeql-action/init@v2
@@ -61,7 +61,7 @@ jobs:
needs: [qltest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install GNU tar
if: runner.os == 'macOS'
run: |

View File

@@ -20,7 +20,7 @@ jobs:
steps:
- name: Clone self (github/codeql)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: codeql
- name: Set up Python 3.8

View File

@@ -42,7 +42,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install GNU tar
if: runner.os == 'macOS'
run: |
@@ -61,7 +61,7 @@ jobs:
ruby/extractor/target/release/codeql-extractor-ruby
ruby/extractor/target/release/codeql-extractor-ruby.exe
ruby/extractor/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}--${{ hashFiles('ruby/extractor/**/*.rs') }}
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ruby/extractor/**/*.rs') }}
- uses: actions/cache@v3
if: steps.cache-extractor.outputs.cache-hit != 'true'
with:
@@ -113,7 +113,7 @@ jobs:
compile-queries:
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch CodeQL
uses: ./.github/actions/fetch-codeql
- name: Cache compilation cache
@@ -145,7 +145,7 @@ jobs:
runs-on: ubuntu-latest
needs: [build, compile-queries]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: ruby.dbscheme
@@ -206,7 +206,7 @@ jobs:
runs-on: ${{ matrix.os }}
needs: [package]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch CodeQL
uses: ./.github/actions/fetch-codeql

View File

@@ -27,14 +27,14 @@ jobs:
repo: [rails/rails, discourse/discourse, spree/spree, ruby/ruby]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/fetch-codeql
- uses: ./ruby/actions/create-extractor-pack
- name: Checkout ${{ matrix.repo }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
path: ${{ github.workspace }}/repo
@@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
needs: measure
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: measurements

View File

@@ -14,6 +14,7 @@ on:
pull_request:
paths:
- "ruby/**"
- "shared/**"
- .github/workflows/ruby-qltest.yml
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml
@@ -32,7 +33,7 @@ jobs:
qlupgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/fetch-codeql
- name: Check DB upgrade scripts
run: |
@@ -53,7 +54,7 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/fetch-codeql
- uses: ./ruby/actions/create-extractor-pack
- name: Cache compilation cache

View File

@@ -39,31 +39,31 @@ jobs:
build-and-test-macos:
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./swift/actions/build-and-test
build-and-test-linux:
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./swift/actions/build-and-test
qltests-linux:
needs: build-and-test-linux
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./swift/actions/run-ql-tests
qltests-macos:
if : ${{ github.event_name == 'pull_request' }}
needs: build-and-test-macos
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./swift/actions/run-ql-tests
integration-tests-linux:
needs: build-and-test-linux
runs-on: ubuntu-latest-xl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./swift/actions/run-integration-tests
integration-tests-macos:
if : ${{ github.event_name == 'pull_request' }}
@@ -71,23 +71,32 @@ jobs:
runs-on: macos-12-xl
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./swift/actions/run-integration-tests
clang-format:
if : ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
name: Check that python code is properly formatted
with:
extra_args: clang-format --all-files
codegen:
if : ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v2
- uses: actions/setup-python@v4
with:
python-version-file: 'swift/.python-version'
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
name: Check that python code is properly formatted
with:
extra_args: autopep8 --all-files
- uses: ./.github/actions/fetch-codeql
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
name: Check that QL generated code was checked in
with:
extra_args: swift-codegen --all-files
@@ -102,6 +111,6 @@ jobs:
if : ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/fetch-codeql
- uses: ./swift/actions/database-upgrade-scripts

View File

@@ -14,7 +14,9 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check synchronized files
run: python config/sync-files.py
- name: Check dbscheme fragments
run: python config/sync-dbscheme-fragments.py

View File

@@ -27,7 +27,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run tests
@@ -35,12 +35,12 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run clippy
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments

View File

@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql

View File

@@ -5,15 +5,14 @@ repos:
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)|.*\.patch
- id: end-of-file-fixer
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)
exclude: /test/.*$(?<!\.ql)(?<!\.qll)(?<!\.qlref)|.*\.patch
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v13.0.1
rev: v17.0.6
hooks:
- id: clang-format
files: ^swift/.*\.(h|c|cpp)$
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.6.0
@@ -21,6 +20,11 @@ repos:
- id: autopep8
files: ^misc/codegen/.*\.py
- repo: https://github.com/warchant/pre-commit-buildifier
rev: 0.0.2
hooks:
- id: buildifier
- repo: local
hooks:
- id: codeql-format

View File

@@ -8,7 +8,8 @@
/swift/ @github/codeql-swift
/misc/codegen/ @github/codeql-swift
/java/kotlin-extractor/ @github/codeql-kotlin
/java/kotlin-explorer/ @github/codeql-kotlin
/java/ql/test-kotlin1/ @github/codeql-kotlin
/java/ql/test-kotlin2/ @github/codeql-kotlin
# ML-powered queries
/javascript/ql/experimental/adaptivethreatmodeling/ @github/codeql-ml-powered-queries-reviewers
@@ -43,3 +44,4 @@ WORKSPACE.bazel @github/codeql-ci-reviewers
# Misc
/misc/scripts/accept-expected-changes-from-ci.py @RasmusWL
/misc/scripts/generate-code-scanning-query-list.py @RasmusWL

View File

@@ -14,14 +14,16 @@ If you have an idea for a query that you would like to share with other CodeQL u
1. **Directory structure**
There are six language-specific query directories in this repository:
There are eight language-specific query directories in this repository:
* C/C++: `cpp/ql/src`
* C#: `csharp/ql/src`
* Java: `java/ql/src`
* Go: `go/ql/src`
* Java/Kotlin: `java/ql/src`
* JavaScript: `javascript/ql/src`
* Python: `python/ql/src`
* Ruby: `ruby/ql/src`
* Swift: `swift/ql/src`
Each language-specific directory contains further subdirectories that group queries based on their `@tags` or purpose.
- Experimental queries and libraries are stored in the `experimental` subdirectory within each language-specific directory in the [CodeQL repository](https://github.com/github/codeql). For example, experimental Java queries and libraries are stored in `java/ql/src/experimental` and any corresponding tests in `java/ql/test/experimental`.

View File

@@ -1,10 +1,12 @@
provide:
- "*/ql/src/qlpack.yml"
- "*/ql/lib/qlpack.yml"
- "*/ql/test/qlpack.yml"
- "*/ql/test*/qlpack.yml"
- "*/ql/examples/qlpack.yml"
- "*/ql/consistency-queries/qlpack.yml"
- "shared/*/qlpack.yml"
- "*/ql/automodel/src/qlpack.yml"
- "*/ql/automodel/test/qlpack.yml"
- "shared/**/qlpack.yml"
- "cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml"
- "go/ql/config/legacy-support/qlpack.yml"
- "go/build/codeql-extractor-go/codeql-extractor.yml"
@@ -27,6 +29,7 @@ provide:
- "swift/extractor-pack/codeql-extractor.yml"
- "swift/integration-tests/qlpack.yml"
- "ql/extractor-pack/codeql-extractor.yml"
- ".github/codeql/extensions/**/codeql-pack.yml"
versionPolicies:
default:

View File

@@ -0,0 +1,33 @@
{
"files": [
"javascript/ql/lib/semmlecode.javascript.dbscheme",
"python/ql/lib/semmlecode.python.dbscheme",
"ruby/ql/lib/ruby.dbscheme",
"ql/ql/src/ql.dbscheme"
],
"fragments": [
"/*- External data -*/",
"/*- Files and folders -*/",
"/*- Diagnostic messages -*/",
"/*- Diagnostic messages: severity -*/",
"/*- Source location prefix -*/",
"/*- Lines of code -*/",
"/*- Configuration files with key value pairs -*/",
"/*- YAML -*/",
"/*- XML Files -*/",
"/*- XML: sourceline -*/",
"/*- DEPRECATED: External defects and metrics -*/",
"/*- DEPRECATED: Snapshot date -*/",
"/*- DEPRECATED: Duplicate code -*/",
"/*- DEPRECATED: Version control data -*/",
"/*- JavaScript-specific part -*/",
"/*- Ruby dbscheme -*/",
"/*- Erb dbscheme -*/",
"/*- QL dbscheme -*/",
"/*- Dbscheme dbscheme -*/",
"/*- Yaml dbscheme -*/",
"/*- Blame dbscheme -*/",
"/*- JSON dbscheme -*/",
"/*- Python dbscheme -*/"
]
}

View File

@@ -1,24 +1,4 @@
{
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlow.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlow.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlow.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlow.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlow.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlow.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlow.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlow.qll"
],
"DataFlowImpl Java/C++/C#/Go/Python/Ruby/Swift": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl.qll"
],
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Legacy Configuration": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll",
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll",
@@ -42,37 +22,14 @@
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplForStringsNewReplacer.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForHttpClientLibraries.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplForPathname.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll"
],
"DataFlow Java/C++/C#/Go/Python/Ruby/Swift Common": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll",
"go/ql/lib/semmle/go/dataflow/internal/DataFlowImplCommon.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplCommon.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImplCommon.qll"
],
"TaintTracking Java/C++/C#/Go/Python/Ruby/Swift": [
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTracking.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTracking.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTracking.qll",
"go/ql/lib/semmle/go/dataflow/internal/tainttracking1/TaintTracking.qll",
"java/ql/lib/semmle/code/java/dataflow/internal/tainttracking1/TaintTracking.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/tainttracking1/TaintTracking.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTracking.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTracking.qll"
],
"TaintTracking Legacy Configuration Java/C++/C#/Go/Python/Ruby/Swift": [
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
@@ -96,23 +53,6 @@
"ruby/ql/lib/codeql/ruby/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
],
"DataFlow Java/C++/C#/Python/Ruby/Swift Consistency checks": [
"java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll",
"cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll",
"cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplConsistency.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImplConsistency.qll"
],
"DataFlow Java/C#/Go/Ruby/Python/Swift Flow Summaries": [
"java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll",
"go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll"
],
"SsaReadPosition Java/C#": [
"java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll",
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll"
@@ -511,25 +451,8 @@
"SensitiveDataHeuristics Python/JS": [
"javascript/ql/lib/semmle/javascript/security/internal/SensitiveDataHeuristics.qll",
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll",
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll"
],
"CFG": [
"csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImplShared.qll",
"ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImplShared.qll",
"swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphImplShared.qll"
],
"TypeTracker": [
"python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll",
"ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll"
],
"AccessPathSyntax": [
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll",
"go/ql/lib/semmle/go/dataflow/internal/AccessPathSyntax.qll",
"java/ql/lib/semmle/code/java/dataflow/internal/AccessPathSyntax.qll",
"javascript/ql/lib/semmle/javascript/frameworks/data/internal/AccessPathSyntax.qll",
"ruby/ql/lib/codeql/ruby/dataflow/internal/AccessPathSyntax.qll",
"python/ql/lib/semmle/python/dataflow/new/internal/AccessPathSyntax.qll",
"swift/ql/lib/codeql/swift/dataflow/internal/AccessPathSyntax.qll"
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll",
"swift/ql/lib/codeql/swift/security/internal/SensitiveDataHeuristics.qll"
],
"IncompleteUrlSubstringSanitization": [
"javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.qll",
@@ -550,26 +473,6 @@
"ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModelsExtensions.qll",
"python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsExtensions.qll"
],
"TaintedFormatStringQuery Ruby/JS": [
"javascript/ql/lib/semmle/javascript/security/dataflow/TaintedFormatStringQuery.qll",
"ruby/ql/lib/codeql/ruby/security/TaintedFormatStringQuery.qll"
],
"TaintedFormatStringCustomizations Ruby/JS": [
"javascript/ql/lib/semmle/javascript/security/dataflow/TaintedFormatStringCustomizations.qll",
"ruby/ql/lib/codeql/ruby/security/TaintedFormatStringCustomizations.qll"
],
"HttpToFileAccessQuery JS/Ruby": [
"javascript/ql/lib/semmle/javascript/security/dataflow/HttpToFileAccessQuery.qll",
"ruby/ql/lib/codeql/ruby/security/HttpToFileAccessQuery.qll"
],
"HttpToFileAccessCustomizations JS/Ruby": [
"javascript/ql/lib/semmle/javascript/security/dataflow/HttpToFileAccessCustomizations.qll",
"ruby/ql/lib/codeql/ruby/security/HttpToFileAccessCustomizations.qll"
],
"Typo database": [
"javascript/ql/src/Expressions/TypoDatabase.qll",
"ql/ql/src/codeql_ql/style/TypoDatabase.qll"
],
"Swift declarations test file": [
"swift/ql/test/extractor-tests/declarations/declarations.swift",
"swift/ql/test/library-tests/ast/declarations.swift"
@@ -597,5 +500,9 @@
"EncryptionKeySizes Python/Java": [
"python/ql/lib/semmle/python/security/internal/EncryptionKeySizes.qll",
"java/ql/lib/semmle/code/java/security/internal/EncryptionKeySizes.qll"
],
"Python model summaries test extension": [
"python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml",
"python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml"
]
}

View File

@@ -0,0 +1,86 @@
#!/usr/bin/env python3
import argparse
import json
import os
import pathlib
import re
def make_groups(blocks):
groups = {}
for block in blocks:
groups.setdefault("".join(block["lines"]), []).append(block)
return list(groups.values())
def validate_fragments(fragments):
ok = True
for header, blocks in fragments.items():
groups = make_groups(blocks)
if len(groups) > 1:
ok = False
print("Warning: dbscheme fragments with header '{}' are different for {}".format(header, ["{}:{}:{}".format(
group[0]["file"], group[0]["start"], group[0]["end"]) for group in groups]))
return ok
def main():
script_path = os.path.realpath(__file__)
script_dir = os.path.dirname(script_path)
parser = argparse.ArgumentParser(
prog=os.path.basename(script_path),
description='Sync dbscheme fragments across files.'
)
parser.add_argument('files', metavar='dbscheme_file', type=pathlib.Path, nargs='*', default=[],
help='dbscheme files to check')
args = parser.parse_args()
with open(os.path.join(script_dir, "dbscheme-fragments.json"), "r") as f:
config = json.load(f)
fragment_headers = set(config["fragments"])
fragments = {}
ok = True
for file in args.files + config["files"]:
with open(os.path.join(os.path.dirname(script_dir), file), "r") as dbscheme:
header = None
line_number = 1
block = {"file": file, "start": line_number,
"end": None, "lines": []}
def end_block():
block["end"] = line_number - 1
if len(block["lines"]) > 0:
if header is None:
if re.match(r'(?m)\A(\s|//.*$|/\*(\**[^\*])*\*+/)*\Z', "".join(block["lines"])):
# Ignore comments at the beginning of the file
pass
else:
ok = False
print("Warning: dbscheme fragment without header: {}:{}:{}".format(
block["file"], block["start"], block["end"]))
else:
fragments.setdefault(header, []).append(block)
for line in dbscheme:
m = re.match(r"^\/\*-.*-\*\/$", line)
if m:
end_block()
header = line.strip()
if header not in fragment_headers:
ok = False
print("Warning: unknown header for dbscheme fragment: '{}': {}:{}".format(
header, file, line_number))
block = {"file": file, "start": line_number,
"end": None, "lines": []}
block["lines"].append(line)
line_number += 1
block["lines"].append('\n')
line_number += 1
end_block()
if not ok or not validate_fragments(fragments):
exit(1)
if __name__ == "__main__":
main()

View File

@@ -1,12 +1,17 @@
package(default_visibility = ["//visibility:public"])
load("@rules_pkg//:mappings.bzl", "pkg_filegroup")
package(default_visibility = ["//visibility:public"])
alias(
name = "dbscheme",
actual = "//cpp/ql/lib:dbscheme",
)
alias(
name = "dbscheme-stats",
actual = "//cpp/ql/lib:dbscheme-stats",
)
pkg_filegroup(
name = "db-files",
srcs = [

View File

@@ -145,9 +145,9 @@ namespace Semmle.Autobuild.Cpp.Tests
bool IBuildActions.IsMacOs() => IsMacOs;
public bool IsArm { get; set; }
public bool IsRunningOnAppleSilicon { get; set; }
bool IBuildActions.IsArm() => IsArm;
bool IBuildActions.IsRunningOnAppleSilicon() => IsRunningOnAppleSilicon;
string IBuildActions.PathCombine(params string[] parts)
{
@@ -326,8 +326,8 @@ namespace Semmle.Autobuild.Cpp.Tests
public void TestCppAutobuilderSuccess()
{
Actions.RunProcess[@"cmd.exe /C nuget restore C:\Project\test.sln -DisableParallelProcessing"] = 1;
Actions.RunProcess[@"cmd.exe /C C:\Project\.nuget\nuget.exe restore C:\Project\test.sln -DisableParallelProcessing"] = 0;
Actions.RunProcess[@"cmd.exe /C CALL ^""C:\Program Files ^(x86^)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat^"" && set Platform=&& type NUL && msbuild C:\Project\test.sln /t:rebuild /p:Platform=""x86"" /p:Configuration=""Release"""] = 0;
Actions.RunProcess[@"cmd.exe /C scratch\.nuget\nuget.exe restore C:\Project\test.sln -DisableParallelProcessing"] = 0;
Actions.RunProcess[@"cmd.exe /C CALL ^""C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio^ 14.0\VC\vcvarsall.bat^"" && set Platform=&& type NUL && msbuild C:\Project\test.sln /t:rebuild /p:Platform=""x86"" /p:Configuration=""Release"""] = 0;
Actions.RunProcessOut[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = "";
Actions.RunProcess[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = 1;
Actions.RunProcess[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationVersion"] = 0;
@@ -337,10 +337,11 @@ namespace Semmle.Autobuild.Cpp.Tests
Actions.FileExists[@"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"] = true;
Actions.FileExists[@"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"] = true;
Actions.FileExists[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"] = true;
Actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CPP_SCRATCH_DIR"] = "scratch";
Actions.EnumerateFiles[@"C:\Project"] = "foo.cs\ntest.slx";
Actions.EnumerateDirectories[@"C:\Project"] = "";
Actions.CreateDirectories.Add(@"C:\Project\.nuget");
Actions.DownloadFiles.Add(("https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", @"C:\Project\.nuget\nuget.exe"));
Actions.CreateDirectories.Add(@"scratch\.nuget");
Actions.DownloadFiles.Add(("https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", @"scratch\.nuget\nuget.exe"));
var autobuilder = CreateAutoBuilder(true);
var solution = new TestSolution(@"C:\Project\test.sln");

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<Nullable>enable</Nullable>
@@ -11,12 +11,12 @@
<ItemGroup>
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Semmle.Autobuild.Cpp</AssemblyName>
<RootNamespace>Semmle.Autobuild.Cpp</RootNamespace>
<ApplicationIcon />
@@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
<PackageReference Include="Microsoft.Build" Version="17.8.3" />
</ItemGroup>
<ItemGroup>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Expose whether a function was prototyped or not
compatibility: backwards
function_prototyped.rel: delete

View File

@@ -0,0 +1,11 @@
class Declaration extends @declaration {
string toString() { none() }
}
class MangledName extends @mangledname {
string toString() { none() }
}
from Declaration d, MangledName n
where mangled_name(d, n, _)
select d, n

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Add completness information to mangled name table
compatibility: full
mangled_name.rel: run mangled_name.qlo

View File

@@ -0,0 +1,19 @@
class BuiltinType extends @builtintype {
string toString() { none() }
}
from BuiltinType type, string name, int kind, int kind_new, int size, int sign, int alignment
where
builtintypes(type, name, kind, size, sign, alignment) and
if
type instanceof @fp16 or
type instanceof @std_bfloat16 or
type instanceof @std_float16 or
type instanceof @complex_std_float32 or
type instanceof @complex_float32x or
type instanceof @complex_std_float64 or
type instanceof @complex_float64x or
type instanceof @complex_std_float128
then kind_new = 2
else kind_new = kind
select type, name, kind_new, size, sign, alignment

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Introduce new floating-point types from C23 and C++23
compatibility: backwards
builtintypes.rel: run builtintypes.qlo

View File

@@ -0,0 +1,9 @@
class Function extends @function {
string toString() { none() }
}
from Function fun, string name, int kind, int kind_new
where
functions(fun, name, kind) and
if kind = 7 or kind = 8 then kind_new = 0 else kind_new = kind
select fun, name, kind_new

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Support more function types
compatibility: full
functions.rel: run functions.qlo

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Removed @assignpaddexpr and @assignpsubexpr from @assign_bitwise_expr
compatibility: full

View File

@@ -1,5 +1,6 @@
description: Support C++17 if and switch initializers
compatibility: partial
constexpr_if_initialization.rel: delete
if_initialization.rel: delete
switch_initialization.rel: delete
exprparents.rel: run exprparents.qlo

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Remove _Float128 type
compatibility: full

View File

@@ -0,0 +1,17 @@
class AttributeArg extends @attribute_arg {
string toString() { none() }
}
class Attribute extends @attribute {
string toString() { none() }
}
class Location extends @location_default {
string toString() { none() }
}
from AttributeArg arg, int kind, int kind_new, Attribute attr, int index, Location location
where
attribute_args(arg, kind, attr, index, location) and
if arg instanceof @attribute_arg_expr then kind_new = 0 else kind_new = kind
select arg, kind_new, attr, index, location

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
description: Support expression attribute arguments
compatibility: partial
attribute_arg_expr.rel: delete
attribute_args.rel: run attribute_args.qlo

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Make __is_trivial a builtin operation
compatibility: full

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Introduce extractor version numbers
compatibility: breaking
extractor_version.rel: delete

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Revert removal of uniqueness constraint on link_targets/2
compatibility: backwards

View File

@@ -2,3 +2,4 @@ name: codeql/cpp-downgrades
groups: cpp
downgrades: .
library: true
warnOnImplicitThis: true

View File

@@ -4,3 +4,4 @@ groups:
- examples
dependencies:
codeql/cpp-all: ${workspace}
warnOnImplicitThis: true

View File

@@ -1,7 +1,7 @@
package(default_visibility = ["//cpp:__pkg__"])
load("@rules_pkg//:mappings.bzl", "pkg_files")
package(default_visibility = ["//cpp:__pkg__"])
pkg_files(
name = "dbscheme",
srcs = ["semmlecode.cpp.dbscheme"],

View File

@@ -1,3 +1,174 @@
## 0.12.5
### New Features
* Added the `PreprocBlock.qll` library to this repository. This library offers a view of `#if`, `#elif`, `#else` and similar directives as a tree with navigable parent-child relationships.
* Added a new `ThrowingFunction` abstract class that can be used to model an external function that may throw an exception.
## 0.12.4
### Minor Analysis Improvements
* Deleted many deprecated predicates and classes with uppercase `XML`, `SSA`, `SAL`, `SQL`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `StrcatFunction` class, use `semmle.code.cpp.models.implementations.Strcat.qll` instead.
## 0.12.3
### Deprecated APIs
* The `isUserInput`, `userInputArgument`, and `userInputReturned` predicates from `SecurityOptions` have been deprecated. Use `FlowSource` instead.
### New Features
* `UserDefineLiteral` and `DeductionGuide` classes have been added, representing C++11 user defined literals and C++17 deduction guides.
### Minor Analysis Improvements
* Changed the output of `Node.toString` to better reflect how many indirections a given dataflow node has.
* Added a new predicate `Node.asDefinition` on `DataFlow::Node`s for selecting the dataflow node corresponding to a particular definition.
* The deprecated `DefaultTaintTracking` library has been removed.
* The `Guards` library has been replaced with the API-compatible `IRGuards` implementation, which has better precision in some cases.
### Bug Fixes
* Under certain circumstances a function declaration that is not also a definition could be associated with a `Function` that did not have the definition as a `FunctionDeclarationEntry`. This is now fixed when only one definition exists, and a unique `Function` will exist that has both the declaration and the definition as a `FunctionDeclarationEntry`.
## 0.12.2
No user-facing changes.
## 0.12.1
### New Features
* Added an `isPrototyped` predicate to `Function` that holds when the function has a prototype.
## 0.12.0
### Breaking Changes
* The expressions `AssignPointerAddExpr` and `AssignPointerSubExpr` are no longer subtypes of `AssignBitwiseOperation`.
### Minor Analysis Improvements
* The "Returning stack-allocated memory" (`cpp/return-stack-allocated-memory`) query now also detects returning stack-allocated memory allocated by calls to `alloca`, `strdupa`, and `strndupa`.
* Added models for `strlcpy` and `strlcat`.
* Added models for the `sprintf` variants from the `StrSafe.h` header.
* Added SQL API models for `ODBC`.
* Added taint models for `realloc` and related functions.
## 0.11.0
### Breaking Changes
* The `Container` and `Folder` classes now derive from `ElementBase` instead of `Locatable`, and no longer expose the `getLocation` predicate. Use `getURL` instead.
### New Features
* Added a new class `AdditionalCallTarget` for specifying additional call targets.
### Minor Analysis Improvements
* More field accesses are identified as `ImplicitThisFieldAccess`.
* Added support for new floating-point types in C23 and C++23.
## 0.10.1
### Minor Analysis Improvements
* Deleted the deprecated `AnalysedString` class, use the new name `AnalyzedString`.
* Deleted the deprecated `isBarrierGuard` predicate from the dataflow library and its uses, use `isBarrier` and the `BarrierGuard` module instead.
## 0.10.0
### Minor Analysis Improvements
* Functions that do not return due to calling functions that don't return (e.g. `exit`) are now detected as
non-returning in the IR and dataflow.
* Treat functions that reach the end of the function as returning in the IR.
They used to be treated as unreachable but it is allowed in C.
* The `DataFlow::asDefiningArgument` predicate now takes its argument from the range starting at `1` instead of `2`. Queries that depend on the single-parameter version of `DataFlow::asDefiningArgument` should have their arguments updated accordingly.
## 0.9.3
No user-facing changes.
## 0.9.2
### Deprecated APIs
* `getAllocatorCall` on `DeleteExpr` and `DeleteArrayExpr` has been deprecated. `getDeallocatorCall` should be used instead.
### New Features
* Added `DeleteOrDeleteArrayExpr` as a super type of `DeleteExpr` and `DeleteArrayExpr`
### Minor Analysis Improvements
* `delete` and `delete[]` are now modeled as calls to the relevant `operator delete` in the IR. In the case of a dynamic delete call a new instruction `VirtualDeleteFunctionAddress` is used to represent a function that dispatches to the correct delete implementation.
* Only the 2 level indirection of `argv` (corresponding to `**argv`) is consided for `FlowSource`.
## 0.9.1
No user-facing changes.
## 0.9.0
### Breaking Changes
* The `shouldPrintFunction` predicate from `PrintAstConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
* The `shouldPrintFunction` predicate from `PrintIRConfiguration` has been replaced by `shouldPrintDeclaration`. Users should now override `shouldPrintDeclaration` if they want to limit the declarations that should be printed.
### Major Analysis Improvements
* The `PrintAST` library now also prints global and namespace variables and their initializers.
### Minor Analysis Improvements
* The `_Float128x` type is no longer exposed as a builtin type. As this type could not occur any code base, this should only affect queries that explicitly looked at the builtin types.
## 0.8.1
### Deprecated APIs
* The library `semmle.code.cpp.dataflow.DataFlow` has been deprecated. Please use `semmle.code.cpp.dataflow.new.DataFlow` instead.
### New Features
* The `DataFlow::StateConfigSig` signature module has gained default implementations for `isBarrier/2` and `isAdditionalFlowStep/4`.
Hence it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
### Minor Analysis Improvements
* Data flow configurations can now include a predicate `neverSkip(Node node)`
in order to ensure inclusion of certain nodes in the path explanations. The
predicate defaults to the end-points of the additional flow steps provided in
the configuration, which means that such steps now always are visible by
default in path explanations.
* The `IRGuards` library has improved handling of pointer addition and subtraction operations.
## 0.8.0
### New Features
* The `ProductFlow::StateConfigSig` signature now includes default predicates for `isBarrier1`, `isBarrier2`, `isAdditionalFlowStep1`, and `isAdditionalFlowStep1`. Hence, it is no longer needed to provide `none()` implementations of these predicates if they are not needed.
### Minor Analysis Improvements
* Deleted the deprecated `getURL` predicate from the `Container`, `Folder`, and `File` classes. Use the `getLocation` predicate instead.
## 0.7.4
No user-facing changes.
## 0.7.3
### Minor Analysis Improvements
* Deleted the deprecated `hasCopyConstructor` predicate from the `Class` class in `Class.qll`.
* Deleted many deprecated predicates and classes with uppercase `AST`, `SSA`, `CFG`, `API`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `CodeDuplication.qll` file.
## 0.7.2
### New Features

View File

@@ -52,17 +52,18 @@ class Options extends string {
/**
* Holds if a call to this function will never return.
*
* By default, this holds for `exit`, `_exit`, `abort`, `__assert_fail`,
* `longjmp`, `__builtin_unreachable` and any function with a
* `noreturn` attribute or specifier.
* By default, this holds for `exit`, `_exit`, `_Exit`, `abort`,
* `__assert_fail`, `longjmp`, `__builtin_unreachable` and any
* function with a `noreturn` or `__noreturn__` attribute or
* `noreturn` specifier.
*/
predicate exits(Function f) {
f.getAnAttribute().hasName("noreturn")
f.getAnAttribute().hasName(["noreturn", "__noreturn__"])
or
f.getASpecifier().hasName("noreturn")
or
f.hasGlobalOrStdName([
"exit", "_exit", "abort", "__assert_fail", "longjmp", "__builtin_unreachable"
"exit", "_exit", "_Exit", "abort", "__assert_fail", "longjmp", "__builtin_unreachable"
])
or
CustomOptions::exits(f) // old Options.qll

View File

@@ -0,0 +1,9 @@
## 0.10.0
### Minor Analysis Improvements
* Functions that do not return due to calling functions that don't return (e.g. `exit`) are now detected as
non-returning in the IR and dataflow.
* Treat functions that reach the end of the function as returning in the IR.
They used to be treated as unreachable but it is allowed in C.
* The `DataFlow::asDefiningArgument` predicate now takes its argument from the range starting at `1` instead of `2`. Queries that depend on the single-parameter version of `DataFlow::asDefiningArgument` should have their arguments updated accordingly.

View File

@@ -0,0 +1,6 @@
## 0.10.1
### Minor Analysis Improvements
* Deleted the deprecated `AnalysedString` class, use the new name `AnalyzedString`.
* Deleted the deprecated `isBarrierGuard` predicate from the dataflow library and its uses, use `isBarrier` and the `BarrierGuard` module instead.

View File

@@ -0,0 +1,14 @@
## 0.11.0
### Breaking Changes
* The `Container` and `Folder` classes now derive from `ElementBase` instead of `Locatable`, and no longer expose the `getLocation` predicate. Use `getURL` instead.
### New Features
* Added a new class `AdditionalCallTarget` for specifying additional call targets.
### Minor Analysis Improvements
* More field accesses are identified as `ImplicitThisFieldAccess`.
* Added support for new floating-point types in C23 and C++23.

View File

@@ -0,0 +1,13 @@
## 0.12.0
### Breaking Changes
* The expressions `AssignPointerAddExpr` and `AssignPointerSubExpr` are no longer subtypes of `AssignBitwiseOperation`.
### Minor Analysis Improvements
* The "Returning stack-allocated memory" (`cpp/return-stack-allocated-memory`) query now also detects returning stack-allocated memory allocated by calls to `alloca`, `strdupa`, and `strndupa`.
* Added models for `strlcpy` and `strlcat`.
* Added models for the `sprintf` variants from the `StrSafe.h` header.
* Added SQL API models for `ODBC`.
* Added taint models for `realloc` and related functions.

View File

@@ -0,0 +1,5 @@
## 0.12.1
### New Features
* Added an `isPrototyped` predicate to `Function` that holds when the function has a prototype.

View File

@@ -0,0 +1,3 @@
## 0.12.2
No user-facing changes.

View File

@@ -0,0 +1,20 @@
## 0.12.3
### Deprecated APIs
* The `isUserInput`, `userInputArgument`, and `userInputReturned` predicates from `SecurityOptions` have been deprecated. Use `FlowSource` instead.
### New Features
* `UserDefineLiteral` and `DeductionGuide` classes have been added, representing C++11 user defined literals and C++17 deduction guides.
### Minor Analysis Improvements
* Changed the output of `Node.toString` to better reflect how many indirections a given dataflow node has.
* Added a new predicate `Node.asDefinition` on `DataFlow::Node`s for selecting the dataflow node corresponding to a particular definition.
* The deprecated `DefaultTaintTracking` library has been removed.
* The `Guards` library has been replaced with the API-compatible `IRGuards` implementation, which has better precision in some cases.
### Bug Fixes
* Under certain circumstances a function declaration that is not also a definition could be associated with a `Function` that did not have the definition as a `FunctionDeclarationEntry`. This is now fixed when only one definition exists, and a unique `Function` will exist that has both the declaration and the definition as a `FunctionDeclarationEntry`.

View File

@@ -0,0 +1,6 @@
## 0.12.4
### Minor Analysis Improvements
* Deleted many deprecated predicates and classes with uppercase `XML`, `SSA`, `SAL`, `SQL`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `StrcatFunction` class, use `semmle.code.cpp.models.implementations.Strcat.qll` instead.

View File

@@ -0,0 +1,6 @@
## 0.12.5
### New Features
* Added the `PreprocBlock.qll` library to this repository. This library offers a view of `#if`, `#elif`, `#else` and similar directives as a tree with navigable parent-child relationships.
* Added a new `ThrowingFunction` abstract class that can be used to model an external function that may throw an exception.

View File

@@ -0,0 +1,7 @@
## 0.7.3
### Minor Analysis Improvements
* Deleted the deprecated `hasCopyConstructor` predicate from the `Class` class in `Class.qll`.
* Deleted many deprecated predicates and classes with uppercase `AST`, `SSA`, `CFG`, `API`, etc. in their names. Use the PascalCased versions instead.
* Deleted the deprecated `CodeDuplication.qll` file.

View File

@@ -0,0 +1,3 @@
## 0.7.4
No user-facing changes.

Some files were not shown because too many files have changed in this diff Show More