Skip to content

ci: add cargo-deny supply-chain gate for Rust dependencies#149

Merged
BunsDev merged 1 commit into
OpenCoven:mainfrom
maplesyzzurp:ci/cargo-deny
Jun 1, 2026
Merged

ci: add cargo-deny supply-chain gate for Rust dependencies#149
BunsDev merged 1 commit into
OpenCoven:mainfrom
maplesyzzurp:ci/cargo-deny

Conversation

@maplesyzzurp
Copy link
Copy Markdown
Contributor

Adds a dependency-vulnerability gate to CI — the one supply-chain hole in the current setup. CI runs fmt/clippy/test + check-secrets.py, but nothing audits the dependency tree (261 crates, recently grown).

What

A new cargo-deny job in .github/workflows/ci.yml runs cargo deny check advisories bans sources on every PR/push:

  • advisories — fail on known vulnerabilities (RUSTSEC) and yanked crates.
  • bans — fail on wildcard (*) version requirements; surface duplicate transitive versions as warnings (non-fatal).
  • sources — dependencies must come from the official crates.io registry (reject unknown registries / git sources).

Config lives in deny.toml at the repo root.

Scope

Intentionally security-only. License compliance is left for a follow-up so this gate stays focused and does not fail on license classification; enabling it later is a one-line change ([licenses] allow-list + check licenses).

Notes

  • cargo-deny-action is commit-pinned (bb137d7… = v2.0.20) — a supply-chain gate should not itself depend on a mutable action tag.
  • Verified locally with cargo-deny 0.19.8 against the current Cargo.lock: advisories ok, bans ok, sources ok. Two duplicate-version warnings (thiserror, wit-bindgen) are surfaced but non-fatal.

Opened against the contribution freeze as a focused hardening change, in the same vein as #144 / #145 / #148.

CI ran fmt/clippy/test plus a secret scan, but nothing checked the
dependency tree for known vulnerabilities. Add a cargo-deny job
(advisories + bans + sources) so a RUSTSEC advisory, a yanked crate, a
wildcard version requirement, or a dependency from an unexpected registry
fails CI.

deny.toml is scoped to the security checks; license compliance is left for
a follow-up so the gate stays focused. The action is commit-pinned.
Verified locally with cargo-deny 0.19.8: advisories ok, bans ok, sources ok.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a Rust dependency supply-chain audit to CI using cargo-deny, focused on advisories, wildcard bans, and dependency source restrictions.

Changes:

  • Adds a root deny.toml configuring advisories, bans, and sources checks.
  • Adds a new cargo-deny CI job that runs cargo deny check advisories bans sources.
  • Pins the cargo-deny-action by commit SHA.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
deny.toml Defines the cargo-deny policy for vulnerability/yank checks, wildcard bans, duplicate warnings, and trusted dependency sources.
.github/workflows/ci.yml Adds the dependency audit job to the existing CI workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BunsDev BunsDev merged commit e63313b into OpenCoven:main Jun 1, 2026
3 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.

3 participants