Skip to content

Commit 178786e

Browse files
ci: green the two red checks (CodeQL→Rust, PR fuzzing→cargo-fuzz) + pin lint toolchain (#89)
Fixes the two long-standing red CI checks on `main` and locks the lint toolchain. **No application code changes** — all three are `.github/workflows` fixes. ## 1. CodeQL → analyze Rust The matrix only scanned `javascript-typescript`, but the repo has **zero JS/TS files**, so CodeQL returned a `configuration error` on every run. Switched to `language: rust` (build-mode `none`) — actual security coverage instead of a guaranteed failure. ## 2. PR fuzzing → native cargo-fuzz The `PR (address)` check was ClusterFuzzLite, whose `build_fuzzers` action **hardcodes `.clusterfuzzlite/Dockerfile`**. This repo is **Containerfile-only** (enforced by `contractile.just` / `Trustfile.a2ml`), so it failed with `open Dockerfile: no such file or directory`. Replaced with a native `cargo-fuzz` job that runs the existing `fuzz/fuzz_targets/fuzz_input.rs` target directly on the runner — **no container, no Dockerfile, no podman**. (`cflite_pr.yml` removed, `fuzz-pr.yml` added; the `PR` job + `address` matrix names are preserved so the check name is unchanged. The `.clusterfuzzlite/` harness is left in place for the scheduled batch workflow.) ## 3. Pin the Build Check toolchain `dtolnay/rust-toolchain` pinned to `1.96.0` (kept in sync with `rust-toolchain.toml`) so a floating `stable` can't reintroduce the fmt/clippy skew that previously reddened `main`. ## Verification note CodeQL-Rust and cargo-fuzz can only be exercised in CI, not locally — so this PR's own checks are the validation. Will iterate if either needs adjustment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7 --- _Generated by [Claude Code](https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent d797723 commit 178786e

4 files changed

Lines changed: 49 additions & 30 deletions

File tree

.github/workflows/cflite_pr.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
include:
30-
- language: javascript-typescript
30+
- language: rust
3131
build-mode: none
3232
steps:
3333
- name: Checkout

.github/workflows/fuzz-pr.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Native cargo-fuzz PR smoke. Replaces ClusterFuzzLite, whose build_fuzzers
3+
# action hardcodes `.clusterfuzzlite/Dockerfile` with no override -- this repo's
4+
# convention is Containerfile-only (enforced by contractile.just / Trustfile.a2ml),
5+
# so we run the existing fuzz/ targets directly on the runner: no container,
6+
# no Dockerfile, no podman required.
7+
name: PR fuzzing (cargo-fuzz)
8+
on:
9+
pull_request:
10+
branches: [main]
11+
permissions:
12+
contents: read
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
jobs:
17+
PR:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
sanitizer: [address]
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
- name: Install Rust nightly + rust-src
28+
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # nightly (via toolchain input)
29+
with:
30+
toolchain: nightly
31+
components: rust-src
32+
- name: Install cargo-fuzz
33+
run: cargo install cargo-fuzz --locked
34+
- name: Build fuzz targets (${{ matrix.sanitizer }})
35+
run: cargo +nightly fuzz build --sanitizer ${{ matrix.sanitizer }}
36+
- name: Run fuzz targets (${{ matrix.sanitizer }}, code-change smoke)
37+
run: |
38+
for target in $(cargo +nightly fuzz list); do
39+
echo "::group::fuzz ${target}"
40+
cargo +nightly fuzz run --sanitizer ${{ matrix.sanitizer }} "${target}" -- \
41+
-max_total_time=60 -rss_limit_mb=4096
42+
echo "::endgroup::"
43+
done

.github/workflows/security.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ jobs:
5555
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5656
- name: Install Rust toolchain
5757
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
58+
with:
59+
# Keep in sync with rust-toolchain.toml. Pins the lint gate so a
60+
# floating `stable` cannot reintroduce a fmt/clippy skew on main.
61+
toolchain: "1.96.0"
62+
components: clippy, rustfmt
5863

5964
- name: Cache cargo registry
6065
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4

0 commit comments

Comments
 (0)