From 4d2d51566dc41ecd069d17e66ab3efe895c3aabd Mon Sep 17 00:00:00 2001 From: Gustavo de Santos Date: Thu, 8 Oct 2026 16:53:42 +0200 Subject: [PATCH] Allowlist prelude-public.s3.amazonaws.com for Swift binary targets 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 #304 --- internal/handlers/egress_allowlist_defaults.yaml | 4 ++++ internal/handlers/egress_allowlist_test.go | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/internal/handlers/egress_allowlist_defaults.yaml b/internal/handlers/egress_allowlist_defaults.yaml index a4bc650..7bf25c0 100644 --- a/internal/handlers/egress_allowlist_defaults.yaml +++ b/internal/handlers/egress_allowlist_defaults.yaml @@ -618,5 +618,9 @@ ecosystem_default_domains: # declared in the vendor's own public Package.swift. Anonymous, no redirect. # Exact: *.karte.io also fronts the vendor's unrelated product subdomains. - sdk.karte.io + # Prelude's SDK bucket, serving the PreludeCore xcframework.zip binaryTarget + # declared in the vendor's own public Package.swift. Anonymous, no redirect. + # Exact virtual-hosted bucket; never the path-style s3.amazonaws.com apex. + - prelude-public.s3.amazonaws.com vcpkg: [] pre_commit: [] diff --git a/internal/handlers/egress_allowlist_test.go b/internal/handlers/egress_allowlist_test.go index fb87892..b836b91 100644 --- a/internal/handlers/egress_allowlist_test.go +++ b/internal/handlers/egress_allowlist_test.go @@ -1217,6 +1217,8 @@ func TestEgressAllowlist_PublicVendorRegistriesAllowed(t *testing.T) { // the file parser without these, so no Swift PRs are opened at all. "https://sdk.karte.io/ios/swiftpm/Core-2.39.0/KarteCore-6aa9d244.xcframework.zip", "https://sdk.karte.io/ios/swiftpm/Utilities-3.16.0/KarteUtilities-6aa9d244.xcframework.zip", + // Same failure mode for the Prelude Apple SDK's PreludeCore binaryTarget. + "https://prelude-public.s3.amazonaws.com/sdk/releases/apple/core/0.1.2/PreludeCore-0.1.2.xcframework.zip", } { assert.Nil(t, egressResult(t, h, allowed), "public vendor registry allowed: "+allowed) } @@ -1253,6 +1255,11 @@ func TestEgressAllowlist_PublicVendorRegistriesAllowed(t *testing.T) { // karte.io serves a wildcard cert and resolves subdomains broadly, so // the SDK host must not drag the vendor's parent namespace in with it. "https://attacker.karte.io/payload", + // The Prelude bucket is one exact S3 host: no children, no lookalike + // buckets, and never the path-style apex that reaches every bucket. + "https://evil.prelude-public.s3.amazonaws.com/payload", + "https://prelude-public-attacker.s3.amazonaws.com/payload", + "https://s3.amazonaws.com/prelude-public/payload", } { resp := egressResult(t, h, blocked) if assert.NotNil(t, resp, "must stay blocked: "+blocked) {