Skip to content

Allowlist prelude-public.s3.amazonaws.com for Swift binary targets - #305

Merged
v-robaiken merged 1 commit into
dependabot:mainfrom
gdesantos:allowlist-prelude-swift-binary-target
Oct 12, 2026
Merged

v-robaiken merged 1 commit into
dependabot:mainfrom
gdesantos:allowlist-prelude-swift-binary-target

Conversation

@gdesantos

Copy link
Copy Markdown
Contributor

What are you trying to accomplish?

Hosted Dependabot swift version updates fail for any repo depending on the Prelude Apple SDK since proxy-egress-enforce was enabled. The SDK declares its PreludeCore SwiftPM binaryTarget on https://prelude-public.s3.amazonaws.com/... (Package.swift), and the allowlist 403s that host:

GET https://prelude-public.s3.amazonaws.com:443/sdk/releases/apple/core/0.1.2/PreludeCore-0.1.2.xcframework.zip
* egress not allowlisted prelude-public.s3.amazonaws.com
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.

The bucket is Prelude's public SDK distribution bucket, referenced from the vendor's own public Package.swift, and serves anonymously, so there is no credential to declare under registries:.

This adds prelude-public.s3.amazonaws.com as an exact host to ecosystem_default_domains.swift.

Fixes #304

Anything you want to highlight for special attention from reviewers?

One exact entry closes the chain. The artifact path from the report, probed with --max-redirs 0, returns 206 application/zip with no redirect_url. All resolved addresses are public AWS S3 (eu-west-1) IPs.

Exact virtual-hosted bucket, deliberately. This follows the existing a8c-libs.s3.amazonaws.com precedent: one already-registered bucket, never a glob over shared S3 and never the path-style s3.amazonaws.com apex. The certificate is AWS's own (CN=*.s3-eu-west-1.amazonaws.com, issued by Amazon), so ownership evidence is the vendor's public manifest naming the bucket, not the cert.

Why not registries:. The host is anonymous. Declaring it as a credential just to allowlist it would attach an Authorization header to a public S3 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).

How will you know you've accomplished your goal?

Reproduction is in #304 (proxy 20763b1, 2026-10-08): the PreludeCore 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: the exact URL from the failing job.
  • Negative child: https://evil.prelude-public.s3.amazonaws.com/payload. I confirmed it bites by temporarily changing the entry to .prelude-public.s3.amazonaws.com; the test failed with must stay blocked: https://evil.prelude-public.s3.amazonaws.com/payload, then I reverted.
  • Negative lookalike bucket: https://prelude-public-attacker.s3.amazonaws.com/payload.
  • Negative path-style apex: https://s3.amazonaws.com/prelude-public/payload.

Ran locally with Go 1.26.8: go build ./..., go test ./internal/handlers/ -run TestEgress -count=1, gofmt -l internal/handlers/ (empty) and go test -race -count=2 ./... (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.

The Prelude Apple SDK declares its PreludeCore binaryTarget on this S3
bucket. SwiftPM resolves it while Dependabot parses the manifest, so the
block fails every Swift update job for repos that depend on the SDK.

Fixes dependabot#304
@gdesantos
gdesantos requested a review from a team as a code owner October 8, 2026 14:58
@v-robaiken v-robaiken added the allowlist Changes the default egress allowlist label Oct 12, 2026
@v-robaiken
v-robaiken merged commit 4b9734b into dependabot:main Oct 12, 2026
106 of 108 checks passed
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.

prelude-public.s3.amazonaws.com (Prelude iOS SDK SwiftPM binary target) blocked by the enforced proxy egress allowlist

2 participants