Open-source tool brain0 tracks AI code commits and key reads
Start here
On November 4, 2026, the WeChat public account "Jumang Security Lab" published a teardown of the open-source tool brain0. The tool passively reads git history and the session records that Claude Code and Codex write to disk, associates each commit with Agent intent (down to a single function), and outputs a drift score between declared changes and actual changes, a list of sensitive files the Agent has read, and a risk score. The report notes that brain0 is post-hoc auditing rather than inline interception, and that the real interception primitive is preflight; its read set is only a lower bound, and reads by MCP tools, environment variables, and inside scripts cannot be covered.
Generated by AI from reports · Updated 25 days ago
Progress timeline
- WeChat · Goumang Security LabSelectedAI code auditing tool brain0 dissected: each commit traced to the Agent prompt, and which keys it read also checked
Jumang Security Lab dissected the open-source tool brain0, which passively reads git history and session records that Claude Code and Codex write to disk, associates each commit with Agent intent (down to individual functions), and outputs a drift score between declared and actual changes, a list of sensitive files the Agent read, and a risk score. It is post-hoc auditing rather than inline interception; the real interception primitive is preflight; the read set is only a lower bound, and reads by MCP tools, environment variables and inside scripts are all invisible. brain0 itself disclosed two GHSAs in late October: versions 0.1.2 and earlier have a path traversal in /api/diff and all API routes return Access-Control-Allow-Origin: *, CVSS 6.5, fixed in 0.1.3; versions 0.1.1 and earlier write the .brain0/ directory containing keys into the work tree of the observed repository, CVSS 5.9, fixed in 0.1.2.
Related discussion
- Older than 72 hours · Not included in the 72-hour figures
- WeChatDoonsec"AI code auditing" brain0 dissected: each commit traced to the Agent prompt, and which keys it read also checked(opens the original post in a new tab)