
sentry-security
Sentry-specific security review based on real vulnerability history. Use when reviewing Sentry endpoints, serializers, or views for security issues. Trigger keywords: "sentry security review", "check for IDOR", "access control review", "org scoping", "cross-org", "security audit endpoint".
- Installs
- 100
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/getsentry/sentry --skill sentry-security- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads sentry-security automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Sentry Security Review
Find security vulnerabilities in Sentry code by checking for the patterns that have caused real vulnerabilities in this codebase.
This skill is Sentry-specific. It encodes patterns from 37 real security patches shipped in the last year — not generic OWASP theory.
Scope
Review the code provided by the user (file, diff, or endpoint). Research the codebase as needed to build confidence before reporting.
Report only HIGH and MEDIUM confidence findings. Do not report theoretical issues.
| Confidence | Criteria | Action |
|---|---|---|
| HIGH | Traced the flow, confirmed no check exists | Report with fix |
| MEDIUM | Check may exist but could not confirm | Report as needs verification |
| LOW | Theoretical or mitigated elsewhere | Do not report |
Step 1: Classify the Code
Determine what you're reviewing and load the relevant reference.
| Code Type | Load Reference |
|---|---|
API endpoint (inherits from *Endpoint) | references/endpoint-patterns.md |
| Serializer or form field | references/serializer-patterns.md |
| Email template or HTML rendering | references/output-sanitization.md |
| Token, OAuth, or session handling | references/token-lifecycle.md |
| Role or permission logic | references/privilege-escalation.md |
If the code spans multiple categories, load all relevant references.
Always load references/enforcement-layers.md — it documents where security checks can legitimately live in Sentry's request lifecycle. A check in any layer counts as enforcement.
Step 2: Check for the Top 6 Vulnerability Classes
These are ordered by frequency from the last year of real patches.
Check 1: Cross-Org Object Access (IDOR) — 9 patches last year
The most common vulnerability. An endpoint accepts an ID from the request but does not scope the query by the organization from the URL.
Trace this flow for every ID that comes from the request:
1. Where does the ID enter? (query param, request body, URL kwarg)
2. Where is it used in an ORM query?
3. Between (1) and (2), is the query scoped by organization_id or project_id
from the URL (NOT from the request body)?
Red flags:
Model.objects.get(id=request.data["something_id"])— no org scopeModel.objects.filter(id=request.GET["id"])— no org scopeproject_idfrom request body/query used directly withoutProject.objects.filter(id=pid, organization_id=organization.id)- Endpoint inherits
OrganizationEndpointbut handler method does not accept or use theorganizationparameter
Safe patterns:
- Query includes
organization_id=organization.idwhereorganizationcomes fromconvert_args() - Uses
self.get_projects()which scopes by org internally - Object is fetched via URL kwargs resolved by
convert_args() - Unscoped query is a guard that only raises an error (never returns data), AND a downstream query in the same flow IS org-scoped and raises the same error — no differential behavior means no information leak
Check 2: Missing Authorization Checks — 10 patches last year
An endpoint or serializer performs a sensitive operation without verifying the user has permission.
Check:
- Does the endpoint inherit from the right base class? (
OrganizationEndpoint,ProjectEndpoint, etc.) - Does it declare
permission_classes? If not, it inherits the base class default — verify that's appropriate. - For serializer fields that reference other objects: do they validate the user can access those objects?
- For Django views (not DRF): is there a
@login_requiredor equivalent?
Check 3: Privilege Escalation / Role Abuse — 3 patches last year
A user can assign ownership, modify roles, or escalate access beyond what their role allows.
Check:
- Owner/assignee fields: uses
OwnerActorField(validates membership), NOTActorField(allows any actor) - Role modification endpoints: verify the requesting user's role is >= the target role
- Team assignment: verify the user is a member of the target team (or has
team:admin)
Check 4: Token / Session Security — 5 patches last year
Token lifecycle gaps that allow unauthorized access.
Check:
- Token refresh: is the application's active status checked before granting a refresh?
- Org-level tokens: is
organization_idrequired and validated? - Member status: is the member's enabled/disabled status checked before granting tokens?
- Impersonation: are impersonated sessions rate-limited?
Check 5: Output Sanitization (XSS/HTML Injection) — 4 patches last year
User-controlled strings rendered unsafely in emails, markdown, or HTML.
Check:
- User display names, team names, org names used in email templates: are they sanitized?
- Markdown rendering: is custom CSS or HTML allowed through?
format_html()vs string concatenation in templatesmark_safe()called on user input
Check 6: Auth/MFA Gaps — 3 patches last year
Authentication state inconsistencies.
Check:
- When removing an authenticator: are recovery codes cleaned up?
- CSRF token handling: is it synced across tabs/windows?
- Session invalidation: does removing auth factors properly invalidate sessions?
If no checks produced a potential finding, stop and report zero findings. Do not invent issues to fill the report. An empty result is the correct output when the code has no vulnerabilities matching these patterns.
Step 3: Trace the Full Enforcement Chain
For each potential finding, trace the complete request flow end-to-end. Do not stop at the authentication class — follow into the endpoint handler, then into any business logic classes it delegates to (e.g., Validator, Refresher, GrantExchanger).
1. Authentication class → does authenticate() or authenticate_token() enforce the check?
2. Permission class → does has_permission() enforce it?
3. convert_args() → does has_object_permission() / determine_access() enforce it?
4. Access module → does from_rpc_auth() or from_request() enforce it?
5. Handler method → does the endpoint handler enforce it?
6. Business logic classes → do downstream classes (Validator, etc.) enforce it?
7. Serializer → do validate_*() methods enforce it?
A check at ANY layer is enforcement. Before marking HIGH, confirm the check is absent from all layers using the checklist in enforcement-layers.md.
If you cannot confirm the check is absent from every layer, mark the finding as MEDIUM (needs verification), not HIGH.
Cross-flow enforcement for token issuance: For token/credential issuance flows, also check whether the issued credential is blocked at usage time (e.g., determine_access() rejects it at all endpoints in the relevant scope). Classify based on the enforcement scope:
- Centralized enforcement (check runs in a permission class inherited by all endpoints in the affected scope) → the credential is effectively inert → LOW (do not report)
- Scattered enforcement (only some endpoints or serializers check, others may not) → MEDIUM (report as needs verification)
See enforcement-layers.md "Cross-Flow Enforcement."
Non-DRF views: OAuth views are plain Django views — the 7-layer DRF model does not apply to the view itself. Check the view's own decorators and handler logic. But tokens issued by these views are later used at DRF endpoints where the full enforcement chain applies.
Step 4: Report Findings
## Sentry Security Review: [Component]
### Findings
#### [SENTRY-001] [Title] (Severity: Critical/High/Medium)
- **Category**: [IDOR | Missing Auth | Privilege Escalation | Token | XSS | Auth/MFA]
- **Location**: `path/to/file.py:123`
- **Confidence**: HIGH — confirmed through code tracing
- **Issue**: [What the vulnerability is]
- **Trace**:
1. [Step-by-step trace showing how the vulnerability is reached]
- **Impact**: [What an attacker could do]
- **Fix**:
```python
[Code that fixes the issue — must enforce, not document]
```
- Precedent: [Similar past fix if applicable, e.g. "Similar to #104990 PromptsActivity IDOR"]
Needs Verification
[MEDIUM confidence items with explanation of what to verify]
Not Reviewed
[Areas outside the scope of this review]
Fix suggestions must include actual enforcement code. Never suggest a comment or docstring as a fix.
FAQ
What does the sentry-security skill do?
Sentry-specific security review based on real vulnerability history. Use when reviewing Sentry endpoints, serializers, or views for security issues. Trigger keywords: "sentry security review", "check for IDOR", "access control review", "org scoping", "cross-org", "security audit endpoint".
How do I install sentry-security?
Run npx skills add https://github.com/getsentry/sentry --skill sentry-security in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/sentry-security/ (personal) or .claude/skills/sentry-security/ (project).
Which AI agents can use sentry-security?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is sentry-security safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains sentry-security?
It is published by getsentry in getsentry/sentry, and it is an official skill from the maker of the technology it covers. It has 100 recorded installs.
More from getsentry/sentry
design-system
getsentry/sentry
Open the skill to read its SKILL.md instructions.
sentry-javascript-bugs
getsentry/sentry
Review Sentry React and TypeScript changes for bug patterns drawn from real production issues. Use when reviewing a frontend diff or PR, checking Warden findings, auditing the current branch, reviewing production-error patterns, or looking for common regressions in static/.
generate-migration
getsentry/sentry
Open the skill to read its SKILL.md instructions.
generate-frontend-forms
getsentry/sentry
Open the skill to read its SKILL.md instructions.
sentry-backend-bugs
getsentry/sentry
Open the skill to read its SKILL.md instructions.
migrate-frontend-forms
getsentry/sentry
Open the skill to read its SKILL.md instructions.
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.