microsoft / microsoft/vscode-remote-release
CANNOT Disable Credential Forwarding Git GnuPG SSH
@chrmarti is already working on this.
Since Jun 11, 2025.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
- VSCode Version: 1.99.3 17baf841131aa23349f217ca7c570c76ee87b957 x64
- Local OS Version: WSL 2 (Debian Bookworm) Windows 11 x64
- Remote OS Version: Debian Bookworm amd64
- Remote Extension/Connection Type: Dev Containers
There is no way to disable credential forwarding to devcontainer. Not for Git, not for GnuPG, not for SSH.
The fact that this is enabled by default and there's no way to opt-out at all, it's almost a malware behavior.
These are credentials that we are dealing with, SECRETS! It's not something that should be willy nilly be touched by VSCode or any extensions for that matter.
Steps to Reproduce:
-
Configure Git, GnuPG, and SSH in WSL 2
-
Create a project in WSL 2 with the following devcontainer:
.devcontainer/devcontainer.json
{
"build": {
"dockerfile": "Dockerfile"
}
}
.devcontainer/Dockerfile
FROM debian:bookworm
RUN apt-get update && apt-get -y install git gnupg openssh-client
RUN useradd 'dev' -ms '/bin/bash'
USER "dev"
RUN touch ~/.config ~/.gnupg ~/.ssh
- Open the project in devcontainer. It will clearly fail because none of
~/.config,~/.gnupg, and~/.sshare folders.
Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes
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.