Tom Hvitved
19119ea0d4
C#: Add some lambda flow tests for demo
2024-11-15 10:57:23 +01:00
Tom Hvitved
134707605b
C#: Update expected test output
2024-11-15 09:35:25 +01:00
Tom Hvitved
1f2cda933d
C#: Implement isVariableCaptureContentSet
2024-11-14 20:31:52 +01:00
Tom Hvitved
5c9e79e947
Data flow: Workaround for lambda + capture flow
2024-11-14 20:30:54 +01:00
Tom Hvitved
9d6ece1039
Data flow: Restrict lambda reads at actual lambda calls
2024-11-14 20:24:27 +01:00
Simon Friis Vindum
6ef4aef600
Data flow: Add comments and use more consistent camel case
2024-11-14 16:25:53 +01:00
Simon Friis Vindum
9891b412ca
Java: Add toString for new ContentApprox elements
2024-11-14 15:49:49 +01:00
Simon Friis Vindum
c71898c265
Java: Consistent naming of TContent cases
2024-11-14 15:36:23 +01:00
Tom Hvitved
3ae793dd31
C#: Update lambda flow implementation
2024-11-14 14:46:00 +01:00
Tom Hvitved
906a4789f7
Data flow: Add LambdaArgs node
2024-11-14 14:25:36 +01:00
Anders Schack-Mulligen
7265884768
FlowSummaryImpl: Might actually be a bugfix for main?!
2024-11-14 14:22:33 +01:00
Anders Schack-Mulligen
333be603d3
Java: Add approx contents.
2024-11-14 14:16:39 +01:00
Tom Hvitved
9907e0d0bf
C#: Implement new lambda flow interface
2024-11-13 21:04:12 +01:00
Tom Hvitved
6e69b636b9
Data flow: More lambda flow changes
2024-11-13 20:59:04 +01:00
Kasper Svendsen
8154500aa5
Data flow: Extend NodeEx.toString to new lambda nodes
2024-11-13 16:04:52 +01:00
Anders Schack-Mulligen
a43b0234b9
do the type thing
2024-11-13 14:44:23 +01:00
Anders Schack-Mulligen
925fd92485
fixup api diff
2024-11-13 14:27:32 +01:00
Kasper Svendsen
7228766a7c
Data flow: Implement new lambda flow interface for Java
2024-11-13 14:26:07 +01:00
Anders Schack-Mulligen
15c8968dd4
gogogo shared code.
2024-11-13 14:25:05 +01:00
Tom Hvitved
c63283f762
Data flow: Add new lambda flow interface
2024-11-13 11:00:10 +01:00
Esben Sparre Andreasen
570260b4dc
Merge pull request #17963 from github/esbena/actions/artifact-v4
...
chore(actions): bump to artifacts@v4
2024-11-12 15:51:14 +01:00
Taus
1ca2590146
Merge pull request #16764 from github/redsun82/python-match-fps
...
Python: tests with false positives around `match`
2024-11-12 15:43:32 +01:00
Esben Sparre Andreasen
a70438b72c
chore(action): ruby-dataset-measure w artifacts@v4
2024-11-12 13:58:02 +01:00
Arthur Baars
3b2262be3a
Update ruby-dataset-measure.yml
2024-11-12 12:52:09 +00:00
Esben Sparre Andreasen
2f50d25aaa
feat(actions/qhelp-preview): unique artifact names
2024-11-12 13:29:09 +01:00
Esben Sparre Andreasen
351daaac8b
feat(actions/MAD): matrix-unique artifact names
2024-11-12 13:29:01 +01:00
Esben Sparre Andreasen
b3fff05e7d
chore(actions): most workflows onto artifacts@v4
...
`ruby-dataset-measure.yml` is not updated yet as it requires aid from the language team.
We can presumably disable the workflow during the brownout periods, but a fix will have to be present before the full deprecation happens
2024-11-12 13:26:38 +01:00
Anders Schack-Mulligen
d7fbf68a59
Merge pull request #17597 from aschackmull/java/chararraywriter-tostring
...
Java: Add model for CharArrayWriter.toString().
2024-11-12 12:55:44 +01:00
Calum Grant
1a688456f6
Merge pull request #17892 from github/calumgrant/telemetry
...
C++: Initial telemetry queries
2024-11-12 11:51:37 +00:00
Owen Mansel-Chan
349518b0d7
Merge pull request #17618 from owen-mc/go/mad/subtypes-promoted-methods
...
Go: Make the models-as-data subtypes column do something more sensible for promoted methods
2024-11-12 11:21:17 +00:00
Calum Grant
91b1cb8a76
C++: Some renaming
2024-11-12 09:49:10 +00:00
Simon Friis Vindum
7517ad3e4b
Merge pull request #17959 from paldepind/rust-inline-flow-test
...
Rust: Setup inline flow test library
2024-11-12 10:47:08 +01:00
Jeroen Ketema
77ae26fca7
Merge pull request #17960 from jketema/guarded-free
...
C++: Add tests for experimental `cpp/guarded-free` query
2024-11-12 10:43:39 +01:00
Jeroen Ketema
79a9e9c6c0
C++: Address review comments
2024-11-12 10:13:37 +01:00
Napalys Klicius
6266dab518
Merge pull request #17951 from Napalys/napalys/reverse-support
...
JS: Added support for reverse function
2024-11-12 10:09:18 +01:00
Simon Friis Vindum
d9d3027667
Rust: Make improvements to getArgString based on PR comments
2024-11-12 09:45:33 +01:00
Jeroen Ketema
a29b958f5f
C++: Address review comments
2024-11-12 09:08:36 +01:00
Tamás Vajk
ba26281b02
Merge pull request #17955 from tamasvajk/binlog/multiple
...
C#: Change extractor to accept multiple `binlog` files
2024-11-12 08:58:47 +01:00
Owen Mansel-Chan
fd4a6d4bb8
Change note
2024-11-11 23:55:57 +00:00
Owen Mansel-Chan
13fb92ad3e
Rename getIntermediateEmbeddedType
2024-11-11 23:53:14 +00:00
Owen Mansel-Chan
d3a6452860
Add missing QLDoc
2024-11-11 23:50:09 +00:00
Owen Mansel-Chan
6af5b55d51
Refactor elementAppliesToQualifier
...
This is needed for performance when there are lots of embeddings.
2024-11-11 23:50:08 +00:00
Owen Mansel-Chan
3986dffc91
Keep methods and fields separate in SourceOrSinkElement
...
This improves performance.
2024-11-11 23:50:06 +00:00
Owen Mansel-Chan
b6a31b1def
Restrict to Methods
2024-11-11 23:50:04 +00:00
Owen Mansel-Chan
57192e8154
Add even more tests
2024-11-11 23:49:58 +00:00
Owen Mansel-Chan
e813fa346b
Fix case in some test-related file names
2024-11-11 23:48:34 +00:00
Owen Mansel-Chan
8abb0594c3
Combine two arms of newtype TSourceOrSinkElement
2024-11-11 23:48:32 +00:00
Owen Mansel-Chan
b2c2a94866
Accept review comment - doc clarification
2024-11-11 23:48:30 +00:00
Owen Mansel-Chan
39afb18ee4
Fix bad join order
2024-11-11 23:48:29 +00:00
Owen Mansel-Chan
80e8015e67
Inline late and remove manual magic
2024-11-11 23:48:27 +00:00
Owen Mansel-Chan
c2aee37210
getSyntacticQualifier -> getSyntacticQualifierBaseType
...
This improves performance.
2024-11-11 23:48:25 +00:00
Owen Mansel-Chan
ede3b9f033
Improve join order by making a separate predicate
2024-11-11 23:48:23 +00:00
Owen Mansel-Chan
e335737f38
Minor fixes to docs
2024-11-11 23:48:21 +00:00
Owen Mansel-Chan
adc946ec2b
Revert simplification to make tests pass
2024-11-11 23:48:19 +00:00
Owen Mansel-Chan
4a1fce9168
Test non-promoted fields and methods
2024-11-11 23:46:10 +00:00
Chris Smowton
f61251cc24
Document elementAppliesToQualifier
2024-11-11 23:43:59 +00:00
Chris Smowton
7ffff43424
Improve comments
2024-11-11 23:43:57 +00:00
Chris Smowton
cd99bea9c1
Explain getSyntacticQual
2024-11-11 23:43:55 +00:00
Chris Smowton
ccc525abd3
Remove probably-unnecessary pragma
2024-11-11 23:43:53 +00:00
Chris Smowton
fd40662ad8
Rename getImplicitFieldReadInstruction
2024-11-11 23:43:51 +00:00
Chris Smowton
e290cecabd
Rename ensureCorrectTypeInfo and getSyntacticRecv
2024-11-11 23:43:49 +00:00
Chris Smowton
17a3429f1e
Correct hasTypeInfo doc comment
2024-11-11 23:43:47 +00:00
Chris Smowton
20e8d48869
Add comment noting that a Method or Field might have multiple SourceOrSinkElements
2024-11-11 23:43:45 +00:00
Chris Smowton
520acc4b1c
Further simplify interpretElement to avoid 'm' only being used on one side of a disjunction
2024-11-11 23:43:44 +00:00
Chris Smowton
d9126d384f
Simplify interpretElement
2024-11-11 23:43:42 +00:00
Chris Smowton
e90e313295
Simplify ensureCorrectTypeInfo
2024-11-11 23:43:40 +00:00
Owen Mansel-Chan
e46ec5a171
Fix MaD inheritance
2024-11-11 23:41:11 +00:00
Owen Mansel-Chan
91375d3a49
Update ExternalFlow.qll docs on subtypes column
2024-11-11 23:31:39 +00:00
Owen Mansel-Chan
a277bcbc3e
Merge pull request #17941 from owen-mc/go/fix/missing-method-qualified-names
...
Go: fix missing qualified names for some promoted methods
2024-11-11 22:50:17 +00:00
Calum Grant
317f43d325
C++: Don't use PrintAST in a test
2024-11-11 17:16:47 +00:00
Calum Grant
2351328aa1
C++: Rename SourceFiles metric
2024-11-11 17:16:46 +00:00
Calum Grant
593dcb646b
C++: Remove missing includes test
2024-11-11 17:16:44 +00:00
Calum Grant
fb82d435b5
C++: Various renamings
2024-11-11 17:16:43 +00:00
Calum Grant
34ee947d2f
C++: Limit number of errors/includes to 50
2024-11-11 17:16:42 +00:00
Calum Grant
e6f3512056
C++: Remove unused class UndefinedIdentifier
2024-11-11 17:16:41 +00:00
Calum Grant
faeff396eb
C++: Limit metrics to top 500
2024-11-11 17:16:39 +00:00
Calum Grant
067ecdeea0
C++: Match more tags
2024-11-11 17:16:38 +00:00
Calum Grant
9a81ce8bb4
C++: Separate int and float metrics
2024-11-11 17:16:37 +00:00
Calum Grant
8d2cef632e
C++: Minor edits
2024-11-11 17:16:36 +00:00
Calum Grant
6c402adbcc
C++: Minor edits
2024-11-11 17:16:35 +00:00
Calum Grant
a53e1dec20
C++: Minor edits
2024-11-11 17:16:34 +00:00
Calum Grant
f6776a4249
C++: Initial telemetry queries and tests
2024-11-11 17:16:32 +00:00
Jeroen Ketema
a5a6445b2e
C++: Add tests for experimental cpp/guarded-free query
2024-11-11 17:29:28 +01:00
Simon Friis Vindum
cd2038a8f8
Rust: Setup inline flow test library
2024-11-11 16:41:59 +01:00
Cornelius Riemenschneider
fed240a2b2
Merge pull request #17956 from github/criemen/rust-upd-deps
...
Rust: Update cargo dependencies.
2024-11-11 16:06:09 +01:00
Napalys Klicius
42f7f73ae1
Update ArrayInPlaceManipulationTaintStep documentation
2024-11-11 15:38:57 +01:00
Michael Nebel
425b1b17d1
Merge pull request #17952 from michaelnebel/java/movemodels
...
Java: Move non-experimental models out of the experimental folder.
2024-11-11 15:28:53 +01:00
Tamas Vajk
46f168823c
Improve code quality
2024-11-11 14:10:13 +01:00
Tamas Vajk
fe62900a15
C#: Change extractor to accept multiple binlog files
2024-11-11 12:56:24 +01:00
Michael B. Gale
d6ef8c3f9a
Merge pull request #17946 from github/dependabot/go_modules/go/extractor/extractor-dependencies-c113e28156
...
Bump golang.org/x/tools from 0.26.0 to 0.27.0 in /go/extractor in the extractor-dependencies group
2024-11-11 11:31:21 +00:00
Cornelius Riemenschneider
e8aa5db07a
Rust: Update cargo dependencies.
...
There was a recent round of tree-sitter-* package releases,
so the latest code is now a) released and b) available on crates.io.
Therefore, move away from the (super slow on CI) git dependencies to released crates instead.
This also includes a run of `cargo update`, so there's a bunch of more changes to the lockfile.
2024-11-11 12:13:14 +01:00
Simon Friis Vindum
ad6bd88f0a
Merge pull request #17954 from paldepind/rust-data-flow-fix-inconsistencies
...
Rust: Fix data flow fix inconsistencies
2024-11-11 11:56:10 +01:00
Chris Smowton
89a2f0dc00
Merge pull request #17890 from smowton/smowton/fix/kotlin-use-nulltype
...
Kotlin extractor: use special <nulltype> for null literals
2024-11-11 10:54:21 +00:00
Simon Friis Vindum
aebce746df
Rust: Create data flow nodes for parameters in the CFG
...
Before data flow nodes where created for all parameters in the AST. But
some AST parameters does not lead to any data flow (for instance
parameters in function pointer types).
2024-11-11 11:46:10 +01:00
Simon Friis Vindum
6a3d417836
Rust: Implement enclosing callable for additional classes
2024-11-11 11:11:29 +01:00
Napalys
ae57c12b15
Added change notes
2024-11-11 10:38:14 +01:00
Michael Nebel
404ca27aec
Java: Move non-experimental models out of the experimental folder.
2024-11-11 10:08:45 +01:00
Simon Friis Vindum
bf07aa1cbd
Merge pull request #17947 from paldepind/rust-ssa-node-printing
...
Rust: Mark SSA data flow nodes in output and hide them in paths
2024-11-11 09:55:26 +01:00
Simon Friis Vindum
55796badaf
Rust: Mark SSA data flow nodes in output and hide them in paths
2024-11-11 08:48:48 +01:00
Simon Friis Vindum
e3662fa97f
Merge pull request #17923 from geoffw0/unreachable4
...
Rust: More tests for rust/deadcode
2024-11-11 08:45:47 +01:00
Napalys
81bc7cd19f
Refactored SortTaintStep to ArrayInPlaceManipulationTaintStep to support both sort and reverse functions. Fixed newly added test case. from 8026a99db7
2024-11-11 08:32:03 +01:00
Napalys
1c298f0231
Added test case for Array.prototype.reverse, which is currently not flagged as a potential sink.
2024-11-11 08:32:02 +01:00
Napalys
f1c6dc1d9b
Moved SortTaintStep to more appropriate home TaintTracking->Arrays
2024-11-11 08:32:01 +01:00
dependabot[bot]
916184964b
Bump golang.org/x/tools
...
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.26.0 to 0.27.0
- [Release notes](https://github.com/golang/tools/releases )
- [Commits](https://github.com/golang/tools/compare/v0.26.0...v0.27.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-11-11 03:24:36 +00:00
Owen Mansel-Chan
0b24235de4
Update test results
2024-11-09 07:56:44 +00:00
Owen Mansel-Chan
9afdee4697
Accept changed test results and improve test
2024-11-09 07:55:02 +00:00
Florin Coada
f3c7352727
Merge pull request #17935 from github/changedocs/2.19.3
...
Changedocs for 2.19.3
2024-11-08 17:58:54 +00:00
Geoffrey White
727a7d4957
Merge branch 'main' into unreachable4
2024-11-08 17:39:15 +00:00
Paolo Tranquilli
5490975a27
Merge pull request #17943 from github/redsun82/rust-accept-inconsistencies
...
Rust: accept some inconsitencies for now
2024-11-08 18:17:30 +01:00
Paolo Tranquilli
9684df8535
Rust: accept some inconsitencies for now
...
The modified result is just a change due to a semantic conflict after introducing some
`toString` implementations.
The new inconsistency should be looked at more in detail.
2024-11-08 18:05:19 +01:00
Owen Mansel-Chan
c8f41206be
Add a change note
2024-11-08 14:23:55 +00:00
Geoffrey White
c7112ef278
Rust: Accept consistency check changes.
2024-11-08 14:22:04 +00:00
Owen Mansel-Chan
38ee2d418a
Fix bug by extracting more pointer types
2024-11-08 13:57:36 +00:00
Owen Mansel-Chan
5094cb851b
Add test showing bug (SEmbedP.PMethod not showing)
2024-11-08 13:57:34 +00:00
Anders Schack-Mulligen
a311294080
Merge pull request #17932 from aschackmull/java/kotlin-notnull-typeflow
...
Kotlin: Support NotNullExpr in TypeFlow.
2024-11-08 13:48:15 +01:00
Michael B. Gale
71e4646489
Merge pull request #17934 from github/dependabot/go_modules/go/extractor/extractor-dependencies-ede2484c43
...
Bump golang.org/x/mod from 0.21.0 to 0.22.0 in /go/extractor in the extractor-dependencies group
2024-11-08 12:43:38 +00:00
Paolo Tranquilli
9cea631399
Merge pull request #17931 from github/redsun82/rust-target-dir
...
Rust: allow to specify the target directory
2024-11-08 13:34:03 +01:00
Paolo Tranquilli
26839f5e15
Merge pull request #17882 from github/redsun82/rust-resolve
...
Rust: extract some resolved paths
2024-11-08 13:33:41 +01:00
Geoffrey White
3805d0f958
Merge branch 'main' into unreachable4
2024-11-08 11:46:34 +00:00
Geoffrey White
0610c265e2
Merge pull request #17913 from geoffw0/unusedvar8
...
Rust: Fix rust/unused-variable FPs
2024-11-08 11:41:45 +00:00
Geoffrey White
7c2c5ee1fa
Rust: Fix expected consistency results.
2024-11-08 11:22:35 +00:00
Geoffrey White
fc444f1f9a
Merge branch 'main' into unusedvar8
2024-11-08 11:20:12 +00:00
Florin Coada
bee51091d6
Changedocs for 2.19.3
2024-11-08 10:43:42 +00:00
Erik Krogh Kristensen
9b6c96730d
Merge pull request #17912 from mbarbero/patch-1
...
fix: add "actions" tag to ActionsArtifactLeak
2024-11-08 10:50:43 +01:00
Simon Friis Vindum
f2569c45a9
Merge pull request #17921 from paldepind/rust-df-enclosing-callable
...
Rust: Implement enclosing callable
2024-11-08 10:36:59 +01:00
Paolo Tranquilli
083394073a
Rust: rename target_dir to cargo_target_dir, add to extraction options
...
Also removed the now unused `extract_dependencies` one.
2024-11-08 09:53:50 +01:00
dependabot[bot]
ccb92357a2
Bump golang.org/x/mod
...
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/mod](https://github.com/golang/mod ).
Updates `golang.org/x/mod` from 0.21.0 to 0.22.0
- [Commits](https://github.com/golang/mod/compare/v0.21.0...v0.22.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 >
2024-11-08 04:00:30 +00:00
Calum Grant
39b2d2c3d8
Merge pull request #17906 from github/calumgrant/bmn/wrong-number-format-args
...
C++: Fix FPs in cpp/wrong-number-format-arguments
2024-11-07 15:05:39 +00:00
Anders Schack-Mulligen
5602570e18
Kotlin: Support NotNullExpr in TypeFlow.
2024-11-07 15:25:23 +01:00
Simon Friis Vindum
22835c28ff
Rust: Make a return node the last node before function exit
2024-11-07 15:21:11 +01:00
Tom Hvitved
a35a4b2d98
Merge pull request #17887 from hvitved/dataflow/provenance-order
...
Data flow: Order provenance output by textual representation
2024-11-07 14:19:18 +01:00
Simon Friis Vindum
1a000ecb46
Rust: Make minor data flow changes based on PR feedback
2024-11-07 13:04:54 +01:00
Paolo Tranquilli
4f6fda0100
Rust: allow to specify the target directory
2024-11-07 12:45:20 +01:00
Michael Nebel
fc8d8bbbb1
Merge pull request #17742 from michaelnebel/csharp/higherordermodels
...
C#: Models for higher order methods.
2024-11-07 11:12:46 +01:00
Paolo Tranquilli
3488b9fbca
Merge pull request #17920 from github/redsun82/rust-files
...
Rust: exclude uncompiled files from semantics and surface semantic-less reason
2024-11-07 11:04:12 +01:00
Geoffrey White
df7bcfd116
Rust: Accept dataflow consistency check changes.
2024-11-07 09:54:39 +00:00
Tom Hvitved
26b048a645
Address review comment
2024-11-07 10:40:03 +01:00
Paolo Tranquilli
147d66b587
Merge branch 'main' into redsun82/python-match-fps
2024-11-07 09:46:32 +01:00
Paolo Tranquilli
64d522e447
Rust: address review
2024-11-07 09:39:44 +01:00
Michael Nebel
8041f00bf5
C#: Address more review comments.
2024-11-07 09:24:26 +01:00
Jami
07bb60da92
Merge pull request #17925 from jcogs33/jcogs33/vscode-setting-matchOnWordStartOnly-false
...
VSCode setting: turn off `editor.suggest.matchOnWordStartOnly`
2024-11-06 18:05:26 -05:00
Jami Cogswell
8e4a312ac7
Turn off editor.suggest.matchOnWordStartOnly
2024-11-06 16:41:20 -05:00
Geoffrey White
b3f7a8a46f
Merge pull request #17908 from geoffw0/dfcons
...
Rust: Expose counts of data flow inconsistencies
2024-11-06 19:11:04 +00:00
Geoffrey White
18ce8be302
Update rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll
...
Co-authored-by: Simon Friis Vindum <paldepind@github.com >
2024-11-06 19:00:10 +00:00
Geoffrey White
fbfdd57383
Rust: Additional test cases for rust/dead-code.
2024-11-06 17:43:04 +00:00
Geoffrey White
a8b1cb3243
Rust: Make it so that all of the test functions may return.
2024-11-06 17:23:01 +00:00
Paolo Tranquilli
200715773f
Rust: fix no_semantics_reason
2024-11-06 17:19:06 +01:00
Michael Nebel
e9c9519d90
C#: Address review comments.
2024-11-06 16:29:20 +01:00
Michael Nebel
55cfbccd43
C#/Java: Exclude summaries using callbacks in fields, properties and synthetic fields.
2024-11-06 16:29:19 +01:00
Michael Nebel
5c389355d0
C#: Simplify delegate read and store steps (remove dependency on parameter).
2024-11-06 16:29:17 +01:00
Michael Nebel
a86cd181a6
Java: Make language specific modifications.
2024-11-06 16:29:16 +01:00
Michael Nebel
395cababb3
C#: Add some model generator examples for higher order methods.
2024-11-06 16:29:14 +01:00
Michael Nebel
fe854812ec
C#: Add read and store steps for delegate calls.
2024-11-06 16:29:13 +01:00
Simon Friis Vindum
dadc6059a8
Rust: Implement enclosing callable
2024-11-06 16:23:24 +01:00
Paolo Tranquilli
2987743e44
Rust: exclude uncompiled files from semantics and surface semanticless reason
2024-11-06 15:22:28 +01:00
Geoffrey White
bf0e1008ce
Rust: Move some test cases together.
2024-11-06 13:14:52 +00:00
Simon Friis Vindum
ff80b249ca
Merge pull request #17917 from paldepind/rust-df-types
...
Rust: Fix unique type data flow inconsistency
2024-11-06 14:02:00 +01:00
Simon Friis Vindum
60986d8c9b
Rust: Fix unique type data flow inconsistency
2024-11-06 13:48:10 +01:00
Anders Schack-Mulligen
4df4a1e6c6
Merge pull request #17863 from aschackmull/shared/universal-flow
...
Shared: Add a Universal Flow library and refactor TypeFlow to use it.
2024-11-06 13:46:13 +01:00
Tom Hvitved
f8058e40af
Merge pull request #17915 from hvitved/rust/pat-literal-cfg
...
Rust: Include literals in the CFG for literal patterns
2024-11-06 13:09:49 +01:00
Geoffrey White
8a35e151d1
Rust: Move the function pointer parameter exclusion into VariableImpl.qll.
2024-11-06 10:51:41 +00:00
Tom Hvitved
9392bf796a
Rust: Include literals in the CFG for literal patterns
2024-11-06 09:21:52 +01:00
Simon Friis Vindum
6054855edb
Merge pull request #17888 from paldepind/rust-data-flow-consistency
...
Rust: Data flow additions
2024-11-05 21:29:18 +01:00
Geoffrey White
1a5d2e1f5d
Rust: Correct a comment and autoformat.
2024-11-05 15:22:46 +00:00
Geoffrey White
93836a55e2
Rust: Clean up code / clarify responsibilities and fix the issue in rust/unused-value as well.
2024-11-05 15:16:59 +00:00
Geoffrey White
bb5ee525fc
Merge pull request #17757 from geoffw0/unusedvar7
...
Rust: Remove the workaround in rust/unused-variable.
2024-11-05 15:06:48 +00:00
Mikaël Barbero
881fe0ba57
fix: add "actions" tag to ActionsArtifactLeak
...
Similar to javascript/ql/src/Security/CWE-094/ExpressionInjection.ql
2024-11-05 15:58:46 +01:00
Geoffrey White
278760c735
Rust: Add another exception to rust/unused-variable.
2024-11-05 14:46:32 +00:00
Simon Friis Vindum
262a9f0cfa
Rust: Make fixes in data flow based on PR feedback
2024-11-05 15:37:44 +01:00
Geoffrey White
35ffd0cc9c
Rust: Add more test cases for unused variables (inspired by real world FPs).
2024-11-05 14:07:10 +00:00
Geoffrey White
3091083705
Rust: Call all the test cases.
2024-11-05 11:02:38 +00:00
Geoffrey White
088dd50f1f
Rust: Update tests.
2024-11-05 10:30:41 +00:00
Geoffrey White
c8c747a110
Rust: Add total data flow inconsistencies to rust/summary/summary-statistics.
2024-11-04 19:10:44 +00:00
Geoffrey White
30cc55005d
Rust: Add rust/diagnostics/data-flow-consistency-counts query for data flow inconsistency counts.
2024-11-04 19:09:30 +00:00
Simon Friis Vindum
c7b4e7c30a
Rust: Small improvements to data flow
...
The predicate `ssaDefAssigns` was definitely broken before
2024-11-04 20:01:58 +01:00
Simon Friis Vindum
d9636b37b6
Rust: Add data flow test with assignment to mutable variable
2024-11-04 20:00:36 +01:00
Geoffrey White
91ebc0eb45
Rust: Add metadata to the DataFlowConsistency.ql query.
2024-11-04 18:53:34 +00:00
Geoffrey White
a645a9e829
Rust: Add getInconsistencyCounts predicate to the shared DataFlowImplConsistency.qll, so it's possibly to access inconsistency data as a whole.
2024-11-04 18:52:20 +00:00
Chuan-kai Lin
3cdf94e83a
Merge pull request #17904 from github/post-release-prep/codeql-cli-2.19.3
...
Post-release preparation for codeql-cli-2.19.3
2024-11-04 10:14:12 -08:00
Calum Grant
397bf7c5e2
C++: Fix FPs caused by a syntax error
2024-11-04 17:38:16 +00:00
Calum Grant
496efeed7e
C++: Add a test for cpp/wrong-number-format-arguments
2024-11-04 17:36:23 +00:00
github-actions[bot]
f107d16b4e
Post-release preparation for codeql-cli-2.19.3
2024-11-04 17:20:08 +00:00
Chuan-kai Lin
39a67b6e2e
Merge pull request #17903 from github/release-prep/2.19.3
...
Release preparation for version 2.19.3
2024-11-04 08:42:12 -08:00
github-actions[bot]
cc7b724123
Release preparation for version 2.19.3
2024-11-04 16:37:28 +00:00
Simon Friis Vindum
8d59b9289b
Rust: Make improvements to data flow based on PR feedback
2024-11-04 16:42:05 +01:00
Geoffrey White
5a34c166b7
Rust: Remove the workaround in rust/unused-variable.
2024-11-04 15:31:43 +00:00
Simon Friis Vindum
2818893010
Rust: Refactor AstCfgNode to use a field
...
Co-authored-by: Tom Hvitved <hvitved@github.com >
2024-11-04 15:01:25 +01:00
Florin Coada
7418d8ed24
Merge pull request #17832 from github/changedocs/2.19.2
...
CodeQL 2.19.2 changedocs
2024-11-04 13:56:28 +00:00
Tom Hvitved
0aee809697
Merge pull request #17899 from hvitved/accept-changes-multi-jobs
...
Handle matrix jobs in accept changes script
2024-11-04 14:54:21 +01:00
Rasmus Wriedt Larsen
5f20f1984c
expected-changes: Use set constructor
2024-11-04 14:14:15 +01:00
Rasmus Wriedt Larsen
8f80c24270
Merge pull request #17256 from RasmusWL/js-threat-models
...
JS: Add support for threat models
2024-11-04 14:04:12 +01:00
Simon Friis Vindum
34e8ea17d8
Merge pull request #17898 from paldepind/rust-cfg-refactor
...
Rust: CFG classes are in expression module iff they correspond to exp…
2024-11-04 13:01:15 +01:00
Tom Hvitved
95e9d013cc
Update expected test output
2024-11-04 12:07:06 +01:00
Tom Hvitved
a89c82bf74
Handle matrix jobs in accept changes script
2024-11-04 11:49:35 +01:00
Simon Friis Vindum
6b25bea2e5
Rust: Accept consistency results
2024-11-04 11:28:26 +01:00
Simon Friis Vindum
a3c7d5a469
Merge branch 'main' into rust-data-flow-consistency
2024-11-04 11:10:48 +01:00
Simon Friis Vindum
fb26f7861f
Merge pull request #17895 from paldepind/rust-data-flow-consistency-query
...
Rust: Add data flow consistency queries
2024-11-04 11:07:46 +01:00
Simon Friis Vindum
714e2fc2c1
Merge branch 'main' into rust-data-flow-consistency-query
2024-11-04 10:42:53 +01:00
Simon Friis Vindum
2ae721bd54
Merge pull request #17897 from github/redsun82/rust-fix-compilation
...
Rust: fix semantic merge conflict about semantics
2024-11-04 10:35:47 +01:00
Simon Friis Vindum
633bac633c
Rust: CFG classes are in expression module iff they correspond to expressions
2024-11-04 10:34:08 +01:00
Simon Friis Vindum
7f344fab78
Rust: Add data flow consistency queries
2024-11-04 10:17:50 +01:00
Paolo Tranquilli
6848a22c65
Rust: fix semantic merge conflict about semantics
2024-11-04 10:04:40 +01:00
Paolo Tranquilli
bde517fcb1
Merge pull request #17849 from github/aibaars/single-semantics
...
Rust: try to speed things up a bit
2024-11-04 09:24:26 +01:00
Tom Hvitved
8b8b721788
Data flow: Order provenance output by textual representation
2024-11-04 08:47:30 +01:00
Simon Friis Vindum
82076ee0b8
Rust: Propagate data flow through a few expression types
2024-11-03 16:12:59 +01:00
Simon Friis Vindum
2bab29d31b
Rust: Add local data flow step tests
2024-11-03 16:12:58 +01:00
Simon Friis Vindum
01141ccdc9
Rust: Integrate SSA into data flow
2024-11-03 16:12:56 +01:00
Tom Hvitved
662a824312
Merge pull request #17865 from hvitved/rust/unused-macro-expansion
2024-11-03 09:17:14 +01:00
Chris Smowton
81ff394533
Be explicit about Kotlin database type
2024-11-01 19:02:28 +00:00
Chris Smowton
5d3f723df9
Kotlin extractor: use special <nulltype> for null literals
...
This matches the Java extractor's treatment of these literals, and so enables dataflow type-tracking to avoid special-casing Kotlin. Natively, Kotlin would regard this as kotlin.Nothing?, the type that can only contain null (kotlin.Nothing without a ? can take nothing at all), which gets Java-ified as java.lang.Void, and this will continue to be used when a null type has to be "boxed", as in representing substituted generic constraints with no possible type.
2024-11-01 16:14:10 +00:00
Tom Hvitved
c4adec3010
Address review comment
2024-11-01 15:28:17 +01:00
yoff
cec0544ca5
Merge pull request #17789 from aschackmull/python/resolvecall-refactor
...
Python: Refactor references to NormalCall.
2024-11-01 14:20:34 +01:00
Anders Schack-Mulligen
bae61875cd
UniversalFlow: Fixup some qldoc.
2024-11-01 14:04:27 +01:00
Taus
0bb5b4b9dc
Merge pull request #17875 from github/tausbn/python-improve-parser-logging-and-timing
...
Python: Improve parser logging/timing/customisability
2024-11-01 12:47:46 +01:00
Taus
2892f0ff48
Merge pull request #17873 from github/tausbn/python-fix-generator-expression-locations
...
Python: Even more parser fixes
2024-11-01 12:47:19 +01:00
Simon Friis Vindum
a36095d85b
Rust: Add local data flow test with if expression
2024-11-01 11:28:10 +01:00
Rasmus Wriedt Larsen
c0ad9ba529
Merge branch 'main' into js-threat-models
2024-11-01 10:48:32 +01:00
Rasmus Wriedt Larsen
dc8e645594
JS: Convert remaining queries to use ActiveThreatModelSourceAsSource
2024-11-01 10:47:10 +01:00
Tom Hvitved
03ffaac87a
Merge pull request #17880 from hvitved/ruby/symbol-string-key-indifference
...
Ruby: Do not distinguish between symbols and strings in hash keys
2024-11-01 10:43:56 +01:00
Rasmus Wriedt Larsen
19fae76a94
JS: Remove dummy comment
...
Co-authored-by: Asger F <asgerf@github.com >
2024-11-01 10:24:22 +01:00
Paolo Tranquilli
03aef50836
Merge pull request #17883 from github/redsun82/rust-analysis
...
Rust: use common config for analysis
2024-10-31 17:46:15 +01:00
Paolo Tranquilli
c6585b726a
Rust: use common config for analysis
...
Now that the nightly bundle has the default query set, we don't need a special
inline config.
2024-10-31 16:44:07 +01:00
Jeroen Ketema
03ced1795a
Merge pull request #17694 from jketema/multiple-entry-point
...
C++: Do not generate IR for functions with multiple entry points
2024-10-31 16:16:03 +01:00
Paolo Tranquilli
e5a199b821
Rust: accept test changes due to toString implementations
2024-10-31 16:02:56 +01:00
Rasmus Wriedt Larsen
61e60de969
JS: Model readline as a stdin threat-model source
...
Technically not always true, but my assumption is that +90% of the time
that's what it will be used for, so while we could be more precise by
adding a taint-step from the `input` part of the construction, I'm not
sure it's worth it in this case.
Furthermore, doing so would break with the current way we model
threat-model sources, and how sources are generally modeled in JS... so
for a very pretty setup it would require changing all the other `file`
threat-model sources to start at the constructors such as
`fs.createReadStream()` and have taint-propagation steps towards the
actual use (like we do in Python)...
I couldn't see an easy path forwards for doing this while keeping the
Concepts integration, so I opted for the simpler solution here.
2024-10-31 14:29:30 +01:00
Rasmus Wriedt Larsen
eca8bf5a35
JS: Do simple modeling of process.stdin as threat-model source
2024-10-31 14:26:45 +01:00
Paolo Tranquilli
cee2ed0ec4
Rust: extract some resolved paths
2024-10-31 14:19:15 +01:00
Rasmus Wriedt Larsen
34b86c39c1
JS: Model fs.promises.readFile as file source
...
You could argue that proper modeling be done in the same way as
`NodeJSFileSystemAccessRead` is done for the callback based `fs` API (in
NodeJSLib.qll). However, that work is straying from the core goals I'm
working towards right now, so I'll argue that "perfect is the enemy of
good", and leave this as is for now.
2024-10-31 14:09:38 +01:00
Rasmus Wriedt Larsen
971f53870e
JS: Include fs externs
...
Makes a difference due to the modeling of NodeJSFileSystemAccessRead depending on these, see
412e841d69/javascript/ql/lib/semmle/javascript/frameworks/NodeJSLib.qll (L479-L488)
File copied from 7cef4322e7/javascript/externs/nodejs/fs.js
2024-10-31 13:51:22 +01:00
Rasmus Wriedt Larsen
b47fa77dc6
JS: Add tests for stdin threat-model sources
2024-10-31 12:59:21 +01:00
Tom Hvitved
d0f9a0b9ce
Rust: Add another unused-value test
2024-10-31 11:43:33 +01:00
Tom Hvitved
55a6ed7e8a
Rust: Include link to variable in unused value query
2024-10-31 11:42:44 +01:00
Tom Hvitved
2b340b18dd
Rust: Exclude results inside macro expansions from unused entity queries
2024-10-31 11:42:43 +01:00
Tom Hvitved
fec31a6da4
Rust: Include variable name in Unused{Variable,Value}.ql
2024-10-31 11:42:41 +01:00
Tom Hvitved
6b60865d7e
Ruby: Do not distinguish between symbols and strings in hash keys
2024-10-31 11:42:09 +01:00
Tom Hvitved
2b37c6cd32
Merge pull request #17548 from hvitved/shared/inline-test-post-process
...
Shared: Post-processing query for inline test expectations
2024-10-31 11:40:11 +01:00
Tom Hvitved
f04a55ecb5
Ruby: Update hash extension tests
2024-10-31 11:00:33 +01:00
Jeroen Ketema
5e3748ac12
C++: Update expected test results
2024-10-31 10:57:12 +01:00
Jeroen Ketema
1a830cdf14
C++: Do not generate IR for functions with multiple entry points in different locations
2024-10-31 10:55:52 +01:00
Jeroen Ketema
8cfd19cf2f
C++: Add multiple entry point test
2024-10-31 10:55:48 +01:00
Tom Hvitved
977eb05f31
Merge pull request #17879 from paldepind/rust-speculative-taint
...
Rust: Add predicate for speculative taint step
2024-10-31 10:17:48 +01:00
Simon Friis Vindum
00b8a29da7
Rust: Add predicate for speculative taint step
2024-10-31 09:09:39 +01:00
Simon Friis Vindum
b96698aee3
Merge pull request #17871 from paldepind/rust-data-flow-skeleton
...
Rust: Add basic skeleton setup for data flow
2024-10-31 08:26:11 +01:00
Tom Hvitved
c936468b17
Merge pull request #17739 from hvitved/dataflow/big-step-quadratic
2024-10-31 08:16:16 +01:00
Anders Schack-Mulligen
b556590ef8
Merge pull request #17663 from aschackmull/dataflow/speculative-flow
...
Dataflow: Add support for speculative taint flow.
2024-10-31 08:12:43 +01:00
Paolo Tranquilli
7e8a09aea1
Merge pull request #17825 from github/redsun82/rust-canonical-path
...
Rust: add `extended_canonical_path` and `crate_origin` to `Item`
2024-10-30 18:13:05 +01:00
Simon Friis Vindum
efa59fd2b6
Rust: Make changes based on PR feedback
2024-10-30 16:01:26 +01:00
Anders Schack-Mulligen
570b042645
Dataflow: Rename SpeculativeFlow to SpeculativeGlobal.
2024-10-30 15:23:15 +01:00
Anders Schack-Mulligen
9b493c1e1b
Java: Fix bug related to null inference for pattern initializer.
2024-10-30 15:05:36 +01:00
Taus
2ef3ae9860
Python: Improve parser logging/timing/customisability
...
Does a bunch of things, unfortunately all in the same place, so my
apologies in advance for a slightly complicated commit.
As for the changes themselves, this commit
- Adds timers for the old and new parsers. This means we get the overall
time spent on these parts of the extractor if the extractor is run with
`DEBUG` output shown.
- Adds logging information (at the `DEBUG` level) to show which
invocations of the parsers happen when, and whether they succeed or not.
- Adds support for using an environment variable named
`CODEQL_PYTHON_DISABLE_OLD_PARSER` to disable using the old parser
entirely. This makes it easier to test the new parser in isolation.
- Fixes a bug where we did not check whether a parse with the new parser
had already succeeded, and so would do a superfluous second parse.
2024-10-30 13:58:46 +00:00
Anders Schack-Mulligen
b005973317
UniversalFlow: Skip property propagation to null nodes.
2024-10-30 14:08:38 +01:00
Taus
f75615b913
Merge pull request #17822 from github/tausbn/python-more-parser-fixes
...
Python: A few more parser fixes
2024-10-30 13:47:10 +01:00
Arthur Baars
0e511d640b
Rust: avoid panics
...
If:
* the text for a file_id is not found (likely non-utf data in file)
* path does not appear in Vfs, in which case we fall back on loading the file from disk with no "semantics" available
2024-10-30 13:18:36 +01:00
Simon Friis Vindum
44bebedae6
Rust: Add basic skeleton setup for data flow
2024-10-30 13:16:26 +01:00
Tom Hvitved
495c92df38
Shared: Also take query ID into account in PathProblemSourceTestInput
2024-10-30 10:54:40 +01:00
Chris Smowton
2b678c97ab
Merge pull request #17870 from charmander/patch-1
...
Fix typo and grammar in InsecureCookie.qhelp
2024-10-30 09:48:20 +00:00
Chris Smowton
5f31adc1f4
Update InsecureCookie.qhelp
...
Gratuitous commit to nudge CI
2024-10-30 09:34:49 +00:00
Tom Hvitved
ff9811b488
C#: Add tests for the inline test post-processor
2024-10-30 10:09:40 +01:00
Charmander
a97998811a
Fix typo and grammar in InsecureCookie.qhelp
2024-10-30 07:29:20 +00:00
Paolo Tranquilli
4c73c6284e
Merge pull request #17867 from github/dbartol/actions-build
...
Add the Actions extractor to the build
2024-10-30 05:48:41 +01:00
Dave Bartolomeo
b07642b585
Fix linting
2024-10-29 17:09:47 -04:00
Dave Bartolomeo
902a8bd847
Add Actions extractor to build
2024-10-29 16:54:37 -04:00
Dave Bartolomeo
3c9e19346c
Update test expectations
2024-10-29 16:53:36 -04:00
Tom Hvitved
cc94c42f87
Address review comments
2024-10-29 20:36:16 +01:00
Ian Lynagh
b00bbc9ca2
Merge pull request #17731 from igfoo/igfoo/removeErasure
...
Java/Kotlin: Remove the erasure dbscheme relation
2024-10-29 14:21:57 +00:00
Rasmus Wriedt Larsen
2b6c27eb60
JS: Add initial file threat-model support
...
However, as indicated by the `MISSING` annotations, we could do better.
2024-10-29 15:14:39 +01:00
Rasmus Wriedt Larsen
3656864695
JS: Add database threat-model source modeling
2024-10-29 15:11:09 +01:00
Tom Hvitved
baeffa2345
Update rust/ql/test/query-tests/unusedentities/unreachable.rs
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2024-10-29 15:00:09 +01:00
Anders Schack-Mulligen
8b5756526c
Update python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2024-10-29 13:57:27 +01:00
Tom Hvitved
dd520fea47
Rust: Post-processing query for inline test expectations
2024-10-29 13:37:04 +01:00
Tom Hvitved
1259b7e8e7
JS: Post-processing query for inline test expectations
2024-10-29 13:35:38 +01:00
Tom Hvitved
e5f2bbb6ec
Python: Post-processing query for inline test expectations
2024-10-29 13:35:37 +01:00
Tom Hvitved
4750b0de94
C++: Post-processing query for inline test expectations
2024-10-29 13:35:36 +01:00
Tom Hvitved
540b433f5a
Go: Post-processing query for inline test expectations
2024-10-29 13:35:35 +01:00
Tom Hvitved
4561770db4
Swift: Post-processing query for inline test expectations
2024-10-29 13:35:34 +01:00
Tom Hvitved
5b5ca05e87
Ruby: Post-processing query for inline test expectations
2024-10-29 13:35:33 +01:00
Tom Hvitved
e2b614d18a
Java: Post-processing query for inline test expectations
2024-10-29 13:35:32 +01:00
Tom Hvitved
8ba80fd022
C#: Post-processing query for inline test expectations
2024-10-29 13:35:31 +01:00
Tom Hvitved
e7a3e6bfed
Shared: Post-processing query for inline test expectations
2024-10-29 13:35:29 +01:00
Tom Hvitved
b111194fbc
Shared: Simplify PrettyPrintModels.ql
2024-10-29 13:35:28 +01:00
Tom Hvitved
c5d699cb6b
Merge pull request #17857 from geoffw0/unreachable3
...
Rust: Fix rust/dead-code
2024-10-29 13:35:10 +01:00
Asger F
879cb7c365
Merge pull request #17864 from asgerf/js/vue-attribute-syntax
...
JS: Fix parsing of special Vue attributes
2024-10-29 13:23:47 +01:00
Ian Lynagh
251a8a34ed
Java: Add up/downgrade scripts
2024-10-29 11:32:22 +00:00
Geoffrey White
6a110368a5
Rust: Rename predicates.
2024-10-29 11:32:22 +00:00
Ian Lynagh
6be2e98796
Java/Kotlin: Remove the erasure relation
...
It's no longer used
2024-10-29 11:32:20 +00:00
Ian Lynagh
8ab52dba83
Kotlin: Don't write the erasure relation
...
It's no longer used
2024-10-29 11:32:18 +00:00
Ian Lynagh
6c9739023d
Java: Remove redundant getErasure overrides
...
The root definition covers these cases already
2024-10-29 11:32:16 +00:00
Rasmus Wriedt Larsen
7c7420a9a4
JS: Add change-note
2024-10-29 11:35:56 +01:00
Rasmus Wriedt Larsen
07bc1feb11
Docs: Threat-models supported in JS
...
Capturing
- 7d3793e718
- e35c2b243a
- e11bfc27bd
2024-10-29 11:33:02 +01:00
Rasmus Wriedt Larsen
84f6b89ced
JS: Minor improvements to threat-model Concepts
...
Mirroring what was done for Python
2024-10-29 11:29:48 +01:00
Asger F
6aef571c17
JS: Bump extractor version string
2024-10-29 11:28:06 +01:00
Asger F
3cc6b11e6b
JS: Expand attribute regex to include some Vue attributes
2024-10-29 11:19:01 +01:00
Asger F
560b3da851
JS: Add test with some special Vue attributes
2024-10-29 11:18:17 +01:00
Tom Hvitved
7ddc8f087d
Merge pull request #17786 from paldepind/rust-saa-additions
...
Rust: SSA additions
2024-10-29 09:51:38 +01:00
Tom Hvitved
813ccb9c06
Merge pull request #17855 from hvitved/csharp/comments-mapped-locations
...
C#: Take mapped locations into account in `Comments.qll`
2024-10-29 08:58:38 +01:00
Anders Schack-Mulligen
1d3bad1358
UniversalFlow: More renaming.
2024-10-29 08:53:18 +01:00
Erik Krogh Kristensen
733158f8f2
Merge pull request #17860 from erik-krogh/fix-windows
...
fix the RAM setting on Windows
2024-10-29 08:34:09 +01:00
erik-krogh
2ee88f6774
fix the RAM setting on Windows
2024-10-28 20:39:34 +01:00
Arthur Baars
c87f2c4eb1
Rust: remove unnecessary field
2024-10-28 18:56:20 +01:00
Paolo Tranquilli
2b386c422c
Merge pull request #17839 from github/redsun82/rust-analysis
...
Rust: add codeql analysis workflow
2024-10-28 18:14:32 +01:00
Dave Bartolomeo
d4db759057
Merge pull request #17858 from github/dbartol/actions-placeholder
2024-10-28 11:57:20 -04:00
Dave Bartolomeo
609a6c38e4
Revert "Fix bash nit"
...
This reverts commit 3228447544 .
2024-10-28 11:39:22 -04:00
Dave Bartolomeo
a70ce25144
Merge pull request #17850 from github/dbartol/actions-placeholder
...
Implement Actions extractor and placeholder Actions QL packs
2024-10-28 11:34:00 -04:00
Anders Schack-Mulligen
7d98d391b7
UniversalFlow: Rename FlowScc.
2024-10-28 16:28:28 +01:00
Anders Schack-Mulligen
d41b86a87d
UniversalFlow: Tweak visibility and add qldoc.
2024-10-28 16:27:27 +01:00
Anders Schack-Mulligen
6680537e93
UniversalFlow: Minor tweak to isNull and autoformat.
2024-10-28 16:25:30 +01:00
Anders Schack-Mulligen
d6e420bd0e
UniversalFlow: Rename node type.
2024-10-28 16:23:44 +01:00
Anders Schack-Mulligen
1aecdb44dc
UniversalFlow: Move Universal Flow library to its own file.
2024-10-28 16:20:16 +01:00
Taus
5d6600e61f
Python: Fix generator expression locations
...
Our logic for detecting the first and last item in a generator
expression was faulty, sometimes matching comments as well. Because
attributes (like `_location_start`) can only be written once, this
caused `tree-sitter-graph` to get unhappy.
To fix this, we now require the first item to be an `expression`, and
the last one to be either a `for_in_clause` or an `if_clause`.
Crucially, `comment` is neither of these, and this prevents the
unfortunate overlap.
2024-10-28 14:53:09 +00:00
Taus
ef60b730ea
Python: Fix parenthesized tuple parser bug
...
We were writing the `parenthesised` attribute twice on tuples, once
because of the explicit parenthetisation, and once because all non-empty
tuples are parenthesised. This made `tree-sitter-graph` unhappy.
To fix this, we now explicitly check whether a tuple is already
parenthesised, and do nothing if that is the case.
2024-10-28 14:49:45 +00:00
Anders Schack-Mulligen
ea458c09a0
TypeFlow: Extract a universal flow library abstraction from TypeFlow.
2024-10-28 15:48:29 +01:00
Taus
b4ecc7937d
Python: Fix some more async parsing problems
...
Turns out we were not setting the `is_async` field on anything except
`async for` statements. This commit makes it so that we also do this for
`async def` and `async with`, and adds a test that this produces the
same behaviour as the old parser.
2024-10-28 14:44:02 +00:00
Taus
e710c0a6bf
Python: Regenerate parser files
2024-10-28 14:44:01 +00:00
Taus
ac87868097
Python: Fix parsing of await inside expressions
...
Found when parsing `Lib/test/test_coroutines.py` using the new parser.
For whatever reason, having `await` be an `expression` (with an argument
of the same kind) resulted in a bad parse. Consulting the official
grammar, we see that `await` should actually be a `primary_expression`
instead. This is also more in line with the other unary operators, whose
precedence is shared by the `await` syntax.
2024-10-28 14:44:01 +00:00
Taus
1e51703ce9
Python: Allow escaped quotes/backslashes in raw strings
...
Quoting the Python documentation (last paragraph of
https://docs.python.org/3/reference/lexical_analysis.html#escape-sequences ):
"Even in a raw literal, quotes can be escaped with a backslash, but the
backslash remains in the result; for example, r"\"" is a valid string
literal consisting of two characters: a backslash and a double quote;
r"\" is not a valid string literal (even a raw string cannot end in an
odd number of backslashes)."
We did not handle this correctly in the scanner, as we only consumed the
backslash but not the following single or double quote, resulting in
that character getting interpreted as the end of the string.
To fix this, we do a second lookahead after consuming the backslash, and
if the next character is the end character for the string, we advance
the lexer across it as well.
Similarly, backslashes in raw strings can escape other backslashes.
Thus, for a string like '\\' we must consume the second backslash,
otherwise we'll interpret it as escaping the end quote.
2024-10-28 14:40:24 +00:00
Geoffrey White
eb79bcbc34
Rust: Remove unnecessary line.
2024-10-28 14:36:45 +00:00
Geoffrey White
bf5a0b7bd0
Rust: Rewrite UnreachableCode.ql to be more robust.
2024-10-28 14:36:42 +00:00
Geoffrey White
41df9ae4fc
Merge pull request #17854 from geoffw0/cleanuptest
...
Rust: Clean up unreachable test
2024-10-28 14:29:42 +00:00
Paolo Tranquilli
f5d14dbe07
Merge pull request #17856 from github/redsun82/rust-defaultSuiteFile
...
Rust: add `defaultSuiteFile`
2024-10-28 15:27:51 +01:00
Simon Friis Vindum
8f8564ddfd
Rust: Address PR comments
2024-10-28 15:15:38 +01:00
Anders Schack-Mulligen
fba4d09e65
TypeFlow: Simplify interface.
2024-10-28 15:09:09 +01:00
Anders Schack-Mulligen
3939eff260
TypeFlow: Rename step to uniqStep.
2024-10-28 15:00:05 +01:00
Dave Bartolomeo
3228447544
Fix bash nit
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com >
2024-10-28 09:58:11 -04:00
Paolo Tranquilli
5420e52afa
Rust: add defaultSuiteFile
2024-10-28 14:56:09 +01:00
Tom Hvitved
cfa1ed38b4
Merge pull request #17844 from hvitved/rust/location-impl
...
Rust: Cache `Locatable.getLocation` and `Location`
2024-10-28 14:41:36 +01:00
Paolo Tranquilli
5a84d290e6
Rust: ignore test directory
2024-10-28 14:32:53 +01:00
Tom Hvitved
7910af159c
C#: Take mapped locations into account in Comments.qll
2024-10-28 14:21:10 +01:00
Paolo Tranquilli
dd4fe2a32b
Rust: change analysis config
2024-10-28 14:21:07 +01:00
Tom Hvitved
c93e4385f2
C#: Add a test for a comment with a mapped location
2024-10-28 14:20:24 +01:00
Arthur Baars
2326861b23
Merge pull request #17805 from github/aibaars/local-defs
...
Rust: Rust: add jump to definition for format arguments
2024-10-28 14:17:40 +01:00
Cornelius Riemenschneider
1972532f1c
Merge pull request #17732 from github/criemen/bazel-8
...
Bazel: Upgrade to 8.0.0rc1
2024-10-28 14:03:20 +01:00
Michael Nebel
058fcc1a51
Merge pull request #17853 from michaelnebel/csharp/madtests
...
C#: Re-factor test for CWE-611/UntrustedDataInsecureXml.ql to pretty print models.
2024-10-28 13:38:26 +01:00
Tom Hvitved
711dfc3592
Rust: Cache Locatable.getLocation and Location
2024-10-28 13:33:49 +01:00
Arthur Baars
b6c26debef
Rust: create single Semantics object for each workspace
2024-10-28 13:29:04 +01:00
Arthur Baars
57cdda3405
Rust: no longer reload files into the RootDatabase
...
Files were reloaded to handle cases were there was no content
for a file_id, causing a panic. Missing contents was caused by
files that did not contain valid UTF-8 data. These are skipped
by rust-analyzer when it is loading data into the RootDatabase.
2024-10-28 13:29:03 +01:00
Paolo Tranquilli
9c95a17882
Rust: add block ids to canonical paths, making them "extended"
2024-10-28 12:41:05 +01:00
Simon Friis Vindum
cab916453d
Rust: Update unused value expected test result
2024-10-28 12:18:00 +01:00
Simon Friis Vindum
b86a5810b3
Rust: Small refactor based on PR feedback
2024-10-28 11:45:46 +01:00
Simon Friis Vindum
c5b01eb629
Merge branch 'main' into rust-saa-additions
2024-10-28 11:42:32 +01:00
Geoffrey White
e5818f6f2e
Rust: Fix unused value cases in the unreachable test (they're not interesting, just distract from the point of these tests.
2024-10-28 10:29:31 +00:00
Arthur Baars
fdf99e2f50
Rust: filter out definitions that are inside expanded macros
2024-10-28 11:27:59 +01:00
Geoffrey White
72606d5a59
Rust: Add missing annotations to unreachable test.
2024-10-28 10:22:46 +00:00
Arthur Baars
c4126e4410
Rust: add tests for Definitions.qll
2024-10-28 11:17:48 +01:00
Rasmus Wriedt Larsen
e3c400b0c8
Add auto labeler support for 'Actions'
2024-10-28 10:46:05 +01:00
Rasmus Wriedt Larsen
01fa95f98a
Actions: autoformat
2024-10-28 10:43:46 +01:00
Michael Nebel
b112a9b31e
Merge pull request #17851 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2024-10-28 10:38:27 +01:00
Michael Nebel
82ff545424
C#: Re-factor test for CWE-611/UntrustedDataInsecureXml.ql to pretty print models in test case.
2024-10-28 10:36:32 +01:00
Óscar San José
3e77629477
Merge pull request #17838 from github/oscarsj/deprecate-macos-12
...
Remove macos-12 and its variants, deprecated
2024-10-28 10:32:49 +01:00
Paolo Tranquilli
2fa1c5ebcd
Merge branch 'main' into redsun82/rust-analysis
2024-10-28 10:30:08 +01:00
Arthur Baars
40ef9ad805
Rust: make TDef cached
2024-10-28 10:21:43 +01:00
github-actions[bot]
0e5ba2b23e
Add changed framework coverage reports
2024-10-28 00:21:56 +00:00
Dave Bartolomeo
8840f91503
Fix formatting
2024-10-25 20:32:01 -04:00
Dave Bartolomeo
4a567344f5
Fix style alerts
2024-10-25 17:59:49 -04:00
Dave Bartolomeo
dffc9e2e31
Create placeholder Actions QL packs
2024-10-25 17:45:05 -04:00
Dave Bartolomeo
47a7d24a1a
Implement Actions extractor
2024-10-25 17:44:46 -04:00
Jeroen Ketema
655fa53cdd
Merge pull request #17848 from jketema/wrong-format
...
C++: Add wrong format type builtin function test
2024-10-25 19:11:22 +02:00
Chris Smowton
fa4cc83753
Merge pull request #17837 from smowton/smowton/admin/trim-java-web-jsp-test
...
Java: Trim JSP test
2024-10-25 17:23:51 +01:00
Paolo Tranquilli
652e47177f
Rust: format
2024-10-25 17:44:16 +02:00
Simon Friis Vindum
7db90fe073
Merge pull request #17847 from paldepind/rust-unused-variable-trait
...
Rust: Don't consider parameters in trait method definitions without bodies as variables
2024-10-25 17:41:04 +02:00
Paolo Tranquilli
719b5e175f
Rust: add missing expected files
2024-10-25 17:06:54 +02:00
Paolo Tranquilli
8f6196d5f1
Rust: accept test changes
2024-10-25 16:58:05 +02:00
Paolo Tranquilli
9789059e9f
Rust: add more thourough canonical path testing
2024-10-25 16:58:05 +02:00
Paolo Tranquilli
34b1055c13
Rust: accept test changes
2024-10-25 16:58:04 +02:00
Paolo Tranquilli
194e0daa8c
Rust: add canonical_path and crate_origin to Item
2024-10-25 16:58:04 +02:00
yoff
7338eafbd4
Merge pull request #16812 from porcupineyhairs/pyloadSsl
...
Python: Pycurl SSL Disabled
2024-10-25 16:23:25 +02:00
Simon Friis Vindum
bfa6113366
Rust: Fix grammar in comment
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2024-10-25 16:23:04 +02:00
Jeroen Ketema
ccc2a39abc
C++: Add wrong format type builtin function test
2024-10-25 16:16:13 +02:00
Simon Friis Vindum
f7a45e6650
Rust: Don't consider parameters in trait method definitions without bodies as variables
2024-10-25 15:56:58 +02:00
Paolo Tranquilli
ab1b48d687
Merge pull request #17843 from github/redsun82/reduce-log-noise
...
Rust: reduce log spam and skip debug diagnostics in the DB
2024-10-25 15:33:29 +02:00
Simon Friis Vindum
a5ce3c1570
Rust: Move trait tests for unused entities into main.rs
2024-10-25 15:15:49 +02:00
Rasmus Wriedt Larsen
1726287bf4
JS: Add e2e threat-model test
2024-10-25 15:03:44 +02:00
Rasmus Wriedt Larsen
d3ae4c930e
JS: Model newer yargs command-line parsing pattern
2024-10-25 15:03:43 +02:00
Rasmus Wriedt Larsen
3448751b4c
JS: Consolidate command-line argument modeling
...
Such that we can reuse the existing modeling, but have it globally
applied as a threat-model as well.
I Basically just moved the modeling. One important aspect is that this
changes is that the previously query-specific `argsParseStep` is now a
globally applied taint-step. This seems reasonable, if someone applied
the argument parsing to any user-controlled string, it seems correct to
propagate that taint for _any_ query.
2024-10-25 15:03:43 +02:00
Rasmus Wriedt Larsen
412e841d69
JS: Add environment threat-model source
2024-10-25 15:03:43 +02:00
Rasmus Wriedt Larsen
f733ac19a9
JS: Make (most) queries use ActiveThreatModelSource
...
7 cases looks something like this:
```
class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource {
RemoteFlowSourceAsSource() { not this instanceof ClientSideRemoteFlowSource }
}
```
(some have variations like `not this.(ClientSideRemoteFlowSource).getKind().isPathOrUrl()`)
javascript/ql/lib/semmle/javascript/security/dataflow/ClientSideUrlRedirectCustomizations.qll
javascript/ql/lib/semmle/javascript/security/dataflow/CommandInjectionCustomizations.qll
javascript/ql/lib/semmle/javascript/security/dataflow/CorsMisconfigurationForCredentialsCustomizations.qll
javascript/ql/lib/semmle/javascript/security/dataflow/RegExpInjectionCustomizations.qll
javascript/ql/lib/semmle/javascript/security/dataflow/RequestForgeryCustomizations.qll
javascript/ql/lib/semmle/javascript/security/dataflow/ResourceExhaustionCustomizations.qll
javascript/ql/lib/semmle/javascript/security/dataflow/TaintedPathCustomizations.qll
2024-10-25 15:03:42 +02:00
Rasmus Wriedt Larsen
4b1c027359
JS: Integrate RemoteFlowSource with ThreatModelSource
2024-10-25 14:52:49 +02:00
Rasmus Wriedt Larsen
dbfbd2c00a
JS: Remove 'response' from default threat-models
...
I didn't want to put the configuration file in
`semmle/javascript/frameworks/**/*.model.yml`, so created `ext/` as in other
languages
2024-10-25 14:52:49 +02:00
Rasmus Wriedt Larsen
05dce8a0be
JS: Add test showing default active threat-models
2024-10-25 14:50:59 +02:00
Rasmus Wriedt Larsen
17a6d54e4d
JS: Setup basic support for threat-models
...
Integration with RemoteFlowSource is not straightforward, so postponing
that for later
Naming in other languages:
- `SourceNode` (for QL only modeling)
- `ThreatModelFlowSource` (for active sources from QL or data-extensions)
However, since we use `LocalSourceNode` in Python, and `SourceNode` in
JS (for local source nodes), it seems a bit confusing to follow the same
naming convention as other languages, and instead I came up with new names.
2024-10-25 14:50:59 +02:00
Tom Hvitved
c5da712d10
Merge pull request #17840 from hvitved/shared/inline-test-space
...
Shared: Add missing spaces in inline test expectation output
2024-10-25 14:23:55 +02:00
Paolo Tranquilli
a760b89895
Rust: small tweaks
2024-10-25 14:13:27 +02:00
Paolo Tranquilli
5230b7b041
Rust: reduce log spam and skip debug diagnostics in the DB
2024-10-25 13:47:13 +02:00
Tom Hvitved
7c4d5981dd
Shared: Add missing spaces in inline test expectation output
2024-10-25 13:23:03 +02:00
Arthur Baars
f092594a52
Rust: add location definitions for format arguments
2024-10-25 12:57:08 +02:00
Arthur Baars
997a622496
Rust: also implement localReferences.ql
2024-10-25 12:57:06 +02:00
Paolo Tranquilli
45e9c2ff4d
Merge pull request #17841 from github/redsun82/rust-fix-qltest-macos
...
Rust: fix qltest on macOS, and add CI cross-platform testing of it
2024-10-25 12:56:23 +02:00
Tom Hvitved
ba600b0791
Merge pull request #17829 from hvitved/rust/cfg-stage
...
Rust: Collapse cached CFG logic into one stage
2024-10-25 12:45:38 +02:00
Arthur Baars
9dc5e2fa36
Merge pull request #17791 from github/aibaars/rust-format-templates
...
Rust: parse formatting templates
2024-10-25 12:42:35 +02:00
Paolo Tranquilli
4485193f57
Rust: skip output redirection QL test on windows for now
2024-10-25 12:33:47 +02:00
Óscar San José
8f7ed21f5d
Update macOS version in workflow file
2024-10-25 12:21:27 +02:00
Arthur Baars
8d4bb97b1a
Rust: make VariableAccess non-abstract
2024-10-25 12:21:23 +02:00
Óscar San José
c2a644b740
Update macOS version in build workflow
2024-10-25 12:20:25 +02:00
Paolo Tranquilli
4e8b6dc038
Rust: fix qltest on macOS, and add CI cross-platform testing of it
2024-10-25 12:19:46 +02:00
Michael Nebel
0b538313fb
Merge pull request #17666 from michaelnebel/csharp/net8models
...
C#: Update .NET 8 models.
2024-10-25 11:24:27 +02:00
Arthur Baars
a08b4b7372
Rust: allow VariableAccess elements to have another primary QL class
2024-10-25 11:02:55 +02:00
Arthur Baars
a6e69eb147
Revert "Rust: avoid classes with multiple getAPrimaryQLClass result"
...
This reverts commit 110d2ea775 .
2024-10-25 10:59:31 +02:00
Simon Friis Vindum
334602a50a
Rust: Handle calls that might read/write variables through closures
...
This implementation is copied and adapted from the Ruby SSA
implementation.
2024-10-25 10:50:32 +02:00
Simon Friis Vindum
75103f4b26
Merge branch 'main' into rust-saa-additions
2024-10-25 10:43:59 +02:00
Paolo Tranquilli
af3be84005
Rust: add codeql analysis workflow
2024-10-25 10:05:28 +02:00
Óscar San José
a467923e9b
Remove macos-12 and its variants, deprecated
2024-10-24 18:57:58 +02:00
Paolo Tranquilli
55d092fd3e
Merge pull request #17835 from github/redsun82/rust-qltest
...
Rust: move `qltest` to rust code, add `options` with cargo check
2024-10-24 18:29:17 +02:00
Paolo Tranquilli
41d0085918
Rust: address review
2024-10-24 17:54:18 +02:00
Paolo Tranquilli
c79f8180f3
Rust: move down options in query-tests
2024-10-24 17:14:48 +02:00
Arthur Baars
bd19661b60
Address comments
2024-10-24 16:40:19 +02:00
Chris Smowton
4e879e64fc
Trim JSP test
...
This was only ever testing that Java files relating to the JSPs in question appear in the database, so there's no need for a particularly wide selection.
2024-10-24 14:19:16 +01:00
Arthur Baars
a7628e7f4e
Rust: revert unnecessary changes to VariableImpl.qll
2024-10-24 15:19:01 +02:00
Arthur Baars
2d07270c1e
Rust: stop sharing Diagnostics.qll with Ruby :-(
2024-10-24 15:14:13 +02:00
Arthur Baars
bad9262f12
Rust: create locations for Format and FormatArgument
2024-10-24 15:14:11 +02:00
Arthur Baars
017d492348
Rust: implement synthesized Locations
2024-10-24 15:14:10 +02:00
Arthur Baars
110d2ea775
Rust: avoid classes with multiple getAPrimaryQLClass result
2024-10-24 15:14:09 +02:00
Arthur Baars
ca469f6d5c
Rust: introduce PathExprBase class
2024-10-24 15:14:07 +02:00
Arthur Baars
2b65e78674
Rust: fix bad join order
2024-10-24 15:13:27 +02:00
Arthur Baars
a3b903f13a
Rust: simplify synth constructors
2024-10-24 15:13:25 +02:00
Arthur Baars
8843a7c389
Rust: rename {Implicit,FormatTemplate}VariableAccess
2024-10-24 15:13:24 +02:00
Arthur Baars
fc4ac9bcf8
Rust: implement Format and FormatArgument classes
2024-10-24 15:13:23 +02:00
Arthur Baars
58dfe6c667
Rust: run codegen
2024-10-24 15:13:22 +02:00
Arthur Baars
8d2236b6d6
Rust: define Format and FormatArgument in schema
2024-10-24 15:13:21 +02:00
Arthur Baars
d4b2dc3711
Apply suggestion
2024-10-24 15:13:20 +02:00
Arthur Baars
be41ca5d4e
Rust: update expected output
2024-10-24 15:13:19 +02:00
Arthur Baars
11396ef7cb
Rust: avoid multiple PrimaryQLClass warnings
...
Fixes things like:
```
multiplePrimaryQlClasses
| x | PathExpr,VariableAccess |
```
2024-10-24 15:13:17 +02:00
Arthur Baars
e1c315b288
Rust: make ImplicitVariableAccess instance of VariableAccess
2024-10-24 15:13:14 +02:00
Arthur Baars
1b7b24ecb8
Rust: add Locatable::hasLocationInfo
2024-10-24 15:11:02 +02:00
Arthur Baars
f213a2d640
Rust: CFG for ImplicitVariableAccess
2024-10-24 15:11:01 +02:00
Arthur Baars
8a5fa9b72f
Rust: add ImplicitVariableAccess class
2024-10-24 15:11:00 +02:00
Arthur Baars
8f2c7c1239
Rust: parse formatting templates
2024-10-24 15:10:59 +02:00
Tom Hvitved
09c3ac6f81
Rust: Collapse cached CFG logic into one stage
2024-10-24 14:58:19 +02:00
Tom Hvitved
e920a4c56c
Merge pull request #17828 from hvitved/rust/enclosing-callable
...
Rust: Introduce `AstNode.getEnclosingCallable`
2024-10-24 14:57:12 +02:00
Cornelius Riemenschneider
f900060e7f
Bazel: Upgrade to bazel 8.
2024-10-24 13:30:57 +02:00
Paolo Tranquilli
3f8d438851
Rust: move qltest to rust code, add options with cargo check
2024-10-24 12:55:23 +02:00
Erik Krogh Kristensen
7bbd4a10b9
Merge pull request #17831 from erik-krogh/skip-more-types
...
JS: have getId always return null if skipExtractingTypes is set
2024-10-24 12:34:22 +02:00
Owen Mansel-Chan
e16f35478b
Merge pull request #17833 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2024-10-24 11:19:01 +01:00
yoff
c78aeec2ec
Update python/ql/lib/semmle/python/frameworks/Pycurl.qll
2024-10-24 11:44:16 +02:00
Calum Grant
a8f1d57573
Merge pull request #17775 from github/calumgrant/bmn/wrong-type-format-arguments-test
...
C++: Reduce FPs in cpp/wrong-type-format-argument due to extraction errors
2024-10-24 08:40:46 +01:00
github-actions[bot]
1e26db64fb
Add changed framework coverage reports
2024-10-24 00:20:48 +00:00
Florin Coada
6838d9414b
CodeQL 2.19.2 changedocs
2024-10-23 16:02:22 +01:00
erik-krogh
073d6d8c14
have getId always return null if skipExtractingTypes is set
2024-10-23 16:50:23 +02:00
Taus
5db601af3c
Python: Allow comments in comprehensions
...
A somewhat complicated solution that necessitated adding a new custom
function to `tsg-python`. See the comments in `python.tsg` for why this
was necessary.
2024-10-23 14:24:47 +00:00
Jeroen Ketema
226756e1d4
Merge pull request #17826 from MathiasVP/missing-flow-with-aliasing-fields
...
C++: Add test with missing flow
2024-10-23 15:49:42 +02:00
Calum Grant
421413a654
C++: Update change notes
2024-10-23 14:46:00 +01:00
Michael Nebel
779ee25a19
Merge pull request #17824 from michaelnebel/java/maptoobj
...
Java: Add manual models for `mapToObj`.
2024-10-23 15:40:28 +02:00
Calum Grant
f37be68067
C++: Handle builtin FormattingFunctions better
2024-10-23 14:35:32 +01:00
Tom Hvitved
a3d8b8eb14
Rust: Run codegen
2024-10-23 15:31:08 +02:00
Tom Hvitved
df19281b9f
Rust: Introduce AstNode.getEnclosingCallable
2024-10-23 15:31:07 +02:00
Michael Nebel
c1b1c62616
C#: Address review comments.
2024-10-23 15:25:52 +02:00
Tom Hvitved
086e0c61fc
Merge pull request #17817 from hvitved/rust/cfg-scope-callable
...
Rust: Use `Callable` to define `CfgScope`
2024-10-23 15:24:13 +02:00
Taus
24ae54886f
Merge pull request #17809 from github/tausbn/python-fix-kwargs-in-class-bases
...
Python: Fix bug in handling of `**kwargs` in class bases
2024-10-23 15:04:54 +02:00
Mathias Vorreiter Pedersen
7c5f561724
C++: Accept test changes.
2024-10-23 13:37:06 +01:00
Taus
e1e35689ca
Merge pull request #17807 from github/tausbn/python-fix-string-encoding-dataset-check-failure
...
Python: Fix string encoding dataset check failure
2024-10-23 14:26:45 +02:00
Mathias Vorreiter Pedersen
2fd07f28f0
C++: Add test with missing flow.
2024-10-23 13:00:33 +01:00
Michael Nebel
146c88fabb
C#: Update test expected output where the results are not affected.
2024-10-23 13:08:21 +02:00
Michael Nebel
5495a211f2
C#: Update exception information exposure expected output.
2024-10-23 13:08:19 +02:00
Michael Nebel
cad9aa21d8
C#: Update flow summaries test expected output.
2024-10-23 13:08:18 +02:00
Michael Nebel
b7b6feed04
C#: Re-generate .NET 8 Runtime models.
2024-10-23 13:08:17 +02:00
Michael Nebel
9cd9ebfda9
C#: Add manual models for StringWriter.
2024-10-23 13:08:15 +02:00
Michael Nebel
87caf3d826
C#: Add change note.
2024-10-23 13:08:14 +02:00
Michael Nebel
d3a359b498
C#: Update .NET 8 models.
2024-10-23 13:08:13 +02:00
Michael Nebel
00ccd20452
C#: Delete all .NET 8 Runtime models.
2024-10-23 13:08:11 +02:00
Michael Nebel
20b5a7b6f0
C#: Update expected test output.
2024-10-23 13:08:10 +02:00
Michael Nebel
062a2ad97d
C#: Include exception property accesses in the exception information exposure query.
2024-10-23 13:08:08 +02:00
Tom Hvitved
7a2105b1d5
Go: Update expected test output
2024-10-23 10:41:13 +02:00
Tom Hvitved
2e7b71c28d
Data flow: Prevent quadratic blowup in Stage6Param::localStep
2024-10-23 10:41:12 +02:00
Michael Nebel
caa08046b6
Java: Update expected test output.
2024-10-23 09:29:29 +02:00
Michael Nebel
3d70f91b9f
Java: Add manual models for various mapToObj methods.
2024-10-23 09:29:15 +02:00
Michael Nebel
197642c914
Merge pull request #17547 from michaelnebel/java/jdk17update
...
Java: Update Java JDK 17 models.
2024-10-23 09:07:02 +02:00
Henning Makholm
665354ebd2
Merge pull request #17823 from github/hmakholm/pr/graph-equivalence-test
...
Supplement 'query-type: graph' with actual query metadata
2024-10-22 21:08:15 +02:00
Henning Makholm
3d8d340f2a
Supplement 'query-type: graph' with actual query metadata
...
A number of CPP library tests contain `// query-type: graph`
annotations that make the test driver compare the output
from the test query in a special mode. (This feature is
not used by other languages).
It's somewhat awkward in the implementation of `codeql test run`
that this annotation is not an ordinary item of query metadata --
essentially it means that _every_ test query has to be opened
and read an extra time to look for this annotation. I'd like
to move towards using ordinary query metadata for this, since
the QL compiler already parses it anyway.
For the time being, give the annotation in both old and new
syntaxes, until a CLI that recognizes both has been released.
2024-10-22 20:38:00 +02:00
Taus
4f60494019
Python: Support assignments of the form [x,y,z] = w
...
Surprisingly, the new parser did not support these constructs (and the
relevant test was missing this case), so on files that required the new
parser we were unable to parse this construct.
To fix it, we add `list_pattern` (not to be confused with
`pattern_list`) as a `tree-sitter-python` node that results in a `List`
node in the AST.
2024-10-22 16:06:35 +00:00
Taus
89ea4b8200
Python: Regenerate parser files
2024-10-22 15:39:41 +00:00
Taus
9c913902c5
Python: Allow except* to be written as except *
...
Turns out, `except*` is actually not a token on its own according to the
Python grammar. This means it's legal to write `except *foo: ...`, which
we previously would consider a syntax error.
To fix it, we simply break up the `except*` into two separate tokens.
2024-10-22 15:39:29 +00:00
Taus
7ceefb509b
Python: Regenerate parser files
2024-10-22 15:17:34 +00:00
Taus
8053e0ed44
Python: Allow list_splats as type annotations
...
That is, the `*T` in `def foo(*args : *T): ...`.
This is apparently a piece of syntax we did not support correctly until
now.
In terms of the grammar, we simply add `list_splat` as a possible
alternative for `type` (which could previously only be an `expression`).
We also update `python.tsg` to not specify `expression` those places (as
the relevant stanzas will then not work for `list_splat`s).
This syntax is not supported by the old parser, hence we only add a new
parser test for it.
2024-10-22 15:17:12 +00:00
Taus
fcec8e0256
Python: Fail tests when errors/warnings are logged
...
This is primarily useful for ensuring that errors where a node does not
have an appropriate context set in `python.tsg` actually have an effect
on the pass/fail status of the parser tests. Previously, these would
just be logged to stdout, but test could still succeed when there were
errors present.
Also fixes one of the logging lines in `tsg_parser.py` to be more
consistent with the others.
2024-10-22 15:11:51 +00:00
Michael Nebel
16fe7a2fbe
Merge pull request #17815 from michaelnebel/csharp/logforgingreplacelineending
...
C#: Add sanitizer to `cs/log-forging`.
2024-10-22 15:41:17 +02:00
Chris Smowton
2312f9d8df
Merge pull request #17811 from github/smowton/admin/package-maven-plugin-change-note
...
Add change-note for Java buildless packaging its required Maven plugin
2024-10-22 14:23:01 +01:00
Cornelius Riemenschneider
cdffa09a7b
Merge pull request #17821 from github/criemen/win-make-bazel
...
Go: Fix makefile to use bash to look up bazel path.
2024-10-22 12:50:10 +02:00
Cornelius Riemenschneider
1ccadbc3f6
Add comment.
2024-10-22 11:26:02 +02:00
Cornelius Riemenschneider
ad1ef65539
Go: Fix makefile to use bash to look up bazel path.
...
On Windows, make's path resolution algorithm is incorrect.
It picks up a bazel.exe in PATH that's _after_ a bazel binary.
In particular, on actions, the non-exe binary is a bazelisk
instance, whereas bazel.exe is a bazel (at the current time 7.3.2)
installation.
This means we pick up the wrong bazel version, and
if the differences between the bazel we want and that we actually
get are too big, the build fails.
2024-10-22 10:51:10 +02:00
Tom Hvitved
60c205ff37
Merge pull request #17818 from hvitved/rust/summary-stats-perf
...
Rust: Speedup `SummaryStats.ql`
2024-10-22 10:15:56 +02:00
Owen Mansel-Chan
23a1ea7191
Merge pull request #17717 from owen-mc/go/update-incorrect-integer-conversion-qhelp
...
Go: Update `go/incorrect-integer-conversion` qhelp to explain possible source of FPs
2024-10-21 21:53:32 +01:00
Jeroen Ketema
9ef1a9c3f9
Merge pull request #17225 from geoffw0/aliasperf2
...
C++: Improve AliasedSSA performance
2024-10-21 20:20:24 +02:00
Taus
9803bbdc4b
Python: Update class parser test
2024-10-21 15:35:48 +00:00
Taus
1cd04c96c7
Python: Fix bug in handling of **kwargs in class bases
...
This caused a dataset check error on the `python/cpython` database, as
we had a `DictUnpacking` node whose parent was not a `dict_item_list`,
but rather an `expr_list`.
Investigating a bit further revealed that this was because in a
construction like
```python
class C[T](base, foo=bar, **kwargs): ...
```
we were mistakenly adding `**kwargs` to the same list as `base` (which
is just a list of expressions), rather than the same list as `foo=bar`
(which is a list of dictionary items)
The ultimate cause of this was the use of `! name` in `python.tsg` to
distinguish between bases and keyword arguments (only the latter of
which have the `name` field). Because `dictionary_splat` doesn't have a
`name` field either, these were mistakenly put in the wrong list,
leading to the error.
Also, because our previous test of `class` statements did not include a
`**kwargs` construction, we were not checking that the new parser
behaved correctly in this case. For the most part this was not a
problem, but on files that use syntax not supported by the old parser
(like type parameters on classes), this became an issue. This is also
why we did not see this error previously.
To fix this, we added `! value` (which is a field present on
`dictionary_splat` nodes) as a secondary filter, and added a third
stanza to handle `dictionary_splat` nodes.
2024-10-21 15:35:47 +00:00
Taus
ae4a4bb881
Python: Flip test expectation
...
This test should now validate that we no longer have dataset check
errors even when there are unencodable characters.
2024-10-21 15:32:23 +00:00
Taus
cc39ae57dc
Python: Fix dataset check error for string encoding
...
Here's an example of one of these errors:
```
INVALID_KEY predicate py_cobjectnames(@py_cobject obj, string name)
The key set {obj} does not functionally determine all fields. Here is a
pair of tuples that agree on the key set but differ at index 1: Tuple 1
in row 63874: (72088,"u'<X>'") Tuple 2 in row 63875: (72088,"u'<?>'")
```
(Here, the substring `X` should really be the Unicode character U+FFFD,
but for some reason I'm not allowed to put that in this commit message.)
Inside the extractor, we assign IDs based on the string type (bytestring
or Unicode) and a hash of the UTF-8 encoded content of the string. In
this case, however, certain _different_ strings were receiving the same
hash, due to replacement characters in the encoding process.
In particular, we were converting unencodable characters to question
marks in one place, and to U+FFFD in another place. This caused a
discrepancy that lead to the dataset check error.
To fix this, we put in a custom error handler that always puts the
U+FFFD character in place of unencodable characters. With this, the
strings now agree, and hence there is no clash.
2024-10-21 15:31:16 +00:00
Porcupiney Hairs
c7610b3539
Include change-note
2024-10-21 20:14:58 +05:30
Porcupiney Hairs
c93f0ed851
Include change-note
2024-10-21 20:12:46 +05:30
Jeroen Ketema
e36a1c717d
Merge branch 'main' into aliasperf2
2024-10-21 16:40:01 +02:00
Porcupiney Hairs
c74f6f587f
Merge branch 'main' into pyloadSsl
2024-10-21 20:09:05 +05:30
Porcupiney Hairs
f6369a6ed7
Include changes from review
2024-10-21 20:01:44 +05:30
Arthur Baars
490f81437b
Merge pull request #17804 from github/aibaars/local-defs-1
...
Rust: add ide-contextual-queries/localDefinitions.ql
2024-10-21 15:30:44 +02:00
Tom Hvitved
f72af4f1f3
Rust: Use Callable to define CfgScope
2024-10-21 15:22:04 +02:00
Tom Hvitved
c4c936d6fa
Rust: Speedup SummaryStats.ql
2024-10-21 15:21:13 +02:00
Michael Nebel
dec2c61e5d
Java: Update LdapInjection expected test output.
2024-10-21 15:19:46 +02:00
Michael Nebel
d59df1f938
Java: Re-generate JDK 17 models.
2024-10-21 15:19:45 +02:00
Michael Nebel
23d285c698
Java: Update model generator expected output.
2024-10-21 15:19:44 +02:00
Michael Nebel
786d04e939
Java: Add the clone method to the model generation exclusions.
2024-10-21 15:19:43 +02:00
Michael Nebel
7919dcfb12
Java: Add modelgenerator clone example.
2024-10-21 15:19:42 +02:00
Michael Nebel
e2ada2536b
Java: Update java.net expected output.
2024-10-21 15:19:41 +02:00
Michael Nebel
97f0037a7b
Java: Manually model InetSocketAddress as the model generator doesn't correctly taint the hostname.
2024-10-21 15:19:40 +02:00
Michael Nebel
0a931aa69f
Java: Add change note.
2024-10-21 15:19:38 +02:00
Michael Nebel
9a44eec04c
Java: Add manual models for FileReader (they would also have disappeared if models were re-generated without using mixed mode).
2024-10-21 15:19:37 +02:00
Michael Nebel
b356c3cd48
Java: Manually model ZipFile (due to CWE-522 compression bombs test failure).
2024-10-21 15:19:36 +02:00
Michael Nebel
f537e04532
Java: Update LdapInjection expected test output.
2024-10-21 15:19:35 +02:00
Michael Nebel
f7b38a8955
Java: Add some less precise models for BasicAttributes to get the models to work with search sink and re-generate SDK models.
2024-10-21 15:19:34 +02:00
Michael Nebel
e94cacd449
Java: Update test expected output where the query results are not affected.
2024-10-21 15:19:33 +02:00
Michael Nebel
24d1e9927b
Java: Update expected test output for the model editor tests.
2024-10-21 15:19:32 +02:00
Michael Nebel
ea14547643
Java: Update TopJdkApisTest expected output.
2024-10-21 15:19:31 +02:00
Michael Nebel
cbd9cc6dae
Java: Update request forgery expected output.
2024-10-21 15:19:30 +02:00
Michael Nebel
3b6f39931b
Java: Re-add generated (mixed) summaries and neutrals for the Java SDK 17.
2024-10-21 15:19:28 +02:00
Michael Nebel
f50734f0ee
Java: Delete all generated Java JDK models.
2024-10-21 15:19:27 +02:00
Tom Hvitved
e9adbf231f
Merge pull request #17816 from hvitved/rust/expr-trees-module
...
Rust: Move all expression CFG trees inside an `ExprTrees` module
2024-10-21 15:12:51 +02:00
Tom Hvitved
d2623cf4c3
Merge pull request #17814 from hvitved/rust/fix-bad-join
...
Rust: Fix bad join
2024-10-21 15:01:31 +02:00
Tom Hvitved
a6a68ef8be
Apply suggestions from code review
...
Co-authored-by: Simon Friis Vindum <paldepind@github.com >
2024-10-21 14:43:22 +02:00
Taus
d01593e571
Python: Add test for string encoding dataset check
...
Note that this test checks that the current setup creates dataset check
violations. A later commit will fix this (and flip the negation in the
test).
2024-10-21 12:08:46 +00:00
Tom Hvitved
1f5e02f539
Rust: Move all expression CFG trees inside an ExprTrees module
2024-10-21 13:41:11 +02:00
Simon Friis Vindum
85e59c9920
Merge branch 'main' into rust-saa-additions
2024-10-21 13:30:02 +02:00
Michael Nebel
1217c55c36
C#: Add change note.
2024-10-21 12:08:03 +02:00
Michael Nebel
191658f637
C#: Update expected test output.
2024-10-21 12:04:31 +02:00
Michael Nebel
b2b1a3ea65
C#: Consider string.ReplaceLineEndings(string) as a sanitizer for log forging.
2024-10-21 12:03:59 +02:00
Michael Nebel
0b8e83dc87
C#: Add log forging false positive example using ReplaceLineEndings.
2024-10-21 11:55:09 +02:00
Cornelius Riemenschneider
ce53964edf
Merge pull request #17812 from github/redsun82/rust-move-integration-tests
...
Rust: move integration tests to where other languages have them
2024-10-21 11:41:16 +02:00
Tom Hvitved
7e82595cae
Rust: Fix bad join
...
Before
```
Evaluated relational algebra for predicate MatchExprImpl::Impl::MatchExpr.getLastArm/0#dispred#24e5f4cf@9cf607tl with tuple counts:
660677 ~0% {4} r1 = SCAN `MatchExprImpl::Impl::MatchExpr.getArm/1#dispred#817de8a3` OUTPUT _, In.0, In.2, In.1
660677 ~0% {3} | REWRITE WITH Tmp.0 := 1, Out.0 := (Tmp.0 + In.3) KEEPING 3
5342095756 ~0% {3} | JOIN WITH `MatchArmList::Generated::MatchArmList.getNumberOfArms/0#dispred#9ad72f08_10#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.2
96597 ~3% {2} | JOIN WITH `MatchExpr::Generated::MatchExpr.getMatchArmList/0#dispred#11f1a73e` ON FIRST 2 OUTPUT Lhs.0, Lhs.2
return r1
```
After
```
Evaluated relational algebra for predicate MatchExprImpl::Impl::MatchExpr.getLastArm/0#dispred#24e5f4cf@9d7a92pu with tuple counts:
660677 ~0% {5} r1 = JOIN `MatchExprImpl::Impl::MatchExpr.getArm/1#344daffc` WITH `MatchExprImpl::Impl::MatchExpr.getNumberOfArms/0#ab0d8732` ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, _, Rhs.1
{4} | REWRITE WITH Tmp.3 := 1, Out.3 := (In.4 - Tmp.3), TEST Out.3 = InOut.1 KEEPING 4
96597 ~3% {2} | SCAN OUTPUT In.0, In.2
return r1
```
2024-10-21 11:40:13 +02:00
Simon Friis Vindum
5e4ce8f66d
Merge pull request #17800 from paldepind/rust-cfg-fixes
...
Rust: Various fixes to the CFG construction
2024-10-21 10:39:27 +02:00
Chris Smowton
5ba37bd7a3
Rename change note
2024-10-21 09:36:07 +01:00
Simon Friis Vindum
a1ebf98552
Merge branch 'main' into rust-cfg-fixes
2024-10-21 10:12:07 +02:00
Simon Friis Vindum
3ae04752c4
Rust: Accept less CFG inconsistencies
2024-10-21 10:07:11 +02:00
Simon Friis Vindum
9c172f62a4
Rust: Fix dead end in CFG for match expressions with no arms
2024-10-21 09:59:23 +02:00
Paolo Tranquilli
7b870d30a4
Rust: move integration tests to where other languages have them
2024-10-21 09:29:37 +02:00
Simon Friis Vindum
381f061e7f
Rust: Add CFG test for match with no arms
2024-10-21 09:29:28 +02:00
Simon Friis Vindum
e149071634
Merge pull request #17803 from paldepind/unreachable2
...
Rust: More test cases for rust/dead-code
2024-10-21 08:30:36 +02:00
Porcupiney Hairs
7ef2d79b3f
Include changes from review
2024-10-21 03:28:19 +05:30
Calum Grant
c5a082fd8e
C++: Fix CWE-022
2024-10-18 19:45:29 +01:00
Chris Smowton
241f951db1
Add change-note for Java buildless packaging its required Maven plugin
2024-10-18 17:43:18 +01:00
Chris Smowton
74ef91649b
Merge pull request #17780 from smowton/smowton/admin/add-buildless-maven-packaging-test
...
Java buildless: add tests checking usage of a local copy of the Maven dependency graph plugin
2024-10-18 17:38:59 +01:00
Arthur Baars
08af7d0007
Merge pull request #17810 from github/post-release-prep/codeql-cli-2.19.2
...
Post-release preparation for codeql-cli-2.19.2
2024-10-18 18:28:07 +02:00
github-actions[bot]
272f6c2541
Post-release preparation for codeql-cli-2.19.2
2024-10-18 15:56:02 +00:00
Arthur Baars
3990d0e11a
Merge pull request #17808 from github/release-prep/2.19.2
...
Release preparation for version 2.19.2
2024-10-18 17:36:23 +02:00
Arthur Baars
aaf220d41e
Fix typos in changelogs
2024-10-18 15:28:05 +00:00
github-actions[bot]
ca0345324e
Release preparation for version 2.19.2
2024-10-18 15:16:21 +00:00
Arthur Baars
7c15be1f02
Merge pull request #17806 from github/revert-17764-release-prep/2.19.2
...
Revert "Release preparation for version 2.19.2"
2024-10-18 17:13:50 +02:00
Arthur Baars
eb515f884b
Revert "Release preparation for version 2.19.2"
2024-10-18 17:06:20 +02:00
Calum Grant
0fcabc4e61
C++: Move mayBeFromImplicitlyDeclaredFunction to Call
2024-10-18 15:56:08 +01:00
Jami
c8d420ec57
Merge pull request #17795 from jcogs33/jcogs33/update-spring-csrf-qhelp-link
...
Java: update qhelp link for `java/spring-disabled-csrf-protection`
2024-10-18 10:11:37 -04:00
Arthur Baars
4a5a48a5b6
Rust: move PrintCfg to ide-contextual-queries
2024-10-18 16:11:18 +02:00
Arthur Baars
c9372b91f8
Rust: move ide-contextual-queries to the library pack
2024-10-18 16:11:17 +02:00
Arthur Baars
53744407ad
Rust: add localDefinitions.ql
2024-10-18 16:11:08 +02:00
Calum Grant
419780591a
C++: Resolve firstFormatArgumentIndex in FormattingFunction CP
2024-10-18 14:52:54 +01:00
Simon Friis Vindum
4ddc7a4592
Rust: Update unused value expected results
2024-10-18 15:49:52 +02:00
yoff
8cb339aa93
Merge pull request #17801 from yoff/python/extra-std-models
...
Python: extra modelling of stdlib
2024-10-18 15:32:01 +02:00
Jami Cogswell
335c59792c
Java: remove unnecessary anchor and update page name
2024-10-18 09:26:56 -04:00
Rasmus Lerchedahl Petersen
30e5a12230
Python: udate expectations
2024-10-18 15:14:51 +02:00
Simon Friis Vindum
b665f45ffa
Merge branch 'main' into unreachable2
2024-10-18 15:13:40 +02:00
Chuan-kai Lin
41e811773c
Merge pull request #17648 from github/cklin/dataflow-diff-informed-filtering
...
Dataflow: apply diff-informed filtering consistently
2024-10-18 06:02:28 -07:00
Rasmus Lerchedahl Petersen
30053da70d
Python: extra modelling of stdlib
...
as a reaction to the latest QA run
2024-10-18 13:49:33 +02:00
Simon Friis Vindum
b1e85d1ad8
Rust: Refactor BreakExprTree to use StandardPostOrderTree
2024-10-18 13:30:36 +02:00
Simon Friis Vindum
28f111b7c0
Rust: Remove erroneous CFG edge from return to break
2024-10-18 13:26:11 +02:00
Simon Friis Vindum
4ca6b0eceb
Rust: Add a CFG test for a return within a break
2024-10-18 13:22:39 +02:00
Simon Friis Vindum
6568eb80a2
Rust: Refactor CFG pattern tree implementation
2024-10-18 12:52:56 +02:00
Simon Friis Vindum
7aa28a0449
Rust: Fix multiple CFG successors in range pattern without lower bound
2024-10-18 11:19:21 +02:00
Simon Friis Vindum
b0625f83c6
Rust: Add CFG test of range patterns
2024-10-18 11:19:19 +02:00
Simon Friis Vindum
272d12fee1
Rust: Step correctly over method arguments
...
Previously the math was wrong and the first argument (with `i` being `0`) had two edges out of it.
2024-10-18 11:19:07 +02:00
Owen Mansel-Chan
f3abe549f3
Merge pull request #17794 from owen-mc/go/ast-viewer-typeparamdecl
...
Go: Fix type param declarations in AST viewer
2024-10-18 10:14:51 +01:00
Owen Mansel-Chan
b0376d500c
Merge pull request #17792 from owen-mc/go/lookthrough-pointer-type
...
Go: Add helper predicate `lookThroughPointerType`
2024-10-18 09:30:46 +01:00
Owen Mansel-Chan
bacf448388
Add change note
2024-10-17 22:06:49 +01:00
Jami Cogswell
88b7a9fcb5
Java: update qhelp link
2024-10-17 16:38:53 -04:00
Chris Smowton
8b0bd8c8ad
Adjust test expectations
2024-10-17 20:42:41 +01:00
Chris Smowton
13f19481db
Add tests checking Maven retrieves the depgraph plugin from our shipped repo, and produces the expected settings.xml file in the process
2024-10-17 20:42:40 +01:00
Arthur Baars
6e197b5802
Merge pull request #17773 from geoffw0/unusedval2
...
Rust: Implement UnusedValue.ql (2)
2024-10-17 21:03:24 +02:00
Dave Bartolomeo
639864e94d
Handle may vs. must for EntireAllocationMemoryLocation
2024-10-17 19:50:50 +01:00
Chuan-kai Lin
1aa3eb527f
Dataflow: apply diff-informed filtering consistently
2024-10-17 10:23:38 -07:00
yoff
b07c788a08
Merge pull request #17793 from github/tausbn/python-update-docs-for-python-3.13
...
Python: Update supported-versions-compilers.rst
2024-10-17 16:59:08 +02:00
Owen Mansel-Chan
7ed82068ef
Add type param decls to AST viewer hierarchy
2024-10-17 15:39:16 +01:00
Geoffrey White
e1aaa136b2
Rust: Add variants with pattern matching for unreachable_let_1 and 2.
2024-10-17 15:38:47 +01:00
Taus
bf920605b2
Python: Update supported-versions-compilers.rst
...
Adds Python 3.13 to the list.
We might want to consider shortening the list to something like "3.5 - 3.13" at some point.
Also, once we're finally rid of standard library extraction, we should update footnote 8 accordingly.
2024-10-17 16:38:10 +02:00
Owen Mansel-Chan
b8ea8400d1
Add type param decls to PrintAST tests
2024-10-17 15:37:31 +01:00
Geoffrey White
3d0c86e176
Rust: Test spacing.
2024-10-17 15:37:03 +01:00
Jeroen Ketema
064ec91fa2
Merge pull request #17778 from jketema/param-name
...
C++: Improve parameter naming
2024-10-17 16:29:10 +02:00
Simon Friis Vindum
b2032fc6fd
Rust: Only normal completion of a let statement initializer steps to the pattern
2024-10-17 16:28:57 +02:00
Simon Friis Vindum
e6f1edcbb5
Rust: Conditional completion of match arm expression should now flow to next arm
2024-10-17 16:25:19 +02:00
Simon Friis Vindum
04f2062942
Rust: Label the non-return CFG edge out of question mark as match
2024-10-17 16:22:07 +02:00
Simon Friis Vindum
fd5d6255c1
Rust: Avoid creating CFG scopes for trait signatures without implementations
2024-10-17 16:20:30 +02:00
Simon Friis Vindum
b0cd44e47f
Rust: Add CFG test cases
2024-10-17 16:09:17 +02:00
Owen Mansel-Chan
1318504aa5
Add QLDoc
2024-10-17 12:06:46 +01:00
Owen Mansel-Chan
87992fac88
Revert change to hasEmbeddedField
2024-10-17 11:50:17 +01:00
Mathias Vorreiter Pedersen
b9205b13d6
Merge pull request #17788 from MathiasVP/better-function-pointer-resolution
...
C++: Improve function pointer resolution
2024-10-17 11:27:43 +01:00
Owen Mansel-Chan
5007666d6e
Add helper predicate lookThroughPointerType
2024-10-17 11:26:24 +01:00
Mathias Vorreiter Pedersen
5e04358ece
Update cpp/ql/lib/change-notes/2024-10-16-new-api-for-call-target-resolution.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2024-10-17 10:57:30 +01:00
Calum Grant
4341fab794
C++: Reject invalid results from getFirstFormatArgumentIndex()
2024-10-17 10:50:44 +01:00
Simon Friis Vindum
2d1c62b6df
Rust: Fix dead end in CFG for empty tuple and struct patterns
2024-10-17 10:40:34 +02:00
Simon Friis Vindum
b97ec405d0
Rust: Add CFG tests with empty tuple and struct patterns
2024-10-17 10:34:49 +02:00
Mathias Vorreiter Pedersen
baab74cb35
C++: Add change notes.
2024-10-16 17:45:44 +01:00
Geoffrey White
e21959d7bb
Rust: Add more unreachable test cases.
2024-10-16 17:34:57 +01:00
Geoffrey White
a92de0df93
Rust: Test spacing.
2024-10-16 16:56:12 +01:00
Calum Grant
5315a5cfbf
C++: Tweak test
2024-10-16 15:47:34 +01:00
Anders Schack-Mulligen
4153a83a4f
Python: Add workaround.
2024-10-16 16:14:51 +02:00
Anders Schack-Mulligen
5950c336e2
Python: Refactor references to NormalCall.
2024-10-16 16:04:31 +02:00
Mathias Vorreiter Pedersen
a99d57640a
C++: Add a new API for getting the target of a 'Call' expression.
2024-10-16 14:45:44 +01:00
Geoffrey White
7e2542bd74
Rust: Accept consistency check failures.
2024-10-16 14:32:16 +01:00
Geoffrey White
7d62cdad71
Merge pull request #17774 from geoffw0/astcount
...
Rust: Count number of AST inconsistencies
2024-10-16 14:17:39 +01:00
Mathias Vorreiter Pedersen
2dbf75fde9
C++: Accept test changes.
2024-10-16 14:15:05 +01:00
Mathias Vorreiter Pedersen
30e0781778
C++: Also check for source calls when using 'lambda call resolution'.
2024-10-16 14:14:52 +01:00
Mathias Vorreiter Pedersen
9ea4c40ca9
C++: Add failing test.
2024-10-16 14:13:55 +01:00
Simon Friis Vindum
76e1885355
Rust: Make mutable variables that are only borrowed immutably amenable for SSA
2024-10-16 15:07:46 +02:00
Simon Friis Vindum
577afc3fd5
Rust: Support capture of mutable variables in SSA
2024-10-16 14:57:46 +02:00
Calum Grant
9758e023f9
C++: Remove redundant test
2024-10-16 13:47:06 +01:00
Calum Grant
ceceee1947
C++: Add test for mixed implicit/explicit function declarations
2024-10-16 13:46:06 +01:00
Anders Schack-Mulligen
42d35f8b9d
Ruby: Exclude some cases that are unlikely library calls.
2024-10-16 14:35:23 +02:00
Anders Schack-Mulligen
c20f12fa6c
Add qldoc.
2024-10-16 14:35:23 +02:00
Anders Schack-Mulligen
9ca8a27bae
C/C++: Accept test changes.
2024-10-16 14:35:22 +02:00
Anders Schack-Mulligen
4e8a4a5cdd
C/C++: Add tentative support for speculative taint flow.
2024-10-16 14:35:22 +02:00
Anders Schack-Mulligen
fae71756eb
Go: Add tentative support for speculative taint flow.
2024-10-16 14:35:21 +02:00
Anders Schack-Mulligen
635071fe8a
Swift: Add tentative support for speculative taint flow.
2024-10-16 14:35:21 +02:00
Anders Schack-Mulligen
7497d9530d
Python: Add tentative support for speculative taint flow.
2024-10-16 14:35:20 +02:00
Anders Schack-Mulligen
8eb0cb4c66
Ruby: Add tentative support for speculative taint flow.
2024-10-16 14:35:20 +02:00
Anders Schack-Mulligen
7b43100af5
C#: Add support for speculative taint flow.
2024-10-16 14:35:19 +02:00
Anders Schack-Mulligen
6c6b6061bc
Dataflow: Add consistency check.
2024-10-16 14:35:19 +02:00
Anders Schack-Mulligen
8b99154a00
Java: Add support for speculative taint flow.
2024-10-16 14:35:19 +02:00
Anders Schack-Mulligen
7d123296f8
Dataflow: Add speculative flow modules.
2024-10-16 14:35:18 +02:00
Anders Schack-Mulligen
c80627a3d3
Dataflow: add plumbing for adding provenance to state-steps.
2024-10-16 14:35:18 +02:00
Jeroen Ketema
bee073dee5
Merge pull request #17776 from jketema/parent-scope
...
C++: Add missing parent scope cases
2024-10-16 13:12:24 +02:00
Simon Friis Vindum
a1db359ba1
Rust: Add variable tests involving borrowing and capture
2024-10-16 13:05:53 +02:00
yoff
6cb607e087
Merge pull request #17779 from github/tausbn/python-run-replace-test
...
Python: Add `copy.replace` test to list of runnable tests
2024-10-16 13:01:49 +02:00
Geoffrey White
4577d1ce06
Rust: Additional test cases.
2024-10-16 11:38:30 +01:00
Jeroen Ketema
1eb0b49634
C++: Improve parameter naming
2024-10-16 11:33:18 +02:00
Calum Grant
d88a674a15
C++: Change note for mayBeFromImplicitlyDeclaredFunction
2024-10-16 10:27:54 +01:00
Calum Grant
6a48ad0ee7
C++: Implement Expr::mayBeFromImplicitlyDeclaredFunction
2024-10-16 10:23:39 +01:00
Paolo Tranquilli
79c3728d1f
Merge pull request #17719 from github/redsun82/bazel-lfs
...
Bazel: skip git lfs endpoints presenting malformed data, and print workaround
2024-10-16 10:57:30 +02:00
Calum Grant
853128c9c3
C++: Clean up false-positives
...
C++: Change note
2024-10-16 09:46:26 +01:00
Paolo Tranquilli
8f451515e0
Bazel: print workaround for git_lfs_probe.py failing
2024-10-16 10:16:38 +02:00
Paolo Tranquilli
fd31e6d813
Bazel: skip git lfs endpoints presenting malformed data
2024-10-16 10:01:19 +02:00
Taus
65dbc1de91
Python: Add copy.replace test to list of runnable tests
2024-10-15 18:17:00 +02:00
Taus
28f8874243
Merge pull request #17688 from github/tausbn/python-3.13-default-type-parser-support
...
Python: Add support for type parameter defaults
2024-10-15 18:01:51 +02:00
Taus
d4e0cb2ffa
Merge pull request #17767 from github/tausbn/python-3.13-model-flow-in-replace
...
Python: Model `copy.replace`
2024-10-15 18:01:28 +02:00
Geoffrey White
5b667026cb
Rust: More fixup after some line numbers changed.
2024-10-15 16:17:03 +01:00
Jeroen Ketema
22b8e2cbb4
C++: Add missing parent scope cases
2024-10-15 17:16:58 +02:00
Calum Grant
fe85e007b3
C++: Add test for cpp/wrong-type-format-argument
2024-10-15 16:09:35 +01:00
Paolo Tranquilli
886c7f1f7a
Merge pull request #17771 from github/redsun82/rust-codegen
...
Rust: fix codegen to allow `--force` again
2024-10-15 17:08:39 +02:00
Owen Mansel-Chan
5efb88ed1f
Merge pull request #17737 from owen-mc/go/extractor/objecttypes-consistency-generics-2
...
Go: extractor/objecttypes consistency generics (second try)
2024-10-15 15:50:45 +01:00
Paolo Tranquilli
2c970a080d
Rust: remove useless blank line
...
Co-authored-by: Simon Friis Vindum <simonfv@gmail.com >
2024-10-15 16:50:15 +02:00
Geoffrey White
feed0ebeca
Rust: Autoformat.
2024-10-15 15:49:56 +01:00
Geoffrey White
f9eca42ded
Merge pull request #17763 from geoffw0/cfgcount3
...
Rust: Count number of CFG inconsistencies
2024-10-15 15:43:39 +01:00
Geoffrey White
2a68d3e46e
Rust: Put Yes, No back in the logical order.
2024-10-15 15:31:34 +01:00
Geoffrey White
84a74d910d
Rust: Fixup after merging main.
2024-10-15 15:24:43 +01:00
Tom Hvitved
88f6d3b5ea
Rust: Implement UnusedValue.ql
2024-10-15 15:05:39 +01:00
Ian Lynagh
196baa99b2
Merge pull request #17769 from igfoo/igfoo/2.1.0-beta2
...
Kotlin: Fix for 2.1.0-Beta2
2024-10-15 14:56:55 +01:00
Arthur Baars
bdec751527
Merge pull request #17768 from github/post-release-prep/codeql-cli-2.19.2
...
Post-release preparation for codeql-cli-2.19.2
2024-10-15 15:33:42 +02:00
Geoffrey White
f07f6188ae
Rust: Make rust/summary/summary-statistics a metric query so that we can access data in the DCA job.
2024-10-15 14:19:46 +01:00
Geoffrey White
f4d4925239
Rust: Address QL-for-QL complaint.
2024-10-15 14:19:45 +01:00
Geoffrey White
2be5ce4f7a
Rust: Change rust/summary/summary-statistics to a diagnostic query, so that it gets run as a diagnmetric query for DCA.
2024-10-15 14:19:44 +01:00
Geoffrey White
e8953fb5e4
Rust: Add diagnostic query for AST inconsistency counts.
2024-10-15 14:19:43 +01:00
Geoffrey White
e01ecd1b79
Rust: Calculate a total of AST inconsistencies.
2024-10-15 14:19:42 +01:00
Geoffrey White
2d019eb00e
Rust: Add QLDoc to the AST consistency rules and make their output more consistent.
2024-10-15 14:19:40 +01:00
Geoffrey White
b5c88c7bfe
Rust: Give the extraction consistency query metadata as well.
2024-10-15 14:19:39 +01:00
Geoffrey White
414fcf836e
Rust: Move the AST consistency logic to a .qll.
2024-10-15 14:19:38 +01:00
Geoffrey White
79c5adfc9a
Rust: Use correct versions of the consistency predicates.
2024-10-15 14:10:51 +01:00
Paolo Tranquilli
1d9767a163
Merge pull request #17770 from github/redsun82/rust-callable-base
...
Rust: Add `Callable` as a base class of `Function` and `ClosureExpr`
2024-10-15 15:00:59 +02:00
Paolo Tranquilli
8e31abaefe
Rust: fix codegen to allow --force
...
This passes command line arguments to codegen, allowing in particular
`--force` to be passed.
Also, a convenience `//rust/codegen:py` is added to only run the python
based code generation, which will be faster and enough when
`ast-generator` is unchanged.
2024-10-15 14:37:30 +02:00
Jeroen Ketema
50ec2549c0
Merge pull request #17740 from jketema/requires
...
C++: Add support for C++ requires expressions
2024-10-15 14:32:28 +02:00
Paolo Tranquilli
bd08bc7923
Rust: address review
2024-10-15 14:21:11 +02:00
Ian Lynagh
b5bfd06624
Kotlin: Fix for 2.1.0-Beta2
...
We need to catch a different exception now.
2024-10-15 13:17:26 +01:00
github-actions[bot]
079ab77a38
Post-release preparation for codeql-cli-2.19.2
2024-10-15 12:16:59 +00:00
Taus
3b60d8302b
Python: Add change note
2024-10-15 12:14:20 +00:00
Taus
778b96aa39
Python: Update test expectations
2024-10-15 12:14:19 +00:00
Taus
eaef783f4b
Python: Add partial model for copy.replace
...
Extends our modelling to partially cover the behaviour of
`copy.replace`. In particular, we model this in two ways:
Firstly, we extend the existing Models-as-Data row for `copy` and
`deepcopy` to also cover `replace`. This means that we treat the result
of `replace` as containing all of the fields of the original object.
This is somewhat _more_ than we want, as strictly speaking the fields
that are overwritten should _not_ propagate flow through the `replace`
call, but currently we don't have a good way of modelling this blocking
of flow.
Secondly, we add a flow summary that adds flow from named arguments of
the `replace` call to the corresponding fields on the base object. This
ensures that we at least have the new flow arising from the `replace`
call.
Note that the flow summary adds this flow for _all_ named arguments of
_all_ `replace` calls throughout the codebase. However, since any
particular `replace` call will only populate a subset of these (the
subset consisting of exactly those named arguments that are in that
particular call), this does not cause any unwanted crosstalk between
different `replace` calls.§
2024-10-15 12:14:19 +00:00
Paolo Tranquilli
5b2eb88672
Merge pull request #17766 from github/aibaars/fix-cwe-link
...
Fix CWE coverage link in main index
2024-10-15 14:05:50 +02:00
Taus
6f2cfa0ba8
Python: Update CopySummary to use getMaDRepresentation
...
Demonstrates the somewhat more ergonomic way to use
`getMaDRepresentation` when specifying summaries.
Note that this slightly extends the previous definition, in that
`DictionaryContentAny` is now _also_ propagated by a call to the
`.copy()` method, but I think this is correct.
2024-10-15 11:52:37 +00:00
Taus
ce914019c5
Python: Add getMaDRepresentation()
...
This adds a convenient way of getting the Models-as-Data representation
of a particular type of content. This avoids repeating the same
construction over and over in our various summaries. Currently this is
defined for all types of content except the captured variable content,
which to my knowledge doesn't have any representation in Models-as-Data.
2024-10-15 11:50:38 +00:00
Taus
e16405c675
Python: Add test for copy.replace
...
This test demonstrates the current state of affairs: that `copy.replace`
essentially blocks all flow of taint through it, because it has not been
modelled yet.
2024-10-15 11:48:43 +00:00
Jeroen Ketema
168f7f5d34
C++: Add support for C++ requires expressions
2024-10-15 13:44:17 +02:00
Arthur Baars
af6fc676ce
Fix CWE coverage link in main index
2024-10-15 13:34:38 +02:00
Taus
417e60a466
Python: Update extractor version
2024-10-15 11:22:54 +00:00
Taus
d905010aa8
Python: Add change note
2024-10-15 11:22:34 +00:00
Taus
8630f57710
Python: Add up-/downgrade scripts
...
Adds up- and downgrade scripts for the support for type parameter
defaults.
In the upgrade direction we do nothing, matching the behaviour of
`getDefault` not having a result for old databases.
In the downgrade direction, we explicitly remove the relevant child (via
the `py_exprs` database relation) for `TypeVar`, `TypeVarTuple`, and
`ParamSpec` parameters.
2024-10-15 11:22:33 +00:00
Taus
819b3d77ab
Python: Update test expectations
...
Note that this still includes the somewhat puzzling parsing of
`Spam[**P2]` as an exponentiation with an empty left hand side. When we
fix that bug, we should also update this test to contain actually valid
syntax.
2024-10-15 11:22:33 +00:00
Taus
182a192cc0
Python: Regenerate dbscheme/AST
2024-10-15 11:22:33 +00:00
Taus
36d89745f9
Python: Fix dbscheme/AST autogeneration
...
There was an errant `ql` in the relevant paths, a leftover from the move
from the internal repo. Also, we can no longer rely on an intree version
of the CodeQL CLI, so from now on we'll just assume it's present in the
path. (On Codespaces, `gh codeql` is a decent replacement, especially if
using the `install-stub` functionality.
2024-10-15 11:22:32 +00:00
Taus
2af0d78435
Python: Add default field to the relevant AST nodes
2024-10-15 11:22:32 +00:00
Taus
55ee3eb36b
Python: Add TSG support for type defaults
2024-10-15 11:22:31 +00:00
Taus
6545bfffa7
Python: Regenerate parser files
...
Two new files -- alloc.h and array.h -- suddenly appeared. Presumably
they are used by the somewhat newer version of tree-sitter. To be safe,
I included them in this commit.
2024-10-15 11:22:31 +00:00
Taus
882249ef82
Python: Add grammar support for type defaults
...
Also fixes an oversight in the grammar: starred expressions should be
allowed inside the subscript of an `Index` expression.
2024-10-15 11:22:30 +00:00
Taus
1ced5b44d7
Python: Add test for type parameter defaults
2024-10-15 11:22:30 +00:00
Arthur Baars
15bc417a17
Merge pull request #17764 from github/release-prep/2.19.2
...
Release preparation for version 2.19.2
2024-10-15 13:08:40 +02:00
Arthur Baars
9ba8045837
Fix typos in changelog entries
2024-10-15 11:06:20 +00:00
Ian Lynagh
24d98eef83
Merge pull request #17741 from github/igfoo/logverb
...
Kotlin: Log our verbosity level
2024-10-15 11:42:15 +01:00
Geoffrey White
abc4981300
Rust: Address QL-for-QL complaint.
2024-10-15 11:30:03 +01:00
github-actions[bot]
255f55cf1a
Release preparation for version 2.19.2
2024-10-15 10:29:25 +00:00
Geoffrey White
983179b84e
Rust: Autoformat.
2024-10-15 11:23:16 +01:00
Owen Mansel-Chan
1626af0ae1
Merge pull request #17748 from owen-mc/go/join-order-fix/data-flow-node-gettype
...
Go: Fix bad join order in `SummarizedParameterNode.gettype`
2024-10-15 10:14:38 +01:00
Paolo Tranquilli
248eb7f00c
Merge branch 'main' into rust/callable-base
2024-10-15 11:03:11 +02:00
Geoffrey White
7d9a3e1399
Merge pull request #17756 from geoffw0/unusedvar6
...
Rust: More test cases for rust/unused-variable
2024-10-15 10:02:37 +01:00
Arthur Baars
508e8157b3
Merge pull request #17746 from github/aibaars/macro-pat-irrefutable
...
Rust: add MacroPat to isExhaustiveMatch
2024-10-15 10:45:06 +02:00
Geoffrey White
5e33d9a145
Rust: Further changes from code review.
2024-10-15 09:38:17 +01:00
Geoffrey White
8169ccd21e
Apply suggestions from code review
...
Co-authored-by: Simon Friis Vindum <paldepind@github.com >
2024-10-15 09:36:09 +01:00
Simon Friis Vindum
cc1e33fb64
Merge pull request #17713 from hvitved/rust/ssa
...
Rust: Initial SSA implementation
2024-10-15 09:59:48 +02:00
Geoffrey White
57875554f4
Rust: Accept consistency failures in the new test cases.
2024-10-14 17:06:55 +01:00
Geoffrey White
e5885f65db
Rust: Add more test cases for unused variables and unreachable code.
2024-10-14 16:25:18 +01:00
Geoffrey White
528641c55a
Rust: Test spacing.
2024-10-14 16:25:17 +01:00
Geoffrey White
134539060d
Rust: correct some 'spurious' annotations that are off by one line.
2024-10-14 16:24:44 +01:00
Geoffrey White
25b592fc89
Merge pull request #17744 from geoffw0/unusedvar5
...
Rust: Unused variable follow-up work
2024-10-14 16:20:52 +01:00
Taus
5115216c2d
Merge pull request #17755 from github/python/more-adj
...
python: more adjustments...
2024-10-14 17:16:16 +02:00
yoff
da5e9ac18c
python: more adjustments...
2024-10-14 14:54:33 +00:00
Edward Minnix III
ade5686e52
Merge pull request #17335 from egregius313/egregius313/go/dataflow/models/stdin
...
Go: Implement `stdin` models
2024-10-14 10:38:27 -04:00
Taus
96ea9507a4
Merge pull request #17754 from github/python/extractor-expectations
...
python: update extractor expectations
2024-10-14 16:35:06 +02:00
yoff
9d8d7ab237
python: update extractor expectations
2024-10-14 14:14:40 +00:00
Arthur Baars
ae7afa7aff
Update rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll
...
Co-authored-by: Simon Friis Vindum <simonfv@gmail.com >
2024-10-14 15:20:43 +02:00
Arthur Baars
867c8a7fa6
Merge branch 'main' into aibaars/macro-pat-irrefutable
2024-10-14 15:02:28 +02:00
Simon Friis Vindum
ef1592fe32
Merge pull request #17751 from paldepind/rust-rename-predicate
...
Rust: Rename isIrrefutablePattern to isExhaustiveMatch
2024-10-14 14:47:15 +02:00
Arthur Baars
493a68a232
Rust: add MacroPat to isExhaustiveMatch
2024-10-14 13:55:59 +02:00
Simon Friis Vindum
22261c1480
Rust: Rename isIrrefutablePattern to isExhaustiveMatch
2024-10-14 13:43:57 +02:00
Simon Friis Vindum
d0f978d937
Merge pull request #17749 from paldepind/rust-cfg-handle-question-mark
...
Rust: Handle question mark operator in CFG
2024-10-14 13:19:46 +02:00
Arthur Baars
de612963de
Merge pull request #17750 from yoff/python/extractor-test-expectaionts
...
Python: adjust test expectations for extractor test
2024-10-14 12:54:15 +02:00
Rasmus Lerchedahl Petersen
3402a729d0
Python: adjust test expectations for extractor test
2024-10-14 12:36:56 +02:00
Simon Friis Vindum
e83f1d17bf
Rust: Simplify return implementation in CFG
2024-10-14 11:40:35 +02:00
Simon Friis Vindum
8e4e663739
Rust: Handle question mark operator in CFG
2024-10-14 11:38:35 +02:00
Simon Friis Vindum
2f07f1c730
Rust: Abnormal completion in scrutinee does not continue to match arms
2024-10-14 11:32:22 +02:00
Simon Friis Vindum
23ee7b955c
Rust: Add CFG tests for question mark operator and scrutinee with return
2024-10-14 11:27:32 +02:00
Owen Mansel-Chan
1456ec2119
Fix bad join order in SummarizedParameterNode.gettype
...
Specifically the disjunct for this.getPos() != -1. Running on
uber/aresdb, before we had this:
2403 ~1% {3} r6 = JOIN `DataFlowUtil::SummarizedParameterNode.getPos/0#dispred#70a2aab4` WITH `DataFlowPrivate::FlowSummaryNode.getSummarizedCallable/0#dispred#e79ea9be` ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Rhs.1
9149774 ~5% {4} | JOIN WITH `Types::SignatureType.getParameterType/1#dispred#2c11bb7b_102#join_rhs` ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1, Rhs.2
923 ~9% {2} | JOIN WITH `Scopes::Callable.getType/0#dispred#55a0e6a2` ON FIRST 2 OUTPUT Lhs.2, Lhs.3
We add a binding pragma to make it not bind on this.getPos() until
necessary. After we have this:
2403 ~0% {3} r6 = JOIN `DataFlowUtil::SummarizedParameterNode.getPos/0#dispred#70a2aab4` WITH `DataFlowPrivate::FlowSummaryNode.getSummarizedCallable/0#dispred#e79ea9be` ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
2373 ~0% {3} | JOIN WITH `Scopes::Callable.getType/0#dispred#55a0e6a2` ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1
923 ~9% {2} | JOIN WITH `Types::SignatureType.getParameterType/1#dispred#2c11bb7b` ON FIRST 2 OUTPUT Lhs.2, Rhs.2
2024-10-13 14:27:51 +01:00
Tom Hvitved
6290be2922
Rust: Initial SSA implementation
2024-10-11 19:39:28 +02:00
Tom Hvitved
b0ea175021
Rust: Add more variables tests
2024-10-11 19:36:04 +02:00
yoff
8f681154ce
Merge pull request #17683 from yoff/python/flip-default-for-stdlib-extraction
...
Python: Flip default for stdlib extraction
2024-10-11 18:34:44 +02:00
Geoffrey White
c4256f21c7
Rust: Fix out-of-date spurious tags.
2024-10-11 17:18:41 +01:00
Geoffrey White
ac9a8d602c
Rust: Add metadata to the original CFG consistency query.
2024-10-11 17:01:47 +01:00
Geoffrey White
d4c3e3323f
Rust: Add diagnostic query for CFG inconsistency counts.
2024-10-11 17:01:46 +01:00
Geoffrey White
7b712f3d65
Rust: Calculate a total of CFG inconsistencies.
2024-10-11 17:01:41 +01:00
Geoffrey White
4398c83a67
Rust: Add more QLDoc to the CFG consistency library.
2024-10-11 16:53:46 +01:00
Geoffrey White
85f2582afd
Rust: Move CFG consistency logic into a library.
2024-10-11 16:53:45 +01:00
Paolo Tranquilli
5b57826915
Merge pull request #17659 from github/aibaars/rust-macros
...
Rust: add macro expansion to the extractor
2024-10-11 17:29:29 +02:00
Ian Lynagh
9f340279cb
Kotlin: Accept test changes
2024-10-11 15:10:19 +01:00
yoff
2af60f1390
Merge pull request #17712 from yoff/python/re-finditer-match
...
Python: model that `re.finditer` returns an iterable of `re.Match` objects
2024-10-11 16:08:49 +02:00
Arthur Baars
fc298b23c9
Rust: address comment
2024-10-11 16:01:13 +02:00
Arthur Baars
5f45402cf7
Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros
2024-10-11 15:40:07 +02:00
Rasmus Lerchedahl Petersen
5650694313
Python: update tests
2024-10-11 15:36:44 +02:00
Rasmus Lerchedahl Petersen
e2eb08b543
Python: improve messaging
2024-10-11 15:36:44 +02:00
Rasmus Lerchedahl Petersen
22588c9f85
Python: update ectractor version
2024-10-11 15:36:44 +02:00
Rasmus Lerchedahl Petersen
c013d4a59c
Python: update test expectations
2024-10-11 15:36:44 +02:00
Rasmus Lerchedahl Petersen
4a291147e0
Python: only look for the py2 stdlib if we extract std lib
2024-10-11 15:36:44 +02:00
Rasmus Lerchedahl Petersen
bb78c2a67e
Python: update test expectations
2024-10-11 15:36:44 +02:00
Rasmus Lerchedahl Petersen
e91efaa92e
python: do not extract stdlib by default
2024-10-11 15:36:44 +02:00
Ian Lynagh
156ddd3fae
Kotlin: Log our verbosity level
...
This happens at `info` level, which is logged by default.
2024-10-11 14:24:25 +01:00
Tom Hvitved
ac8b9739c5
Merge pull request #17686 from hvitved/rust/cfg-patterns
...
Rust: Include parameters and patterns in the CFG
2024-10-11 14:45:27 +02:00
Tom Hvitved
ffd6b9864c
Address review comments
2024-10-11 14:27:42 +02:00
Arthur Baars
659ce6f1ca
Rust: fix CodeQL alert
2024-10-11 13:45:10 +02:00
Arthur Baars
b4bb24aa43
Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros
2024-10-11 13:33:50 +02:00
Arthur Baars
6ade2a8054
Rust: address comments
2024-10-11 13:11:12 +02:00
Tom Hvitved
0ec40afa4c
Rust: Update expected test output
2024-10-11 12:44:35 +02:00
Owen Mansel-Chan
9381dda4a9
Use un-specialized field when extracting struct types
2024-10-11 11:30:02 +01:00
Owen Mansel-Chan
6bf6ed6f48
Add check for object for specialized named type
2024-10-11 11:30:00 +01:00
Owen Mansel-Chan
a810309160
Add check for specialized objects
2024-10-11 11:29:58 +01:00
Owen Mansel-Chan
45710e23c6
Always use generic method object
2024-10-11 11:29:57 +01:00
Tom Hvitved
8cc349e85f
Rust: Run codegen
2024-10-11 12:01:16 +02:00
Tom Hvitved
b284a2a7c0
Rust: Add Callable as a base class of Function and ClosureExpr
2024-10-11 12:00:30 +02:00
Paolo Tranquilli
854d7660eb
Merge pull request #17730 from github/redsun82/codegen-annotate
...
Rust: insert `CallExprBase` in the hierarchy
2024-10-11 10:59:40 +02:00
Jeroen Ketema
57c6e4d9cb
Merge pull request #17734 from jketema/handle-print
...
C++: Print handler parameters in PrintAST
2024-10-11 10:53:27 +02:00
Paolo Tranquilli
f3bf347bd6
Merge branch 'main' into redsun82/codegen-annotate
2024-10-11 10:38:02 +02:00
Arthur Baars
9fad5410c0
Rust: implement CFG for macros
2024-10-11 10:37:24 +02:00
Paolo Tranquilli
c66bd72620
Rust: rename to CallExprBase
2024-10-11 09:52:30 +02:00
Ian Lynagh
575eb24073
Merge pull request #17735 from github/revert-17709-go/extractor/objecttypes-consistency-generics
...
Revert "Go: extractor/objecttypes consistency generics"
2024-10-10 22:20:03 +01:00
Owen Mansel-Chan
d013c8940d
Revert "Go: extractor/objecttypes consistency generics"
2024-10-10 21:37:44 +01:00
Tom Hvitved
756affa4aa
Rust: Fix bugs in LetExprTree and MethodCallExprTree
2024-10-10 21:05:01 +02:00
Tom Hvitved
2f14ec9f2a
Rust: Include patterns in the CFG
2024-10-10 21:05:00 +02:00
Tom Hvitved
f6f54c6e3b
Rust: Include parameters in the CFG
2024-10-10 21:04:58 +02:00
Tom Hvitved
665da3958a
Rust: Add CFG test for nested function
2024-10-10 21:04:57 +02:00
Jeroen Ketema
f1a350c96a
C++: Print handler parameters in PrintAST
2024-10-10 20:47:12 +02:00
Owen Mansel-Chan
d0f73acc25
Merge pull request #17709 from owen-mc/go/extractor/objecttypes-consistency-generics
...
Go: extractor/objecttypes consistency generics
2024-10-10 17:30:03 +01:00
Geoffrey White
b692b1b282
C++: Autoformat.
2024-10-10 17:26:38 +01:00
Geoffrey White
cedfeee6d7
Merge branch 'main' into aliasperf2
2024-10-10 17:25:45 +01:00
Tom Hvitved
5f353b72cd
Merge pull request #17727 from github/aibaars/modifiers
...
Rust: add extraction of all sorts of modifier tokens
2024-10-10 18:00:21 +02:00
Simon Friis Vindum
1398575b97
Merge pull request #17728 from paldepind/rust-remove-unused-types
...
Rust: Remove unused types
2024-10-10 17:33:59 +02:00
Geoffrey White
04c7319b6b
Merge pull request #17647 from geoffw0/warnings
...
Rust: More information about extractor errors and warnings
2024-10-10 16:19:15 +01:00
Geoffrey White
7420d07935
Update ruby/ql/lib/codeql/ruby/AST.qll
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2024-10-10 15:54:14 +01:00
Mathias Vorreiter Pedersen
e7da53d838
Merge pull request #17715 from MathiasVP/fopen-taint
...
C++: Add taint through `fopen`
2024-10-10 15:46:46 +01:00
Arthur Baars
6d43eed1e6
Rust: add QL doc for MacroStmts and MacroItems
2024-10-10 16:28:10 +02:00
Paolo Tranquilli
3ef49f31aa
Merge pull request #17725 from github/redsun82/fix-cwe-coverage-link
...
Docs: fix CWE coverage link in main index
2024-10-10 16:18:16 +02:00
Arthur Baars
f97a159163
Rust: clippy fixes
2024-10-10 15:53:16 +02:00
Arthur Baars
88e5ce3cf8
Rust: lower default verbosity to WARN
2024-10-10 15:53:15 +02:00
Arthur Baars
ca27785ace
Rust: extract files on a per-project basis
...
This way we have only one "project" database in-memory at a time. This
should avoid running out of memory when analyzing large mono-repos.
2024-10-10 15:53:14 +02:00
Arthur Baars
db28f1b29e
Rust: use macro to inject extraction functions for detached properties
2024-10-10 15:53:13 +02:00
Arthur Baars
8372a2e562
Rust: ensure error and token locations are valid
...
The locations are "clipped" to the ranges of the parent node of a token,
and the root node of the parse tree for errors.
2024-10-10 15:53:12 +02:00
Arthur Baars
58d2c71c20
Rust: load files from disk ourselves
...
This avoids problems with files containing invalid utf-8 data, which may cause
panic's like:
```
thread 'main' panicked at external/rules_rust~~_crate~ql~~r~r__ra_ap_salsa-0.0.232/src/input.rs:91:32:
no value set for CompressedFileTextQuery(FileId(2429))
stack backtrace:
0: rust_begin_unwind
at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:665:5
1: core::panicking::panic_fmt
at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:74:14
2: <salsa::input::InputStorage<Q> as salsa::plumbing::QueryStorageOps<Q>>::fetch
3: <DB as ra_ap_base_db::SourceDatabase>::compressed_file_text::__shim
4: <ra_ap_base_db::FileTextQuery as salsa::plumbing::QueryFunction>::execute
5: salsa::Cycle::catch
6: salsa::derived_lru::slot::Slot<Q,MP>::execute
7: salsa::derived_lru::slot::Slot<Q,MP>::read
8: <salsa::derived_lru::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::fetch
9: <DB as ra_ap_base_db::SourceDatabase>::file_text::__shim
10: <DB as ra_ap_base_db::SourceDatabase>::file_text
11: <ra_ap_base_db::ParseQuery as salsa::plumbing::QueryFunction>::execute
12: salsa::Cycle::catch
13: salsa::derived_lru::slot::Slot<Q,MP>::execute
14: salsa::derived_lru::slot::Slot<Q,MP>::read
15: <salsa::derived_lru::DerivedStorage<Q,MP> as salsa::plumbing::QueryStorageOps<Q>>::fetch
16: <DB as ra_ap_base_db::SourceDatabase>::parse::__shim
17: <DB as ra_ap_base_db::SourceDatabase>::parse
18: ra_ap_hir::semantics::SemanticsImpl::parse
19: single_arch_extractor::main
```
2024-10-10 15:53:11 +02:00
Arthur Baars
f70f8a3536
Rust: fix utf8 test
2024-10-10 15:53:10 +02:00
Arthur Baars
1135bf6bcd
Rust: improve QL test script
2024-10-10 15:53:09 +02:00
Arthur Baars
3e877ffaac
Rust: do not fail on bad Cargo.toml files
2024-10-10 15:53:08 +02:00
Arthur Baars
ae19b2fd89
Rust: check that TextRanges are for the correct file
2024-10-10 15:53:07 +02:00
Arthur Baars
faa168993c
Rust: reduce log output
2024-10-10 15:53:06 +02:00
Arthur Baars
0c10f083cb
Rust: set RUST_BACKTRACE=1
2024-10-10 15:53:05 +02:00
Arthur Baars
796da126b8
Rust: update expected output
2024-10-10 15:52:57 +02:00
Arthur Baars
0b3b95ab54
Rust: macro expansion
2024-10-10 15:19:47 +02:00
Arthur Baars
cad2b74137
Rust: integrate Rust Analyzer's Semantic module into extractor
2024-10-10 15:19:46 +02:00
Arthur Baars
6ede20cccc
Rust: regenerate code
2024-10-10 15:19:45 +02:00
Arthur Baars
69f0e8bcf7
Rust: add MacroStmts and MacroItems
2024-10-10 15:19:43 +02:00
Arthur Baars
7986fc7036
Rust: avoid double '.' in trap extension
2024-10-10 15:19:42 +02:00
Cornelius Riemenschneider
396bf93ac0
Merge pull request #17716 from github/criemen/rules-kotlin-2.0.0
...
Upgrade rules_kotlin to 2.0.0.
2024-10-10 15:07:50 +02:00
Geoffrey White
8a895740ba
Ruby: Move language specific code out of FileSystem.qll (at least for now).
2024-10-10 14:05:39 +01:00
Owen Mansel-Chan
513efe222d
Add check for object for specialized named type
2024-10-10 13:59:51 +01:00
Owen Mansel-Chan
6f6b4a0bfe
Add check for specialized objects
2024-10-10 13:59:49 +01:00
Owen Mansel-Chan
d295cac697
Always use generic method object
2024-10-10 13:59:47 +01:00
Paolo Tranquilli
89f43fb917
Rust: generate code
2024-10-10 14:37:40 +02:00
Paolo Tranquilli
6015524589
Rust: insert FunctionOrMethodCallExpr in annotations
2024-10-10 14:34:24 +02:00
Paolo Tranquilli
c364fd7e56
Codegen: allow annotations to replace bases and drop fields
2024-10-10 14:33:06 +02:00
Arthur Baars
32e9881cfb
Rust: update expected output
2024-10-10 14:25:07 +02:00
Arthur Baars
30034b4254
Rust: run 'bazel //rust/codegen'
2024-10-10 14:25:06 +02:00
Arthur Baars
b80b6aafdd
Rust: extract modifier tokens as predicates
2024-10-10 14:25:05 +02:00
Tom Hvitved
4df9cd88ef
Merge pull request #17658 from hvitved/shared/cfg-conditional-splitting
...
Shared `ConditionalCompletionSplitting` implementation
2024-10-10 13:21:38 +02:00
Simon Friis Vindum
0c9a2896d8
Rust: Remove unused types
2024-10-10 11:47:58 +02:00
Cornelius Riemenschneider
b18f8d3935
Merge pull request #17714 from github/criemen/flip-enable-plus
...
Bazel: Flip --incompatible_use_plus_in_repo_names.
2024-10-10 11:06:19 +02:00
Cornelius Riemenschneider
6322270926
Merge branch 'main' into criemen/flip-enable-plus
2024-10-10 09:54:16 +02:00
Paolo Tranquilli
3711a7e3e6
Fix CWE coverage link in main index
...
Kudos to @aikenka for spotting this.
Closes https://github.com/github/codeql/issues/17723
2024-10-10 09:30:20 +02:00
Geoffrey White
25b3d76f71
Merge pull request #17718 from geoffw0/unusedvar4
...
Rust: Restrict variables to lowercase (for now).
2024-10-10 08:22:52 +01:00
Geoffrey White
09c2f901f4
Merge pull request #17525 from geoffw0/unreachable
...
Rust: Unreachable code query
2024-10-10 08:22:08 +01:00
Tom Hvitved
6a87eb0c73
Merge pull request #17696 from hvitved/rust/captured-variables
...
Rust: Account for captured variables
2024-10-09 19:42:03 +02:00
Mathias Vorreiter Pedersen
acac3a06ad
C++: Respond to review comments.
2024-10-09 17:32:37 +01:00
Geoffrey White
719cef8298
Merge branch 'main' into unreachable
2024-10-09 17:06:11 +01:00
Geoffrey White
5ac9c2db74
Rust: Accept variables test change.
2024-10-09 17:00:15 +01:00
Edward Minnix III
0abc0d1a67
Fix: ActiveThreatModelSource
2024-10-09 11:35:07 -04:00
Tom Hvitved
aa7215bbd5
Address review comments
2024-10-09 17:22:16 +02:00
Geoffrey White
dfeb35fe1a
Rust: Move the restriction to variableDecl.
2024-10-09 16:21:12 +01:00
Jeroen Ketema
8352d17e2c
Merge pull request #17693 from jketema/concepts
...
C++: Add a skeleton class for requires expressions
2024-10-09 16:54:33 +02:00
Geoffrey White
f171eeb229
Rust: Restrict 'unreachable' to nodes intended to be part of the CFG.
2024-10-09 15:37:10 +01:00
Rasmus Lerchedahl Petersen
6bd46148e7
Python: add change note
2024-10-09 16:27:52 +02:00
Geoffrey White
a66f31d844
Rust: Restrict variables to lowercase (for now).
2024-10-09 15:14:27 +01:00
Owen Mansel-Chan
500992c499
Update qhelp to explain possible source of FPs
2024-10-09 15:08:48 +01:00
Mathias Vorreiter Pedersen
6965cf7246
C++: Make ql-for-ql happy.
2024-10-09 15:05:13 +01:00
Cornelius Riemenschneider
4de0fefe86
Upgrade rules_kotlin to 2.0.0.
...
This is required for the bazel 8 upgrade, as one of the
incompatible-flag flips breaks 1.9.4.
2024-10-09 16:04:16 +02:00
Jeroen Ketema
b087fdecfe
Merge pull request #17678 from MathiasVP/modernize-unclear-array-index-validation
...
C++: Modernize `cpp/unclear-array-index-validation`
2024-10-09 15:55:31 +02:00
Tom Hvitved
918e435a48
Merge pull request #17690 from hvitved/rust/ast-consistency-queries
...
Rust: Add AST consistency queries
2024-10-09 15:54:51 +02:00
Tom Hvitved
04d1c82005
Merge pull request #17689 from hvitved/rust/print-ast
...
Rust: `PrintAst` improvements
2024-10-09 15:54:30 +02:00
Mathias Vorreiter Pedersen
954235ecdd
C++: Add change note.
2024-10-09 14:42:36 +01:00
Mathias Vorreiter Pedersen
338e82064e
C++: Add a taint model for 'fopen' and accept test changes.
2024-10-09 14:40:26 +01:00
Mathias Vorreiter Pedersen
201842d2f9
C++: Add test with missing flow through 'fopen'.
2024-10-09 14:39:24 +01:00
Mathias Vorreiter Pedersen
61a012fc6c
C++: Don't allow 'x < 0' as a barrier guard.
2024-10-09 14:17:56 +01:00
Mathias Vorreiter Pedersen
c883aa09f8
Update cpp/ql/src/change-notes/2024-10-07-unclear-array-index-validation.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2024-10-09 13:45:18 +01:00
Michael Nebel
79871aa51e
Merge pull request #17687 from michaelnebel/modelgen/removeduplicatedf
...
C#/Java: Avoid `df` and `dfc` overlap in model generation.
2024-10-09 14:04:31 +02:00
Cornelius Riemenschneider
4c21444dd5
Bazel: Flip --incompatible_use_plus_in_repo_names.
...
We've hardcoded the tilde in a lot of places :(
This improves performance on Windows and gets us ready for Bazel 8.
We need an upgrade of rules_rust for this to work.
2024-10-09 14:04:05 +02:00
Geoffrey White
ed39c465a6
Merge pull request #17710 from geoffw0/unusedvar3
...
Rust: More test cases for unused variables
2024-10-09 12:44:58 +01:00
Michael Nebel
5d4ceeebb5
Shared: Only generate df summary model in the mixed query in case no context sensitive model exist.
2024-10-09 13:04:32 +02:00
Geoffrey White
f3d727fadc
Rust: Correct spurious annotations.
2024-10-09 11:52:24 +01:00
Geoffrey White
fa1c92dbe7
Rust: Another case worth having.
2024-10-09 11:50:29 +01:00
Rasmus Lerchedahl Petersen
0ac4a10345
Python: model that finditer returns iterable of re.Match objects
2024-10-09 12:42:38 +02:00
Rasmus Lerchedahl Petersen
494b8bd7e1
python: model string property of resultof finditer
2024-10-09 12:40:47 +02:00
Rasmus Lerchedahl Petersen
073189ed6b
python: add test for re.Match objects returned from finditer
2024-10-09 12:32:51 +02:00
Geoffrey White
7a6eabc8a3
Rust: Additional test cases.
2024-10-09 11:31:44 +01:00
yoff
6ffdf576d0
Merge pull request #17708 from yoff/python/ignore-extractor-test-output
...
Python: ignore some extractor test output
2024-10-09 12:31:42 +02:00
yoff
0b0e8a4bf5
Update python/extractor/tests/parser/.gitignore
...
As suggested by @tausbn
2024-10-09 12:22:17 +02:00
Chris Smowton
58fd1a2241
Merge pull request #17357 from smowton/smowton/feature/go-indistinguishable-types
...
Go: extract and expose struct tags, interface method IDs
2024-10-09 11:06:02 +01:00
Rasmus Lerchedahl Petersen
ad630bc6ff
Python: ignore some extractor test output
...
If you test the extractor locally, you want to ignore these files.
2024-10-09 11:34:58 +02:00
Jeroen Ketema
4d251b96a6
C++: Fix copy&paste error in QLDoc
2024-10-09 11:24:08 +02:00
Tom Hvitved
bdb793ba92
Swift: Adopt shared ConditionalCompletionSplitting implementation
2024-10-09 11:02:18 +02:00
Tom Hvitved
3a098d7449
Ruby: Adopt shared ConditionalCompletionSplitting implementation
2024-10-09 11:02:17 +02:00
Tom Hvitved
5d925d36d3
C#: Adopt shared ConditionalCompletionSplitting implementation
2024-10-09 11:02:15 +02:00
Tom Hvitved
3d95369608
Shared ConditionalSplitting implementation
2024-10-09 11:02:13 +02:00
Tom Hvitved
11016e193c
Rust: PrintAst improvements
2024-10-09 10:41:30 +02:00
Geoffrey White
41218fb89f
Rust: Test spacing / variable names.
2024-10-09 09:17:24 +01:00
Tom Hvitved
5afd2d5bf0
Rust: Account for captured variables
2024-10-09 10:17:01 +02:00
Tom Hvitved
a3a0c2b269
Rust: Add more variable tests
2024-10-09 10:17:00 +02:00
Tom Hvitved
9952997b48
Shared: Add DenseRank library
2024-10-09 10:16:59 +02:00
Jeroen Ketema
f3cbf86c43
Merge pull request #17703 from jketema/odr-test
...
C++: Fix ODR violations in tests
2024-10-09 10:16:24 +02:00
Jeroen Ketema
723236d15b
C++: Add a skeleton class for requires expressions
2024-10-09 02:16:20 +02:00
Jeroen Ketema
c90d0faaf6
C++: Fix ODR violations in dataflow tests
2024-10-08 20:34:20 +02:00
Chris Smowton
837387aeae
Re-optimise isSensitive routine
2024-10-08 19:23:31 +01:00
Chris Smowton
629a7a601d
Further optimise guardingFunction: remove redundant condition, and order guard -> guardFunction case to work backwards from interesting return sites, allowing us to go backwards not forwards through BasicBlock::dominates
2024-10-08 19:23:30 +01:00
Chris Smowton
d401891d30
copyedit
2024-10-08 19:23:29 +01:00
Chris Smowton
c79da8b2b5
Avoid pathological case where getExampleMethodName picks a very common method name
2024-10-08 19:23:28 +01:00
Chris Smowton
ed9a6bd820
Further join order optimisations
2024-10-08 19:23:27 +01:00
Chris Smowton
bf5ba33c2e
Improve join orders for top 5 perf regressions in QA
2024-10-08 19:23:26 +01:00
Chris Smowton
365ccf4903
autoformat
2024-10-08 19:23:25 +01:00
Chris Smowton
36a031833f
Further optimisation
2024-10-08 19:23:24 +01:00
Chris Smowton
ab99509a11
Rework interface for querying private interface method ids
2024-10-08 19:23:22 +01:00
Chris Smowton
0f95a8d724
Clarify doc
2024-10-08 19:23:21 +01:00
Chris Smowton
288e0ec565
component_tags -> struct_tags
2024-10-08 19:23:20 +01:00
Chris Smowton
c1a1edf24e
Autoformat
2024-10-08 19:23:19 +01:00
Chris Smowton
74cba9056b
Optimise join orders
2024-10-08 19:23:18 +01:00
Chris Smowton
d04a0f4b87
Add note explaining how to regenerate dbscheme
2024-10-08 19:23:17 +01:00
Chris Smowton
1511927a2b
Remove unnecessary table population on upgrade
2024-10-08 19:23:15 +01:00
Chris Smowton
fd615fb7a3
Prevent bad magic
2024-10-08 19:23:14 +01:00
Chris Smowton
442e58188b
Update stats
2024-10-08 19:23:13 +01:00
Chris Smowton
e1963a5fcd
autoformat
2024-10-08 19:23:12 +01:00
Chris Smowton
7a7ff4a91e
Apply review comments
2024-10-08 19:23:11 +01:00
Chris Smowton
5d14070cd4
Fix test file
2024-10-08 19:23:10 +01:00
Chris Smowton
22ed2f9ae3
Autoformat CodeQL
2024-10-08 19:23:09 +01:00
Chris Smowton
9bb2a4bfce
Change note
2024-10-08 19:23:07 +01:00
Chris Smowton
dcbb66d366
Go: extract and expose struct tags, interface method IDs
...
This enables us to distinguish all database types in QL. Previously structs with the same field names and types but differing tags, and interface types with matching method names and at least one non-exported method but declared in differing packages, were impossible or only sometimes possible to distinguish in QL. With this change these types can be distinguished, as well as permitting queries to examine struct field tags, e.g. to read JSON field name associations.
2024-10-08 19:23:06 +01:00
Jeroen Ketema
f1e22687ab
C++: Fix ODR violations in tests
...
In QLtest we do not have linkage awareness, so having multiple functions with
the same name in the same test causes ODR violations.
2024-10-08 20:09:31 +02:00
yoff
1f1b1b7aab
Merge pull request #17653 from yoff/python/typetracking-through-comprehensions
2024-10-08 19:39:21 +02:00
Taus
3c1a19c5ab
Merge pull request #17700 from github/tausbn/update-cors-query-change-note-and-tags
...
Python: Update CORS query tags and change note
2024-10-08 18:05:30 +02:00
Taus
92bca9c268
Python: Update CORS query tags and change note
...
Makes it more clear that the query is experimental.
2024-10-08 15:44:29 +00:00
Florin Coada
98f52589b0
Merge pull request #17684 from github/changedocs/2.19.1
...
Adding unified changelog for 2.19.1
2024-10-08 16:41:18 +01:00
Tom Hvitved
fcf1b6d6f5
Merge pull request #17657 from hvitved/rust/cfg-conditional-splitting
...
Rust: Implement `ConditionalCompletionSplitting`
2024-10-08 16:21:14 +02:00
Geoffrey White
7ff376b346
Merge branch 'main' into aliasperf2
2024-10-08 15:08:43 +01:00
Geoffrey White
4a131dd8f1
C++: Implement dbartol's suggestion.
2024-10-08 14:44:45 +01:00
Geoffrey White
f9fa52fe77
C++: Disabled the change again.
2024-10-08 14:43:56 +01:00
Tom Hvitved
08d6d54961
Rust: Add AST consistency queries
2024-10-08 15:00:38 +02:00
Geoffrey White
70d530a49c
Rust: Exclude nodes that aren't part of the CFG.
2024-10-08 13:52:15 +01:00
Geoffrey White
a7dbe29448
Rust: Add parenthesis example to test.
2024-10-08 13:50:17 +01:00
Geoffrey White
7235ba8f91
Rust: Fix test compilation errors.
2024-10-08 13:38:33 +01:00
Geoffrey White
3b1d917c2b
Rust: Autoformat.
2024-10-08 13:30:28 +01:00
Tom Hvitved
cb1ca4c75c
Update rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2024-10-08 13:41:24 +02:00
Arthur Baars
4ab925507d
Merge pull request #17682 from github/redsun82/rust-codegen
...
Rust: integrate rust code generation into `//rust/codegen`
2024-10-08 13:23:20 +02:00
Geoffrey White
6bde26d9fd
Rust: Switch firstUnreachable to hvitved's suggested implementation.
2024-10-08 12:07:44 +01:00
Geoffrey White
5d7a92cf13
Rust: Add example from discussion.
2024-10-08 12:00:53 +01:00
Geoffrey White
40096ebb62
Rust: More cleanup after merge.
2024-10-08 11:46:45 +01:00
Geoffrey White
9e3f4cd183
Rust: Accept test changes after merging main.
2024-10-08 11:43:31 +01:00
Geoffrey White
483370d5f4
Merge branch 'main' into unreachable
2024-10-08 11:40:03 +01:00
Geoffrey White
f084bb7bcf
Rust: A couple of interesting cases with short-circuiting.
2024-10-08 11:38:23 +01:00
Florin Coada
36937a0988
Adding unified changelog for 2.19.1
2024-10-08 11:28:15 +01:00
Jonas Jensen
51d189d30d
Merge pull request #17556 from d10c/d10c/bigint-docs
...
BigInt Documentation
2024-10-08 11:46:58 +02:00
Jeroen Ketema
3d6965a550
Merge pull request #17665 from jketema/printir-doc
...
C++: Add some documentation on the printed IR
2024-10-08 11:09:56 +02:00
Mathias Vorreiter Pedersen
b00c545799
C++: Add change notes.
2024-10-08 10:08:16 +01:00
Mathias Vorreiter Pedersen
d6618edf01
C++: Accept test changes.
2024-10-08 10:08:14 +01:00
Mathias Vorreiter Pedersen
f7392d6498
C++: Range analysis of 'getc'.
2024-10-08 10:08:13 +01:00
Mathias Vorreiter Pedersen
6ca978e1cc
C++: Add FP test.
2024-10-08 10:08:12 +01:00
Mathias Vorreiter Pedersen
823d5acd69
C++: Spacing.
2024-10-08 10:05:11 +01:00
Mathias Vorreiter Pedersen
8bb21e1b49
C++: Accept test changes.
2024-10-08 10:05:10 +01:00
Mathias Vorreiter Pedersen
a2cdb9c173
C++: Use range analysis at the sink to exclude trivial FPs.
2024-10-08 10:05:08 +01:00
Mathias Vorreiter Pedersen
c3d9ea1820
C++: Add FP.
2024-10-08 10:05:07 +01:00
Mathias Vorreiter Pedersen
afb5e4f841
C++: Add test spacing.
2024-10-08 10:05:06 +01:00
Mathias Vorreiter Pedersen
f6f5f5d4b4
C++: Accept test changes.
2024-10-08 10:05:04 +01:00
Mathias Vorreiter Pedersen
c9bd9e9303
C++: Modernize the 'cpp/unclear-array-index-validation' query by getting rid of the DefaultTaintTracking barriers and replacing them with a 'BarrierGuard' instantiation.
2024-10-08 10:05:03 +01:00
Paolo Tranquilli
61c3aa6288
Rust: integrate rust code generation into //rust/codegen
2024-10-08 10:37:53 +02:00
Nora Dimitrijević
328f322692
BigInt documentation
2024-10-08 10:15:06 +02:00
Nora Dimitrijević
26ac84aa6e
Fix trailing whitespace in docs
2024-10-08 10:15:03 +02:00
Paolo Tranquilli
96dda8808c
Rust: rename generate-schema -> ast-generator
2024-10-08 10:03:00 +02:00
Asger F
5a4cd1c578
Merge pull request #17661 from asgerf/shared/js-useuse-ssa-changes
...
SSA: Add BarrierGuardWithState
2024-10-08 08:27:18 +02:00
Jeroen Ketema
ed266dac5f
C++: Address review comments
2024-10-07 22:42:18 +02:00
Asger F
1ce0ba5083
SSA: Make WithState private
2024-10-07 14:48:28 +02:00
Michael B. Gale
9bfd461fad
Merge pull request #17669 from github/dependabot/go_modules/go/extractor/extractor-dependencies-ae022431d0
...
Bump golang.org/x/tools from 0.25.0 to 0.26.0 in /go/extractor in the extractor-dependencies group
2024-10-07 11:44:05 +01:00
dependabot[bot]
26f8e64a35
Bump golang.org/x/tools
...
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.25.0 to 0.26.0
- [Release notes](https://github.com/golang/tools/releases )
- [Commits](https://github.com/golang/tools/compare/v0.25.0...v0.26.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-10-07 09:26:56 +00:00
Chris Smowton
770774ed52
Merge pull request #17671 from hvitved/go/fix-tests
...
Go: Update expected test output
2024-10-07 09:23:59 +01:00
Tom Hvitved
c15749f342
Merge pull request #17672 from hvitved/swift/fix-test
...
Swift: Update expected test output
2024-10-07 10:07:20 +02:00
Tom Hvitved
6196fd2cc1
Swift: Update expected test output
2024-10-07 09:45:08 +02:00
Arthur Baars
c04315a7cf
Merge pull request #17670 from hvitved/ruby/fix-test
...
Ruby: Fix expected test output
2024-10-07 09:44:51 +02:00
Tom Hvitved
16feaf15e2
Go: Update expected test output
2024-10-07 09:23:39 +02:00
Tom Hvitved
f1afa2bf59
Ruby: Fix expected test output
2024-10-07 09:16:12 +02:00
Owen Mansel-Chan
927b402a3a
Merge pull request #17668 from igfoo/igfoo/typo
...
Java: Typo in a comment
2024-10-06 13:22:08 +01:00
Ian Lynagh
d24bdbb4e4
Java: Typo in a comment
2024-10-04 17:34:39 +01:00
yoff
6bb98b02a8
Merge pull request #17577 from yoff/python/add-comprehension-capture-flow
...
python: capture flow through comprehensions
2024-10-04 15:51:06 +02:00
Jeroen Ketema
b8eb2ab100
C++: Add some documentation on the printed IR
2024-10-04 15:37:22 +02:00
Rasmus Lerchedahl Petersen
6f5b949ec8
Python: adjust test expectations
...
note that we do retain precision in
`test_dict_from_keyword()`
2024-10-04 15:30:02 +02:00
Tom Hvitved
04a4fb2143
Merge pull request #17655 from hvitved/rust/variable-mut
...
Rust: `&(mut) x` is neither a read nor a write
2024-10-04 15:29:36 +02:00
Rasmus Lerchedahl Petersen
a4c1a622b7
Merge branch 'main' of https://github.com/github/codeql into python/add-comprehension-capture-flow
2024-10-04 14:53:03 +02:00
Tom Hvitved
50c2d108ca
Rust: Fix CompoundAssignmentExpr charpred
2024-10-04 14:48:07 +02:00
yoff
306b087b6e
Merge pull request #17566 from yoff/python/dict-can-take-multiple-args
...
Python: All dict constructor args are relevant
2024-10-04 14:30:10 +02:00
Rasmus Lerchedahl Petersen
977767b0d6
Python: comment around dictionary comprehensions
2024-10-04 14:14:30 +02:00
Rasmus Lerchedahl Petersen
201c4aad13
Python: add comment
2024-10-04 14:09:33 +02:00
yoff
c064a9e092
Update python/ql/lib/semmle/python/frameworks/Stdlib.qll
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2024-10-04 14:01:18 +02:00
Tom Hvitved
db5e452178
Merge pull request #17536 from hvitved/ql-test-source-root
...
Adapt to `sourceLocationPrefix` change in `qltest`
2024-10-04 12:48:51 +02:00
Michael Nebel
c629867191
Merge pull request #17654 from michaelnebel/modelgen/mixedbugfix
...
C#/Java: Only use heuristic if no content based model exist (in mixed mode).
2024-10-04 10:28:49 +02:00
Tom Hvitved
d0ca39fb03
JS: Update expected test output
2024-10-04 08:35:33 +02:00
Tom Hvitved
b3b9406e45
Python: Update test
2024-10-04 08:35:32 +02:00
Tom Hvitved
953461d1aa
C++: Update expected test output
2024-10-04 08:35:31 +02:00
Tom Hvitved
bf0675e5ba
Kotlin: Update two tests
2024-10-04 08:35:30 +02:00
Tom Hvitved
2832318711
Java: Account for top-level res folders in AndroidLayoutXmlFile
2024-10-04 08:35:28 +02:00
Tom Hvitved
aa5e0c39ba
Rust: Implement ConditionalCompletionSplitting
2024-10-03 21:25:50 +02:00
Tom Hvitved
a9cf33ce18
Rust: &x is neither a read nor a write
2024-10-03 20:20:59 +02:00
Angela P Wen
8542992b0d
Merge pull request #17651 from github/post-release-prep/codeql-cli-2.19.1
...
Post-release preparation for codeql-cli-2.19.1
2024-10-03 11:18:54 -07:00
Tom Hvitved
05f85497ed
Rust: Add &mut variable tests
2024-10-03 19:55:07 +02:00
Geoffrey White
d4414dabff
Ruby: Add change notes.
2024-10-03 17:40:18 +01:00
Geoffrey White
86cc2dc5a1
Ruby: Add rb/diagnostics/extraction-warnings so that we don't miss anything we had before.
2024-10-03 17:40:17 +01:00
Geoffrey White
1ea94faccf
Ruby: Make similar changes to differentiate extraction errors and warnings, and mostly restore original behaviour.
2024-10-03 17:39:56 +01:00
Geoffrey White
4c7ec59306
Ruby: Sync identical files.
2024-10-03 17:17:37 +01:00
Chris Smowton
321eb34eff
Merge pull request #17637 from smowton/smowton/admin/go-test-extraction-tests
...
Go: augment test-extraction tests
2024-10-03 16:06:53 +01:00
Geoffrey White
2e772a80c4
Rust: Accept minor consistency .expected changes.
2024-10-03 15:15:32 +01:00
Geoffrey White
64720adccb
Merge pull request #17656 from geoffw0/unusedvar2
...
Rust: Diagnose unused variable false positives
2024-10-03 14:56:27 +01:00
Michael Nebel
7600c243de
Merge pull request #17639 from felickz/patch-1
...
Update Comment - Clarify threat model flow sources comment in LogForgingQuery.qll
2024-10-03 15:51:40 +02:00
Geoffrey White
369241e1ea
Merge pull request #5 from hvitved/unusedvar2
...
Rust: Account for variables bound in `while let` expressions
2024-10-03 14:04:38 +01:00
Geoffrey White
ccaf2dd9ea
Rust: Temporarily limit results (hopefully enough for the DCA job to cope).
2024-10-03 13:44:04 +01:00
yoff
88b3d1ffd7
Merge pull request #17565 from yoff/python/model-urllib-parse-parse-qs
...
Python: model `urllib.parse.parse_qs`
2024-10-03 14:32:08 +02:00
Tom Hvitved
cd04500dd9
Rust: Account for variables bound in while let expressions
2024-10-03 14:05:24 +02:00
Geoffrey White
3c777b7605
Merge branch 'main' into warnings
2024-10-03 12:54:56 +01:00
Geoffrey White
32dbdb3913
Rust: Update summary stats .expected file.
2024-10-03 12:50:59 +01:00
Geoffrey White
da84889242
Rust: Use @diagnostic_error, @diagnostic_warning rather than constants.
2024-10-03 12:50:40 +01:00
Asger F
9902874ddd
SSA: Add BarrierGuardWithState
2024-10-03 13:48:44 +02:00
Geoffrey White
0304aa846c
Rust: Add more tests for uused variables.
2024-10-03 12:37:02 +01:00
Rasmus Lerchedahl Petersen
777279dc29
Python: MaD test expectations
2024-10-03 13:29:56 +02:00
Geoffrey White
821398715c
Rust: Test spacing.
2024-10-03 11:55:11 +01:00
Rasmus Lerchedahl Petersen
768d866e72
python: model urllib.parse.parse_qs
2024-10-03 12:20:40 +02:00
Rasmus Lerchedahl Petersen
0462809edc
Python: add taint test for urllib
2024-10-03 12:20:38 +02:00
Rasmus Lerchedahl Petersen
5c68bad2f1
Python: add comments
2024-10-03 12:17:59 +02:00
yoff
91f1cf10a7
Merge pull request #17454 from yoff/stdlib-optparse
...
Python: Several standard library models
2024-10-03 12:02:22 +02:00
Tom Hvitved
97c2387904
Merge pull request #17644 from hvitved/rust/break-continue-target
2024-10-03 11:38:27 +02:00
yoff
56d0affe38
Update python/ql/lib/semmle/python/frameworks/Stdlib.model.yml
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2024-10-03 10:18:25 +02:00
Rasmus Lerchedahl Petersen
6d486f9931
Python: move change note to the right place
2024-10-03 10:15:55 +02:00
Rasmus Lerchedahl Petersen
9e808c17af
Python: add change note
2024-10-03 10:09:59 +02:00
Rasmus Lerchedahl Petersen
0dc036abd1
Python: Allow type tracking through comprehensions
...
- the subscript operator is extended to comprehensions
- the capture jump-step is extended to work for the functions generated inside comprehensions
2024-10-03 09:31:02 +02:00
github-actions[bot]
98d587c482
Post-release preparation for codeql-cli-2.19.1
2024-10-02 22:40:35 +00:00
Geoffrey White
88abc8f72f
Rust: Add to summary stats.
2024-10-02 18:43:26 +01:00
Geoffrey White
a4c06b2bbc
Rust: Define SuccessfullyExtractedFile and use it to simplify queries.
2024-10-02 18:43:25 +01:00
Geoffrey White
12fbd18f3a
Rust: Have ExtractionConsistency.ql report both.
2024-10-02 18:43:24 +01:00
Geoffrey White
ad7c96554f
Rust: Correct extraction errors query to output only errors.
2024-10-02 18:43:15 +01:00
Geoffrey White
f30a642c8f
Rust: Add a test for the extractor warnings query.
2024-10-02 18:42:37 +01:00
Geoffrey White
ba9c2f1e3a
Rust: Add extractor warnings query.
2024-10-02 18:42:32 +01:00
Geoffrey White
f7db47b771
Merge pull request #17588 from geoffw0/loc2
...
Rust: Improve lines-of-code counts.
2024-10-02 18:13:36 +01:00
Geoffrey White
0b6ec4624e
Rust: Autoformat.
2024-10-02 17:05:01 +01:00
Geoffrey White
d6848f5c5d
Rust: Apparently a doc comment here was illegal.
2024-10-02 17:00:28 +01:00
Geoffrey White
01abcf8537
Rust: Use just end locations for now, to avoid all false positive lines caused by attached comments.
2024-10-02 16:54:02 +01:00
Geoffrey White
8c87b66bea
Rust: Add more test cases for comments.
2024-10-02 16:52:19 +01:00
Chris Smowton
05d2e16de3
autoformat
2024-10-02 15:25:36 +01:00
Tom Hvitved
6da3972433
Rust: Simplify break/continue CFG labels
2024-10-02 15:45:18 +02:00
Tom Hvitved
1266f9757d
Rust: Add {BreakExpr,ContinueExpr}.getTarget()
2024-10-02 15:45:16 +02:00
Tom Hvitved
000dedf3e8
Rust: Output CFG for library-tests/variables
2024-10-02 15:45:14 +02:00
Tom Hvitved
d6415cd0c8
Merge pull request #17642 from hvitved/rust/unused-variable
...
Rust: Implement `UnusedVariable.ql`
2024-10-02 15:41:24 +02:00
Michael Nebel
51623c3837
Java: Consider all summarized callable with generated verification as generated when counting generated vs manual.
2024-10-02 15:24:01 +02:00
Michael Nebel
104d448b16
Shared: Only use heuristic summary flow in case there is no content based flow.
2024-10-02 15:24:01 +02:00
Tom Hvitved
3a1f6efce4
Address review comments
2024-10-02 13:37:24 +02:00
Geoffrey White
8243f87179
Rust: Modify the exclusion as suggested in comments.
2024-10-02 11:38:29 +01:00
Tom Hvitved
fb9ec2423c
Rust: Implement UnusedVariable.ql
2024-10-02 11:22:32 +02:00
Tom Hvitved
3fa52ad680
Merge pull request #17633 from hvitved/rust/cfg-fixes
...
Rust: More CFG modelling
2024-10-02 11:21:53 +02:00
Tom Hvitved
9c7216fe4f
Rust: Add another CFG test
2024-10-02 10:59:26 +02:00
Tom Hvitved
69e0ad0181
Rust: Refactor CFG implementation for loops
2024-10-02 10:55:52 +02:00
Calum Grant
8b536f54fd
Merge pull request #17481 from github/calumgrant/bmn/uninitialized-local
...
C++: Remove FPs from cpp/uninitialized-local when encountered extraction errors
2024-10-02 09:29:15 +01:00
Calum Grant
d3695dce4d
C++: Add change note
2024-10-02 08:14:23 +01:00
Chad Bentz
2458d16426
Clarify threat model flow sources comment in LogForgingQuery.qll
2024-10-01 23:04:22 -04:00
Ed Minnix
f8335e6163
Fix formatting
2024-10-01 15:58:07 -04:00
Edward Minnix III
91b7a6cbd8
Wording of change note
...
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2024-10-01 15:56:43 -04:00
Edward Minnix III
1f932d407f
Remove unnecessary asExpr()
...
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com >
2024-10-01 15:56:42 -04:00
Ed Minnix
26b49dd0df
Fix test expectation
2024-10-01 15:56:40 -04:00
Ed Minnix
d80a1487be
Add change note
2024-10-01 15:56:37 -04:00
Ed Minnix
e18389718c
Implement stdin models
...
Unfortunately due to how variable and varargs work, these are better
done in QL
2024-10-01 15:56:31 -04:00
Tom Hvitved
8f0b7f0969
Rust: Use propagatesAbnormal in two places
2024-10-01 21:49:08 +02:00
Tom Hvitved
c4eafb2cf3
Rust: Skip ParenExprs in the CFG
2024-10-01 21:26:49 +02:00
Tom Hvitved
8b66dc16ad
Rust: Fix CFG for labelled block expressions
2024-10-01 21:03:36 +02:00
Tom Hvitved
e8cb3490e6
Rust: Refine deadEnd consistency check
2024-10-01 21:02:55 +02:00
Tom Hvitved
85957767c9
Rust: Fix CFG for while let loops
2024-10-01 21:02:17 +02:00
Tom Hvitved
071076875c
Rust: Make more CFG nodes leaves
2024-10-01 21:01:56 +02:00
Tom Hvitved
26c69b8f8a
Rust: Add more CFG tests
2024-10-01 21:01:49 +02:00
Tom Hvitved
bbd0aa929f
Rust: Add more missing CFG trees
2024-10-01 21:01:26 +02:00
Tom Hvitved
17770af491
Rust: Account for let statement else blocks in deadEnd
2024-10-01 21:00:39 +02:00
Tom Hvitved
a507854288
Rust: Fix bug in BooleanCompletion.isValidForSpecific0
2024-10-01 21:00:33 +02:00
Tom Hvitved
8c1fd8fa7a
Rust: Implement CFG for ForExprs
2024-10-01 21:00:09 +02:00
Tom Hvitved
f3e3734424
Rust: Implement CFG for WhileExprs
2024-10-01 20:59:41 +02:00
Tom Hvitved
5444a5bf8a
Rust: Extend while and for CFG tests
2024-10-01 20:59:13 +02:00
Geoffrey White
3a54c10f36
Rust: For now exclude top-level AST elements from LOC counts. This is not ideal.
2024-10-01 17:35:30 +01:00
Tom Hvitved
5fb61b0304
Merge pull request #17606 from hvitved/rust/variables
2024-10-01 18:13:32 +02:00
Ian Lynagh
6af5afc184
Merge pull request #17634 from igfoo/igfoo/implicit_param_name
...
Java: Add a test for parameter names
2024-10-01 17:03:18 +01:00
Calum Grant
cd1f10cdea
C++: Reinstate accidentally-deleted comment
2024-10-01 16:15:24 +01:00
Geoffrey White
74826032ef
Merge branch 'main' into loc2 and accept new test results.
2024-10-01 16:10:39 +01:00
Chris Smowton
6ef2aed3aa
Add blackbox, out-of-package test
2024-10-01 15:52:30 +01:00
Chris Smowton
9a82ea48f2
Add test for cross-package references with test extraction
2024-10-01 15:50:43 +01:00
Rasmus Lerchedahl Petersen
315890680c
Python: dict only has one positional argument
2024-10-01 16:48:43 +02:00
Calum Grant
a9b3c0d91b
C++: Address review comments
2024-10-01 15:47:12 +01:00
Rasmus Lerchedahl Petersen
38b1eb7c71
Python: just use ListElementContent for iterables
2024-10-01 16:24:15 +02:00
Ian Lynagh
323b7cb96f
Java: Follow change of implicit parameter names
2024-10-01 15:06:45 +01:00
Ian Lynagh
901f756c69
Java: Add a test for parameter names
2024-10-01 15:06:42 +01:00
Chris Smowton
01c9509741
Merge pull request #17628 from smowton/smowton/admin/go-vendor-dir-extraction-option
...
Go: add extractor option for vendor-directory extraction
2024-10-01 14:47:42 +01:00
Anders Schack-Mulligen
6081ba5902
Merge pull request #17604 from aschackmull/java/neutral-overrides
...
Java/C#: Add overrides to the interpretation of neutral MaD models.
2024-10-01 14:55:54 +02:00
Rasmus Lerchedahl Petersen
f39dc41903
Python: use imprecise content in cp
...
We had accidentally used precise content leadingto blowup
2024-10-01 13:53:25 +02:00
Tom Hvitved
91e26d0f44
Rust: Add another variable test
2024-10-01 13:45:58 +02:00
Tom Hvitved
a172063e6a
Rust: Document VariableOrAccessCand
2024-10-01 13:38:18 +02:00
Rasmus Lerchedahl Petersen
05910de8d1
Python: MaD expectations
2024-10-01 13:21:22 +02:00
Rasmus Lerchedahl Petersen
cef8744a37
Python: consolidate models in one file
2024-10-01 12:56:21 +02:00
yoff
7816f34d75
Merge branch 'main' into stdlib-optparse
2024-10-01 12:48:09 +02:00
Rasmus Lerchedahl Petersen
64890a1a6b
Python: valid change note
2024-10-01 12:37:45 +02:00
yoff
2b6aab108d
Update python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll
...
Co-authored-by: Taus <tausbn@github.com >
2024-10-01 12:36:20 +02:00
Calum Grant
fe00c8819d
C++: Fix formatting
2024-10-01 11:26:47 +01:00
Chris Smowton
cb0b388345
Merge pull request #17630 from smowton/smowton/admin/deduplicate-tests
...
Go: deduplicate integration tests
2024-10-01 11:08:00 +01:00
Calum Grant
4712ae1cfc
C++: Use refactored isFirstAllocatorCallArgument()
2024-10-01 11:01:51 +01:00
Calum Grant
59a77d70c0
C++: Use Function::hasErrors in queries
2024-10-01 11:01:23 +01:00
Calum Grant
4b5aa1497b
C++: Implement Function::hasErrors()
2024-10-01 11:00:44 +01:00
yoff
2eac11edd6
Update python/ql/lib/change-notes/2024-09-24-std-lib-models.md
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2024-10-01 11:47:42 +02:00
Chris Smowton
d689db23d8
Warn on use of old option
2024-10-01 10:43:28 +01:00
yoff
62509a10c2
Update python/ql/test/library-tests/dataflow/coverage/test_builtins.py
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2024-10-01 11:39:12 +02:00
Calum Grant
60abea17e6
C++: Test for cpp/uninitialized-local
2024-10-01 10:32:17 +01:00
Jeroen Ketema
66d156d386
Merge pull request #17608 from jketema/macro-expansion-tests
...
C++: Add more macro expansion tests
2024-10-01 11:19:49 +02:00
Rasmus Lerchedahl Petersen
e0a3c8a1c4
Python: add change note
2024-10-01 10:12:39 +02:00
Tom Hvitved
b0efffd8f0
Rust: AST support for variables
2024-10-01 10:10:08 +02:00
Rasmus Lerchedahl Petersen
bd68986fa4
Python: add test showing dict can take multiple arguments
2024-10-01 10:01:22 +02:00
Tom Hvitved
a282efc43e
Rust: Add inline test expectations library
2024-10-01 09:50:05 +02:00
Tom Hvitved
1d6626c821
Rust: Implement IdentPat.toString()
2024-10-01 08:42:26 +02:00
Jeroen Ketema
2427227b84
Merge pull request #17611 from microsoft/brodes/wcharcharconversion_false_positives_upstream5
...
Brodes/wcharcharconversion false positives upstream5
2024-10-01 08:00:51 +02:00
Rasmus Lerchedahl Petersen
9357762e06
Python: remove superflous code
...
This is handled by parameter-argument matching
2024-10-01 00:03:04 +02:00
Angela P Wen
204e4c5bb0
Merge pull request #17631 from github/post-release-prep/codeql-cli-2.19.1
...
Post-release preparation for codeql-cli-2.19.1
2024-09-30 13:47:39 -07:00
github-actions[bot]
e97878ed63
Post-release preparation for codeql-cli-2.19.1
2024-09-30 19:49:00 +00:00
Chris Smowton
be389b4c19
Go: deduplicate integration tests
2024-09-30 19:54:14 +01:00
Chris Smowton
c9d6c80913
Log when vendor dir extraction is active
2024-09-30 18:44:20 +01:00
Chris Smowton
684aedf6aa
Golang vendor dir extraction: add extractor option
2024-09-30 18:24:49 +01:00
REDMOND\brodes
c496503053
Formatting.
2024-09-30 11:23:08 -04:00
REDMOND\brodes
eeddb176f8
Merge branch 'brodes/wcharcharconversion_false_positives_upstream5' of https://github.com/microsoft/codeql into brodes/wcharcharconversion_false_positives_upstream5
2024-09-30 11:20:20 -04:00
REDMOND\brodes
162519185d
Removing unnecessary bracket/singleton set literal.
2024-09-30 11:19:31 -04:00
Ben Rodes
9e9469f3ca
Update cpp/ql/src/change-notes/2024-09-26-wcharcharconversion-false-positives.md
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2024-09-30 11:17:48 -04:00
REDMOND\brodes
318e75c094
Changing name of predicate to be clearer, and removing an unused parameter.
2024-09-30 11:10:28 -04:00
REDMOND\brodes
c91f7f4918
Altering exists predicate ordering to be clearer.
2024-09-30 11:07:09 -04:00
REDMOND\brodes
31324fc778
Altering ordering for exists statement to be clearer.
2024-09-30 11:05:38 -04:00
REDMOND\brodes
51e787b316
Switching to looking for explicit declaration of unsigned char, to avoid cases where unsigned char is the default char width for char.
2024-09-30 11:02:43 -04:00
REDMOND\brodes
c4737c7fbb
Changing from hasIntermediateType to getABaseType.
2024-09-30 10:58:45 -04:00
REDMOND\brodes
338ab96593
Correct comment.
2024-09-30 10:46:39 -04:00
Anders Schack-Mulligen
5c4b4d644a
C#: Accept test changes.
2024-09-30 16:27:50 +02:00
Rasmus Lerchedahl Petersen
dacc0ab8fe
Python: docs and a simplification
2024-09-30 16:06:30 +02:00
Rasmus Lerchedahl Petersen
438e664116
Python: add missing qldoc
...
More doc is needed, but this should turn the tests green
2024-09-30 15:43:19 +02:00
Anders Schack-Mulligen
a8f55d93cb
C#: Add overrides to the interpretation of neutral MaD models.
2024-09-30 15:23:27 +02:00
Anders Schack-Mulligen
0459d136d3
Java: Remove neutral model for Object.toString.
2024-09-30 15:17:21 +02:00
Rasmus Lerchedahl Petersen
a22ea6c1c8
Python: use known sanitiser
...
- also adjust test expectations in experimental
2024-09-30 14:22:17 +02:00
Rasmus Lerchedahl Petersen
7392d186bc
Python: use yield step also for taint
...
Using the comprehension store step meant that all comprehensions would receive taint.
This because comprehension flow now goes via a callable, meaning they share the return node.
2024-09-30 13:49:01 +02:00
Rasmus Lerchedahl Petersen
fb07a56de6
Python: adjust test expectations
2024-09-30 13:26:59 +02:00
Anders Schack-Mulligen
ec0bd4494c
Java: Add overrides to the interpretation of neutral MaD models.
2024-09-30 13:11:49 +02:00
Rasmus Lerchedahl Petersen
ded39749a7
Python: allow comp arg as argumentnode
2024-09-30 13:02:20 +02:00
Rasmus Lerchedahl Petersen
f9f46f0f98
Python: update test expectations
...
We now have a new callable, yielding new enclosing callables
2024-09-30 12:00:38 +02:00
Rasmus Lerchedahl Petersen
3ef05a628f
Python: add location to node
2024-09-30 11:56:36 +02:00
Rasmus Lerchedahl Petersen
310819d392
Python: fix dataflow inconsistencies
...
- adjust scope of argument, the argument is outside the called function
- add missing post-update nodes for the new arguments
2024-09-30 10:31:36 +02:00
Rasmus Lerchedahl Petersen
d4ea62edec
Python: flow through yield
...
- add yield as a dataflow return
- replace comprehension store step
with a store step to the yield
2024-09-30 09:01:29 +02:00
Jeroen Ketema
e73d1c7b76
C++: Add more macro expansion tests
2024-09-28 22:32:36 +02:00
REDMOND\brodes
b73fe0ba0a
Adding change log
2024-09-27 12:41:45 -04:00
REDMOND\brodes
92c8d39ba3
Updating expected file, false positives now resolved.
2024-09-27 12:39:50 -04:00
REDMOND\brodes
cc24f1ed9f
Modifications to the query to address false positives.
2024-09-27 12:38:22 -04:00
REDMOND\brodes
26e58532ee
Adding tests and updated expected file with false positives to correct.
2024-09-27 12:37:09 -04:00
Arthur Baars
7c6239b077
Merge branch 'main' into unreachable
2024-09-27 12:15:49 +02:00
Rasmus Lerchedahl Petersen
72530a8312
Python: use synthetic node for comprehension capture argument
...
We used to use the CfgNode for the comprehension itself.
In cases where that is also an argument, say
```python
",".join([x for x in l])
```
that would be an argument to two different calls causing a dataflow consistency violation.
2024-09-27 12:15:03 +02:00
Anders Schack-Mulligen
2d76752ca0
Java: Add model for CharArrayWriter.toString().
2024-09-27 11:28:20 +02:00
Rasmus Lerchedahl Petersen
294092b671
Python: use comprehension function argument
...
For a comprehension `[x for x in l]
- `l` is now a legal argument (in DataFlowPublic)
- `l` is the argument of the comprehension function (in DataFlowDispatch)
- the parameter of the comprehension function is being read rather than `l` (in IterableUnpacking)
Thus the read that used to cross callable boundaries is now split into a arg-param edge and a read from that param.
2024-09-27 09:44:39 +02:00
Geoffrey White
caca4950e6
Rust: Revert the change to FileSystem.qll.
2024-09-26 11:10:32 +01:00
Geoffrey White
f8ce11b3a7
Rust: Improve File.getNumberOfLinesOfCode().
2024-09-25 16:42:29 +01:00
Geoffrey White
7da2845cad
Rust: Uncomment two lines from the test that should now behave deterministically.
2024-09-25 16:42:28 +01:00
Rasmus Lerchedahl Petersen
fc2dc28f87
python: capture flow through comprehensions
...
- add comprehension functions as `DataFlowCallable`s
- add comprehension call as `DataFlowCall`
- create capture argument node for comprehension calls
2024-09-25 10:02:31 +02:00
Rasmus Lerchedahl Petersen
112e7c95fa
Python: all dict constructor args are relevant
2024-09-24 20:58:59 +02:00
yoff
e7f9b5bbbc
Merge branch 'main' into stdlib-optparse
2024-09-24 20:24:00 +02:00
Rasmus Lerchedahl Petersen
f95926e1a8
Python: add change note
2024-09-24 20:23:39 +02:00
Geoffrey White
3e0d30f13a
Rust: Merge of unusedvar and unreachable work.
2024-09-20 12:58:38 +01:00
Geoffrey White
58b9355c69
Merge branch 'main' into unreachable
2024-09-20 12:53:49 +01:00
Geoffrey White
1eaa998648
Rust: Implement unreachable code query.
2024-09-19 17:44:15 +01:00
Geoffrey White
e7e0c6bf12
Rust: Add qhelp + examples for unreachable code query.
2024-09-19 17:34:46 +01:00
Geoffrey White
35378aa714
Rust: Add placeholder query + test for unreachable code query.
2024-09-19 17:34:41 +01:00
Geoffrey White
1ff6c4c090
C++: Restore change and see effect on test.
2024-09-03 11:55:06 +01:00
Geoffrey White
5bd58f044e
C++: Add a direct test of getOverlap and a test case for it.
2024-09-03 11:52:20 +01:00
Porcupiney Hairs
e2dd126962
Python: Pycurl SSL Disabled
2024-09-03 03:41:23 +05:30
Geoffrey White
0e766aa99b
C++: Remove redundant lines.
2024-08-16 15:56:30 +01:00
Geoffrey White
7430fde8c6
C++: Avoid outputting a cartesian product in AliasedSSA's getOverlap.
2024-08-14 10:53:25 +01:00
Rasmus Lerchedahl Petersen
3434c38da7
Python: update test expectations
...
This is MaD...
2024-07-22 17:03:29 +02:00
Rasmus Lerchedahl Petersen
e30f725e71
Python: Remove questionable model for multiprocessing.connection.Listener
2024-07-22 15:43:06 +02:00
Rasmus Lerchedahl Petersen
e40ae2e52d
Python: adjust test expectations
...
MaD row numbers in provenance column
2024-06-28 21:56:11 +02:00
Rasmus Lerchedahl Petersen
77a00873a9
Python: add tests for loggers
2024-06-28 15:25:17 +02:00
Rasmus Lerchedahl Petersen
5ddfe75a0d
Python: Add value steps for sequence elements
...
It would be nice to simplify to a single sequence content type..
2024-06-28 15:10:08 +02:00
Rasmus Lerchedahl Petersen
59f953269a
Python: remove strange sink
...
It is not clear from the code how this could happen and
I do not remember the path I saw, perhaps it was unreasonable.
2024-06-28 14:42:24 +02:00
yoff
bbc3ff2dfe
Apply suggestions from code review
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com >
2024-06-28 14:39:03 +02:00
Rasmus Lerchedahl Petersen
a3076f4f72
Python: fix test expectations, add missing sanitizer
2024-06-26 13:27:32 +02:00
Rasmus Lerchedahl Petersen
b261145f43
Python: fix compilation
2024-06-26 10:46:38 +02:00
Rasmus Lerchedahl Petersen
571be8be3e
Python: model more loggers
2024-06-26 01:00:38 +02:00
Rasmus Lerchedahl Petersen
eb32cbe8a5
Python: codecs.open
2024-06-26 00:57:59 +02:00
Rasmus Lerchedahl Petersen
bdc48088e6
Python: MaD summary models
...
Two of the generated summaries have been excluded:
- ["re", "Member[split]", "Argument[0,pattern:]", "ReturnValue", "taint"]
From the documentation, it is not clear why pattern should figure in the return value, as that is the part denoting split point and thus all those instances are filtered out.
From the implementation
Spit function: https://github.com/python/cpython/blob/3.12/Lib/re/__init__.py#L199
_compile function being called by split: https://github.com/python/cpython/blob/3.12/Lib/re/__init__.py#L280
We see that in case the pattern is already a compiled `Pattern`, it is returned directly from _compile and could thus be part of the return value from split. This is probably not possible to arrange for an attacker, and so an FP in practice.
- ["urllib2", "Member[unquote]", "Argument[0,string:]", "ReturnValue", "taint"]
urllib2 seems to be only in Python2 (e.g. https://docs.python.org/2.7/library/urllib2.html ) and I cannot locate the function unquote.
2024-06-26 00:39:30 +02:00
Rasmus Lerchedahl Petersen
bc551174f9
Python: model copy.deepcopy as a value step
2024-06-25 14:53:06 +02:00
Rasmus Lerchedahl Petersen
501cda4e8c
Python: model fnmatch.filter
2024-06-25 14:44:39 +02:00
Rasmus Lerchedahl Petersen
2118f233b9
Python: model optparse.OptionParser.parse_arg
2024-06-25 14:40:23 +02:00
Rasmus Lerchedahl Petersen
b80a711b27
python: undo changes to qlpack
2024-06-25 14:13:59 +02:00
Rasmus Lerchedahl Petersen
1e97600c4a
Python: move models
2024-06-25 14:13:56 +02:00
Rasmus Lerchedahl Petersen
d410136852
python: compress models
2024-06-25 14:13:52 +02:00
Rasmus Lerchedahl Petersen
c004ffaca8
python: move model to Stdlib.yml
...
There is already a model there so we add to that one.
We did observe that this existing model was blocked by the external MaD model.
This is concerning and needs to be cleared up.
2024-06-25 14:13:48 +02:00
Rasmus Lerchedahl Petersen
281ac05868
python: add modelling for urlib.parse
...
- `quote` together with `re.compile` recover regex injection alerts on haiwen/seahub
- `quote_plus` recovers the URL redirection alert on DemocracyClub/EveryElection
- `unquote` recovers path injection alerts on `cloudera/hue`
- it was tedious finding justifications for the rest..
2024-06-25 14:13:44 +02:00
Rasmus Lerchedahl Petersen
df406b4fca
python: Start modelling using MaD
...
- empty models for now
- `summaryModel` of `codeql/python-all` will be added to shortly.
2024-06-25 14:13:41 +02:00
Paolo Tranquilli
daea773fce
Python: tests with false positives around match
2024-06-14 17:28:35 +02:00