-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Enabling sandboxing for terminal commands execution through copilot chat. #280236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
40882e1
0b15f7e
1084d72
c0b6751
b1976dc
a7ce30e
63cac43
caf2c45
5c21691
cd71156
762aaad
5147287
697f4f5
353d912
b634138
94f319d
a8b410c
f4e9d28
49aeae9
31ea4be
10ce464
02fec9b
22c6a80
544d616
5b01c73
dd41b1b
4742604
4adb2a6
aa3945e
1e046d4
e35e56f
2ed1d8d
46534e1
07dc6df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,22 @@ import type { IAction } from '../../../base/common/actions.js'; | |
| import type { IDisposable } from '../../../base/common/lifecycle.js'; | ||
| import type { SingleOrMany } from '../../../base/common/types.js'; | ||
|
|
||
| /** | ||
| * Local type definition for sandbox runtime configuration to avoid importing external package | ||
| * in the common layer. The actual type should match @anthropic-ai/sandbox-runtime. | ||
| */ | ||
| export interface ISandboxRuntimeConfig { | ||
dileepyavan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
dileepyavan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| network?: { | ||
| allowedDomains?: string[]; | ||
| deniedDomains?: string[]; | ||
| }; | ||
| filesystem?: { | ||
| denyRead?: string[]; | ||
| allowWrite?: string[]; | ||
| denyWrite?: string[]; | ||
| }; | ||
| } | ||
|
|
||
| export const enum TerminalSettingPrefix { | ||
| AutomationProfile = 'terminal.integrated.automationProfile.', | ||
| DefaultProfile = 'terminal.integrated.defaultProfile.', | ||
|
|
@@ -670,6 +686,20 @@ export interface IShellLaunchConfig { | |
| shellIntegrationNonce?: string; | ||
| } | ||
|
|
||
| export interface ISandboxTerminalSettings { | ||
| enabled?: boolean; | ||
dileepyavan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| network?: { | ||
| allowedDomains?: string[]; | ||
| deniedDomains?: string[]; | ||
| }; | ||
| filesystem?: { | ||
| denyRead?: string[]; | ||
| allowWrite?: string[]; | ||
| denyWrite?: string[]; | ||
| }; | ||
|
||
| } | ||
|
|
||
|
|
||
| export interface ITerminalTabAction { | ||
| id: string; | ||
| label: string; | ||
|
|
@@ -710,6 +740,8 @@ export interface IShellLaunchConfigDto { | |
| isFeatureTerminal?: boolean; | ||
| tabActions?: ITerminalTabAction[]; | ||
| shellIntegrationEnvironmentReporting?: boolean; | ||
| sandboxed?: boolean; | ||
| sandboxSettings?: ISandboxRuntimeConfig; | ||
dileepyavan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -727,6 +759,7 @@ export interface ITerminalProcessOptions { | |
| environmentVariableCollections: ISerializableEnvironmentVariableCollections | undefined; | ||
| workspaceFolder: IWorkspaceFolder | undefined; | ||
| isScreenReaderOptimized: boolean; | ||
| sandboxSettings?: ISandboxRuntimeConfig; | ||
| } | ||
|
|
||
| export interface ITerminalEnvironment { | ||
|
|
@@ -918,6 +951,8 @@ export interface ITerminalProfile { | |
| overrideName?: boolean; | ||
| color?: string; | ||
| icon?: ThemeIcon | URI | { light: URI; dark: URI }; | ||
| sandboxed?: boolean; | ||
| sandboxSettings?: ISandboxRuntimeConfig; | ||
| } | ||
|
|
||
| export interface ITerminalDimensionsOverride extends Readonly<ITerminalDimensions> { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.