fix(release): narrow S3 egress wildcards to Apple notary bucket - #138
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the two wildcard S3 entries in the goreleaser job's harden-runner allowlist with the one specific hostname a release actually contacts:
*.s3.amazonaws.com:443,*.s3.us-west-2.amazonaws.com:443notary-submissions-prod.s3.us-west-2.amazonaws.com:443Why
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
PUTto 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.comglobal 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.