gabriel / musehub public
minor task/security-proposals-review #1 / 1
gabriel · 170 days ago · Apr 10, 2026 · Diff

security: add access control to submit_proposal_review (REST + MCP)

REST: add _guard_write_access to submit_proposal_review — was checking repo existence but not whether the caller has access to the (possibly private) repo.

MCP: add repo existence check + _require_public_or_write_access to execute_submit_proposal_review — any authenticated user could previously submit reviews on private repos they have no access to.

Tests: 3 new MCP tests (forbidden_without_auth, forbidden_on_private_repo, any_user_can_review_public_repo) + 1 new REST test (submit_review_forbidden_on_private_repo_for_non_owner).

sha256:beae6cf63b4c7fd99cb2059908a21007d3ee8f3371f046f2d26e382c6ab5df7e sha
+4 ~3 symbols
sha256:8e91f43350e855005d70f68399974fa544faf64dceb04808b7ca5c290fd5b80a snapshot
+4
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 7 symbols
~ tests/test_mcp_write_tools.py .py 3 symbols added, 1 symbol modified
+ test_any_user_can_review_public_repo method async_method test_any_user_can_review_public_repo L690–710
+ test_forbidden_on_private_repo_for_non_member method async_method test_forbidden_on_private_repo_for_non_member L667–687
+ test_forbidden_without_auth method async_method test_forbidden_without_auth L656–664
~ tests/test_musehub_proposals.py .py 1 symbol added
+ test_submit_review_forbidden_on_private_repo_for_non_owner function async_function test_submit_review_forbidden_on_private_repo_for_non_owner L1226–1249
← Older Oldest on task/security-proposals-review
All commits
Newer → Latest on task/security-proposals-review

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:beae6cf63b4c7fd99cb2059908a21007d3ee8f3371f046f2d26e382c6ab5df7e --body "your comment"