microsoft / microsoft/vscode-remote-release
Add setting to disable automatic SSH agent forwarding in Dev Containers
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Problem
VS Code Dev Containers automatically forwards the SSH agent from the host into containers, creating a socket at /tmp/vscode-ssh-auth-<uuid>.sock. This happens even when remoteEnv.SSH_AUTH_SOCK is set to "" in devcontainer.json.
This creates a security concern when users do not want to share their SSH agent socket with a dev container at all.
Requested Feature
Add a setting to completely disable automatic SSH agent forwarding:
{
"dev.containers.forwardSSHAgent": false
}
This would allow users to manually manage SSH authentication in containers instead of automatically inheriting the host's SSH agent.
Current Workaround
The only workaround is modifying VS Code's launch environment, which affects all workspaces globally rather than allowing per-project configuration.
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.
Research direction
The issue names devcontainer.json and the /tmp/vscode-ssh-auth-.sock socket, but no implementation files or tests. Start by locating the Dev Containers code that creates the socket and trace how remoteEnv.SSH_AUTH_SOCK is handled. Done means a per-project forwardSSHAgent setting disables automatic forwarding without changing the global launch environment, with coverage for enabled and disabled behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- developer-experience, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100