diff --git a/.cargo/audit.toml b/.cargo/audit.toml new file mode 100644 index 0000000..ad3b882 --- /dev/null +++ b/.cargo/audit.toml @@ -0,0 +1,5 @@ +[advisories] +# chrono is unmaintained, but it is not ours to drop: rmcp and schemars (via +# rmcp) depend on it unconditionally. Remove this entry once rmcp stops +# requiring it. Every other warning still fails the audit. +ignore = ["RUSTSEC-2026-0543"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbba189..b951620 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,20 +159,7 @@ jobs: - run: cargo build --all-features --locked audit: - runs-on: ubuntu-24.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - # cargo audit itself rather than rustsec/audit-check, whose releases - # still run on Node.js 20. Pinned like the lint toolchain. - - uses: taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39 # v2.90.3 - with: - tool: cargo-audit@0.22.2 - # Unsound and yanked crates fail as vulnerabilities do; ignore a specific - # advisory by ID in .cargo/audit.toml rather than drop this flag. - - run: cargo audit --deny warnings + uses: $/.github/workflows/security.yml # Prebuilt binaries, one per platform the test matrix above runs on. A binary # for a platform whose suite never ran there is a promise nobody checked, so diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index bdeab62..3964779 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -1,9 +1,11 @@ name: Security -# Advisories land without a code change, so this runs on a clock rather than -# on pushes. ci.yml still audits every push and pull request, and gates the -# release on it; this is the run that notices a new advisory between them. +# The one definition of the RustSec audit. ci.yml calls it on every push and +# pull request and gates the release on it; the clock below notices a new +# advisory between those runs, since advisories land without a code change. +# Ignore an advisory by ID in .cargo/audit.toml rather than drop --deny. on: + workflow_call: schedule: - cron: "17 6 * * *" workflow_dispatch: @@ -22,5 +24,5 @@ jobs: - uses: taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39 # v2.90.3 with: tool: cargo-audit@0.22.2 - # Same flags as ci.yml: unsound and yanked crates fail like vulnerabilities. + # Unsound and yanked crates fail like vulnerabilities. - run: cargo audit --deny warnings diff --git a/docs/development.md b/docs/development.md index 6218e7f..e51d1eb 100644 --- a/docs/development.md +++ b/docs/development.md @@ -164,8 +164,10 @@ TTL alone never supplies content for conflict detection. | `build` | release binaries for each tested platform, Linux against glibc 2.17 | | `release` | on pushes to `main` only, after every job above passes, replaces the `latest` GitHub release | -`.github/workflows/security.yml` runs the same `cargo audit` daily and on demand, -because advisories land without a code change; Dependabot proposes the fix. +`audit` is `.github/workflows/security.yml`, called by CI and also run daily and +on demand, because advisories land without a code change; Dependabot proposes +the fix. An advisory with no fix to take is ignored by ID, with the reason, in +`.cargo/audit.toml`. The release scripts live in `.ci/`; their header comments explain the ordering that keeps a failed run from leaving no release behind.