The dot Claude Attack Surface

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:

The 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:

This 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.

Why it deserves more upvotes: Agentic coding tools have quietly introduced a powerful new local configuration surface, and almost nobody is doing the threat-modeling work on it yet — this post starts.

All newsletters