Repository navigation
Allowlist releases.amplify.aws for Swift binary targets - #378
Open
kateorlova wants to merge 1 commit into
Open
kateorlova wants to merge 1 commit into
kateorlova wants to merge 1 commit into
Conversation
The AWS SDK for iOS (aws-amplify/aws-sdk-ios-spm) declares its xcframework binaryTargets on releases.amplify.aws. Under egress enforcement the proxy 403s it, SwiftPM fails while Dependabot parses the manifest, and no Swift update pull requests are opened for any repository that depends on the SDK.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the narrowly scoped addition of the AWS SDK download host to the Swift egress allowlist.
No open issues 🎉
What changed in this PR
Adds the AWS SDK for iOS download host to the proxy’s egress allowlist, addressing the Swift dependency-resolution failures reported in #377 without allowing the broader amplify.aws namespace.
Changes:
- Adds
releases.amplify.awsas an exact host under the Swift defaults. - Adds two artifact-download test cases and rejection checks for child, parent, sibling, and suffix-lookalike hosts.
| File | Description |
|---|---|
internal/handlers/egress_allowlist_test.go |
Tests allowed AWS SDK downloads and blocked related hosts. |
internal/handlers/egress_allowlist_defaults.yaml |
Adds and documents the exact AWS SDK download host. |
Review effort: Balanced
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 are you trying to accomplish?
Hosted Dependabot
swiftversion updates fail for any repo depending on the AWS SDK for iOS SwiftPM package sinceproxy-egress-enforcewas enabled. The package declares everybinaryTargetonhttps://releases.amplify.aws/aws-sdk-ios/...(Package.swift), and the allowlist 403s that host:SwiftPM resolves the whole package graph during manifest parsing, so the job dies in
Dependabot::Swift::FileParserand no Swift PRs are opened at all. Ignoring the dependency independabot.ymldoesn't help.This adds
releases.amplify.awsas an exact host toecosystem_default_domains.swift.Fixes #377
Anything you want to highlight for special attention from reviewers?
One exact entry closes the chain.
curl --max-redirs 0 -r 0-0on an artifact from the failing job returns206 binary/octet-streamwith no redirect. The host is a CloudFront distribution (d2yii0bmozfan8.cloudfront.net) with its own certificate (CN=releases.amplify.aws, SAN that host only, issued by Amazon RSA 2048 M04).Exact host, deliberately.
amplify.awsalso fronts AWS's Amplify docs and console hosts, so this does not add*.amplify.awsor the apex.Why not
registries:. The host is anonymous. Declaring it as a credential just to allowlist it would attach anAuthorizationheader to a public CloudFront download.swiftis not an anchor/alias member, so no aliased ecosystem needs the same edit. Precedent for the section: #290 / #298 (sdk.karte.io), #304 / #305 (prelude-public.s3.amazonaws.com).How will you know you've accomplished your goal?
Reproduction is in #377 (proxy
2746302, 2026-11-17): everyreleases.amplify.awsrequest returns403under enforcement and the Swift job fails, while other binary targets in the same job (dl.google.com, GitHub release assets) succeed.Coverage in
TestEgressAllowlist_PublicVendorRegistriesAllowed:AWSCore,AWSConnectParticipant).https://evil.releases.amplify.aws/payload. I confirmed it bites by temporarily changing the entry to.releases.amplify.aws; the test failed withmust stay blocked: https://evil.releases.amplify.aws/payload, then I reverted.https://amplify.aws/payload,https://attacker.amplify.aws/payload.https://releases.amplify.aws.attacker.com/payload.Ran locally with Go 1.27.4:
go build ./...,go vet ./internal/handlers/,go test ./internal/handlers/ -run TestEgress -count=1,gofmt -l internal/handlers/(empty) andgo test -race -count=1 ./...(all packages pass). Docker wasn't available, soscript/testitself wasn't run; that box is left unticked.Checklist
🤖 Generated with Claude Code