e08ba42697
docker / test (pull_request) Successful in 29s
docker / lint (pull_request) Successful in 35s
lint / lint (pull_request) Successful in 35s
test / test (pull_request) Successful in 35s
docker / docker-test (pull_request) Successful in 8s
docker / docker-publish (pull_request) Has been skipped
test / test (push) Successful in 23s
lint / lint (push) Successful in 23s
Add a `milestone` argument to `create_issue` and `update_issue` accepting either a numeric milestone id or a title (resolved case-insensitively against open and closed milestones, with a clear error for unknown titles). On `update_issue`, `milestone: 0` clears the milestone. A BeforeValidator rejects booleans so they are not silently coerced to an id. Gitea Projects (Kanban boards) were investigated for #22 and are intentionally left unsupported: Gitea 1.26.2 exposes no project endpoints in its REST API. Documented this in api-reference.md and refreshed the (stale) write-mode tool list to cover all 16 write tools. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Write Mode
Threat Model
Write mode introduces mutation risk (issue/PR changes, metadata updates). Risks include unauthorized action, accidental mass updates, and audit evasion.
Default Posture
WRITE_MODE=falseby default.- When enabled, writes require repository whitelist membership by default.
- Optional opt-in:
WRITE_ALLOW_ALL_TOKEN_REPOS=trueallows writes to any repo the token can access. - Policy engine remains authoritative and may deny specific write tools.
Supported Write Tools
create_issue(optionalmilestoneid or title)update_issue(optionalmilestone;0clears it)create_issue_commentcreate_pr_commentedit_issue_commentadd_labelsremove_labelsassign_issuecreate_labelupdate_labelcreate_pull_requestcreate_releaseedit_releasecreate_branchcreate_milestone
Not supported (explicitly forbidden): merge actions, branch/label/release deletion, force push, repo/admin management, and repository content writes (file create/edit, commits). Gitea Projects (Kanban boards) are unsupported because the Gitea REST API exposes no project endpoints.
Enablement Steps
- Set
WRITE_MODE=true. - Choose one:
WRITE_REPOSITORY_WHITELIST=owner/repo,...(recommended)WRITE_ALLOW_ALL_TOKEN_REPOS=true(broader scope)
- Review policy file for write-tool scope.
- Verify audit logging and alerting before rollout.
Safe Operations
- Start with one repository in whitelist.
- Use narrowly scoped bot credentials.
- Require peer review for whitelist/policy changes.
- Disable write mode during incident response if abuse is suspected.
Risk Tradeoffs
Write mode improves automation and triage speed but increases blast radius. Use least privilege, tight policy, and strong monitoring.