From 7264725577680e75849614fa297cf69ab62ce8ca Mon Sep 17 00:00:00 2001 From: Michal Przytulski Date: Thu, 1 Oct 2026 10:51:23 +0200 Subject: [PATCH] fix(LH-3904): propose exact Gemfury download admission --- internal/handlers/egress_allowlist_defaults.yaml | 3 +++ internal/handlers/egress_allowlist_test.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/internal/handlers/egress_allowlist_defaults.yaml b/internal/handlers/egress_allowlist_defaults.yaml index e80fddf..349276a 100644 --- a/internal/handlers/egress_allowlist_defaults.yaml +++ b/internal/handlers/egress_allowlist_defaults.yaml @@ -213,6 +213,9 @@ ecosystem_default_domains: - pypi.python.org - files.pythonhosted.org - pythonhosted.org + # Gemfury package downloads redirect to signed URLs in this shared bucket. + # Exact host only; customer objects share it, so no S3 namespace wildcard. + - gemfury.s3-accelerate.dualstack.amazonaws.com - download.pytorch.org - pypi.nvidia.com - pypi.tuna.tsinghua.edu.cn diff --git a/internal/handlers/egress_allowlist_test.go b/internal/handlers/egress_allowlist_test.go index 7af8f6f..e025c8f 100644 --- a/internal/handlers/egress_allowlist_test.go +++ b/internal/handlers/egress_allowlist_test.go @@ -562,6 +562,7 @@ func TestEgressAllowlist_NewExactDomainsAllowed(t *testing.T) { "https://maven.google.com/androidx/pkg.pom", "https://packages.drupal.org/8/packages.json", "https://packages.confluent.io/maven/pkg.jar", + "https://gemfury.s3-accelerate.dualstack.amazonaws.com/packages/example/example-1.0.0-py3-none-any.whl", } { assert.Nil(t, egressResult(t, h, allowed), "new exact host allowed: "+allowed) } @@ -696,6 +697,7 @@ func TestEgressAllowlist_NewEntriesDoNotWidenBeyondExactHosts(t *testing.T) { // moment its entry is changed to a leading-dot suffix, so this is the probe // set that actually pins exact-host semantics. childProbes := []string{ + "https://evil.gemfury.s3-accelerate.dualstack.amazonaws.com/payload", "https://evil.appboy.github.io/payload", "https://evil.juliaregistries.github.io/payload", "https://evil.spsprodcus3.vssps.visualstudio.com/_signin", @@ -723,6 +725,8 @@ func TestEgressAllowlist_NewEntriesDoNotWidenBeyondExactHosts(t *testing.T) { // Sibling hosts: names sharing a parent with an added entry. These pin the // parent namespace closed ("*.github.io", "*.vssps.visualstudio.com"). siblingProbes := []string{ + "https://attacker.s3-accelerate.dualstack.amazonaws.com/payload", + "https://s3-accelerate.dualstack.amazonaws.com/attacker/payload", "https://attacker.github.io/payload", "https://attacker.vssps.visualstudio.com/_signin", "https://attacker.pkg.julialang.org/registries",