Visual Studio Code
Securing Visual Studio Code with Lima
Lima helps securing the development environment by running it inside a VM. Notably, this prevents AI agents, such as GitHub Copilot in VS Code, from directly executing untrusted commands on the host.
- Start a Lima instance. If you use GitHub Copilot, consider disabling mounts by passing the
--mount-none
flag to prevent Copilot from accessing host files:
limactl start --mount-none
- Add the following line to
~/.ssh/config
:
Include ~/.lima/*/ssh.config
- Open the Remote Explorer in the Visual Studio Code sidebar and select
lima-<INSTANCE>
from the SSH remote list.
Hint
If the Remote Explorer is missing in the sidebar, install the following extensions:
See also the documentation of Visual Studio Code for further troubleshooting.
- Set up the workspace by clicking
Clone Git Repository...
on theWelcome
screen, or copy the project directory withlimactl cp
:
limactl cp -r DIR default:~/