Repository navigation
fix: 0.13 backport, 55 KAS, security, Bot, MCP and browser fixes from main - #39387
Conversation
… main Backports to release/0.13.0 the fixes from #39342, squashed into one commit and brought up to date with release/0.13.0 after the Kiro Memory preview backport (#39360). Picks, in order; each [pick sha] is the commit on the #39342 branch, whose body has main's cherry-picked-from line: - fix(monitor): wake the session once when its watched PR merges or closes (#37776) [pick 84da419] - fix(security): match deny rules against Windows program suffixes and cmd/PowerShell in-word escapes (#33569) [pick e4941b7] - fix(mimocode): refuse a chat that would answer from Xiaomi's hosted model unsigned (#37629) [pick 1bfdce3] - fix(acp): end a quiet agent-started cycle on the shared runtime's stale gate (#37932) [pick fa870a2] - fix(conductor): re-read goal-conductor after a compaction (#37917) [pick ccdd67c] - fix(security): refuse a command nested past 32 substitutions before the floors walk it (#37875) [pick 2f9bd67] - fix(mates): carry a moved Bot's shell toolsSettings entry as execute_bash instead of holding it (#37973) [pick 16022f4] - fix: hold an app to its own sessions, jobs and runs (#37804) [pick 3dff0c0] - fix(acp): keep a KAS chat's stored record when its resume fails after the load (#37955) [pick 6ceb7b5] - fix(gateway): ignore a repeat SIGTERM during graceful shutdown (#38031) [pick b48287d] - fix(security): keep a quote in a $( ) from hiding a later ssh (#37558) [pick b9fed61] - fix(agent): rebuild takes a server's disabledTools from the kiro global (#38147) [pick c50bbcc] - fix(mcp_gateway): keep the backend when a stub leaves an open listen (#38121) [pick 3e9c7f9] - fix: refresh plan and model list after a kiro-cli sign-in to another account (#38053) [pick 5ad3d36] - fix(slack): keep a picture sent in a linked thread for the dashboard turn (#38076) [pick 7f8903e] - fix: keep a resolved tool policy when the gateway is too slow to answer (#36669) [pick 9be5691] - fix: open owner-only files and prune overlay folders without following links (#36994) [pick 6a1acc9] - fix: refuse the local token mint to app backends (#38113) [pick d166dab] - fix(subagent): hold a spawn's first prompt for its MCP servers (#38127) [pick e3e0298] - fix(security): refuse a headless git --output write with no approver (#36326) [pick 1abee40] - fix(restore): require an explicit mode, never default to replace (#38094) [pick ca86c06] - fix: make the deny gate's shell walk linear in command length (#36437) [pick 22c100b] - fix(chat): let a cancelled background start finish its session teardown (#36664) [pick b1dd34f] - fix(acp): refuse a start when two differing specs declare the agent's name (#38411) [pick 80ccfff] - fix: probe a silent turn while its co-tenant keeps the process busy (#38662) [pick 6354490] - fix(kas): let a reopened chat switch to models its load select omits (#38376) [pick 1640822] - fix(cloud): install a patched node 22 on run on aws instances (#38732) [pick 059cb90] - fix: write member record files without following links (#37303) [pick aac9642] - fix: fail a kas start fast once the host has turned its mcp off (#38677) [pick e147238] - fix(decisions): fall back to HTTP/1.1 when h2 is missing (#38759) [pick fc16482] - fix(mcp_gateway): free a spawn permit when its backend exits before initialize (#38793) [pick a084ba2] - fix(kas): start an app chat whose tool policy hides every kirocrew-cron tool (#38761) [pick ccea5a9] - fix(acp): give the tool-stall watchdog a margin over native waits (#34117) [pick b5d9e89] - fix(mcp): bind the working-folder answer to its launch; observe launch changes behind name grants (#38983) [pick a1069be] - fix(mcp): hide the gateway secret files from the npm install and third-party probe spawns (#39000) [pick 14d8571] - fix(sandbox): fold env name case on Windows in the agent env scrub (#33997) [pick 9bdce76] - fix(apps): let app turns follow the Auto approval mode (#38830) [pick e8336df] - fix: end a dashboard turn stopped while it is still being prepared (#36478) [pick 37fff93] - fix(acp): cleanup_session deletes the record on the session's own host (#39046) [pick 31b5ec4] - fix(acp): scan only the new part of a streamed tool result (#38852) [pick e2870db] - fix(sandbox): make an unscoped session host the OOM victim, not the gateway (#39189) [pick 2be6dde] - fix(security): read aws s3 downloads piped into tail, with 2>&1, or with an AWS_PROFILE prefix (#38271) [pick bf65d97] - fix: redact four display and log paths and use a fixed 502 message for session switch refusals (#38982) [pick 55d9ec7] - fix(sandbox): pin a credential-masking app's folder after the masks on the namespace backend (#34339) [pick afd2b14] - fix(acp): wait for systemd scope admission as its own startup stage (#37008) [pick 3e29c86] - fix(acp): wait for systemd scope admission on the AcpClient spawn path (#38303) [pick 85f0a25] - fix(acp): stamp the spawn instance on the AcpClient child (#38810) [pick f36eb5a] - fix: end the turn when the agent never confirms a stop (#38512) [pick 2665c9d] - fix(kas): renew a refused crew sign-in instead of failing every start (#38978) [pick 2f48cac] - fix(security): keep self-host detection when the ssh verb is a glob (#34056) [pick ab53f10] - fix(security): judge each substitution body for ssh-to-self (#37616) [pick d5b7ac3] - test: check the ssh floor's nesting bound below the gate's depth cap (#37964) [pick 6c9ae1d] - fix(mate): apply held Bot limits on shared claude sessions and refuse unnarrowed KAS children (#39212) [pick 721bbbe] - test(integration): wait out and reset the hidden-chat refresh between boots (#37933) [pick e77586d] - fix(browser): fall back to Kiro's Chromium under Automatic when Chrome's remote debugging is off (#39265) [pick 31912eb] Left out of #39342's set (not needed for 0.13.0): the provider_labels refactor, #34045, #36668, #39120 and #37627. Merge with release/0.13.0: kept both imports in runtime_session_load, runtime_spawn_launch and session_provider; session_allocation lists the memory_policy owner; the keep-record resume path passes kas_memory_mode as main does; dropped the ACP_BACKENDS_SESSION_EVICTION import that moved to session_provider_new_conversation.
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/subagent_manager/turn_session.py:383 -- Publish cleanup identity before the cancellable MCP wait
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1: MEDIUM to HIGH harm, and it is silent. This PR adds a wait of up to 30s for declared MCP servers in False positive or not applicable? A repository writer can comment: |
Security Scope Review -- ✅ human override accepted@bolichen97 overrode this lane for [SCOPE-REVIEWED] f5f766d |
|
/ai-review override design f5f766d not-applicable: owner ruling by bolichen97: this backport diff is 1.8 MB, over the lane's 1 MB fail-closed cap, so the lane never reviewed it; every pick was reviewed on its own main PR. |
|
/ai-review override ux f5f766d not-applicable: owner ruling by bolichen97: this backport diff is 1.8 MB, over the lane's 1 MB fail-closed cap, so the lane never reviewed it; every pick was reviewed on its own main PR. |
Human judgment recorded@bolichen97 recorded a not-applicable release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override fable f5f766d not-applicable: owner ruling by bolichen97: this backport diff is 1.8 MB, too large for the Opus lane's single discovery pass, so it fails closed without reviewing; every pick was reviewed on its own main PR. |
Human judgment recorded@bolichen97 recorded a not-applicable release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override scope f5f766d not-applicable: owner ruling by bolichen97: this backport diff is 1.8 MB, too large for Security Scope Review to run, so it fails closed without a finding; every pick, including each security fix, was reviewed on its own main PR. |
Human judgment recorded@bolichen97 recorded a not-applicable release (class
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@bolichen97 recorded a not-applicable release (class
This decision applies only to this commit. A new push requires a new judgment. |
UX Review (Opus 5.5) — ✅ human override accepted@bolichen97 overrode this lane for |
Design Review (Opus 5.5) — ✅ human override accepted@bolichen97 overrode this lane for |
Opus 5.5 Review — ✅ human override acceptedReviewed Human judgment by @bolichen97 overrides the Opus 5.5 finding for [OPUS-OVERRIDE] f5f766d Verdict recorded from an authorized human decision for commit False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: 0.13 users get the fixes merged on main that fix breaks they hit on 0.13.0 today, and nothing more.
This replaces #39342. That PR carried 60 commits, conflicted with release/0.13.0 after the Kiro Memory preview backport (#39360) merged, and failed PR Hygiene on its commit count. This PR is the same set of picks minus five that 0.13.0 does not need, merged with the current release/0.13.0 and squashed into one commit.
Why it matters
0.13 is the next stable line. Without these picks its users keep crashes, hangs, data loss, security gaps and user-reported breaks that main already fixed. Each pick's reason is in #39342's Picks table.
Not a goal
Removed from #39342's set, because 0.13.0 works without them:
codetool, a new capability rather than a fix.provider_labels.pyrefactor: needed only to keepacp/types.pyunder its line cap once fix(kas): turn on code intelligence so kas sessions get the code tool #36668 was in. Without both,acp/types.pyis 1,989 lines.#38677 stays: the #38978 sign-in renewal pick uses its
KasGovernanceOffError.What changed (motivation → approach → change)
One commit on release/0.13.0 (
7f98f1d7eec). It is #39342's branch merged with release/0.13.0 at9402c19bdf5, with the five picks above reverted, squashed, then rebased cleanly over #39378 and #39376. The commit message lists all 55 picks in order. Each one names its commit on the #39342 branch, which carries main'scherry picked fromline.Merge with release/0.13.0, where #39360 overlaps the picks:
runtime_session_load.py,runtime_spawn_launch.py,session_provider.py: kept both sides' imports, in the same form main uses.runtime_session_load.py: the keep-record resume path that fix(acp): keep a KAS chat's stored record when its resume fails after the load #37955 adds now passeskas_memory_mode, as main does. Without it a memory-policy resume test fails.session_provider.py: dropped theACP_BACKENDS_SESSION_EVICTIONimport, because feat: 0.13 backport, add the opt-in Kiro Memory preview (#36872, #38735) #39360 moved its only user intosession_provider_new_conversation.py(flake8 F401 otherwise).session_allocation.py: the owner list and docstring namememory_policy, and dropeviction, which only fix: make a stricter sandbox tier reach running sessions #34045 added.Backwards compatibility
Compatible: every pick is code already on main.
The one take-away is #39000's, which hides the gateway secret files from npm install and probe spawns. Its readers, as listed on #39000:
Reader: src/kiro_crew/mcp_gateway/resolve_once.py:install -- chat -- it has no secret-file access (git grep on release/0.13.0 finds none), so it still works.
Reader: src/kiro_crew/mcp_discovery_probe.py:probe_server -- chat -- it has no secret-file access either, and the first-party managed server is not masked.
Tests
On the final tree, with one local environment:
test_workflows_private_execution.py(fixture 'event_loop' not found) also occur on the tree before the reverts. They come from this local pytest-asyncio install, and the file is unchanged from release/0.13.0.flake8==7.1.0: exit 0 on the changed Python files.mypy: exit 0 on 28 changed source files.runtime_session_load.pyand the KAS model-select files): 20 test files on the overlap, 2,071 passed; flake8 exit 0; mypy exit 0 on 186 changed source files.git range-diffshows the commit's patch unchanged apart from one hunk header.Proof: not provable -- other: a backport of fixes whose proof ran on their own main PRs
Manual verification
N/A: each fix was verified on its own main PR. This batch only carries them.
Related Issues
Backport batch for release/0.13.0. Supersedes #39342.
Sibling sweep
Siblings: none -- a backport; each fix's sweep is recorded on its own main PR
Pattern harvest
Not generalizable: a backport; the patterns are recorded on each main PR
Checklist