From 38431fddf461f9d5fe78e8ab85c2195bfbe2c719 Mon Sep 17 00:00:00 2001 From: Gal Zahavi <38544478+galz10@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:28:01 -0700 Subject: [PATCH 1/2] Enable network access in sandbox configuration (#24055) # Conflicts: # packages/cli/src/config/sandboxConfig.test.ts --- packages/cli/src/config/sandboxConfig.test.ts | 47 +++++++++++++------ packages/cli/src/config/sandboxConfig.ts | 4 +- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/packages/cli/src/config/sandboxConfig.test.ts b/packages/cli/src/config/sandboxConfig.test.ts index cfe1fed660b..03f31ab6ad9 100644 --- a/packages/cli/src/config/sandboxConfig.test.ts +++ b/packages/cli/src/config/sandboxConfig.test.ts @@ -93,7 +93,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'docker', image: 'default/image', }); @@ -122,7 +122,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'lxc', image: 'default/image', }); @@ -148,7 +148,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'sandbox-exec', image: 'default/image', }); @@ -161,7 +161,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'sandbox-exec', image: 'default/image', }); @@ -174,7 +174,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'docker', image: 'default/image', }); @@ -187,7 +187,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'podman', image: 'default/image', }); @@ -210,7 +210,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'podman', image: 'default/image', }); @@ -244,7 +244,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'docker', image: 'env/image', }); @@ -257,7 +257,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'docker', image: 'default/image', }); @@ -285,7 +285,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'docker', image: 'default/image', }); @@ -338,6 +338,11 @@ describe('loadSandboxConfig', () => { sandbox: { enabled: true, command: 'podman', +<<<<<<< HEAD +======= + allowedPaths: [], + networkAccess: true, +>>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, }, @@ -353,6 +358,11 @@ describe('loadSandboxConfig', () => { sandbox: { enabled: true, image: 'custom/image', +<<<<<<< HEAD +======= + allowedPaths: [], + networkAccess: true, +>>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, }, @@ -367,6 +377,11 @@ describe('loadSandboxConfig', () => { tools: { sandbox: { enabled: false, +<<<<<<< HEAD +======= + allowedPaths: [], + networkAccess: true, +>>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, }, @@ -382,6 +397,10 @@ describe('loadSandboxConfig', () => { sandbox: { enabled: true, allowedPaths: ['/settings-path'], +<<<<<<< HEAD +======= + networkAccess: true, +>>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, }, @@ -403,7 +422,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'runsc', image: 'default/image', }); @@ -418,7 +437,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'runsc', image: 'default/image', }); @@ -435,7 +454,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'runsc', image: 'default/image', }); @@ -453,7 +472,7 @@ describe('loadSandboxConfig', () => { expect(config).toEqual({ enabled: true, allowedPaths: [], - networkAccess: false, + networkAccess: true, command: 'runsc', image: 'default/image', }); diff --git a/packages/cli/src/config/sandboxConfig.ts b/packages/cli/src/config/sandboxConfig.ts index 59a9685f706..66221328721 100644 --- a/packages/cli/src/config/sandboxConfig.ts +++ b/packages/cli/src/config/sandboxConfig.ts @@ -123,7 +123,7 @@ export async function loadSandboxConfig( let sandboxValue: boolean | string | null | undefined; let allowedPaths: string[] = []; - let networkAccess = false; + let networkAccess = true; let customImage: string | undefined; if ( @@ -134,7 +134,7 @@ export async function loadSandboxConfig( const config = sandboxOption; sandboxValue = config.enabled ? (config.command ?? true) : false; allowedPaths = config.allowedPaths ?? []; - networkAccess = config.networkAccess ?? false; + networkAccess = config.networkAccess ?? true; customImage = config.image; } else if (typeof sandboxOption !== 'object' || sandboxOption === null) { sandboxValue = sandboxOption; From 07c4fcf50583af88ed40510543313e3ac6b68418 Mon Sep 17 00:00:00 2001 From: galz10 Date: Fri, 27 Mar 2026 15:14:27 -0700 Subject: [PATCH 2/2] test(cli): fix merge conflicts in sandboxConfig.test.ts Resolves the merge conflicts introduced in sandboxConfig.test.ts when cherry-picking #24055 (Enable network access in sandbox configuration). --- packages/cli/src/config/sandboxConfig.test.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/cli/src/config/sandboxConfig.test.ts b/packages/cli/src/config/sandboxConfig.test.ts index 03f31ab6ad9..34c97d6ecde 100644 --- a/packages/cli/src/config/sandboxConfig.test.ts +++ b/packages/cli/src/config/sandboxConfig.test.ts @@ -338,11 +338,8 @@ describe('loadSandboxConfig', () => { sandbox: { enabled: true, command: 'podman', -<<<<<<< HEAD -======= allowedPaths: [], networkAccess: true, ->>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, }, @@ -358,11 +355,8 @@ describe('loadSandboxConfig', () => { sandbox: { enabled: true, image: 'custom/image', -<<<<<<< HEAD -======= allowedPaths: [], networkAccess: true, ->>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, }, @@ -377,11 +371,8 @@ describe('loadSandboxConfig', () => { tools: { sandbox: { enabled: false, -<<<<<<< HEAD -======= allowedPaths: [], networkAccess: true, ->>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, }, @@ -397,10 +388,7 @@ describe('loadSandboxConfig', () => { sandbox: { enabled: true, allowedPaths: ['/settings-path'], -<<<<<<< HEAD -======= networkAccess: true, ->>>>>>> 765fb6701 (Enable network access in sandbox configuration (#24055)) }, }, },