Skip to content

ci: run all four cargo-deny checks, not just advisories#82

Merged
bashandbone merged 1 commit into
mainfrom
ci/full-cargo-deny
Jul 26, 2026
Merged

ci: run all four cargo-deny checks, not just advisories#82
bashandbone merged 1 commit into
mainfrom
ci/full-cargo-deny

Conversation

@bashandbone

Copy link
Copy Markdown
Owner

deny.toml configures advisories, licenses, bans and sources. The hk cargo_deny step ran only check 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 advisoriescheck (all four checks)
  • Dropped -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-0364 stays handled by ID in deny.toml's ignore, where the reason is recorded.
  • Glob widened Cargo.lockCargo.lock, Cargo.toml, deny.toml. licenses/bans read Cargo.toml and all four read deny.toml, so editing the policy has to re-run the step that enforces it.

.github/workflows/ci.yml needs no change — the lint job runs hk check --all, so it inherits this.

Verification

Full check on main is clean, with and without the allowances:

advisories ok, bans ok, licenses ok, sources ok

And it fails when policy is violated — dropping MIT from the allow list:

advisories ok, bans ok, licenses FAILED, sources ok

The previous command reported advisories ok and exit 0 on that same graph.

This also closes the submod = 0.3.0 is unlicensed failure noted earlier: with license = "LicenseRef-PlainMIT OR MIT" in place of license-file, cargo-deny resolves the expression through the MIT branch. That is now checked on every run rather than only when someone runs cargo deny check by hand.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn

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

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashandbone
bashandbone merged commit debc885 into main Jul 26, 2026
9 checks passed
@bashandbone
bashandbone deleted the ci/full-cargo-deny branch July 26, 2026 13:48
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