jeremylongshore/claude-code-plugins-plus-skills/sentry-security-basics
Claude Code and agent skill by jeremylongshore/claude-code-plugins-plus-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
'Configure Sentry security settings and data protection.
Install
npx vskill@latest install jeremylongshore/claude-code-plugins-plus-skills/sentry-security-basicsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as jeremylongshore/claude-code-plugins-plus-skills/sentry-security-basics.
Sentry Security Basics
Overview
Configure Sentry's security posture: PII scrubbing with beforeSend, built-in data scrubbing, IP anonymization, browser SDK URL filtering, DSN vs auth token handling, CSP reporting, and GDPR data deletion. Covers both client-side (SDK) and server-side (dashboard) controls.
Prerequisites
- Sentry project created with Owner or Admin role
@sentry/node>= 8.x or@sentry/browser>= 8.x installed (orsentry-sdk>= 2.x for Python)- Compliance requirements identified (GDPR, SOC 2, HIPAA, CCPA)
- List of sensitive data patterns for your domain (PII fields, API keys, tokens)
Instructions
Step 1 — Understand DSN vs Auth Token Security
The DSN (Data Source Name) is a client-facing identifier — it tells the SDK where to send events. It is NOT a secret.
- The DSN cannot read data, delete events, or modify settings
- It is safe to ship in client-side JavaScript bundles
- Restrict abuse via Allowed Domains (Project Settings > Client Keys > Configure)
Auth tokens ARE secrets — they grant API access to read/write/delete data:
Step 2 — Disable Default PII Collection
sendDefaultPii defaults to false — but always set it explicitly so intent is clear:
When sendDefaultPii: false (default):
- No IP addresses attached to events
- No cookies sent in request data
- No user-agent strings in request headers
- No request body data captured
- User context must be set manually via
Sentry.setUser()
Step 3 — Client-Side PII Scrubbing with beforeSend
beforeSend runs before every event leaves the client. Use it to strip PII that leaks into error messages, request data, or breadcrumbs:
Python equivalent using before_send:
Step 4 — Server-Side Data Scrubbing Rules
Configure in Project Settings > Security & Privacy:
| Setting | What it does | |
|---|---|---|
| Data Scrubber | Auto-scrubs fields matching common PII patterns (enabled by default) | |
| Sensitive Fields | Custom field names to always scrub: password, ssn, credit_card_number, api_key, secret, token, authorization | |
| Safe Fields | Fields excluded from scrubbing (e.g., transaction_id, correlation_id) | |
| Scrub IP Addresses | Removes or zeroes IP addresses on all events | |
| Scrub Credit Cards | Detects and removes card number patterns |
Organization-wide defaults: Organization Settings > Security & Privacy applies to all projects unless overridden at project level.
Advanced scrubbing rules (regex-based) can target specific event paths:
Step 5 — Browser SDK URL Filtering
Use denyUrls and allowUrls to control which scripts generate captured errors:
Also configure Allowed Domains in Project Settings > Client Keys (DSN) > Configure to prevent unauthorized origins from sending events to your DSN:
Step 6 — CSP Reporting via Sentry
Sentry can ingest Content-Security-Policy violation reports. Use the Security Headers endpoint (not the main DSN):
Add to your CSP header:
Or use the newer report-to directive:
Step 7 — GDPR Data Deletion
Sentry supports right-to-erasure requests via API:
For bulk deletion, use Organization Settings > Data Privacy > Data Removal Requests (Business/Enterprise plans).
Data retention settings: Organization Settings > Subscription > Event Retention — configure 30/60/90-day retention windows to auto-purge old data.
Step 8 — Auth Token Hygiene Checklist
Token best practices:
- Separate tokens per environment — never share between dev/staging/production
- Minimal scopes —
project:releases+org:readfor CI source map uploads - Set expiration dates — 90 days max for CI tokens
- Rotate quarterly — calendar reminder, automate if possible
- Audit via API —
GET /api/0/api-tokens/to list all active tokens
Output
After completing these steps you will have:
sendDefaultPii: falseset explicitly in SDK initbeforeSendcallback stripping emails, IPs, credit cards, auth headers, and tokens from events- Server-side data scrubber enabled with custom sensitive field list
denyUrls/allowUrlsfiltering out third-party noise in browser projects- Allowed Domains restricting which origins can send events
- CSP
report-uriconfigured for security header violation reporting - GDPR deletion workflow documented and tested
- Auth tokens stored in CI secrets with minimal scopes and expiration dates
Error Handling
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/saas-packs/sentry-pack/skills/sentry-security-basics/SKILL.md
Popularity
- Repository stars
- 2,265
- Repository forks
- 314
- 7-day trend score
- 39
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jeremylongshore/claude-code-plugins-plus-skills/sentry-security-basics)