Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Cargo Audit

# Rust supply-chain coverage via RustSec advisory database. Fills the gap
# that CodeQL leaves — CodeQL has no Rust analyzer, so default-setup runs
# but produces no findings regardless of what's in Cargo.lock. cargo-audit
# is the ecosystem-standard check against rustsec/advisory-db.
#
# Triggers:
# - Cargo.lock / Cargo.toml changes on PRs: catches new vulnerable deps
# before merge.
# - Push to main with the same path filter: belt-and-suspenders if an
# admin bypass lands a direct push.
# - Weekly schedule: catches newly-announced CVEs against an unchanged
# Cargo.lock. This is the most valuable trigger — most Rust supply-chain
# alerts come from advisories published after the code was written.
# - workflow_dispatch: manual re-check.

on:
pull_request:
paths:
- 'Cargo.lock'
- 'Cargo.toml'
- '.github/workflows/cargo-audit.yml'
push:
branches: [main, master]
paths:
- 'Cargo.lock'
- 'Cargo.toml'
schedule:
- cron: '0 6 * * 1' # Mondays 06:00 UTC
workflow_dispatch:

permissions:
contents: read

jobs:
audit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6

- uses: dtolnay/rust-toolchain@stable

# taiki-e/install-action fetches a pre-built cargo-audit binary,
# ~5s instead of the ~90s a `cargo install --locked cargo-audit`
# takes from source. Matters for the weekly cron — keeps the
# run cheap enough to not matter.
- name: Install cargo-audit
uses: taiki-e/install-action@cargo-audit

- name: Run cargo audit
run: cargo audit --deny warnings
3 changes: 2 additions & 1 deletion AUDIT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Protocol Conformance Audit — Rust Client

- **Date:** 2026-04-10
- **Date:** 2026-04-10 (protocol conformance), 2026-04-19 (supply-chain coverage — cargo-audit workflow added)
- **Spec:** `cycles-protocol-v0.yaml` v0.1.24 (OpenAPI 3.1.0)
- **Client:** Rust 1.88+ (MSRV), reqwest 0.12, serde 1, tokio 1, bon 3
- **Cross-reference:** [cycles-server AUDIT.md](https://github.com/runcycles/cycles-server/blob/main/AUDIT.md)
- **Supply-chain coverage:** `.github/workflows/cargo-audit.yml` runs `cargo audit` against rustsec/advisory-db on PRs touching `Cargo.lock` / `Cargo.toml`, on push to `main`, and weekly (Monday 06:00 UTC). Fills the gap left by CodeQL default-setup, which has no Rust analyzer.

---

Expand Down
Loading