test(issues): pin custom-action permissions and input validation #48
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.68) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.68 · 419 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.361
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.068
Real PR Conversation Timeline
1 comments
"Review active on #48"
general
weight: 0.35
mangeshraut712
Adds
backend/tests/test_issue_actions.py. It coversIssueViewSetcustom-action behaviour thatissues/tests.pydoesn't already exercise:assignandupdate_status. Those actions are writable only because they're listed inMUTATING_ACTIONS.assign: an inactive user is refused (400), a blankassignee_idunassigns, and a non-object JSON body is rejected.update_status: a blank or unknown status is rejected and the issue stays unchanged.create-for-project: bothreporterandprojectare taken from the URL and the user, even when the body names others. A non-numeric project id returns 400, and anonymous callers get 401.Mutation check: removing
'assign'fromMUTATING_ACTIONSmakes a test fail. The full backend suite passes and ruff is clean (153 on the merged tree with currentmain, Python 3.12). Two draft tests that duplicated existing ones were dropped: one for the missing-project case, and in d0c11d6test_non_numeric_project_id_rejected, which repeatedissues/tests.py::test_create_for_project_rejects_non_numeric_id(caught by Kilo; my first version of this body wrongly said the duplicate had already gone).Tests only. They were drafted with AI help (Z.ai GLM), then reviewed against the existing tests and run locally.
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/mangeshraut712/bug-reporting-system/pull/48" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->
<!-- CURSOR_SUMMARY -->
---
<!-- /CURSOR_SUMMARY -->
---
Review follow-up (d0c11d6). Kilo found four issues; all four are addressed and each thread has the detail. In short: two tests asserted only the status code and now also assert the issue is unchanged, the unauthenticated-create test asserts nothing was created, and a duplicate test was removed. The added assertions were checked by injecting a write-before-validation bug into the view: the old tests passed against it and the new ones fail.