Commit Graph

2588 Commits

Author SHA1 Message Date
Tom Hvitved
ca18005e44 Rust: Add some manual classes to CfgNodes.qll 2024-11-21 10:21:12 +01:00
Tom Hvitved
c8736e8a3d Rust: Auto-generate CfgNodes.qll 2024-11-21 10:21:11 +01:00
Tom Hvitved
1c2fdc29a3 Rust: Add more local data flow tests 2024-11-21 10:21:09 +01:00
Tom Hvitved
fab29361cb Rust: Add more CFG tests 2024-11-21 10:21:06 +01:00
Simon Friis Vindum
8c74478ef4 Merge pull request #18041 from paldepind/rust-cfg-self
Rust: Include `self` parameters in the CFG
2024-11-21 08:53:52 +01:00
Geoffrey White
d828941b7c Rust: Address review comments. 2024-11-20 22:39:27 +00:00
Paolo Tranquilli
d609c1b7e6 Rust: fix OrPat.toString 2024-11-20 17:00:13 +01:00
Paolo Tranquilli
fd45e11f4b Rust: accept test changes 2024-11-20 16:49:20 +01:00
Paolo Tranquilli
b4af5a61d1 Rust: more advanced toString 2024-11-20 16:21:23 +01:00
Tom Hvitved
42e0d7ce10 Util: Refactor DenseRank implementation 2024-11-20 13:09:59 +01:00
Simon Friis Vindum
93f6f042e1 Rust: Update expected file 2024-11-20 12:39:31 +01:00
Simon Friis Vindum
aab0d5e9e4 Rust: Refactor to avoid needing getNumberOfSelfParams 2024-11-20 12:35:52 +01:00
Paolo Tranquilli
4d04c5af83 Rust: fix non-existent string representations 2024-11-20 12:08:51 +01:00
Simon Friis Vindum
24adbb80c7 Rust: Include self parameters in the CFG 2024-11-20 11:50:46 +01:00
Simon Friis Vindum
55121d866c Rust: Add CFG tests for method definitions with self parameters 2024-11-20 11:45:42 +01:00
Paolo Tranquilli
57973df795 Rust: make CallExpr.toString use call identifier if present 2024-11-20 10:00:10 +01:00
Paolo Tranquilli
4fb028cbb2 Rust: accept last integration test changes
Also make `--learn` work with the nested qltest tests.
2024-11-20 09:45:15 +01:00
Paolo Tranquilli
e4f982c12c Rust: accept integration test changes 2024-11-19 17:50:57 +01:00
Paolo Tranquilli
fce13aeb35 Rust: accept test changes 2024-11-19 17:50:14 +01:00
Paolo Tranquilli
a709fc6a54 Rust: add some toString implementations 2024-11-19 17:21:08 +01:00
Simon Friis Vindum
e5951516b8 Merge pull request #18026 from paldepind/rust-df-local
Rust: Add local data flow edge for SSA nodes
2024-11-19 15:41:25 +01:00
Tom Hvitved
7a065746d6 Merge pull request #18024 from hvitved/rust/cfg/async-block-return
Rust: Handle early returns in `async` blocks in CFG
2024-11-19 15:21:34 +01:00
Simon Friis Vindum
2c9bee6208 Rust: Only add data flow edge to SSA write definitions from their underlying CFG node 2024-11-19 14:32:31 +01:00
Paolo Tranquilli
2f3624b625 Merge pull request #18023 from github/redsun82/installer-shortcut
Bazel: add an `install` shortcut and an `experimental` attribute to `codeql_pack`
2024-11-19 14:00:52 +01:00
Simon Friis Vindum
6ae979293c Rust: Accept inconsistencies 2024-11-19 13:26:01 +01:00
Geoffrey White
758092b1d6 Rust: Add consistency check failures. 2024-11-19 12:04:15 +00:00
Geoffrey White
49eefccde1 Rust: Autoformat. 2024-11-19 11:49:02 +00:00
Paolo Tranquilli
918b0bfc53 Bazel: add experimental to codeql_pack 2024-11-19 12:48:36 +01:00
Simon Friis Vindum
23bfa8a9bc Rust: Add local data flow edge for SSA definitons 2024-11-19 12:19:47 +01:00
Geoffrey White
c7c6924fda Rust: Implement query, source/sink/barrier classes and concepts. All of this is framework, nothing is concretely modelled yet. 2024-11-19 11:09:43 +00:00
Geoffrey White
6a7fb06086 Rust: Add .qhelp and examples. 2024-11-19 11:09:42 +00:00
Simon Friis Vindum
bacc37d886 Rust: Add additional tests for intraprocedural data flow 2024-11-19 12:07:26 +01:00
Geoffrey White
2df565c84f Rust: Add options.yml and sqlx 'query cache' (result of 'sqlx prepare') so that the query test can function. 2024-11-19 10:56:37 +00:00
Geoffrey White
28d0ad94d5 Rust: Add placeholder SQL injection query, linked in test. 2024-11-19 10:56:36 +00:00
Geoffrey White
3673c7c813 Rust: Add SQL injection test cases (complete and functioning). 2024-11-19 10:56:35 +00:00
Simon Friis Vindum
b3668f8183 Merge pull request #17971 from paldepind/rust-df-patterns
Rust: Include patterns as data flow nodes
2024-11-19 11:12:12 +01:00
Simon Friis Vindum
2307df41ed Merge pull request #18010 from paldepind/rust-df-viable-callable
Rust: Include method calls in DataFlowCall and implement simple call target resolution
2024-11-19 11:10:34 +01:00
Paolo Tranquilli
e8677b46d5 Bazel: rename shortcut to install 2024-11-19 10:34:40 +01:00
Tom Hvitved
bb8d0b4881 Rust: Handle early returns in async blocks in CFG 2024-11-19 10:33:25 +01:00
Tom Hvitved
b6103e1ef4 Rust: Add CFG test for early return in async block
Also made the test comply with `cargo check`.
2024-11-19 10:32:43 +01:00
Paolo Tranquilli
40b8406d62 Bazel: use installer shortcut in docs and workflows 2024-11-19 10:32:21 +01:00
Paolo Tranquilli
6e33f979c7 Bazel: add an installer shortcut to codeql_pack
This makes the first `codeql_pack` in a package add an `installer` target
aliasing the `<name>-installer` one. This makes it so that one can for
example do `bazel run //rust:installer` instead of the stuttering
`bazel run //rust:rust-installer`. If a bazel package defines multiple
`codeql_pack` targets, the first one only will get the `installer` alias.
2024-11-19 10:25:31 +01:00
Tom Hvitved
ef9f3835e5 Merge pull request #18007 from hvitved/rust/cfg/and-let
Rust: Improve CFG for `let` expressions
2024-11-19 10:23:32 +01:00
Paolo Tranquilli
99494dd540 Merge pull request #18012 from github/revert-18011-revert-17937-redsun82/rust-cargo-options
Revert "Revert "Rust: allow to specify more cargo configuration options""
2024-11-19 09:03:52 +01:00
Tom Hvitved
46b4bad510 Rust: Update expected test output 2024-11-19 08:59:12 +01:00
Tom Hvitved
c85a5f9644 Rust: Run cargo fmt 2024-11-19 08:58:34 +01:00
Paolo Tranquilli
f7ee5f4bf5 Merge pull request #18003 from github/redsun82/rust-qltest
Rust: only accept `options.yml` in QL tests
2024-11-18 17:24:57 +01:00
Paolo Tranquilli
8377ee545f Rust: fix reading lists from options.yml 2024-11-18 17:22:23 +01:00
Paolo Tranquilli
0943389ca1 Rust: add rust-specific deps updater script 2024-11-18 16:16:54 +01:00
Simon Friis Vindum
86672b7e8c Merge branch 'main' into rust-df-viable-callable 2024-11-18 15:52:57 +01:00