Skip to content

feat(ci): add cargo audit + cargo deny to contracts CI pipeline - #371

Merged
snowrugar-beep merged 3 commits into
VertexChainLabs:mainfrom
Moonwalker-rgb:main
Jul 28, 2026
Merged

feat(ci): add cargo audit + cargo deny to contracts CI pipeline#371
snowrugar-beep merged 3 commits into
VertexChainLabs:mainfrom
Moonwalker-rgb:main

Conversation

@Moonwalker-rgb

Copy link
Copy Markdown
Contributor

Summary

Adds a dedicated contracts-audit CI job that runs both cargo-deny and cargo-audit against the contracts/ workspace, ensuring that every pull request and push is scanned for known vulnerabilities in Rust crate dependencies.

Changes

contracts/deny.toml (new file)

A comprehensive cargo-deny configuration that:

  • Sets severity-threshold = "HIGH" — CI fails on HIGH or CRITICAL advisories
  • Allow-lists common OSS licenses (MIT, Apache-2.0, BSD, ISC, Zlib, etc.)
  • Denies unlicensed or unknown-registry/git dependencies
  • Warns on duplicate crate versions and unmaintained/yanked crates

.github/workflows/ci.yml

Added the contracts-audit job that:

  • Installs both cargo-deny and cargo-audit via taiki-e/install-action
  • Runs cargo deny check --show-stats — validates advisories, licenses, bans, and sources
  • Runs cargo audit --deny=warnings — checks the RustSec advisory database

Acceptance Criteria

  • ✅ CI fails if HIGH or CRITICAL advisories are detected (via severity-threshold in deny.toml)
  • ✅ A deny.toml configuration file is committed with an appropriate allow-list

Closes #136

Implements issue VertexChainLabs#136 by adding a dedicated contracts-audit job that
runs both cargo-deny and cargo-audit against the contracts/ workspace.

Changes:
- Create contracts/deny.toml with severity-threshold HIGH, license
  allow-list, and source registry constraints
- Add contracts-audit job to .github/workflows/ci.yml that installs
  both tools and runs them against the workspace

Closes VertexChainLabs#136
The latest cargo-deny requires advisories fields like unmaintained and
unsound to use an object format with `level` and `collection` keys
instead of simple string values. Fixes the CI failure in contracts-audit.
…sories

- Migrate deny.toml to cargo-deny v0.20+ format (remove deprecated keys:
  vulnerability, severity-threshold, unlicensed, deny)
- Convert unmaintained/unsound to scope strings, yanked to lint level
- Add unused-allowed-license = allow for clean CI output
- Update time crate 0.3.36 -> 0.3.47 to fix RUSTSEC-2026-0009
- Add --ignore flags for unmaintained Soroban SDK transitive deps
  (derivative RUSTSEC-2024-0388, paste RUSTSEC-2024-0436)

Copy link
Copy Markdown
Contributor Author

👋 @BigBen-7 @snowrugar-beep — all 21 CI checks are now passing on this PR (Contracts Audit, contract builders, backend, frontend, etc.). This is ready for review and merge. Thanks!

@snowrugar-beep snowrugar-beep left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@snowrugar-beep
snowrugar-beep merged commit 2172d60 into VertexChainLabs:main Jul 28, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cargo audit + cargo deny to contracts/ CI pipeline

2 participants