django-access-review
यह क्या करती है
यह टूल जाँचता है कि Django या DRF से बने सिस्टम में कोई अनधिकृत user किसी दूसरे user का data देख, बदल या मिटा तो नहीं सकता। यह code में देखता है कि permissions कैसे जाँची जाती हैं, ताकि security की कमियाँ मिल सकें।
कब इस्तेमाल करें
- ✓Django/DRF सिस्टम के security code की समीक्षा करते समय।
- ✓जब शक हो कि कोई user किसी दूसरे का data देख या बदल सकता है।
- ✓यह पक्का करने के लिए कि सिर्फ अधिकृत लोग ही किसी खास जानकारी तक पहुँचें।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/django-access-review/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“जाँचो कि क्या कोई साधारण user document system में किसी दूसरे user का data देख सकता है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल code का विश्लेषण करके समझता है कि permissions कैसे check होती हैं, data के flow को ट्रैक करता है, और उन जगहों को ढूंढता है जहाँ access गलत तरीके से दिया जा सकता है। यह आम error patterns खोजने के बजाय सिस्टम के अपने logic को समझने पर ध्यान देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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?
…
अक्सर पूछे जाने वाले सवाल
IDOR क्या है?
IDOR का पूरा नाम 'Insecure Direct Object Reference' है। यह एक security कमी है जिसमें कोई user URL या request में किसी पहचान (जैसे नंबर) को बदलकर ऐसा data या files देख सकता है जिन्हें देखने की उसे अनुमति नहीं है।
यह टूल कमियाँ कैसे ढूंढता है?
यह अपने आप सारे errors को scan नहीं करता। इसके बजाय यह आपको यह जाँचने में मार्गदर्शन देता है कि सिस्टम कौन क्या कर सकता है, यह कैसे तय करता है, और code के logic को फॉलो करके पता लगाता है कि access checks कहाँ नहीं हैं या फेल हो रहे हैं।
क्या इसे इस्तेमाल करने के लिए मुझे Django programming आनी चाहिए?
Django कैसे काम करता है, खासकर data handling और permissions के बारे में, थोड़ी बुनियादी समझ मदद करती है। टूल जाँच की प्रक्रिया में मार्गदर्शन देता है, लेकिन अंतिम code विश्लेषण ज़रूरी है।
जानकारी
लेखक का मूल विवरण
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.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #4468
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।