open source · zero dependencies · Apache-2.0

Don't just git clone.
Let the bouncer check it first.

Malicious repos are now a routine way to attack developers: poisoned starter kits, fake take-home tests, look-alike accounts like micr0s0ft. git-bouncer checks a repo in a throwaway sandbox before any of it touches your laptop.

npm install -g git-bouncer

Then, instead of git clone <url>: bouncer clone <url> or git bouncer <url>

1 ID check

Before anything downloads: who published this? Look-alike owners, impersonated projects, brand-new accounts and repos named in active malware campaigns are caught on your machine, from public GitHub metadata.

2 Pat-down

The repo is cloned into a locked-down, throwaway container with none of your credentials. No capabilities, read-only filesystem, nothing mounted. Then it's checked for the techniques real campaigns use. None of its code is run.

3 Verdict

Clean? It asks before cloning to your machine, at the exact commit it checked, verifies the files on disk, and installs npm dependencies with install scripts off. Not clean? It tells you what it found, in plain language, and deletes the sandbox.

Terminal: bouncer scan on a clean repository. ID check passes, the pat-down finds nothing suspicious, verdict LET IN.
A clean repo gets let in.
Terminal: bouncer scan github.com/micr0s0ft/vscode is turned away at the ID check because micr0s0ft looks like microsoft. Nothing is downloaded.
A look-alike is turned away at the door. Nothing is downloaded.

What the pat-down looks for

Every check, with its severity →

What it can't do

A clean result means no known red flags, not "safe". Static checks can be evaded, brand-new malware isn't in the databases yet, and nothing is run, so behavior that only shows up at runtime isn't seen. git-bouncer shrinks the blast radius of your first contact with an unfamiliar repo. It doesn't replace your judgment. Read the threat model →

No Docker?

It works with Podman (free, open source, no account), and can offer to install it. It can also run the check in your own Google Cloud or AWS account (a throwaway GitHub Codespace option is coming soon).