ci: run all four cargo-deny checks, not just advisories#82
Merged
Conversation
The hk `cargo_deny` step ran `check advisories`, so `deny.toml`'s licenses, bans and sources policy was configured but never enforced by any hook or CI job — the same shape as a green check that runs nothing. `check` with no subcommand runs all four. Also drops `-A unsound -A unmaintained -A yanked -A notice`. They suppress nothing in the current graph, so their only effect would be to hide a future unmaintained or yanked dependency. RUSTSEC-2024-0364 is still handled by ID in deny.toml's `ignore`, where the reason is written down. The glob widens from Cargo.lock to Cargo.lock/Cargo.toml/deny.toml: licenses and bans read Cargo.toml and all four read deny.toml, so editing the policy itself has to re-run the step that enforces it. Verified: full check is clean on main, and fails `licenses FAILED` when MIT is dropped from the allow list — a violation the previous command reported as `advisories ok`, exit 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deny.tomlconfigures advisories, licenses, bans and sources. The hkcargo_denystep ran onlycheck advisories, so three of those four sections were policy nobody enforced — the same shape as the CI job that reported success across three toolchains while running zero tests.Changes
check advisories→check(all four checks)-A unsound -A unmaintained -A yanked -A notice. They suppress nothing in the current graph; keeping them would only hide a future unmaintained or yanked dependency.RUSTSEC-2024-0364stays handled by ID indeny.toml'signore, where the reason is recorded.Cargo.lock→Cargo.lock,Cargo.toml,deny.toml.licenses/bansreadCargo.tomland all four readdeny.toml, so editing the policy has to re-run the step that enforces it..github/workflows/ci.ymlneeds no change — the lint job runshk check --all, so it inherits this.Verification
Full check on
mainis clean, with and without the allowances:And it fails when policy is violated — dropping
MITfrom the allow list:The previous command reported
advisories okand exit 0 on that same graph.This also closes the
submod = 0.3.0 is unlicensedfailure noted earlier: withlicense = "LicenseRef-PlainMIT OR MIT"in place oflicense-file, cargo-deny resolves the expression through theMITbranch. That is now checked on every run rather than only when someone runscargo deny checkby hand.🤖 Generated with Claude Code
https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn