From 4df308564ee57b14594fccb0fbdc217743c5cf84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 18:14:14 +0000 Subject: [PATCH 1/2] Initial plan From 1b0519beacd10a3f9513607f2826547e331ea7f6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 18:31:41 +0000 Subject: [PATCH 2/2] Add download.jetbrains.com to kotlin ecosystem domain allowlist Add the missing download.jetbrains.com domain to the kotlin ecosystem in ecosystem_domains.json. The other domains mentioned in the issue (packages.jetbrains.team and maven.pkg.jetbrains.space) were already present. Also add kotlin ecosystem test coverage to ecosystem_domains_test.go and include kotlin in existing ecosystem enumeration tests. Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/97050330-ec02-4b67-9b36-b862c68ed66a --- pkg/workflow/data/ecosystem_domains.json | 2 +- pkg/workflow/ecosystem_domains_test.go | 26 ++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/pkg/workflow/data/ecosystem_domains.json b/pkg/workflow/data/ecosystem_domains.json index 83ac0572a31..375bbc62396 100644 --- a/pkg/workflow/data/ecosystem_domains.json +++ b/pkg/workflow/data/ecosystem_domains.json @@ -157,7 +157,7 @@ "*.gradle-enterprise.cloud" ], "julia": ["pkg.julialang.org", "*.pkg.julialang.org", "julialang.org", "julialang-s3.julialang.org", "storage.julialang.net"], - "kotlin": ["ge.jetbrains.com", "packages.jetbrains.team", "kotlin.bintray.com", "maven.pkg.jetbrains.space"], + "kotlin": ["download.jetbrains.com", "ge.jetbrains.com", "packages.jetbrains.team", "kotlin.bintray.com", "maven.pkg.jetbrains.space"], "linux-distros": [ "deb.debian.org", "security.debian.org", diff --git a/pkg/workflow/ecosystem_domains_test.go b/pkg/workflow/ecosystem_domains_test.go index 62740bf91b2..b1180389cdc 100644 --- a/pkg/workflow/ecosystem_domains_test.go +++ b/pkg/workflow/ecosystem_domains_test.go @@ -339,6 +339,28 @@ func TestEcosystemDomainExpansion(t *testing.T) { } }) + t.Run("kotlin ecosystem includes JetBrains and Kotlin domains", func(t *testing.T) { + permissions := &NetworkPermissions{ + Allowed: []string{"kotlin"}, + } + domains := GetAllowedDomains(permissions) + + expectedDomains := []string{ + "download.jetbrains.com", + "ge.jetbrains.com", + "packages.jetbrains.team", + "kotlin.bintray.com", + "maven.pkg.jetbrains.space", + } + + for _, expectedDomain := range expectedDomains { + found := slices.Contains(domains, expectedDomain) + if !found { + t.Errorf("Expected domain '%s' to be included in kotlin ecosystem, but it was not found", expectedDomain) + } + } + }) + t.Run("multiple ecosystems can be combined", func(t *testing.T) { permissions := &NetworkPermissions{ Allowed: []string{"defaults", "dotnet", "python", "example.com"}, @@ -389,7 +411,7 @@ func TestAllEcosystemDomainFunctions(t *testing.T) { // Test that all ecosystem categories return non-empty slices ecosystemCategories := []string{ "defaults", "containers", "bazel", "dotnet", "dart", "github", "go", - "terraform", "haskell", "java", "julia", "linux-distros", "lua", "node", + "terraform", "haskell", "java", "julia", "kotlin", "linux-distros", "lua", "node", "ocaml", "perl", "php", "playwright", "python", "r", "ruby", "rust", "swift", } @@ -414,7 +436,7 @@ func TestEcosystemDomainsUniqueness(t *testing.T) { // Test that each ecosystem category returns unique domains (no duplicates) ecosystemCategories := []string{ "defaults", "containers", "bazel", "dotnet", "dart", "github", "go", - "terraform", "haskell", "java", "julia", "linux-distros", "lua", "node", + "terraform", "haskell", "java", "julia", "kotlin", "linux-distros", "lua", "node", "ocaml", "perl", "php", "playwright", "python", "r", "ruby", "rust", "swift", }