Skip to content

Allowlist releases.amplify.aws for Swift binary targets - #378

Open
kateorlova wants to merge 1 commit into
dependabot:mainfrom
kateorlova:allowlist-releases-amplify-aws
Open

kateorlova wants to merge 1 commit into
dependabot:mainfrom
kateorlova:allowlist-releases-amplify-aws

Conversation

@kateorlova

Copy link
Copy Markdown

What are you trying to accomplish?

Hosted Dependabot swift version updates fail for any repo depending on the AWS SDK for iOS SwiftPM package since proxy-egress-enforce was enabled. The package declares every binaryTarget on https://releases.amplify.aws/aws-sdk-ios/... (Package.swift), and the allowlist 403s that host:

GET https://releases.amplify.aws:443/aws-sdk-ios/AWSConnectParticipant-2.41.0.zip
* egress not allowlisted releases.amplify.aws
403 ...

SwiftPM resolves the whole package graph during manifest parsing, so the job dies in Dependabot::Swift::FileParser and no Swift PRs are opened at all. Ignoring the dependency in dependabot.yml doesn't help.

This adds releases.amplify.aws as an exact host to ecosystem_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-0 on an artifact from the failing job returns 206 binary/octet-stream with 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.aws also fronts AWS's Amplify docs and console hosts, so this does not add *.amplify.aws or the apex.

Why not registries:. The host is anonymous. Declaring it as a credential just to allowlist it would attach an Authorization header to a public CloudFront download.

swift is 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): every releases.amplify.aws request returns 403 under 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:

  • Positive: two URLs from the failing job (AWSCore, AWSConnectParticipant).
  • Negative child: https://evil.releases.amplify.aws/payload. I confirmed it bites by temporarily changing the entry to .releases.amplify.aws; the test failed with must stay blocked: https://evil.releases.amplify.aws/payload, then I reverted.
  • Negative parent and sibling: https://amplify.aws/payload, https://attacker.amplify.aws/payload.
  • Negative suffix lookalike: 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) and go test -race -count=1 ./... (all packages pass). Docker wasn't available, so script/test itself wasn't run; that box is left unticked.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

🤖 Generated with Claude Code

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.
@kateorlova
kateorlova requested a review from a team as a code owner November 20, 2026 13:19
Copilot AI balanced review requested due to automatic review settings November 20, 2026 13:19
@github-actions github-actions Bot added the allowlist Changes the default egress allowlist label Nov 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.aws as 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allowlist Changes the default egress allowlist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

releases.amplify.aws (AWS SDK for iOS SwiftPM binary targets) blocked by the enforced proxy egress allowlist

2 participants