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).
0 comments
muse hub commit comment sha256:2dbefd99447c2a2a4896a2952e3d6a1d4e27d3eaac0078b352fa26c0db35f070 --body "your comment"
No comments yet. Be the first to start the discussion.