Show HN: Dirblock+envblock – tiny whitelist guards for dirs and env secrets

pfrench421 pts0 comments

After I missed getting hit by the LiteLLM attack by 30 minutes, I decided to see what I could do about it and wrote dirblock. It uses fanotify to block access to ~/.ssh, ~/.gpg, etc. with whitelists of trusted programs — everything else is denied. Shortly after, I wrote its spiritual cousin, envblock, which uses eBPF to stop untrusted programs from receiving real values of GH_TOKEN, AWS keys, and similar environment variables (it poisons them instead). I’ve been running both on my own machines for months. They are intentionally small and narrow (67 KB and 119 KB). Setup is usually under an hour once you know which directories and variables matter. Config is TOML, dry-run modes exist, and they fail open / poison rather than try to be a full MAC system. I’ve just been allowed to open source them. https://github.com/roku-oss/dirblock https://github.com/roku-oss/envblock Happy to answer questions.

dirblock envblock https github roku after

Related Articles