gabriel / muse public
feat patch hub task/assignee-flag-and-tests #1 / 1
gabriel · 62 days ago · Apr 15, 2026 · Diff

feat(hub): add --assignee to issue create + _validate_assignee with full input hardening

Adds --assignee USER flag to 'muse hub issue create'. The flag validates the handle before any network I/O using a new _validate_assignee() helper, then dispatches a second POST to /assign after the issue is created.

_validate_assignee() rejects: null bytes, control chars (terminal injection), newlines (output spoofing), non-ASCII Unicode (confusable impersonation), shell metacharacters, oversized handles (>64 chars), and anything not matching ^[a-zA-Z0-9][a-zA-Z0-9_-]*$. allow_empty=True permits empty string for the unassign path (issue assign and issue update --assign).

Validation also added to run_issue_assign() and run_issue_update() --assign path, which previously sent handles straight to the API without any checks.

Also adds: import re, _MAX_HANDLE_LEN and _HANDLE_RE module constants. Tests: 86 tests across all 8 tiers (shape, round-trip, edge cases, stress, data integrity, performance, security, docstrings).

sha256:2dbefd99447c2a2a4896a2952e3d6a1d4e27d3eaac0078b352fa26c0db35f070 sha
sha256:9b5712c671c9f68445c55e3b1b4d7f15b0e3423d050ee51eedb838d1b6abd1ad snapshot
← Older Oldest on task/assignee-flag-and-tests
All commits
Newer → Latest on task/assignee-flag-and-tests

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:2dbefd99447c2a2a4896a2952e3d6a1d4e27d3eaac0078b352fa26c0db35f070 --body "your comment"