Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Adding a new variant to the `Actions` enum always triggers an `enum_variant_adde

## Advisory Triage

There is one advisory ignore list: `deny.toml`'s `[advisories].ignore`. Both the blocking `cargo-audit` job and the weekly `cargo-deny-scheduled.yml` read it, so triage a new advisory there once. `unsound` and `unmaintained` are set to `"all"`: cargo-deny's `unsound` default of `"workspace"` drops advisories in transitive crates, which hid RUSTSEC-2026-0306 and RUSTSEC-2026-0205. Raw `cargo audit` is no longer run in CI. A workflow `--ignore RUSTSEC` flag fails `tests/test_deny_policy.py`, which also checks that a GPL fixture is rejected and an MIT fixture accepted.
There is one advisory ignore list: `deny.toml`'s `[advisories].ignore`. Both the blocking `cargo-audit` job and the weekly `cargo-deny-scheduled.yml` read it, so triage a new advisory there once. `unsound` and `unmaintained` are set to `"all"`: cargo-deny's `unsound` default of `"workspace"` drops advisories in transitive crates, which hid RUSTSEC-2026-0306 and RUSTSEC-2026-0205. Raw `cargo audit` is no longer run in CI. A workflow `--ignore RUSTSEC` flag, or `unsound`/`unmaintained` set to anything but `"all"`, fails `tests/test_deny_policy.py`, which also checks that a GPL fixture is rejected and an MIT fixture accepted.

## Branch Workflow

Expand Down
11 changes: 11 additions & 0 deletions tests/test_deny_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pathlib import Path

import pytest
import tomllib

REPO = Path(__file__).resolve().parent.parent
FIXTURES = REPO / "tests/fixtures/deny"
Expand Down Expand Up @@ -78,3 +79,13 @@ def test_one_ignore_list_no_workflow_has_its_own() -> None:
assert files
offenders = [f.name for f in files if "--ignore RUSTSEC" in f.read_text()]
assert offenders == []


def test_advisories_cover_transitive_crates() -> None:
"""cargo-deny 0.20.2 defaults `unsound` to "workspace", which hid
RUSTSEC-2026-0306 and -0205 (etch-cli#159). The fixtures cannot see this
setting, so pin both scope keys explicitly."""
with (REPO / "deny.toml").open("rb") as handle:
advisories = tomllib.load(handle)["advisories"]
assert advisories.get("unsound") == "all"
assert advisories.get("unmaintained") == "all"
Loading