Skip to content

ci: flip harden-runner to egress block mode with per-job allowlists (SLSA phase 5) - #41

Open
serval-frenchie wants to merge 2 commits into
threatcl:mainfrom
serval-frenchie:ci/harden-runner-egress-block
Open

ci: flip harden-runner to egress block mode with per-job allowlists (SLSA phase 5)#41
serval-frenchie wants to merge 2 commits into
threatcl:mainfrom
serval-frenchie:ci/harden-runner-egress-block

Conversation

@serval-frenchie

Copy link
Copy Markdown
Contributor

What

Phase 5, mirroring threatcl's block-mode flip: every job's harden-runner moves from egress-policy: audit (added in #35) to block with an explicit per-job allowed-endpoints list. Off-list outbound connections now fail at connect time, so a compromised action or dependency can't exfiltrate.

Where the lists come from

  • Observed baselines: per-job egress harvested from StepSecurity insights across the runs since ci: supply-chain hardening — scanning, runner hardening, SBOMs (SLSA phase 4) #35 merged (testvet, govulncheck, CodeQL, zizmor, dependency-review all have clean multi-run baselines).
  • GitHub/Go infra cache-miss paths the same tools use when runner caches miss (codeload, objects/release-assets CDNs, Go toolchain fallback).
  • Release job (hasn't run under harden-runner yet): the shared build baseline plus publish endpoints (uploads.github.com, fulcio/rekor/tuf-repo-cdn.sigstore.dev for the provenance attestation, syft's get.anchore.io/toolbox-data.anchore.io). Note the attest step runs before gh release create here, so a blocked endpoint fails the run before anything is published — the safe ordering.

Validation

  • This PR's CI runs every pull_request-triggered job under block mode — green checks are live proof of each list.
  • Adversarial review verified the harden-runner agent semantics at the pinned version (endpoint format, wildcard support, implicitly-allowed Actions control-plane endpoints) and found no missing endpoints.
  • actionlint + zizmor clean.

Companion PR on the CLI repo: threatcl/threatcl (same branch name).

🤖 Generated with Claude Code

serval-frenchie and others added 2 commits July 5, 2026 17:47
…SLSA phase 5)

Every job moves from egress-policy: audit to block with an explicit
allowed-endpoints list: the job's observed egress baseline (StepSecurity
insights across the runs since phase 4 landed) plus GitHub/Go-infra
cache-miss paths the same tools use. The release job has not yet run
under harden-runner; its list adds the publish endpoints (release
upload, Sigstore keyless signing) to the shared build baseline, and its
attest step runs before gh release create, so a blocked endpoint fails
the run before anything is published.

This PR's own CI validates the block lists live for every
pull_request-triggered job.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@serval-frenchie
serval-frenchie marked this pull request as ready for review July 5, 2026 07:48
@serval-frenchie
serval-frenchie requested a review from xntrik as a code owner July 5, 2026 07:48
@xntrik

xntrik commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

I will adjust these to block in the future, just want to make sure that we've captured all the endpoints over a couple of releases

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