Repository navigation
CI: check dependency licences, bans and sources with cargo-deny - #276
Open
sombraSoft wants to merge 1 commit into
Open
sombraSoft wants to merge 1 commit into
sombraSoft wants to merge 1 commit into
Conversation
CONTRIBUTING.md requires every dependency to be GPL-2.0-compatible (no Apache-2.0-only, no GPL-3.0), but nothing checked it: a new crate, or an update that changes a crate's licence, could land unnoticed. deny.toml turns the rule into an allowlist (BSD-2-Clause, GPL-2.0-only, MIT, Unicode-3.0: the licences the current graph needs). Apache-2.0 is not on it; `MIT OR Apache-2.0` crates pass through MIT. The same file refuses wildcard versions and crates from anywhere but crates.io, and reports duplicate versions (windows-sys 0.52 / 0.61, syn 2 / 3) without failing. ci.yml runs `cargo deny check bans licenses sources` on Linux for every push and pull request. RustSec advisories run in advisories.yml (daily, by hand, and when Cargo.lock, deny.toml or that workflow changes): a new advisory changes the result without any change to the repository and should not turn unrelated pull requests red.
sombraSoft
force-pushed
the
ci/cargo-deny
branch
from
November 23, 2026 23:12
9ebae7e to
bb232e4
Compare
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.
CONTRIBUTING.md requires every dependency to be GPL-2.0-compatible (no Apache-2.0-only, no GPL-3.0), but nothing checks it. This turns the rule into a cargo-deny check that blocks PRs. A separate workflow checks RustSec advisories daily, so a new advisory does not turn unrelated PRs red.
Part of #265
What is in it
deny.toml:x86_64-pc-windows-msvc.MIT OR Apache-2.0crates pass through MIT..github/workflows/ci.yml: a newdenyjob (ubuntu-latest,EmbarkStudios/cargo-deny-action@v2,check bans licenses sources). The header comment lists it..github/workflows/advisories.yml:check advisoriesruns daily, onworkflow_dispatch, and on pushes / PRs that touchCargo.lock,deny.tomlor the workflow.CI time
denyjob runs in parallel on Ubuntu and takes 19 s. The advisories workflow (22 s) runs only daily and on PRs that changeCargo.lock,deny.tomlor the workflow.Tested
cargo deny check(cargo-deny 0.22.0, Windows):advisories ok, bans ok, licenses ok, sources ok, plus the 2 duplicate warnings (syn, windows-sys). Every crate's licence was checked: 50 pass through MIT, and retour, unicode-ident and the 3 workspace crates use the other entries above.Dependencies (cargo-deny)green (https://github.com/sombraSoft/xcl/actions/runs/45276856646),Advisoriesgreen (https://github.com/sombraSoft/xcl/actions/runs/45276857241).main(9ab7d76), RTX 3060 Ti (driver 621.24), Ryzen 9 5900X, Windows 11, rustc 1.97.1, debug:scripts/test.ps1→ 651 passed, 0 failed, 40 ignored; SKIPPED: 2 (no wave64). This PR changes only CI config, so the compiled code is the same.Regression run
crates/xcl/srcchange.Not tested
pull_requesttrigger ran.AI use