Skip to content

feat: disable VS Code Workspace Trust in the image#521

Merged
venkatamutyala merged 1 commit into
mainfrom
fix/disable-workspace-trust
Jul 11, 2026
Merged

feat: disable VS Code Workspace Trust in the image#521
venkatamutyala merged 1 commit into
mainfrom
fix/disable-workspace-trust

Conversation

@venkatamutyala

Copy link
Copy Markdown
Contributor

Problem

On every codespace launch the workspace opens in Restricted Mode and VS Code blocks the terminal with:

Do you trust the authors of the files in this folder?
Creating a terminal process requires executing code

This is VS Code Workspace Trust gating terminals/tasks in an untrusted folder (e.g. /workspaces/glueops).

Fix

Ship "security.workspace.trust.enabled": false in the image's Machine settings (Dockerfile L202), which already sets the color theme. This disables Workspace Trust entirely, so every folder opens trusted with no prompt.

{"workbench.colorTheme": "VS Code Dark", "security.workspace.trust.enabled": false}

Why disable, not pre-trust one folder

VS Code stores the trusted-folder list in SQLite global state (state.vscdb), not in settings.json, and a freshly launched CDE doesn't carry it — so a specific folder can't be pre-trusted declaratively. Disabling the feature is the only reliable image-level option.

Trade-off

Workspace Trust exists to stop a maliciously-crafted repo from auto-executing code on open. Turning it off globally means any folder opened in these CDEs runs fully trusted. Acceptable here since these ephemeral environments only ever open the user's own GlueOps repos.

Independent of #519 (the code CLI wrapper); both touch .devcontainer/Dockerfile L202 but different lines.

🤖 Generated with Claude Code

Ship `security.workspace.trust.enabled: false` in the Machine settings so
workspaces (e.g. /workspaces/glueops) always open trusted. Removes the
"Do you trust the authors of the files in this folder? Creating a terminal
process requires executing code" prompt that blocks terminals/tasks on
every codespace launch.

Pre-trusting a single folder isn't durable -- VS Code stores the trusted
-folder list in SQLite global state that a freshly launched CDE doesn't
carry -- so disabling the feature is the reliable declarative option.
These CDEs only ever open the user's own GlueOps repos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@venkatamutyala venkatamutyala merged commit 86a5552 into main Jul 11, 2026
2 checks passed
@venkatamutyala venkatamutyala deleted the fix/disable-workspace-trust branch July 11, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant