Set up DLP rules for my team
Surfaces used: dashboard DLP Rules Editor (source of truth) + any enforcement surface (gateway, hooks, browser extension, SDK) Modes supported: Hosted Hybrid Tiers: Solo Teams
What you'll do
Open the DLP Rules Editor, pick from 64 built-in patterns (SSN, AWS keys, credit cards, health identifiers, etc.) or write custom regex, test your rules against sample inputs, and publish. Every enforcement surface in your org picks up the change automatically.
Why this is the right path for you
- If you want one canonical place where "what is sensitive" is defined, this is it. You do not maintain parallel lists in multiple tools.
- The editor is the source. Deployment surfaces (gateway, coding hooks / SDK, browser extension) enforce it -- you author one ruleset, not a per-surface copy.
- A
maskrule redacts sensitive values in place and lets the call proceed on Claude Code and Gemini CLI through the Python SDK. On Node hooks and every other surface, including the Gateway, it becomes a deny. - Coverage remains explicit per event: the browser extension enforces custom rules scoped to
browser_ext; its always-on built-in patterns are detect-only. Ablockrule denies on every covered event.
When NOT to use this approach
caution
If you only need detection on one surface and do not care about consistency, the built-in default ruleset already covers most cases. The editor is for teams that want to add custom patterns or tune defaults.
5-minute setup
- Dashboard -> DLP -> Rules editor.
- Click Add rule. Pick a preset (e.g.,
US SSN) or Custom regex. - Configure:
- Pattern: the regex or preset id.
- Action:
mask,detect, orblock.maskrewrites only through the Python SDK on Claude Code and Gemini CLI; elsewhere it denies. - Scope:
prompt,response,tool_arguments, or any subset. - Applies to: all projects, or a specific project.
- Paste a test input in the Test panel. Confirm your rule matches (or not) before publishing.
- Click Publish. Policy bundle is re-signed and distributed; enforcement surfaces pick it up within ~60 seconds.
Example custom rule (internal project code):
Name: Internal project codenames
Pattern: \b(BLUEBIRD|NIGHTHAWK|REDFIN)-[A-Z0-9]{4,}\b
Action: mask # rewrites only on Claude Code/Gemini CLI via Python SDK; otherwise denies
Scope: prompt, tool_arguments
Applies to: Project "engineering"
Verifying it's working
- Test pane: the editor shows matched spans on your sample text before you publish.
- Enforcement: Send a test prompt through the target surface. On Claude Code or Gemini CLI through the Python SDK, confirm the sensitive value is redacted and the call proceeds. On every other surface, confirm the mask rule denies the call.
- Audit: dashboard -> Audit shows the matched rule id on each event.
Common follow-ups
- "I want the list of built-in patterns" -> DLP coverage (64 patterns + custom regex)
- "I want to enforce via the gateway" -> Govern an existing app
- "I want to enforce in the browser" -> Block PII in chat UIs
- "I want to enforce on coding assistants" -> Govern Claude Code
- "I want to use DLP inside my own Python app" -> Govern an AI app in Python
Reference
- Surface page: DLP Rules Editor
- Concepts: Policies
- API: API reference