[WEB-7730] fix(security): scope cascade deletes to workspace in BulkDeleteIssuesEndpoint#9270
Conversation
…Endpoint CycleIssue and ModuleIssue cascade deletes used raw issue_ids from the request instead of the already workspace+project scoped issues queryset, allowing cross-workspace deletion of related records. Fixes GHSA-6cw7-h92q-p9hg and GHSA-2rr4-rp7r-32p4. GHSA-7q7r-mrr4-2wwx (sub-issue parent reassign) covered in WEB-7727. Co-authored-by: Plane AI <noreply@plane.so>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughIn ChangesBulk Issue Deletion Scoping Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Linked to Plane Work Item(s) References This comment was auto-generated by Plane |
…cope + workspace-name валидация + Storybook v10) upstream makeplane#9269/makeplane#9270 (scope issue-ID/cascade-delete к workspace в bulk-эндпоинтах), makeplane#9263/makeplane#9278 (workspace name ≥1 буквенно-цифровой), makeplane#9277 (Storybook v10). Конфликт sub_issue.py разрешён объединением: eyriehq validate_sub_issues_bulk + upstream workspace__slug-scope. Наш GraphQL-шлюз уже безопасен (мутации ре-парента scope по project=p), поддержка не нужна. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…oss-tenant IDOR) Шлюз аутентифицировал (mobile JWT), но не авторизовал: _project(slug, project) брал slug/project на веру → член воркспейса A мог мутировать/читать воркспейс B по slug + известным UUID. В тему апстрим-фиксов makeplane#9269/makeplane#9270 (scope bulk-эндпоинтов к workspace). Введён _member_project(info, slug, project) — резолвит проект ТОЛЬКО для активного WorkspaceMember; заменены ~47 вызовов в work_items/epics/intake + 2 inline (invites_misc/issue_extras). Старые небезопасные _project удалены (footgun). Тест test_graphql_authz: не-член заблокирован на уровне helper'а И мутации createSubIssue; corpus-guard без регрессий. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
BulkDeleteIssuesEndpoint.delete()correctly scoped theissuesqueryset to workspace+project, but the cascade deletes onCycleIssueandModuleIssueused the rawissue_idsfrom the requestCycleIssue/ModuleIssuerecords they don't ownissue_id__in=issue_ids(raw user input) withissue__in=issues(the already-scoped queryset) in both cascade deletesAffected advisories (Cluster H)
Changes
apps/api/plane/app/views/issue/base.pyissue_id__in=issue_ids→issue__in=issuesin CycleIssue and ModuleIssue cascade deletesTest plan
Summary by CodeRabbit
Summary by CodeRabbit