Skip to content

ci: Make supply-chain audits advisory for PRs and mandatory for releases - #2788

Merged
rh-jfuller merged 2 commits into
guacsec:mainfrom
rh-jfuller:change-cargo-deny
Oct 23, 2026
Merged

rh-jfuller merged 2 commits into
guacsec:mainfrom
rh-jfuller:change-cargo-deny

Conversation

@rh-jfuller

@rh-jfuller rh-jfuller commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Keep cargo-deny running on PRs and merge queues, but report failures as warnings without blocking CI.

  • Add a blocking audit to the shared binary-build workflow, covering tagged, latest, and nightly releases.
  • Require the audit to pass before building release artifacts, preventing publishing after an audit failure.
  • Keep push-event CI audits blocking.

Closes #2785

Summary by Sourcery

Separate advisory CI audits from mandatory release auditing to prevent publishing artifacts when supply-chain checks fail.

Enhancements:

  • Make supply-chain audit failures advisory for pull requests and merge queues while retaining blocking behavior for push-triggered CI.
  • Add a mandatory supply-chain audit gate before building release artifacts.

CI:

  • Run supply-chain audits in the shared binary-build workflow and require them to pass before release builds proceed.

@rh-jfuller
rh-jfuller requested a review from ctron October 23, 2026 09:30
@rh-jfuller rh-jfuller self-assigned this Oct 23, 2026
@sourcery-ai

sourcery-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The workflows now distinguish development validation from release validation: cargo-deny failures warn without blocking pull requests or merge queues, while a new shared release-workflow audit must pass before vendor or build jobs can produce artifacts; push-event audits remain blocking.

Flow diagram for advisory PR audits and blocking release audits

flowchart TD
    Event[CI event] --> Audit[cargo-deny audit]
    Audit --> PR{Pull request or merge queue?}
    PR -->|Yes| Warning[Report warning]
    PR -->|No: push| Block[Block CI on failure]
    Release[Release workflow] --> ReleaseAudit[Supply chain audit]
    ReleaseAudit -->|Pass| Artifacts[Vendor and build artifacts]
    ReleaseAudit -->|Fail| Stop[Prevent artifact builds and publishing]
Loading

File-Level Changes

Change Details Files
Adds a mandatory supply-chain audit gate to release artifact builds.
  • Runs cargo-deny against the repository before release jobs start.
  • Makes vendor and build jobs depend on a successful audit, covering all publishers using the shared workflow.
.github/workflows/build-binary.yaml
Makes dependency audits advisory for pull requests and merge queues while retaining blocking behavior for pushes.
  • Captures the audit step outcome and enables continue-on-error only for pull_request and merge_group events.
  • Emits a workflow warning when the advisory audit fails and directs reviewers to the audit output.
.github/workflows/ci.yaml

Assessment against linked issues

Issue Objective Addressed Explanation
#2785 Keep cargo-deny findings from blocking pull requests when dependency issues are unrelated to the PR. ✅
#2785 Require a passing supply-chain audit before producing release artifacts. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/build-binary.yaml" line_range="18" />
<code_context>
+    runs-on: ubuntu-24.04
+    steps:
+      - uses: actions/checkout@v7
+      - uses: EmbarkStudios/cargo-deny-action@v2
+        with:
+          command: check
</code_context>
<issue_to_address>
**Compromised audit action can publish**

When an attacker compromises or retargets the action’s `v2` tag before a tagged release runs, the attacker-controlled action runs in the release workflow with the inherited `contents: write` token, which it can exfiltrate and use to modify repository contents or releases.

Pin the action to a reviewed full commit SHA and update it only through reviewed changes.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: .github/workflows/build-binary.yaml:18


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/workflows/build-binary.yaml Outdated
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Oct 23, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

Report cargo-deny failures as warnings for pull requests and merge queues.
Require a successful audit before building release artifacts, blocking
publishing when the audit fails.

Closes guacsec#2785
@sourcery-ai
sourcery-ai Bot dismissed their stale review October 23, 2026 10:23

Sourcery withdrew this approval because the latest commits introduced blocking findings.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

@rh-jfuller
rh-jfuller added this pull request to the merge queue Oct 23, 2026
Merged via the queue into guacsec:main with commit eb4c5db Oct 23, 2026
10 checks passed
@rh-jfuller
rh-jfuller deleted the change-cargo-deny branch October 23, 2026 12:28
@github-project-automation github-project-automation Bot moved this to Done in Trustify Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Re-consider having cargo deny in the standard PR check

1 participant