Advanced
Open
Pro
Layered Defense for a 'Never Touch Prod DB' Org Rule
Your organization has one rule that must hold with zero exceptions:
Claude Code sessions must never run any command against the production
PostgreSQL database, identified by the hostname
prod-db.internal.example.com. Engineers routinely use Claude Code
against staging and local databases with similar tooling (psql,
migration scripts), so a blanket ban on database commands isn't
practical.
- Design a layered defense for this rule using at least three distinct mechanisms from this subject, explaining what each layer catches that the others might miss.
- Explain specifically why relying on a single
permissions.denyrule alone would be an incomplete defense here, even if written carefully. - Where does sandboxing fit into this design, and what does it add that permission rules and hooks don't?
Share this question