Skip to content

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

Open
maplesyzzurp wants to merge 1 commit into
OpenCoven:mainfrom
maplesyzzurp:ci/cargo-deny
Open

ci: add cargo-deny supply-chain gate for Rust dependencies#149
maplesyzzurp wants to merge 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.
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.

1 participant