When "Do Not" Is Not Deny: Security Rules in CLAUDE.md vs Built-In Controls
Ting Yan
Abstract
In CLAUDE.md, "do not" is a natural-language instruction that the model interprets. Claude Code's deny is a built-in control that blocks an action before the agent can take it. Both can express the same security goal, but they control the agent in different ways. We measure this gap in 481 public CLAUDE.md files. An LLM matched the extracted candidate rules against Claude Code's documented controls, and two security practitioners independently checked a sample without seeing the model's answers or each other's labels. Depending on how closely a control had to match the written rule, only about 4-16% of the retrieved security rules had a matching built-in control. Under the strictest standard the estimate was 4.4% (95% CI: 2.6-6.7%), and the two annotators agreed closely on which rules had a match. A manual review of complete files found that our extraction method captured 66.3% of eligible security rules; the reported rates therefore apply to the rules it captured. This is a usable security problem: CLAUDE.md is a write-only channel. A developer writes a security rule but gets no feedback on whether a control will enforce it. The same plain-text form hides two kinds of rule: those a permission rule, mode, or sandbox can enforce, and those left to the model to interpret.
Create a lesson
Related papers
Calmables: Demonstrating Closed-Loop Infrared Earables for Thermal Biofeedback and Relaxation Support
Valeria Zitz, Michael Küttner, Jonas Hummel et al.
"Okay, I've Actually Softened My Take on This": How People in Decentralized Social Media Reason about the Appropriateness of Generative AI
Romina Mahinpei, Manoel Horta Ribeiro, Andrés Monroy-Hernández et al.
Integrating Flipped Learning and Generative AI for Practice-Based Design Education: Evidence from a Knit Yarn Design Course
Hong Qu, Zichao Ling, Yadie Yang
EasyFashion: A Human-AI Co-Creation System for Personalized Fashion Design and Sewing Pattern Generation
Hong Qu, Zhaoxiang Xu, Jinbo Luo et al.
Verify, Offload, Extend & Recommend: Selective Complementarity in AI Support for Physical Activity Planning with Longitudinal Patient Data
Pavithren V S Pakianathan, Rania Islambouli, Diogo Branco et al.
Building a Cultural Perspective on Doctor-Patient Conversations
Krithi Shailya, Siddharth D Jaiswal, Ashish Makani et al.