Skip to content

Add cargo-audit security scan to CI #97

@Miracle656

Description

@Miracle656

Background

The Soroban smart contracts have Cargo dependencies that could contain known CVEs. Adding cargo audit to CI automatically fails the build if a vulnerability is detected in any transitive dependency, keeping the contracts secure without manual tracking.

What to build

Add a CI job that runs cargo audit against the contracts workspace on every PR targeting main.

Key files

  • .github/workflows/ci.yml — add a new job here
  • contracts/Cargo.lock — must be committed for cargo audit to work

Suggested execution

git checkout -b ci/cargo-audit
  1. Add a security-audit job to .github/workflows/ci.yml that installs cargo-audit and runs it from contracts/
  2. Ensure contracts/Cargo.lock is committed (check .gitignore)
  3. If existing advisories are acceptable, add them to audit.toml with a justification comment

Example commit message:
ci: add cargo-audit security scan for Soroban contract dependencies

Acceptance criteria

  • CI job runs on every PR to main
  • Job fails if a non-ignored CVE is found
  • Any ignored advisories have a comment in audit.toml

Drips Wave · Complexity: Trivial · 100 points
Comment below to request assignment. PR must include Closes #[this issue].

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions