Skip to content

feat: enforce block-mode egress for release-rust's plan and build jobs (#30) - #32

Closed
purpleclay wants to merge 1 commit into
mainfrom
31-zig-mirror-allowlist
Closed

feat: enforce block-mode egress for release-rust's plan and build jobs (#30)#32
purpleclay wants to merge 1 commit into
mainfrom
31-zig-mirror-allowlist

Conversation

@purpleclay

@purpleclay purpleclay commented Aug 1, 2026

Copy link
Copy Markdown
Owner

closes #31

Summary by CodeRabbit

  • Security

    • Hardened release automation by blocking unapproved network access and allowing only verified service endpoints.
    • Added endpoint checks for build dependencies and release provenance generation.
  • Reliability

    • Release builds now validate available, reviewed Zig package mirrors and fail clearly when none are usable.
  • Documentation

    • Added guidance for maintaining, comparing, and verifying the reviewed Zig mirror list.
    • Added configuration to keep mirror data and spelling-check settings properly tracked.

#30)

Closes #23

`build`'s harden_runner moves from audit to block, with the allowed
endpoints computed per matrix leg rather than static:

- `plan` now assembles two endpoint sets — one for zigbuild (linux)
legs, one for native (macOS) legs — and bakes the appropriate one into
each matrix entry alongside runs-on/zigbuild, verified against real
harden-runner audit logs rather than guessed
- the zig mirror allowlist is fetched live from ziglang.org's own
authoritative mirror list, since mlugg/setup-zig picks a mirror at
random per run (confirmed: two real runs picked two different ones) —
allowlisting whichever one we'd happened to observe would have been
incomplete
- `plan` gets its own harden_runner (block, ziglang.org only), since
fetching that mirror list is the first time this job reaches the network

Signed-off-by: purpleclay <purpleclaygh@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 86991363-dce0-4f46-be17-e3fc6b7269df

📥 Commits

Reviewing files that changed from the base of the PR and between 9ffaad0 and ea0c48a.

📒 Files selected for processing (7)
  • .github/workflows/release-rust.yml
  • .github/workflows/release.yml
  • .github/zig-mirrors.md
  • .github/zig-mirrors.txt
  • .github/zizmor.yml
  • .gitignore
  • typos.toml

📝 Walkthrough

Walkthrough

Changes

Release egress hardening

Layer / File(s) Summary
Reviewed Zig mirror selection
.github/workflows/release-rust.yml, .github/zig-mirrors.*, .gitignore, typos.toml
The plan job intersects live Zig mirrors with the committed reviewed list and adds the resulting endpoints to the build matrix. Documentation and spellcheck exceptions support the committed list.
Rust build and provenance allowlists
.github/workflows/release-rust.yml
Build jobs now block egress and use matrix-specific endpoint allowlists. The provenance job uses a fixed allowlist. Build step names are normalized without changing commands.
Release workflow policy updates
.github/workflows/release.yml, .github/zizmor.yml
The release workflow blocks egress to explicit GitHub and release-assets endpoints. Zizmor references the updated workflow location.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PlanJob
  participant ZigUpstream
  participant ReviewedList
  participant BuildMatrix
  participant BuildRunner
  PlanJob->>ZigUpstream: Fetch live community mirrors
  PlanJob->>ReviewedList: Read committed reviewed mirrors
  PlanJob->>BuildMatrix: Pass the live/reviewed intersection
  BuildMatrix->>BuildRunner: Apply target-specific allowed endpoints
  BuildRunner-->>PlanJob: Build with blocked egress
Loading

Possibly related issues

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 31-zig-mirror-allowlist

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

@purpleclay purpleclay closed this Aug 1, 2026
@purpleclay
purpleclay deleted the 31-zig-mirror-allowlist branch August 1, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zig mirror allowlist is derived from mutable, unreviewed remote content

1 participant