microsoft / microsoft/vscode-remote-release
Disabling Trust Does Not Disable Very First "Attaching to a container may execute arbitrary code." Prompt
@chrmarti is already working on this.
Since Feb 27, 2025.
- 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
- On a fresh Ubuntu image, install Visual Studio Code.
- Add "security.workspace.trust.enabled": false to User's settings.json
- Start a Dev Container to attach to.
- In Visual Studio Code, try attach to the Dev Container.
- The following modal dialog shows up.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.