Skip to content

ci(security): add cargo-audit CVE scanning to CI pipeline#26

Merged
ferhimedamine merged 3 commits into
mainfrom
feat/cargo-audit-ci-dak-1517
Apr 6, 2026
Merged

ci(security): add cargo-audit CVE scanning to CI pipeline#26
ferhimedamine merged 3 commits into
mainfrom
feat/cargo-audit-ci-dak-1517

Conversation

@ferhimedamine
Copy link
Copy Markdown
Contributor

Summary

Closes DAK-1517 (companion to dakera-ai/dakera#126). Adds automated CVE scanning to the dakera-cli CI pipeline via cargo-audit.

Gap fixed: QA security audit (2026-04-06) found 14 HIGH vulns via manual Dependabot query — all already fixed but only discovered manually. This PR adds the automated detection layer so future vulnerabilities are caught on every PR.

Changes:

  • New Security Audit job in .github/workflows/ci.yml
  • Runs cargo-audit on every PR and push to main
  • Job is standalone (no needs: dependencies) — runs in parallel with other checks
  • Runs on arm64 runner (consistent with all other CLI CI jobs)
  • SSH deploy key configured for private dep access (same pattern as all other jobs)
  • Swatinem cache used for cargo-audit binary (fast after first run)
  • Fails on any RUSTSEC vulnerability advisory (default behaviour)
  • Does not fail on warnings (unmaintained/yanked crates) — avoids noise

Dakera Ops and others added 3 commits April 5, 2026 22:48
Sets up a minimal Rust integration test framework using httpmock (mock
HTTP server) and assert_cmd (CLI subprocess runner). Adds 7 smoke tests
covering 4 commands:

- health: happy-path + connection-refused failure path
- namespace list: empty response + non-empty JSON output
- namespace policy get: verifies rate_limit_enabled field returned (SEC-5)
- namespace policy set: enables and disables rate limiting (SEC-5 regression guard)

No running Dakera server is required — each test is fully self-contained.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
rustfmt collapses single-arg .args() chains onto one line.
No logic changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a Security Audit job that runs cargo-audit on every PR and push
to main. Catches RUSTSEC vulnerabilities automatically — fixes the
detection gap identified in DAK-1517 (v9.x security gap).

- Job runs on arm64 runner (consistent with all cli CI jobs)
- SSH deploy key configured for private dep access
- Fails on any vulnerability advisory (default cargo audit behaviour)
- Does NOT fail on warnings (unmaintained/yanked) to avoid noise
- Swatinem cache used for binary caching across runs

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label Apr 6, 2026
@ferhimedamine ferhimedamine merged commit 134f017 into main Apr 6, 2026
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