Skip to content

Commit 62c37fb

Browse files
gortavoherclaude
andcommitted
ci: migrate miri and fuzz to circleci-toolkit orb
- Replace custom miri_tests job with toolkit/rust_miri - Replace custom fuzz_smoke job with toolkit/rust_fuzz_smoke - Upgrade toolkit orb from 3.2.0 to 3.3.0 - Reduce audit.yml from 72 to 42 lines (42% reduction) - Same functionality with better caching and maintainability Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Jeremiah Russell <jerry@jrussell.ie>
1 parent 144e558 commit 62c37fb

File tree

1 file changed

+21
-51
lines changed

1 file changed

+21
-51
lines changed

.circleci/audit.yml

Lines changed: 21 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,67 +5,37 @@
55
version: 2.1
66

77
orbs:
8-
toolkit: jerus-org/circleci-toolkit@3.2.0
8+
toolkit: jerus-org/circleci-toolkit@3.3.0
99

1010
parameters:
1111
min-rust-version:
1212
type: string
1313
default: "1.88"
1414

15-
jobs:
16-
miri_tests:
17-
executor:
18-
name: toolkit/rust_env
19-
min_rust_version: <<parameters.min_rust_version>>
20-
21-
parameters:
22-
min_rust_version:
23-
type: string
24-
description: "Required: The minimum version of the rust compiler to use"
25-
26-
steps:
27-
- checkout
28-
# - run: rustup toolchain install nightly --profile minimal
29-
- run: rustup +nightly component add miri
30-
- run: |
31-
set -eux
32-
# Allow std time/syscalls while still catching UB in Rust code
33-
export MIRIFLAGS="-Zmiri-disable-isolation"
34-
# Limit to core crate to keep runtime bounded
35-
cargo +nightly miri test -p hcaptcha --lib -- \
36-
--skip hcaptcha_mock_verify \
37-
--skip hcaptcha_mock_verify_request_reuse \
38-
--skip hcaptcha_mock_verify_not_found \
39-
--skip hcaptcha_mock_verify_client_response \
40-
--skip hcaptcha_mock_verify_client_response_not_found \
41-
--skip hcaptcha_mock_with_remoteip \
42-
--skip hcaptcha_mock_with_sitekey
43-
44-
fuzz_smoke:
45-
executor:
46-
name: toolkit/rust_env
47-
min_rust_version: <<parameters.min_rust_version>>
48-
49-
parameters:
50-
min_rust_version:
51-
type: string
52-
description: "Required: The minimum version of the rust compiler to use"
53-
54-
steps:
55-
- checkout
56-
# - run: rustup toolchain install nightly --profile minimal
57-
- run: cargo +nightly install cargo-fuzz
58-
- run: |
59-
set -eux
60-
# Short fuzz smoke (60s) on the response parser target
61-
cargo +nightly fuzz run response_parse -runs=0 -max_total_time=60 || true
62-
6315
workflows:
6416
audit:
6517
jobs:
6618
- toolkit/security:
6719
sonarcloud: false
68-
- miri_tests:
20+
21+
- toolkit/rust_miri:
22+
name: miri_tests
6923
min_rust_version: << pipeline.parameters.min-rust-version >>
70-
- fuzz_smoke:
24+
package: "hcaptcha"
25+
test_args: "--lib"
26+
skip_tests: >
27+
hcaptcha_mock_verify
28+
hcaptcha_mock_verify_request_reuse
29+
hcaptcha_mock_verify_not_found
30+
hcaptcha_mock_verify_client_response
31+
hcaptcha_mock_verify_client_response_not_found
32+
hcaptcha_mock_with_remoteip
33+
hcaptcha_mock_with_sitekey
34+
miri_flags: "-Zmiri-disable-isolation"
35+
36+
- toolkit/rust_fuzz_smoke:
37+
name: fuzz_smoke
7138
min_rust_version: << pipeline.parameters.min-rust-version >>
39+
fuzz_target: "response_parse"
40+
max_total_time: 60
41+
fail_on_findings: false

0 commit comments

Comments
 (0)