Back to Skills

django-access-review

Django access control and IDOR security review. Use when reviewing Django views, DRF viewsets, ORM queries, or any Python/Django code handling user authorization. Trigger keywords: "IDOR", "access control", "authorization", "Django permissions", "object permissions", "tenant isolation", "broken access".

938stars48forksUpdated 8/20/2026

Security Assessment

Safe(95/100)
Security Score95/100

About django-access-review

django-access-review is a defensive security-review skill for finding access-control and IDOR (Insecure Direct Object Reference) vulnerabilities in Django code. It reframes the whole task around one question — can User A access, modify, or delete User B's data? — and deliberately rejects naive pattern matching in favor of investigation: understand how authorization works in this specific codebase, ask questions about concrete data flows, trace the code to where access checks do or don't happen, and report only what has been confirmed.

It guides a five-phase methodology. Phase 1 maps the authorization model (decorators, middleware, base classes, DRF permission classes, custom mixins, how querysets are scoped, and the ownership model). Phase 2 maps the attack surface (which models hold user data, which have ownership fields, which are reached by ID). Phase 3 asks the core question for each endpoint and traces where a resource ID enters, where it is used to fetch data, and what checks sit between. Phase 4 walks a concrete flow end to end with a worked DocumentViewSet IDOR example. Phase 5 reports findings with HIGH/MEDIUM/LOW confidence levels and insists that suggested fixes enforce authorization with real code, not merely document it in a comment. Bundled references cover DRF permissions, Django views, tenant isolation, and the Django ORM, and the material is based on the OWASP Cheat Sheet Series.

The target users are security engineers, code reviewers, and Django/DRF developers auditing views, viewsets, ORM queries, and multi-tenant isolation. This is defensive tooling: it uses read-oriented tools (Read, Grep, Glob, Bash, Task) to investigate authorization gaps and recommends enforcing fixes, containing no exploit payloads or offensive automation.

FAQ

What vulnerability class does it target?

Access-control flaws and IDOR (Insecure Direct Object Reference) in Django and Django REST Framework — cases where one user can access, modify, or delete another user's data, including broken tenant/organization isolation.

How does its methodology differ from a scanner?

It explicitly avoids scanning for predefined vulnerable patterns. Instead it investigates: understand the codebase's authorization model, ask questions about specific data flows, trace code to where checks happen, and report only confirmed findings.

What does the review process look like?

Five phases: understand the authorization model, map the attack surface, ask the core question and investigate each endpoint, trace specific flows end to end, and report findings with HIGH/MEDIUM/LOW confidence — only reporting confirmed issues.

Is this an offensive or defensive tool?

Defensive. It reviews code to find and fix authorization gaps using read-oriented investigation (Read, Grep, Glob, Bash, Task) and contains no exploit code. Reference material is based on the OWASP Cheat Sheet Series.

What does it expect from a suggested fix?

Fixes must enforce authorization with actual code — validating the user has permission and raising an error otherwise — rather than a comment or docstring that merely says callers should validate permissions.

All Files

5 files
SKILL.md10.0 KB
View
references/drf-permissions.md2.0 KB
View
references/django-views.md1.7 KB
View
references/tenant-isolation.md1.5 KB
View
references/django-orm.md1.7 KB
View

Install django-access-review

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill