Skip to content
WeChat · Goumang Security Lab·Indexed by this site · Originally published· Tools →SelectedAttention39

AI code auditing tool brain0 dissected: each commit traced to the Agent prompt, and which keys it read also checked

「AI代码审计」brain0拆解:每个commit追到Agent提示词,还查它读了哪些密钥

AI summary

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.

Why it was selected

The article dissects the mechanisms and boundaries of how brain0 records Agent intent and sensitive reads, and its own two disclosed vulnerabilities also show that the storage of this kind of auditing tool's repository and keys is itself a risk.

Read originalmp.weixin.qq.com