microsoft / microsoft/vscode-remote-release

Disabling Trust Does Not Disable Very First "Attaching to a container may execute arbitrary code." Prompt

Open
#10,735 0 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Feb 27, 2025.

bug containers
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Version of VS Code: 1.97.2

What type of remote connection you were using: Containers

Your operating system: Ubuntu 22.04

The remote operating system you are connecting to: Ubuntu 22.04

List of extensions that you have installed:

  • github.copilot
  • github.copilot-chat
  • ms-vscode-remote.remote-containers
  • ms-vscode-remote.remote-ssh
  • ms-vscode-remote.remote-ssh-edit
  • ms-vscode.cmake-tools
  • ms-vscode.cpptools
  • ms-vscode.remote-explorer

Reproducible steps (1... 2... 3...) that cause the issue

  1. On a fresh Ubuntu image, install Visual Studio Code.
  2. Add "security.workspace.trust.enabled": false to User's settings.json
  3. Start a Dev Container to attach to.
  4. In Visual Studio Code, try attach to the Dev Container.
  5. The following modal dialog shows up.
    Image

What you expected to see, versus what you actually saw
Expect to not see the "Attaching to a container may execute arbitrary code." modal dialog for the very first time attaching to a container when Trust is completely disabled. Once the dialog is dismissed by human interaction, it won't show up again, however, this human interaction is not possible in the automatic test environment where no human is involved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.