Skip to content

fix(ci): replace rustsec/audit-check with cacheable cargo-audit#72

Merged
ferhimedamine merged 2 commits into
mainfrom
fix/security-audit-workflow
May 18, 2026
Merged

fix(ci): replace rustsec/audit-check with cacheable cargo-audit#72
ferhimedamine merged 2 commits into
mainfrom
fix/security-audit-workflow

Conversation

@ferhimedamine
Copy link
Copy Markdown
Contributor

Summary

  • Replaces rustsec/audit-check@v2 with the same cacheable approach used in the main dakera repo
  • Adds dtolnay/rust-toolchain@stable + rust-cache to the Security Audit job (was missing, unlike all other jobs)
  • Uses conditional cargo install — only builds from source if cargo-audit isn't already cached/pre-installed
  • Adds CVSS >= 7.0 gate so low-severity advisories are warnings, not CI blockers
  • Fixes the root cause of https://github.com/dakera-ai/dakera-cli/actions/runs/26016277989

Root cause

The ARM runner's rustup binary was missing from /root/.cargo/bin/ causing all cargo proxy symlinks to be dangling. Fixed by reinstalling rustup on the runner. Additionally, rustsec/audit-check@v2 builds cargo-audit from source (including aws-lc-sys C/ASM compilation) on every run — slow (~5min) and fragile on ARM. This PR makes it cacheable and resilient.

Test plan

  • CI passes on this PR (Security Audit job uses new workflow)
  • Verify rust-cache speeds up subsequent audit runs
  • Confirm CVSS gate works (low-severity = warning, high = failure)

🤖 Generated with Claude Code

The rustsec/audit-check@v2 action builds cargo-audit from source on
every run. On ARM runners this compiles aws-lc-sys (C/ASM) which is
slow (~5min) and fragile (sensitive to /tmp state). Switch to the same
approach used by the main dakera repo: dtolnay/rust-toolchain + rust-cache
+ conditional cargo install. Also adds CVSS >= 7.0 gate so low-severity
advisories don't block CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label May 18, 2026
aws-lc-sys assembly compilation is broken on the ARM runner (assembler
can't create output files for aarch64 crypto modules). Since cargo-audit
only scans Cargo.lock and doesn't need ARM-specific builds, move the
audit job to x64 where cargo-audit builds and caches correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ferhimedamine ferhimedamine merged commit 4c3504b into main May 18, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Auto-merge when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant