chore: convert upstream-manual-merge command to agent#9963
Closed
kilo-code-bot[bot] wants to merge 2 commits into
Closed
chore: convert upstream-manual-merge command to agent#9963kilo-code-bot[bot] wants to merge 2 commits into
kilo-code-bot[bot] wants to merge 2 commits into
Conversation
| "wc *": allow | ||
| "ls *": allow | ||
| "pwd *": allow | ||
| "echo *": allow |
Contributor
Author
There was a problem hiding this comment.
WARNING: echo * still permits file-mutating shell commands
Because bash permission patterns match the full command string, this allow rule also matches commands like echo data > file or echo data >> file. That lets the agent modify repository files without an edit approval, which bypasses the stated goal that file-mutating shell commands fall through to ask.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.5-20260423 · 302,393 tokens |
Contributor
|
Superseded by #9965. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts
.kilo/command/upstream-manual-merge.mdinto.kilo/agent/upstream-merge.mdso the workflow can run under agent-scoped permissions. The body of the workflow is unchanged except for step 1, which no longer relies on$ARGUMENTS(agents don't support command template vars) — the agent reads the version from the user's first message, the branch name, or the newestupstream-merge-report-<version>.md.Why
The existing slash command ran under the caller's unrestricted permissions. As an agent we can gate
read,edit, andwebfetchbehindask, and whitelist only the read-only shell commands the workflow actually needs (git status/log/diff/show, grep/rg, cat/head/tail, gh pr view,script/upstream/find-conflict-markers.sh, the project's test/typecheck/lint runners, etc.) while leaving everything else — notablysed -iand any other file-mutating shell command — to fall through toask. This makes the "approve before applying" step of the manual merge workflow mechanical instead of social.Notes
permission/evaluate.ts:9-15usesArray.findLast), so"*": askis listed first and specific allows follow. Thekilo-configbuilt-in skill doc currently states the opposite — worth a follow-up fix there.*is special-cased so e.g."git status *"matches both baregit statusandgit status --short.