Claude Code
Today
Explore
Practice
Library
Exam
Certificate
Search
⌘K
ខ្មែរ
◐
Sign in
Today
Explore
Practice
Library
Profile
Writing Rules That Hold
Today
3. Permissions and Safety · 2 of 4
Mark read
Prev
Next
Orient
Anchors, boundaries, and the rules that are never read
Fix the rule that was never consulted
Predict
Write a rule set and try to break it
Close
Practice
Related
Writing Rules That Hold
Advanced
☆
📑
Deny beats ask beats allow — and argument-matching patterns are weaker than they look
Orient
Anchors, boundaries, and the rules that are never read
Fix the rule that was never consulted
Predict
Write a rule set and try to break it
Close
Practice
Related
Practice activities and scenarios are optional. Mark the lesson complete after reading, and return to practice whenever it helps.
Restoring your saved work…
07
Optional practice
🧠 Optional scenario practice
Q1
Why is
"deny": ["Write(secrets/**)"]
an ineffective rule?
A
Write rules only apply to new files
B
Claude Code consults only Edit(path) and Read(path) for file permissions, so the rule is accepted but never checked — it warns at startup
C
The glob syntax is invalid
D
Deny rules cannot contain wildcards
Q2
In user settings at
~/.claude/settings.json
, what does
Read(/secrets/**)
protect?
A
The filesystem root directory /secrets/
B
~/.claude/secrets/**
— a single leading slash anchors to the settings source, not the filesystem root
C
A secrets directory in every project you open
D
Nothing; the pattern is invalid
08
Up Next
Advanced
Modes and Sandboxing
Advanced
Untrusted Content and Injection
Intermediate
Choose the Right Extension
📝 Notes
Mark lesson complete
Next: Modes and Sandboxing →