Commit Graph

85368 Commits

Author SHA1 Message Date
Geoffrey White
7907cbeae1 Rust: Add query suites (identical to the Swift ones apart from their names). 2024-09-12 15:55:06 +01:00
Paolo Tranquilli
0b850a2dff Rust: add missing doc 2024-09-12 16:51:52 +02:00
Simon Friis Vindum
c821ec21bb Rust: CFG edge for return in functions 2024-09-12 16:25:43 +02:00
Paolo Tranquilli
beb27bf5e3 Rust: fix QL compilation and schema includes ordering 2024-09-12 15:05:30 +02:00
Simon Friis Vindum
e1f2fa8c7e Rust: Support break and continue in loops 2024-09-12 14:07:43 +02:00
Geoffrey White
f77c79593e Rust: Updated expected for changes on main. 2024-09-12 12:46:04 +01:00
Asger F
1df69ec1d2 JS: Actually don't propagate into array element 0
Preserving tainted-url-suffix into array element 0 seemed like a good idea, but didn't work out so well.
2024-09-12 13:42:36 +02:00
Asger F
0e4e0f4fdd JS: Preverse tainted-url-suffix when stepping into prefix
A URL of form https://example.com?evil#bar will contain '?evil' after splitting out the '#' suffix, and vice versa.
2024-09-12 13:42:28 +02:00
Asger F
74ab346348 JS: Do not include taint steps in TaintedUrlSuffix::step
TaintedUrlSuffix is currently only used in TaintTracking configs meaning it is already propagated
by taint steps. The inclusion of these taint steps here however meant that implicit reads could appear prior to any of these steps.

This was is problematic for PropRead steps as an expression like x[0] could spuriously read from array element 1 via the path:

x [element 1]
x [empty access path] (after implicit read)
x[0] (taint step through PropRead)
2024-09-12 13:42:25 +02:00
Asger F
2712bf821a JS: Fix a bug in isSafeClientSideUrlProperty 2024-09-12 13:42:23 +02:00
Asger F
bc04131c72 JS: Disallow implicit reads before an optional step 2024-09-12 13:42:22 +02:00
Asger F
e1bed42481 JS: Add inline expectation test specifically for TaintedUrlSuffix 2024-09-12 13:42:20 +02:00
Asger F
cf90c83604 JS: Accept changes to nodes/edges results 2024-09-12 13:42:19 +02:00
Asger F
3b09bc548e JS: Add taint step for shift() 2024-09-12 13:42:17 +02:00
Asger F
3ea1134cc1 JS: Add inline test for .shift() method 2024-09-12 13:42:16 +02:00
Asger F
3fcf4ef7a1 JS: More precise model of .shift()
Array.prototype.shift only returns the first array element.

The mutation of Argument[this] is not yet modelled, and is better handled when we have use-use flow.
2024-09-12 13:42:15 +02:00
Asger F
e4f7560bcd JS: Add missing qldoc 2024-09-12 13:42:14 +02:00
Asger F
15fc450a9e JS: Add reminder to update ClientSideUrlRedirect 2024-09-12 13:42:13 +02:00
Asger F
da696817a3 JS: Convert 'split' taint step to legacy taint step 2024-09-12 13:42:05 +02:00
Asger F
133b016c7c JS: Remove old 'split' handling from TaintedUrlSuffix 2024-09-12 13:41:56 +02:00
Asger F
e87e543850 JS: Ensure optional steps/barriers are computed in the correct stage 2024-09-12 13:35:38 +02:00
Asger F
7790f68fe2 JS: Make the TaintedUrlSuffix library use optional steps/barriers 2024-09-12 13:35:36 +02:00
Asger F
3b34cd72f2 JS: Handle split() with '#' or '?' separator in a separate summary
This summary uses the notion of optional steps/barriers so it becomes configurable whether there is flow into the zero'th array element.

Also makes sure we handle the second-argument version of split().
2024-09-12 13:35:33 +02:00
Asger F
24983a5836 JS: Add OptionalStep and OptionalBarrier MaD tokens
OptionalStep[foo] and OptionalBarrier[foo] contribute steps/barriers that are not active by default, but can be opted into by specific queries or for specific flow states.

(Will be used in the following commits)
2024-09-12 13:30:39 +02:00
Geoffrey White
9d8b514b5c Merge remote-tracking branch 'upstream/main' into files 2024-09-12 12:29:44 +01:00
Paolo Tranquilli
b4b680775c Rust: integrate into standard files+location library 2024-09-12 13:17:10 +02:00
Tamás Vajk
9250c29bd5 Merge pull request #17439 from tamasvajk/feature/include-razor-files-in-fromSource
C#: Include `.razor` files in `File::fromSource`
2024-09-12 13:14:34 +02:00
Paolo Tranquilli
a4c1ec75db Merge pull request #17445 from github/redsun82/rust-qltest
Rust: make ql tests extract files together
2024-09-12 12:53:16 +02:00
Paolo Tranquilli
ed0370b715 Rust: update rust/tools/qltest.sh
Co-authored-by: Arthur Baars <aibaars@github.com>
2024-09-12 12:28:22 +02:00
Alvaro Muñoz
3a39058299 Bump qlpack versions 2024-09-12 10:42:12 +02:00
Simon Friis Vindum
3dc517c82b Rust: Handle absence of else branch in if expression in CFG 2024-09-12 10:35:00 +02:00
Rasmus Wriedt Larsen
66b61ee25a Go/Java/C#: Add change-note 2024-09-12 10:16:55 +02:00
Rasmus Wriedt Larsen
8c10155eb7 mass rename to ActiveThreatModelSource 2024-09-12 10:16:55 +02:00
Alvaro Muñoz
69818c5bb5 Remove bindingset from DataFlow's compatibleTypes 2024-09-12 09:58:21 +02:00
Simon Friis Vindum
67a06cb772 Rust: Support loop in CFG 2024-09-12 09:29:19 +02:00
Paolo Tranquilli
aeae922ef3 Rust: make ql tests extract files together
For the moment this removes the possibility to set custom flags or env
variables for the extractor via comments, but that can be added back
easily if needed with a different mechanism (like an `env` file).
2024-09-12 09:13:35 +02:00
Paolo Tranquilli
5ae8824303 Rust: add context to parameter file expansion errors 2024-09-12 08:56:07 +02:00
Paolo Tranquilli
6adf88542e Rust: fix linting script 2024-09-12 08:53:08 +02:00
Paolo Tranquilli
0a8c0f5ab4 Rust: fix bazel build 2024-09-12 08:46:50 +02:00
Owen Mansel-Chan
076dd07cdc Merge pull request #17429 from owen-mc/go/fix/multiple-anonymous-type-parameters
Go: fix multiple anonymous type parameters
2024-09-12 00:38:56 +01:00
Chuan-kai Lin
ff78bebf19 Shared support for alert filtering 2024-09-11 13:18:26 -07:00
Geoffrey White
c2e86423b9 Rust: Test the successfully extracted files diagnostic. 2024-09-11 17:10:08 +01:00
Geoffrey White
f1d281ffcc Rust: Add test cases for diagnostics. 2024-09-11 17:10:07 +01:00
Alvaro Muñoz
48a0fd500d Bump qlpack versions 2024-09-11 18:09:05 +02:00
Alvaro Muñoz
370d3adbb2 Merge pull request #80 from github/list_files
Add models for list-files actions
2024-09-11 18:08:15 +02:00
Alvaro Muñoz
5fe81ddb08 Update tests 2024-09-11 18:07:25 +02:00
Paolo Tranquilli
5bfe2a9e18 Merge branch 'main' into redsun82/rust-cli-flags 2024-09-11 18:00:47 +02:00
Geoffrey White
a933f0d695 Rust: Add diagnostic query for successfully extracted files. 2024-09-11 16:45:33 +01:00
Paolo Tranquilli
f9e4c0af13 Merge pull request #17435 from github/rust-experiment
Rust: merge current status of experimental extractor into main
2024-09-11 17:31:24 +02:00
Paolo Tranquilli
1b3a5cdab1 Rust: make the cli flags override automatic
This makes the clap flags overlay over `Config` entirely derived via an
attribute macro. Also, the `--intputs-file` option is replaced by a more
standard and versatile `@` parameter file mechanism.
2024-09-11 17:28:59 +02:00