From 17896ce7ab3e70295e25e90775ffb8fb0e87e511 Mon Sep 17 00:00:00 2001 From: Chaoyi Wang <4298595+wcy41gtc@users.noreply.github.com> Date: Sat, 17 Oct 2026 16:31:01 -0700 Subject: [PATCH] Allowlist download.onnxruntime.ai for Swift binary targets microsoft/onnxruntime-swift-package-manager declares its onnxruntime and onnxruntime_extensions binaryTargets on download.onnxruntime.ai. The enforced egress allowlist blocks the host, so SwiftPM fails while the Swift file parser resolves the package graph and no update PRs are made. Add the exact host to the swift defaults, with tests for both release URLs and blocked probes for a child, a sibling and the parent domain. --- internal/handlers/egress_allowlist_defaults.yaml | 5 +++++ internal/handlers/egress_allowlist_test.go | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/internal/handlers/egress_allowlist_defaults.yaml b/internal/handlers/egress_allowlist_defaults.yaml index 5963862..1d03285 100644 --- a/internal/handlers/egress_allowlist_defaults.yaml +++ b/internal/handlers/egress_allowlist_defaults.yaml @@ -684,5 +684,10 @@ ecosystem_default_domains: # (RealSprint/vindral-apple-sdk-spm). Anonymous, no redirect. # Exact: *.vindral.com also fronts the vendor's CDN and stage/test hosts. - applesdk.vindral.com + # Microsoft's ONNX Runtime release host, serving the onnxruntime and + # onnxruntime_extensions zip binaryTargets declared in the vendor's own + # public Package.swift (microsoft/onnxruntime-swift-package-manager). + # Anonymous, no redirect. Exact: the certificate names only this host. + - download.onnxruntime.ai vcpkg: [] pre_commit: [] diff --git a/internal/handlers/egress_allowlist_test.go b/internal/handlers/egress_allowlist_test.go index fc77fea..29156a4 100644 --- a/internal/handlers/egress_allowlist_test.go +++ b/internal/handlers/egress_allowlist_test.go @@ -1282,6 +1282,9 @@ func TestEgressAllowlist_PublicVendorRegistriesAllowed(t *testing.T) { "https://sf16-fe-tos-sg.i18n-pglstatp.com/obj/pangle-sdk-static-va/8.3.0.8/TikTokBusinessSDK.xcframework.zip", // Same failure mode for the Vindral Apple SDK's VindralStreaming binaryTarget. "https://applesdk.vindral.com/tag/1.2.0/VindralStreaming.zip", + // Same failure mode for ONNX Runtime's onnxruntime and onnxruntime_extensions binaryTargets. + "https://download.onnxruntime.ai/pod-archive-onnxruntime-c-1.24.2.zip", + "https://download.onnxruntime.ai/pod-archive-onnxruntime-extensions-c-0.13.0.zip", } { assert.Nil(t, egressResult(t, h, allowed), "public vendor registry allowed: "+allowed) } @@ -1333,6 +1336,11 @@ func TestEgressAllowlist_PublicVendorRegistriesAllowed(t *testing.T) { "https://evil.applesdk.vindral.com/payload", "https://attacker.vindral.com/payload", "https://vindral.com/payload", + // The ONNX Runtime release host is one exact host: no children, and + // never the project's parent domain or its other subdomains. + "https://evil.download.onnxruntime.ai/payload", + "https://attacker.onnxruntime.ai/payload", + "https://onnxruntime.ai/payload", } { resp := egressResult(t, h, blocked) if assert.NotNil(t, resp, "must stay blocked: "+blocked) {