Recently, I've started seeing developer-targeted attacks more often.
Most of them are supply chain attacks like malicious Git hooks, npm scripts, or package lifecycle hooks.
What makes it worse is that many of these attacks are hiding behind job interviews and take-home assignments that look totally normal at first.
Recently, I came across an example of this in a developer's post. He got a ZIP file sent by a recruiter, which included their project for a take-home assignment.
When he examined the code, he found hidden Git hooks.
Those hooks were designed to execute malicious code. When you run a Git command that triggers the hook, it might steal anything your user can access on the computer.
Your personal files, SSH keys, environment secrets, API tokens — everything is potentially at risk.
That made me curious and a bit paranoid.
So, I changed the way I work.
1. Architecture
I recommend working inside a virtual machine instead of directly on your host.
There are several tools you can use depending on your operating system:
- OrbStack on macOS
- Hyper-V Manager on Windows
- KVM/QEMU on Linux
The tool itself is not that important. They all serve the same purpose: create a VM, install Ubuntu inside it, and move your development environment there.
Your host keeps things like:
- GUI applications such as VS Code
- DBeaver, Redis Insight, and similar tools
- Your browser and pretty much everything personal
And the VM keeps pretty much everything related to development:
- Source code and repositories
- Programming languages
- CLI tools, databases, and containers
VS Code works very well with this setup thanks to the Remote - SSH extension.