Repository navigation
fix(kas): honour a server's autoApprove through the derived permissions - #25106
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the kept verbs go through the same Notes
[DESIGN-REVIEWED] eaf97fb Description read[DESCRIPTION-READ] 2fadd9d82d8fdfb11b4d4863d45751c2740c04631c3fe1f6799346329f147695 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix works at the mechanism level: the kept What this change shipsInventory (5 items) — 5 justifiedIntent: an owner's per-server
[FIRST-PRINCIPLES-REVIEWED] eaf97fb Description read[DESCRIPTION-READ] b79f6536dab3b6984cf15b2a0f46966ed6900e6f8aed34c072598d9c9133069a That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
On the KAS backend a spec's mcpServers.<name>.autoApprove was dropped outright, so an owner-written list that kiro-cli honours still raised an approval card for every call. KAS has no slot for the key; its only auto-approval input is the permissions block derived from allowedTools. The projection now runs the spec's servers through the same strip_ungoverned_auto_approve predicate the kiro-cli spec writers use and adds each kept verb as an @server/tool entry to that derivation input. It then meets the per-entry governance ceiling and the PreToolUse-hook withholding like any other grant. The key itself still never reaches the wire, and a verb that is not one literal tool name keeps prompting.
5eff0bc to
eaf97fb
Compare
|
self-added: yes
|
|
Holding at eaf97fb for human review. This turns a server's autoApprove verbs into KAS permission allow rules, so tools that used to prompt will run without an approval card. Tool-approval changes are reserved for a person. From reading I found no defect: the verbs pass the same strip_ungoverned_auto_approve predicate as the kiro-cli route, only literal tool names are used, they go through the same per-entry ceiling and PreToolUse withholding, and allowlist_present is read before they join. CI is green on this head and the AI lanes pass. See KiroCrew/src/kiro_crew/acp/kas_auto_approve.py Lines 29 to 61 in eaf97fb What clears it:
— crew-pr-reviewer (r131) |
CrysisDeu
left a comment
There was a problem hiding this comment.
Comment, not approving yet at eaf97fbb. This is the maintainer review @iamwhatever's 05:48Z HOLD asked for.
Accepted as maintainer: on KAS, an owner-written autoApprove now skips the approval card and Crew's on_tool_call floor for exactly <server>/<tool>. That matches kiro-cli, and I verified the scope: grants are mcp rules per server/verb, neighbouring servers and builtins (shell, fs_*) get nothing, ceiling / PreToolUse hooks / authored deny-ask / excludedTools still outrank it, malformed values grant nothing, glob verbs keep asking. #12712 is not a blocker here since kiro-cli already reads the same file.
Required before I approve (auto-merge is on):
src/kiro_crew/acp/kas_auto_approve.py:34: build refs from the servers_project_mcp_serversactually declares, not rawspec["mcpServers"]. Today a muted (disabled: true) or registry-withheld entry still yields anallowrule (probe confirmed for muted). Dead today, live the moment that server is mounted, and it breaks the "nothing kiro-cli wouldn't keep" promise. Havemerge_worker_specdrop a muted server'sautoApprovetoo.- Add
acp/kas_auto_approve.py,acp/kas_permissions.pyand the permission section ofkas_agents.pyto the sensitive-path list. A module whose only job is to grant auto-approval passed Sensitive Change Review as "no sensitive path changed", which is how a tool-gate change reached readiness: passed with auto-merge on. test/test_kas_auto_approve.py: pin the exact allow set with two servers, one withoutautoApprove(assert _mcp_allows(out) == {"docs-mcp/read_page"}), not just membership.- Audit rate (iamwhatever item 2): dedupe
mcp_auto_approve_honouredon (agent, server, verbs) instead of writing one per session start. - Update
docs/system-specsfor the derived grant.
Nits: :55 drop a verb that differs from its stripped form rather than stripping it; :37-41 skip server names containing / (@a/b/v splits as server a); docs/architecture/mcp.md:218-224 the inserted paragraph breaks the "therefore" that follows it.
Posted by code-reviewer (Kiro Crew member) on behalf of @CrysisDeu. Full report on file.
Cherry-picks these main commits onto release/0.11.0, in merge order: - fix(crew): write a crewmate's hidden welcome and check-ins in the user's language (#24966) (cherry picked from commit d5a76e6) - feat(crew-mode): move every used crewmate to its conductor on upgrade (#24954) (cherry picked from commit 76e89ae) - fix(hooks): Reads mode auto-approves Kiro Crew's own read-only MCP tools (#24910) (cherry picked from commit d8f2038) - fix(members): list crewmates the person created, even with an empty chat (#24987) (cherry picked from commit 163652b) - feat(cron): let a script cron feed its crewmate's Dashboard page (#24692) (cherry picked from commit 959b35a) - fix(kas): honour a server's autoApprove through the derived permissions (#25106) (cherry picked from commit 073c83a) - fix(chat): keep a scrolled-up reader still when a reprice clamps them (#24591) (cherry picked from commit 9a73292) - fix(security): restore every allowed link on a host, not only identical ones (#20487) (cherry picked from commit b161144) - fix(website): swipe the mobile notification banner up to dismiss it (#25151) (cherry picked from commit e68a716) - test: carry the _card_outcomes helper #24910's tests read (cherry picked from commit 9df4d01) The #24987 decision entry is new on this branch, so its Evidence lines now link the owner restatement and the maintainer approval on #24987 instead of describing them. Main keeps its shipped (immutable) copy.
Cherry-picks these main commits onto release/0.11.0, in merge order: - fix(crew): write a crewmate's hidden welcome and check-ins in the user's language (#24966) (cherry picked from commit d5a76e6) - feat(crew-mode): move every used crewmate to its conductor on upgrade (#24954) (cherry picked from commit 76e89ae) - fix(hooks): Reads mode auto-approves Kiro Crew's own read-only MCP tools (#24910) (cherry picked from commit d8f2038) - fix(members): list crewmates the person created, even with an empty chat (#24987) (cherry picked from commit 163652b) - feat(cron): let a script cron feed its crewmate's Dashboard page (#24692) (cherry picked from commit 959b35a) - fix(kas): honour a server's autoApprove through the derived permissions (#25106) (cherry picked from commit 073c83a) - fix(chat): keep a scrolled-up reader still when a reprice clamps them (#24591) (cherry picked from commit 9a73292) - fix(security): restore every allowed link on a host, not only identical ones (#20487) (cherry picked from commit b161144) - fix(website): swipe the mobile notification banner up to dismiss it (#25151) (cherry picked from commit e68a716) - test: carry the _card_outcomes helper #24910's tests read (cherry picked from commit 9df4d01) The #24987 decision entry is new on this branch, so its Evidence lines now link the owner restatement and the maintainer approval on #24987 instead of describing them. Main keeps its shipped (immutable) copy.
Cherry-picks these main commits onto release/0.11.0, in merge order: - fix(crew): write a crewmate's hidden welcome and check-ins in the user's language (#24966) (cherry picked from commit d5a76e6) - feat(crew-mode): move every used crewmate to its conductor on upgrade (#24954) (cherry picked from commit 76e89ae) - fix(hooks): Reads mode auto-approves Kiro Crew's own read-only MCP tools (#24910) (cherry picked from commit d8f2038) - fix(members): list crewmates the person created, even with an empty chat (#24987) (cherry picked from commit 163652b) - feat(cron): let a script cron feed its crewmate's Dashboard page (#24692) (cherry picked from commit 959b35a) - fix(kas): honour a server's autoApprove through the derived permissions (#25106) (cherry picked from commit 073c83a) - fix(chat): keep a scrolled-up reader still when a reprice clamps them (#24591) (cherry picked from commit 9a73292) - fix(security): restore every allowed link on a host, not only identical ones (#20487) (cherry picked from commit b161144) - fix(website): swipe the mobile notification banner up to dismiss it (#25151) (cherry picked from commit e68a716) - test: carry the _card_outcomes helper #24910's tests read (cherry picked from commit 9df4d01) The #24987 decision entry is new on this branch, so its Evidence lines now link the owner restatement and the maintainer approval on #24987 instead of describing them. Main keeps its shipped (immutable) copy.
Backports parts 2-4 of the 0.11.0 insider list (#25665, #25666, #25667) onto release/0.11.0. Parts 0-1 landed in e379f74 (#25663, #25664). - fix(desktop): say why a pop-out cannot open instead of blaming the browser (#23922) (cherry picked from commit 99c2474) - fix(crew): list a crewmate's own script and command schedules (#24023) (cherry picked from commit d2d8d14) - fix(mcp-gateway): show a refused share outside Developer Mode (#23917) (cherry picked from commit c612613) - fix(apps): negative-cache failed app.json fetches in the store listing (#23925) (cherry picked from commit 455e8ec) - fix(power): say that Windows Modern Standby can still sleep on lock (#18259) (cherry picked from commit 0480058) - fix(chat): show nothing in the transcript when the context cap trims (#24492) (cherry picked from commit 1411fcc) - fix(frontend): seed settings rows from the served config during render (#24625) (cherry picked from commit e198b63) - fix(schedule): keep the empty-folder chip rename open and return focus after it (#23904) (#24632) (cherry picked from commit 9f51b91) - feat(website): swipe to dismiss the notification banner on mobile (#24674) (cherry picked from commit e4fad39) - fix(agent): drop a gateway-inherited scratch temp before an agent spawn (#24645) (cherry picked from commit 1f28708) - fix(dashboard): tell the crewmate about unresolved fields, draw no stale band (#24069) (cherry picked from commit f9d8e19) - fix(mcp-gateway): never pool a credential vendor (#24672) (cherry picked from commit 2464225) - fix(acp): keep MCP tools direct on KAS when the spec grants no tool_search (#24297) (cherry picked from commit ddc1fea) - fix(crew): move a working icon avatar as one still image so it cannot tear (#24678) (cherry picked from commit e062153) - fix(crew-mode): keep a crewmate's own chat on the conductor (#24894) (cherry picked from commit 7582829) - fix(memory): name a damaged memory.db instead of restore advice (#24567) (cherry picked from commit efe7624) - fix(env): search Builder Toolbox's Windows bin dir for agent binaries (#24563) (cherry picked from commit 686d39a) - fix(discord): re-admit bot-opened threads after a gateway restart (#21776) (cherry picked from commit 072a37b) - fix(web): keep a hidden model hidden after a harness switch respells its id (#24564) (cherry picked from commit 501f455) - fix(gateway): say the gateway is running once boot finishes (#25029) (cherry picked from commit 02627ec) - fix(mcp): say why an mcp.json settings file could not be read (#22169) (#24572) (cherry picked from commit ed75593) - fix(mcp-gateway): render a refused share through ErrorNotice (#25660) (cherry picked from commit d895a90) - fix(crew): write a crewmate's hidden welcome and check-ins in the user's language (#24966) (cherry picked from commit d5a76e6) - feat(crew-mode): move every used crewmate to its conductor on upgrade (#24954) (cherry picked from commit 76e89ae) - fix(hooks): Reads mode auto-approves Kiro Crew's own read-only MCP tools (#24910) (cherry picked from commit d8f2038) - fix(members): list crewmates the person created, even with an empty chat (#24987) (cherry picked from commit 163652b) - feat(cron): let a script cron feed its crewmate's Dashboard page (#24692) (cherry picked from commit 959b35a) - fix(kas): honour a server's autoApprove through the derived permissions (#25106) (cherry picked from commit 073c83a) - fix(chat): keep a scrolled-up reader still when a reprice clamps them (#24591) (cherry picked from commit 9a73292) - fix(security): restore every allowed link on a host, not only identical ones (#20487) (cherry picked from commit b161144) - fix(website): swipe the mobile notification banner up to dismiss it (#25151) (cherry picked from commit e68a716) - test: carry the _card_outcomes helper #24910's tests read (cherry picked from commit 9df4d01) The #24987 decision entry is new on this branch, so its Evidence lines now link the owner restatement and the maintainer approval on #24987 instead of describing them. Main keeps its shipped (immutable) copy.
Problem / Motivation
Goal: On the KAS backend, a tool an owner lists in a server's
autoApproveruns without an approval card, exactly where the kiro-cli backend would run it without one.A user wrote
mcpServers.<server>.autoApprove: ["<tool>"]in their agent spec. On the kiro-cli backend that tool runs unasked. On the KAS backend the dashboard still raised an approval card for every call. The KAS projection dropsautoApprovefrom each server entry, and nothing carried its verbs anywhere else, so KAS never learned the tool was pre-approved.Why it matters
An owner who switches to the KAS backend loses a setting they wrote on purpose, with no message saying so. Every call to a tool they pre-approved now needs a click, and the only workaround is to repeat the list in
allowedTools, which they have no way to discover.Not a goal
strip_ungoverned_auto_approveis unchanged).autoApprovekey itself onto the KAS wire: it still never travels.autoApprovefrom sources the kiro-cli route does not honour (an app's<app>:<server>entry, a marked entry, a non-list[str]value, a governed server).What changed (motivation → approach → change)
KAS has no slot for
autoApprove; its one auto-approval input is thepermissionsblock Crew derives fromallowedTools. So the fix feeds the kept verbs into that derivation instead of inventing a second path.governance.strip_ungoverned_auto_approve, the same predicate the kiro-cli spec writers run: server ceiling,mcp.honour_auto_approve, owner-written,list[str]; it audits each decision@server/toolentry_ceiling_permitted)askacp/kas_auto_approve.pyholds the conversion.acp/kas_agents.pyadds its refs to the derivation input and readsallowlist_presentbefore they join, so an authoredpermissionsblock is judged exactly as before.docs/architecture/mcp.mddescribes the KAS route.Backwards compatibility
Compatible: a spec with no
autoApprove, or one whose list the kiro-cli route would drop, projects byte-identically; only a kept verb gains anallowrule.Removes nothing: the change only adds a derivation input; no key, rule, reader or check is removed.
Tests
test/test_kas_auto_approve.py:allowrule, and the key still never reaches the wire;permissionsblock gets the same outcome with or without anautoApprovebeside it;mcp_auto_approve_honouredrecord in the security event log, since a hand-written spec reaches the projection without passing a spec writer;Proof: not provable -- other: prove.py reverts the new module too, so the tests error at collection; reverting only the kas_agents hunk by hand fails test_an_owner_written_auto_approve_becomes_a_kas_permission and test_a_pre_tool_hook_on_the_server_outranks_the_permission
KAS projection suites (
test_kas_agents*.py,test_kas_permissions.py,test_kas_spec_hook_gaps.py,test_kas_tools_settings.py, member mounts, side read-only): 923 passed. flake8, isort, mypy, black, comment-history, brand and line-cap gates pass; the flake-pattern ratchet passes.Manual verification
Not run against a live KAS session; the projection is a pure function and the tests read its output. The reporter's exact setup (which file their server lives in) is unverified.
The reporter also sees an approval card when running
kiro-cli chat --agent <agent> --v2directly, with no Crew involved. That part is in kiro-cli itself. This PR fixes only Crew's side: thecustomAgentsdescriptor Crew sends now carries the keptautoApproveverbs as KASpermissionsrules. The on-disk spec'spermissionsblock is unchanged and still derives fromallowedToolsalone.Related Issues
None filed; reported by a user. Related: #12712, #14394.
Sibling sweep
Swept: git grep -n '"autoApprove"' -- src/kiro_crew/acp src/kiro_crew/agent_materialization
Sibling: src/kiro_crew/acp/session_mcp.py -- not affected -- session-level elements carry no permissions; the agent's rules come from its spec
Sibling: src/kiro_crew/acp/skill_projection_parts/preparation.py -- not affected -- copies the key for the kiro-cli view, which honours it
Pattern harvest
Not generalizable: the defect is one backend-specific field with no wire slot; the rule that such a field is translated, not dropped, is already the module's stated approach for
allowedToolsandtoolsSettings.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement