|
5 | 5 | version: 2.1 |
6 | 6 |
|
7 | 7 | orbs: |
8 | | - toolkit: jerus-org/circleci-toolkit@3.2.0 |
| 8 | + toolkit: jerus-org/circleci-toolkit@3.3.0 |
9 | 9 |
|
10 | 10 | parameters: |
11 | 11 | min-rust-version: |
12 | 12 | type: string |
13 | 13 | default: "1.88" |
14 | 14 |
|
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 | | -
|
63 | 15 | workflows: |
64 | 16 | audit: |
65 | 17 | jobs: |
66 | 18 | - toolkit/security: |
67 | 19 | sonarcloud: false |
68 | | - - miri_tests: |
| 20 | + |
| 21 | + - toolkit/rust_miri: |
| 22 | + name: miri_tests |
69 | 23 | 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 |
71 | 38 | 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