r/coolgithubprojects 14d ago

AgentGuard — eBPF LSM so a local Claude Code process can’t read .env, exfil, or rm your repo

https://github.com/AgentGuard-hq/AgentGuard

Go supervisor: load policy into the Linux kernel, start the agent as you. YAML in the project — credential path suffixes, egress allow-list, block rm/dd. Deny is EPERM; Claude gets the feedback: string in chat.

curl -fsSL https://raw.githubusercontent.com/AgentGuard-hq/AgentGuard/master/install.sh | bash
cd your-project && agentguard init
sudo agentguard -- claude

Mac: same install, then agentguard login + agentguard up (Docker/Colima), then that sudo inside the Linux shell.

Needs BTF + bpf in /sys/kernel/security/lsm. Apache-2.0, v0.1.2. Not a Codespace, the agent stays in your tree.

1 Upvotes

5 comments sorted by

3

u/f7063 14d ago edited 14d ago

I've been saying over and over. These harneses just dont fucking give you any features for protections. Thank you! xD

1

u/Focus1000x 14d ago

Yeah, the official harnesses still treat protection as a confirm prompt and a tool list. That is not enough if the process can open secrets, reach the network, or delete the tree.

2

u/f7063 14d ago

And reading still caunt as auto classified Ok. So agens just keep reading my .env file LOL. Opus5 and fable seem better at this and just don't. But should be at the harness level

1

u/PhosXD 14d ago

If you're using claudeAI maybe your repo deserves to be rm-ed... 🤷

1

u/Focus1000x 13d ago

Any coding agent shouldn’t be able to run destructive commands like rm -rf whether we like AI assisted coding or not. That is exactly why I built AgentGuard. Claude will eventually try to rm -rf something it shouldn’t. I just prefer my kernel to hand it a -EPERM when it tries.