cheat-on-content
给所有想把"感觉"变成可校准预测的内容创作者。**方法论通用**——打分 → 盲预测 → T+3d 复盘 → 进化 rubric 的循环适用任何能被量化(播放 / 阅读 / 收听 / 点击)的内容。**rubric 是循环的内容,不是循环本身**——当前内置一份观点视频 rubric(参考博主 25+…
django-access-review
$ npx -y skills add LiHongwei-cn/lihongwei-cn --skill django-access-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/django-access-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
django-access-review
name: django-access-review description: django-access-review risk: unknown source: community
--- name: django-access-review description: 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... --- LICENSE ---
<!-- Reference material based on OWASP Cheat Sheet Series (CC BY-SA 4.0) https://cheatsheetseries.owasp.org/ -->
Find access control vulnerabilities by investigating how the codebase answers one question:
**Can User A access, modify, or delete User B's data?**
Do NOT scan for predefined vulnerable patterns. Instead:
1. **Understand** how authorization works in THIS codebase 2. **Ask questions** about specific data flows 3. **Trace code** to find where (or if) access checks happen 4. **Report** only what you've confirmed through investigation
Every codebase implements authorization differently. Your job is to understand this specific implementation, then find gaps.
---
Before looking for bugs, answer these questions about the codebase:
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)
# 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.**
---
Identify endpoints that handle user-specific data:
□ 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?
For each resource, map:
---
For each endpoint that handles user data, ask:
**"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□ 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? □ For tenant/org resources: Can User in Org A access Org B's data by changing the org_id in the URL?
---
Pick a concrete endpoint and trace it completely.
Endpoint: GET /api/documents/{pk}/
1. Find the view handling this URL
→ DocumentViewSet.retrieve() in api/views.py
2. Check what DocumentViewSet inherits from
→ class DocumentViewSet(viewsets.ModelViewSet)
→ No custom base class with authorization
3. Check permission_classes
→ permission_classes = [IsAuthenticated]
→ Only checks login, not ownership
4. Check get_queryset()
→ def get_queryset(self):
→ return Document.objects.all()
→ Returns ALL documents!
5. Check for has_object_permission()
→ Not implemented
6. Check retrieve() method
→ Uses default, which calls get_object()
→ get_object() uses get_queryset(), which returns all
7. Conclusion: IDOR - Any authenticated user can access any documentPotential gap indicators (investigate further, don't auto-flag): - get_queryset() returns .a
MUNDO - THE EMPEROR. Complete AI orchestration system with 1208 skills, 25 capability modules, self-evolving, collective consciousness. GitHub Actions 24/7 automation.
Repo: LiHongwei-cn/lihongwei-cn
给所有想把"感觉"变成可校准预测的内容创作者。**方法论通用**——打分 → 盲预测 → T+3d 复盘 → 进化 rubric 的循环适用任何能被量化(播放 / 阅读 / 收听 / 点击)的内容。**rubric 是循环的内容,不是循环本身**——当前内置一份观点视频 rubric(参考博主 25+…
提议并执行 rubric 或 bucket 升级。两种模式:**完整 rubric bump**(最高风险动作,5 步强制 + 跨模型审核)和 **--bucket-only 轻量重校**(只换 bucket 边界,不动 rubric 公式)。**Phase 2 强制走 cheat-score-blind…
cheat-on-content 的首次 onboarding 与脚手架创建器。统一流程——所有用户都走相同 5 阶段闭环,唯一区别是"发过视频的人"会在 init 时多一步:抓取已有视频建立历史 context(用于后续 cheat-seed 给更贴合的选题、更准的…
从对标账号导入 script + 数据 → 拆 pattern + 派生 base rubric 信号 → 写到 benchmark.md / script_patterns.md / rubric_notes.md。**这是工具最早期信号的来源**——cold-start…
把老用户的 .cheat-state.json 升级到当前 schema_version。读 migrations/registry.md 算迁移链,按顺序应用每一步迁移文件。幂等:跑两次结果一样。失败停在中间版本不前进。触发词:"迁移"/"升级 state"/"migrate"/"我的 state…
从复盘评论数据派生 / 刷新账号的受众画像,写入 audience.md。这是和 rubric 平行的第二个派生物——rubric 答"怎么打分",persona 答"谁在看"。cheat-seed 选题 / 写稿时读它。**audience.md 含实绩信号,cheat-score-blind…