django-access-review
Fungsinya
Tool ini membantu memeriksa apakah pengguna yang tidak berwenang dapat mengakses, mengubah, atau menghapus data pengguna lain dalam sistem yang dibangun dengan Django atau DRF. Tool ini menelusuri cara kerja permission dalam kode untuk menemukan celah keamanan.
Kapan dipakai
- ✓Saat meninjau kode keamanan sistem Django/DRF.
- ✓Saat mencurigai seorang pengguna dapat melihat atau mengubah data pengguna lain.
- ✓Untuk memastikan hanya orang yang berwenang yang dapat mengakses informasi tertentu.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/django-access-review/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Periksa apakah pengguna biasa dapat melihat data pengguna lain di sistem dokumen.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool menganalisis kode untuk memahami cara permission diperiksa, menelusuri alur data, dan mencari titik di mana akses mungkin tidak tepat. Tool berfokus pada pemahaman logika spesifik sistem, bukan mencari pola error umum.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Django Access Control & IDOR Review
Find access control vulnerabilities by investigating how the codebase answers one question:
Can User A access, modify, or delete User B's data?
When to Use
- You need to review Django or DRF code for access control gaps, IDOR risk, or object-level authorization failures.
- The task involves confirming whether one user can access, modify, or delete another user's data.
- You want an investigation-driven authorization review instead of generic pattern matching.
Philosophy: Investigation Over Pattern Matching
Do NOT scan for predefined vulnerable patterns. Instead:
- Understand how authorization works in THIS codebase
- Ask questions about specific data flows
- Trace code to find where (or if) access checks happen
- Report only what you've confirmed through investigation
Every codebase implements authorization differently. Your job is to understand this specific implementation, then find gaps.
Phase 1: Understand the Authorization Model
Before looking for bugs, answer these questions about the codebase:
How is authorization enforced?
Research the codebase to find:
□ Where are permission checks implemented?
- Decorators? (@login_required, @permission_required, custom?)
- Middleware? (TenantMiddleware, AuthorizationMiddleware?)
- Base classes? (BaseAPIView, TenantScopedViewSet?)
- Permission classes? (DRF permission_classes?)
- Custom mixins? (OwnershipMixin, TenantMixin?)
□ How are queries scoped?
- Custom managers? (TenantManager, UserScopedManager?)
- get_queryset() overrides?
- Middleware that sets query context?
□ What's the ownership model?
- Single user ownership? (document.owner_id)
- Organization/tenant ownership? (document.organization_id)
- Hierarchical? (org -> team -> user -> resource)
- Role-based within context? (org admin vs member)
Investigation commands
# Find how auth is typically done
grep -rn "permission_classes\|@login_required\|@permission_required" --include="*.py" | head -20
# Find base classes that views inherit from
grep -rn "class Base.*View\|class.*Mixin.*:" --include="*.py" | head -20
# Find custom managers
grep -rn "class.*Manager\|def get_queryset" --include="*.py" | head -20
# Find ownership fields on models
grep -rn "owner\|user_id\|organization\|tenant" --include="models.py" | head -30
Do not proceed until you understand the authorization model.
Phase 2: Map the Attack Surface
Identify endpoints that handle user-specific data:
What resources exist?
□ What models contain user data?
□ Which have ownership fields (owner_id, user_id, organization_id)?
□ Which are accessed via ID in URLs or request bodies?
What operations are exposed?
For each resource, map:
- List endpoints - what data is returned?
- Detail/retrieve endpoints - how is the object fetched?
- Create endpoints - who sets the owner?
- Update endpoints - can users modify others' data?
- Delete endpoints - can users delete others' data?
- Custom actions - what do they access?
Phase 3: Ask Questions and Investigate
For each endpoint that handles user data, ask:
The Core Question
"If I'm User A and I know the ID of User B's resource, can I access it?"
Trace the code to answer this:
1. Where does the resource ID enter the system?
- URL path: /api/documents/{id}/
- Query param: ?document_id=123
- Request body: {"document_id": 123}
2. Where is that ID used to fetch data?
- Find the ORM query or database call
3. Between (1) and (2), what checks exist?
- Is the query scoped to current user?
- Is there an explicit ownership check?
- Is there a permission check on the object?
- Does a base class or mixin enforce access?
4. If you can't find a check, is there one you missed?
- Check parent classes
- Check middleware
- Check managers
- Check decorators at URL level
Follow-Up Questions
□ For list endpoints: Does the query filter to user's data, or return everything?
□ For create endpoints: Who sets the owner - the server or the request?
□ For bulk operations: Are they scoped to user's data?
□ For related resources: If I can access a document, can I access its comments?
What if the document belongs to someone else?
…
Pertanyaan umum
Apa itu IDOR?
IDOR adalah singkatan dari 'Insecure Direct Object Reference'. Ini adalah celah keamanan saat seorang pengguna dapat mengakses sumber daya (seperti data atau file) yang seharusnya tidak boleh ia lihat, hanya dengan mengubah pengenal (misalnya angka) di URL atau request.
Bagaimana tool ini menemukan celah?
Tool ini tidak memindai error secara otomatis. Sebaliknya, tool memandu Anda melakukan investigasi manual terhadap cara sistem memeriksa siapa yang boleh melakukan apa terhadap data, dengan mengikuti logika kode untuk menemukan tempat pemeriksaan akses yang hilang atau gagal.
Apakah saya perlu memahami pemrograman Django untuk menggunakan ini?
Pemahaman dasar tentang cara kerja Django, terutama terkait penanganan data dan permission, akan sangat membantu. Tool memandu investigasi, tetapi analisis kode akhir tetap diperlukan.
Detail
Deskripsi asli dari pembuat
Use when reviewing Django or DRF access control: trace authorization flows, IDOR risks, object permissions, query scoping and tenant isolation before proposing a verified fix.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #4468
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- …
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.