django-access-review

Trace Django access control and IDOR risks across views, models, and queries.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/promptlylabs/skills --skill django-access-review-promptlylabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-access-review
Source: https://github.com/promptlylabs/skills/tree/main/plugins/promptly-skills/skills/django-access-review
Command: npx skills add https://github.com/promptlylabs/skills --skill django-access-review-promptlylabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Django-based applications often suffer from subtle authorization gaps (e.g., IDOR, insufficient ownership checks). This Skill provides a structured approach to identify and remediate those gaps by analyzing how permissions are enforced, how data is scoped, and how object-level access is guarded across views, serializers, and models.

Core Features & Use Cases

  • Analyze authorization model: locate where permission checks are implemented (decorators, DRF permission classes, mixins, or middleware) and determine their effectiveness.
  • Inspect query scoping: verify get_queryset and managers enforce user/tenant ownership to prevent cross-user access.
  • Validate object-level protections: assess has_object_permission and get_object() usage to ensure proper access control for each resource.
  • Produce evidence-backed findings: document gaps, potential risks, and concrete remediation steps with minimal false positives.
  • Use Case: security engineers reviewing an existing Django project to ensure a user cannot access another user's data, even if they know the resource ID.

Quick Start

Begin by tracing authorization checks in a Django app, focusing on how views fetch objects and how permissions are applied.

Frequently Asked Questions about django-access-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find IDOR vulnerabilities in a Django application?

Django IDOR vulnerabilities are identified by tracing how permissions are enforced across views and queries. Inspecting get_queryset scoping and has_object_permission checks reveals gaps where a user might access another user's data by guessing resource IDs.

How does get_queryset prevent unauthorized data access in Django REST Framework?

get_queryset prevents unauthorized access by scoping query results to the requesting user. Evaluating queryset managers and ownership fields verifies that users can only retrieve their own data, mitigating IDOR risks in Django REST Framework views.

What is the best way to audit Django object-level permissions for security gaps?

Auditing Django object-level permissions involves evaluating has_object_permission and get_object implementations. Tracing these code paths confirms whether object-level access control properly guards resources against unauthorized retrieval or modification.

Do I need Django REST Framework experience to review authorization checks?

Familiarity with Django REST Framework is required to review authorization checks effectively. Understanding DRF permission classes, mixins, and get_queryset patterns is expected to properly trace object-level protections and identify IDOR risks.

Why does a user accessing another user's data by ID indicate an authorization gap?

Accessing another user's data by ID indicates an authorization gap because ownership checks and queryset scoping are missing. When get_queryset or has_object_permission fail to filter by user, direct object references bypass view security and expose data.