name: Weekly # Checks that do not depend on a push: a new RustSec advisory can land on a # dependency while the code stands still, and fuzzing finds more the longer # its corpus grows. The corpus lives on the persistent runner volume, so every # run starts where the last one stopped. on: schedule: - cron: '17 6 * * 1' workflow_dispatch: concurrency: group: weekly cancel-in-progress: false env: CARGO_TERM_COLOR: always CARGO_HOME: /opt/hostedtoolcache/cargo RUSTUP_HOME: /opt/hostedtoolcache/rustup jobs: audit: name: Dependency audit runs-on: linux-arm64 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable - name: cargo audit run: | command -v cargo-audit >/dev/null || cargo install cargo-audit --locked cargo audit fuzz: name: Fuzz (${{ matrix.target }}) runs-on: linux-arm64 env: CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/xexeu-fuzz strategy: fail-fast: false max-parallel: 1 matrix: target: [der_certificate, service_banner, vuln_feeds, operator_input] steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@nightly - name: cargo-fuzz run: command -v cargo-fuzz >/dev/null || cargo install cargo-fuzz --locked - name: Fuzz for 10 minutes run: | corpus=/opt/hostedtoolcache/fuzz-corpus/xexeu/${{ matrix.target }} mkdir -p "$corpus" cargo +nightly fuzz run "${{ matrix.target }}" "$corpus" -- -max_total_time=600 # A crash fails the job; its input is printed here so it can be replayed # with `cargo +nightly fuzz run ` and turned into a test. - name: Crash input if: failure() run: | for f in fuzz/artifacts/${{ matrix.target }}/*; do [ -f "$f" ] || continue echo "== $f"; base64 -w0 "$f"; echo done