Skip to content

fix(release): narrow S3 egress wildcards to Apple notary bucket - #138

Merged
ryanlewis merged 1 commit into
mainfrom
narrow-s3-egress
Aug 25, 2026
Merged

fix(release): narrow S3 egress wildcards to Apple notary bucket#138
ryanlewis merged 1 commit into
mainfrom
narrow-s3-egress

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

What

Replaces the two wildcard S3 entries in the goreleaser job's harden-runner allowlist with the one specific hostname a release actually contacts:

  • Removed: *.s3.amazonaws.com:443, *.s3.us-west-2.amazonaws.com:443
  • Added: notary-submissions-prod.s3.us-west-2.amazonaws.com:443

Why

The wildcards resolve to any S3 bucket, including one an attacker controls. This job holds the macOS signing P12, the notary key, and the Homebrew tap token — the workflow's own comment calls it the prime exfiltration target. Every other allowlist entry is a specific host; these two were the only general-purpose outbound write path left open, so a compromised dependency could PUT to an arbitrary bucket and the egress policy would allow it.

Both wildcards were added preemptively in #130 rather than from observed traffic. The harden-runner log from the successful v0.5.3 run (32801379092) shows the only S3 host contacted is notary-submissions-prod.s3.us-west-2.amazonaws.com — quill's upload to Apple's notary submission bucket. Nothing ever matched the *.s3.amazonaws.com global wildcard. The bucket-specific host closes the exfil path: the hostname pins the bucket, and that bucket is Apple's.

Caveat

This job only fires on v* tags, so CI on this PR cannot exercise the change. If Apple ever moves the notary bucket (or quill switches to the global/accelerate S3 endpoint), the next release fails loudly on a blocked connection and the harden-runner report names the endpoint to re-add — the same discipline already written into the workflow comment. Worth cutting the next release soon after merging to confirm.

The *.s3.amazonaws.com and *.s3.us-west-2.amazonaws.com wildcards
matched any S3 bucket, leaving a general-purpose outbound write path
open in the one job that holds the signing P12 and tap token. The
harden-runner log from the successful v0.5.3 run (32801379092) shows
the only S3 host actually contacted is
notary-submissions-prod.s3.us-west-2.amazonaws.com (quill's upload to
Apple's notary service); nothing ever matched the global wildcard.
Replace both with that specific hostname.
@ryanlewis
ryanlewis merged commit 9d91c51 into main Aug 25, 2026
7 checks passed
@ryanlewis
ryanlewis deleted the narrow-s3-egress branch August 25, 2026 04:05
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