Skip to content

ci(security): decide yanked/unsound/unmaintained advisory posture (LAB-1152) - #71

Open
27Bslash6 wants to merge 2 commits into
mainfrom
lab-1152-advisory-posture
Open

ci(security): decide yanked/unsound/unmaintained advisory posture (LAB-1152)#71
27Bslash6 wants to merge 2 commits into
mainfrom
lab-1152-advisory-posture

Conversation

@27Bslash6

Copy link
Copy Markdown
Contributor

Closes LAB-1152.

Decision per advisory class

Class Posture Why
yanked fail on the weekly schedule run (cargo audit --deny yanked); warn on PR/push A yank lands against an unchanged lockfile — it must not block unrelated PRs — and the schedule run exists precisely for advisories no PR diff touches. The red is typically fixed same-day with cargo update -p; enforcement lives on the audit side because cargo-deny's feature-resolved graph pruned the actual yanked crate (chacha20, behind reqwest's unused quinn path) while audit saw it.
unsound keep warn everywhere Born red on 3 counts today; rand 0.8.5 (via fred 9.4 + memcache 0.19, RUSTSEC-2026-0097) has no compatible upgrade — enforcement forces an accumulating ignore-list, a worse posture than an honest warning.
unmaintained keep warn everywhere By definition no fixed version exists; same treadmill with no unblock path. deny.toml scopes stay narrow — widening to "all" would only duplicate what audit already reports from the verbatim lockfile every run.

deny.toml's untracked TODO ("widening both scopes to all is open work, not covered") is replaced by this decision of record. README table and Makefile updated to match; make audit runs the strict form so a local pass covers every CI event.

Yanked check proven to execute — and now self-proving

  • Historical evidence on cachekit-lean: run 33334234173 (green, 2026-08-30) shows Updating crates.io index followed by Warning: yanked in the audit step — the check runs on that runner and detects real yanks; it just exited 0.
  • New finding (verified locally on the pinned 0.22.1): with the crates.io index unreachable but the advisory DB reachable, cargo audit --deny yanked silently skips the yank check and exits 0 — no warning at all. Total network loss fails closed (advisory DB fetch errors out). Since the weekly run is the sole enforcement point, its leg now requires positive evidence (Updating crates.io index present, no couldn't check warning) and fails otherwise. Fail-closed brittleness is confined to the schedule event — a wording change in the pinned tool can only redden the weekly run, never a PR.

Green-on-clean proof (local, pinned tool versions 0.19.4 / 0.22.1)

  • cargo update -p chacha20 → 0.10.1 (yanked) → 0.10.2 (not yanked; crates.io checksum verified; sole dependent rand 0.10.2 wants ^0.10). cargo check --all-features --locked passes.
  • cargo deny --locked --all-features check → exit 0: advisories ok, bans ok, licenses ok, sources ok (--locked and --all-features preserved).
  • cargo audit --deny yanked → exit 0, warning: 3 allowed warnings found (the three unsound advisories that stay warn by decision: anyhow, rand 0.8.5, scc).

Notes

  • Expert panel (bug-hunter, security, craftsman, catchphrase) reviewed the diff; applied findings: the proof-of-run guard above, softened the "a yank always has a fix" overclaim, de-duplicated the rationale to deny.toml as single decision of record, fixed the stale Makefile header, README row now covers push runs. No findings rejected.
  • Sibling posture (noted, not fixed here — LAB-1037 territory): cachekit-core and cachekit-py both leave yanked at warn and run bare cargo audit; cachekit-core installs cargo-audit unpinned.
  • Trivial-conflict warning: #68 (LAB-1151) touches the same two files; whichever lands second rebases (accepted on-ticket).

…B-1152)

yanked: enforced — cargo audit --deny yanked on the weekly schedule run,
where advisories against an unchanged lockfile belong; PR/push runs keep
the warning so an upstream yank never blocks unrelated PRs. The schedule
leg now also proves the yank check ran (cargo-audit 0.22.1 silently skips
it and exits 0 when the crates.io index is unreachable — verified).

unsound / unmaintained: stay warnings on every event. Neither class
guarantees a fixed version exists (rand 0.8.5 via fred 9.4 + memcache
0.19 has no compatible upgrade today), so enforcement means an
ignore-list treadmill. deny.toml scopes stay narrow: cargo audit already
reports every transitive case from the verbatim lockfile each run.

deny.toml's untracked TODO is replaced by the decision of record;
README table and Makefile follow. cargo update -p chacha20 clears the
one yanked crate (0.10.1 -> 0.10.2) so the enforced class is born green.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Approval pending

CodeRabbit has no unresolved comments, but it could not review the latest commit because the review limit was reached. Follow the review guidance in this comment to continue.


Comment @coderabbitai help to get the list of available commands.

@kodus-27b

This comment has been minimized.

Comment thread .github/workflows/security.yml
…lure (LAB-1152)

Kody flagged the proof-of-run guard as brittle on a warm index cache.
The premise is wrong — cargo-audit 0.22.1 prints 'Updating crates.io
index' unconditionally before the fetch attempt (auditor.rs), so a
fresh cache cannot suppress it; verified empirically cold and warm.

But the review surfaced a real hole in the opposite direction: on
index fetch/open failure the tool warns "couldn't update|open
crates.io index", skips the yank check entirely, and exits 0 — and
the guard's failure grep only matched "couldn't check", so the
weekly enforcing run would go green on a skipped check (the attempt
line prints before the failed fetch). Broaden the failure grep to all
three skip signals; keep the attempt-line grep, which is what catches
the check being disabled outright (e.g. a future -n).
@27Bslash6

Copy link
Copy Markdown
Contributor Author

@kody start-review

@kodus-27b

kodus-27b Bot commented Aug 30, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

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