Skip to content

ci: only fail pull requests on advisories they introduce - #74

Merged
zoeyrose merged 3 commits into
mainfrom
ci/advisory-baseline
Oct 17, 2026
Merged

zoeyrose merged 3 commits into
mainfrom
ci/advisory-baseline

Conversation

@zoeyrose

Copy link
Copy Markdown
Member

Requested by Zoey · project thread

Summary

Before: when a RustSec advisory was published against a crate already in main's Cargo.lock, cargo deny check failed on every open pull request. #72 (a GitHub Actions bump) and #73 went red on RUSTSEC-2026-0346 through 0349 in rustls 0.23.45 even though neither change caused them.

After: pull requests fail only on advisories they introduce. Advisories already present on the base revision show up as warnings on the PR. Pushes to main, local tools/validate.sh runs and the released-dependency candidate stay strict, and a new daily Dependency advisories workflow fails on main so a new advisory is visible in one place instead of on every PR.

How: tools/check-advisories.sh runs cargo deny check advisories with JSON output. When ADVISORY_BASE_REVISION is set, which validate.yml does from the pull request's base SHA, it runs the same check in a temporary worktree at that revision and fails only on the advisory IDs the base does not have. validate.sh keeps running bans, licenses and sources directly.

The rustls fix itself is on #72 and #73.

Provenance and assets

  • Design inputs, authorship, reuse method, fixtures, and generated inputs are recorded. (CI tooling only, newly authored)
  • No GPL source/test/fixture or unallowlisted asset was used.
  • Dependency/native/asset policy and notices are current. (no dependency changes)

Validation

  • tools/validate.sh (CI)
  • Ran tools/check-advisories.sh locally with pinned cargo-deny 0.20.2 in each mode: strict on current main exits 1; with base = main it exits 0 and warns about the four rustls advisories; with rustls 0.23.46 it prints advisories ok; with base = a fixed lockfile and head = main's lockfile it exits 1 and lists the four as introduced.
  • Bounds, authority, privacy, device loss, cancellation, and recovery were reviewed. (no runtime change; temporary worktree removed on exit)

Generated by Claude Code

A RustSec advisory published against main's Cargo.lock failed every open
pull request, including Dependabot updates that do not touch Rust. Pull
requests now compare against the base revision and warn about advisories
already present there; main pushes, local runs and dependency candidates
stay strict, and a daily workflow reports advisories on main.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016FyuSKkineBeVKbubYFsqd
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

  • .github/workflows/advisories.yml

@zoeyrose zoeyrose self-assigned this Oct 17, 2026
@zoeyrose
zoeyrose marked this pull request as ready for review October 17, 2026 14:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T14:22:46.090789Z 74ba4a6 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-17T14:28:42.012522Z 74ba4a6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74ba4a61e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/check-advisories.sh Resolved
Comment thread tools/check-advisories.sh Resolved
A cargo-deny run that failed without reporting advisories (a database
fetch or metadata error) was read as no advisories. Treat a non-zero exit
without a completed summary and findings as a failure, and key findings by
crate coordinates so distinct yanked crates are not merged into one entry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016FyuSKkineBeVKbubYFsqd
@zoeyrose
zoeyrose merged commit 2e75397 into main Oct 17, 2026
10 checks passed
@zoeyrose
zoeyrose deleted the ci/advisory-baseline branch October 17, 2026 14:30
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.

2 participants