2026-07-07
Link: https://www.olafalders.com/2026/07/06/the-dot-claude-attack-surface/
HN Discussion: 1 points, 0 comments
As Claude Code and similar agentic coding tools sweep through developer workflows, an entire new configuration surface has quietly materialized inside our repos and home directories: the .claude/ folder. Olaf Alders' post is one of the first sustained attempts to catalog what actually lives there — and why security teams should be paying attention right now, not after the first supply-chain incident.
The .claude/ directory typically contains:
PreToolUse, PostToolUse, Stop, and other lifecycle events, running with the user's full privilegesThe attack surface is genuinely novel. A malicious CLAUDE.md checked into a dependency can quietly instruct a coding agent to exfiltrate ~/.ssh/ the next time a developer runs Claude Code in that repo. A hook script pulled from a "helpful" starter template can persist arbitrary code execution. Permission allowlists that look benign (Bash(git *)) turn out to permit git config --global core.hooksPath — a classic escape.
What makes the post valuable to a technical audience:
.git/hooks, .vscode/tasks.json, or .envrc — file categories that have all been abused in the wildgit clone can influenceThis is the kind of unglamorous plumbing writeup that ages very well. Six months from now, when the first well-publicized .claude/-based compromise hits the news, everyone will link back to posts like this and wonder why nobody was reading them at the time.
