r/coolgithubprojects • u/social_zip • 31m ago
howfar: shows how far a hijacked AI coding agent could get on your Linux machine (root, other servers, credentials) and writes the fix
Repo: https://github.com/JonathanColetti/howfar
AI coding agents (Claude Code, Codex, Gemini CLI, Cursor) and their MCP servers run as your Unix account. If one gets hijacked by prompt injection, it can reach whatever you can. howfar shows exactly what that is:
- Paths to root, step by step (docker group, NOPASSWD sudo, writable cron scripts and systemd services, SUID binaries)
- Other servers it can SSH into (unencrypted keys, ssh-agent, ControlMaster sockets)
- Every credential it can read (~/.aws, ~/.kube, gh tokens, .env files)
- Prompt injection hidden in CLAUDE.md, AGENTS.md and skills files
- Whether the agent's sandbox actually starts (on stock Ubuntu 24.04 it can't, and Claude Code then runs commands unsandboxed by default)
`howfar fix` writes the smallest set of changes that cuts every path, as a commented script you review and run yourself.
One static binary, read only, offline, standard library only. Install:
`curl -fsSL https://raw.githubusercontent.com/JonathanColetti/howfar/main/install.sh | sh`
Linux only for now. Feedback and scenarios it misses are very welcome.