Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
},
allowWrite: {
type: 'array',
description: localize('agentSandbox.linuxFileSystemSetting.allowWrite', "Array of paths to allow write access. Leave empty to disallow all writes."),
description: localize('agentSandbox.linuxFileSystemSetting.allowWrite', "Array of additional paths to allow write access. Leave empty to disallow writes outside the workspace folders and sandbox temp directory."),
items: { type: 'string' },
default: ['.']
default: []
},
denyWrite: {
type: 'array',
Expand All @@ -591,7 +591,7 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
default: {
denyRead: [],
allowRead: [],
allowWrite: ['.'],
allowWrite: [],
denyWrite: []
},
tags: ['preview'],
Expand All @@ -615,9 +615,9 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
},
allowWrite: {
type: 'array',
description: localize('agentSandbox.macFileSystemSetting.allowWrite', "Array of paths to allow write access. Leave empty to disallow all writes."),
description: localize('agentSandbox.macFileSystemSetting.allowWrite', "Array of additional paths to allow write access. Leave empty to disallow writes outside the workspace folders and sandbox temp directory."),
items: { type: 'string' },
default: ['.']
default: []
},
denyWrite: {
type: 'array',
Expand All @@ -629,7 +629,7 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
default: {
denyRead: [],
allowRead: [],
allowWrite: ['.'],
allowWrite: [],
denyWrite: []
},
tags: ['preview'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class TerminalSandboxService extends Disposable implements ITerminalSandb
private _commandAllowListKeywords: readonly string[] = [];
private _commandCwd: URI | undefined;
private _os: OperatingSystem = OS;
private _defaultWritePaths: string[] = ['~/.npm'];
private _defaultWritePaths: string[] = [];
private static readonly _sandboxTempDirName = 'tmp';
private static readonly _urlRegex = /(?:https?|wss?):\/\/[^\s'"`|&;<>]+/gi;
private static readonly _sshRemoteRegex = /(?:^|[\s'"`])(?:[^\s@:'"`]+@)?([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})(?::[^\s'"`|&;<>]+)(?=$|[\s'"`|&;<>])/gi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ suite('TerminalSandboxService - network domains', () => {
ok(config.filesystem.allowRead.includes('/workspace-one'), 'Sandbox config should re-allow reads from workspace folders');
ok(config.filesystem.allowRead.includes('/configured/path'), 'Sandbox config should re-allow reads from configured allowWrite paths');
ok(config.filesystem.allowRead.includes('/configured/readable/path'), 'Sandbox config should preserve configured allowRead paths');
ok(config.filesystem.allowRead.includes('/home/user/.npm'), 'Sandbox config should re-allow reads from default write paths');
ok(!config.filesystem.allowWrite.includes('/home/user/.volta/'), 'Sandbox config should not include command-specific node write allow-list paths before a command is parsed');
ok(!config.filesystem.allowRead.includes('/home/user/.gitconfig'), 'Sandbox config should not include command-specific git read allow-list paths before a command is parsed');
ok(!config.filesystem.allowRead.includes('/home/user/.nvm/versions'), 'Sandbox config should not include command-specific node read allow-list paths before a command is parsed');
ok(!config.filesystem.allowRead.includes('/home/user/.cache/pip'), 'Sandbox config should not include command-specific common dev read allow-list paths before a command is parsed');
Expand Down
Loading