Skip to content

fix(release): backport six KAS and security fixes to 0.12.0 line - #30809

Merged
buluoray merged 2 commits into
release/0.12.0from
crew/slack/0.12.1-batch-1
Nov 6, 2026
Merged

buluoray merged 2 commits into
release/0.12.0from
crew/slack/0.12.1-batch-1

Conversation

@buluoray

@buluoray buluoray commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Bring six KAS and security fixes that merged on main after v0.12.0 onto release/0.12.0, so the 0.12.1 patch ships them.

KAS is the default backend on 0.12.0, so the three KAS fixes reach every default install. The other three close security gaps (one session's approval click settling another's request, and secrets echoed into log lines).

Why it matters

PR What a 0.12.0 user sees today
#29990 Approving or rejecting a tool call by id can settle a request that another session is showing.
#30129 An old chat whose working dir was an earlier process's hidden scratch dir fails every turn (EPERM uv_cwd, rc=None). Reported by a user on 0.12.0.
#30205 The KAS engine bundle route sends roughly 157k characters of Crew tool schemas on every request instead of deferring them (new in 0.12).
#30279 One more credential value can be written into log output.
#30195 On KAS, answering Deny to a question the model asks reaches the model as "yes".
#30199 Four log lines can echo secrets, and two small checks are looser than intended.

Not a goal

  • No fix that is not already merged on main; nothing is changed only here.
  • No version bump, no tag, no CHANGELOG.md change. Cutting v0.12.1-rc.N and the bare tag follow docs/build/release.md and stay with the maintainers.
  • No pick that needs a hand-resolved conflict. Those come in later, separate PRs.

What changed (motivation → approach → change)

Each main squash commit was cherry-picked with -x onto origin/release/0.12.0 @ f315771db6 (= v0.12.0), in main merge order, then squashed into one commit. The commit message lists every source commit.

# PR main commit Pick
1 #29990 resolve an approval by id only in the session it was shown in 4d2b8a5c9e clean
2 #30129 don't resume in an earlier process's hidden scratch dir 599e33e9f0 clean
3 #30205 let Crew's MCP servers defer on the KAS engine bundle 3d4e4a6c32 clean
4 #30279 keep one more credential value out of log output 9fcf80f316 clean
5 #30195 answer KAS user-input questions instead of letting Deny read as yes bbf4e6df7c clean
6 #30199 redact four log lines and tighten two small checks 16ff876b5a clean

No conflicts. The squashed tree is byte-identical to the tree of the six separate picks.

The second commit is a partial pick of #31391 (4023e84b16), built by hand on top of the first. It carries the Windows branch the GPT review asked for, plus the chat's hidden-scratch fallback:

Part of #31391 Here
native Windows keeps a scratch cwd (get_or_create.py) carried
a dashboard chat's own cwd in a hidden scratch tree starts in the default folder (fallback_hidden_cwd, get_or_create.py, turn_admission.py, eager_spawn.py) carried
test_session_get_or_create.py tests carried, without the notice assertions, plus a Windows test adapted from main's test_hidden_scratch_notice.py
the chat start notice (_note_skipped_hidden_cwd, HIDDEN_SCRATCH_CWD_NOTICE), _fallback_turn_project, ErrorCard and i18n strings, test_hidden_scratch_notice.py left out: the notice surface (startup_notice) comes from #25347, which is not on 0.12

The fallback is kept on 0.12 for #31319: without it every MCP server in that chat fails with ENOENT and the chat is dead, and the hidden folder is unreachable from the process anyway. With no chat notice on 0.12, the WARNING log line names the hidden folder and says the session starts in the default directory.

Backwards compatibility

Compatible: each change is the one already merged on main, and each PR's own compatibility note applies unchanged.

Removes nothing: no pick hides, deletes or renames anything 0.12.0 accepts.

Tests

Proof: not provable -- other: a backport of main commits whose proofs ran on their own PRs

  • CI does not run the backend suite on PRs into release/*, so the related set was run here: the 18 Python test files this diff adds or changes, plus every test file that imports a source module these picks touch, 126 files in total. Sequential batches of up to 20 files, one pytest process each, -n 0. 8305 passed. 5 tests fail, and each fails the same way on clean origin/release/0.12.0 @ f315771db6, so none comes from this diff: test_acp_harness_contract.py::test_a_missing_self_served_binary_names_its_install_command[copilot], test_auto_improvement_members.py::test_assignments_build_real_context_from_only_their_private_store, two in test_folder_steering_provider_dedup.py, and test_harness_parity.py::test_is_kiro_cli_is_positive.
  • The 4 frontend test files this diff changes (ChatInput.approval, dashboardSlice, dashboardSliceRelay, slotReadRelay): 193 of 196 pass. The same 3 ChatInput.approval tests fail on clean origin/release/0.12.0 on this host (a local dev-server path restriction), so they do not come from this diff.
  • Second commit: test_session_get_or_create.py, 60 passed, including the Windows test. Removing the Windows branch makes that test fail. Every test file that mentions eager_spawn, turn_admission or get_or_create (785 files, batches of 20, -n 0) passes except test_harness_parity.py::test_is_kiro_cli_is_positive and test_auto_improvement_members.py::test_assignments_build_real_context_from_only_their_private_store, both listed above as failing on clean release.
  • flake8 and black (py310) pass on every changed Python file.

Manual verification

N/A - every pick was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.

Screenshots / video

Why no screenshot: the frontend changes come from #29990 and #30199 unchanged, and both PRs waived screenshots because nothing on screen changes.

Related Issues

Backport of #29990, #30129, #30205, #30279, #30195 and #30199, plus part of #31391, to the 0.12 line for 0.12.1. Related: #31319. Source issues: #29989, #29775, #30194.

Sibling sweep

Siblings: none -- each source PR carried its own sibling sweep; this PR only carries those fixes unchanged.

Pattern harvest

Not generalizable: this PR only carries six fixes already on main. Each source PR has its own harvest.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

Cherry-picked with -x from main onto release/0.12.0 for 0.12.1, in
main merge order. Every pick applied clean.

- #29990 fix(approvals): resolve an approval by id only in the session it was shown in
  (cherry picked from commit 4d2b8a5)
- #30129 fix(session): don't resume in an earlier process's hidden scratch dir
  (cherry picked from commit 599e33e)
- #30205 fix(acp): let Crew's MCP servers defer on the KAS engine bundle
  (cherry picked from commit 3d4e4a6)
- #30279 fix: keep one more credential value out of log output
  (cherry picked from commit 9fcf80f)
- #30195 fix(acp): answer KAS user-input questions instead of letting Deny read as yes
  (cherry picked from commit bbf4e6d)
- #30199 fix: redact four log lines and tighten two small checks
  (cherry picked from commit 16ff876)

Co-authored-by: Bolin Chen <17506219+bolichen97@users.noreply.github.com>
Co-authored-by: Joe Guo <12429733+iamwhatever@users.noreply.github.com>
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 5, 2026 22:42
@buluoray
buluoray requested review from iamwhatever and removed request for a team November 5, 2026 22:42
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/log_redaction.py

  • src/kiro_crew/security/redaction.py

  • src/kiro_crew/security/rm_floor.py

  • @buluoray posted a complete reasoning template for 55e090d.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 55e090da3d7f0517a890b24f9b886186ac6e22e2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: each pick is a clean backport of a fix already merged on main, and the hand-built partial pick of #31391 only adds code paths that callers opt into.

Notes

  • CI does not run the backend suite on PRs into release/*. The hand-built second commit (_stored_cwd_is_hidden_scratch, fallback_hidden_cwd) is not byte-identical to anything that ran on main, so the 0.12.1 RC soak should open an old chat whose project is a previous process's scratch dir on macOS. That is where the reported EPERM uv_cwd happens.
  • With no start notice on 0.12, a chat whose project falls back moves to the default directory without telling the user. The only record is the WARNING log line, so a user may not see why the agent is working in a different folder. This is acceptable for a patch line, but say it in the 0.12.1 release notes.

[DESIGN-REVIEWED] 55e090d

Description read

[DESCRIPTION-READ] 2453c6f6e9905e8c74abfee4728915cc60cae23639a0dfd8bd164c5401ba9f7c

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 55e090da3d7f0517a890b24f9b886186ac6e22e2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check. The diff adds or changes no visible control, label or state. The frontend edits only change which API route an approval click uses and where the unread relay posts, so no screenshot is needed.

Notes

  • The hidden-scratch fallback (fallback_hidden_cwd in get_or_create.py) moves an old chat's working directory to the default folder without telling the user. The start notice was left out because 0.12 doesn't have startup_notice. Track shipping that notice when feat: add Kiro Cloud Sessions as a session environment #25347 reaches the release line.

[UX-REVIEWED] 55e090d

Description read

[DESCRIPTION-READ] cddf75e22b74965c1d629fe8291c892ffafb404dafcd2c28b530e42c94a151a9

That sha256 names everything this verdict read: the PR description, plus the 3 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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 55e090da3d7f0517a890b24f9b886186ac6e22e2 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: every item is a fix already merged on main, carried over unchanged or cut down to fit 0.12. The only new piece is the Windows branch, and it keeps base behaviour.

What this change ships

Inventory (9 items) — 9 justified

Intent: ship six fixes already merged on main (plus part of #31391) in 0.12.1, so users of the 0.12 line get them. FIX.

  1. Approving or rejecting by id settles only the request shown in that session (fix(approvals): resolve an approval by id only in the session it was shown in #29990) — justified
  2. A resumed chat whose working directory is an earlier process's hidden scratch dir now starts in the default directory (fix(session): don't resume in an earlier process's hidden scratch dir #30129) — justified
  3. On the KAS engine bundle route, Crew's MCP servers now defer their tool schemas (fix(acp): let Crew's MCP servers defer on the KAS engine bundle #30205) — justified
  4. One more credential value is kept out of logs (fix: keep one more credential value out of log output #30279) — justified
  5. On KAS, answering Deny to a question the model asks now reaches the model as a decline, not "yes" (fix(acp): answer KAS user-input questions instead of letting Deny read as yes #30195) — justified
  6. Four log lines are redacted, and the rm guard and one other check are tighter (fix: redact four log lines and tighten two small checks #30199) — justified
  7. A dashboard chat whose own folder is a hidden scratch tree starts in the default directory (partial fix(session): don't start a chat in an earlier process's scratch dir #31391) — justified
  8. Native Windows keeps a scratch working directory, the same as on base — justified
  9. The fallback is recorded only as a WARNING log line, with no chat notice on 0.12 — justified

[FIRST-PRINCIPLES-REVIEWED] 55e090d

Description read

[DESCRIPTION-READ] 227543b51d299eb0f3c84b69a45e279579acbb043f0b3c3c60fa7551d6d34b86

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 55e090da3d7f0517a890b24f9b886186ac6e22e2 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 55e090d

Verdict parsed from the review's SHA-scoped output markers for commit 55e090da3d7f0517a890b24f9b886186ac6e22e2.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 55e090da3d7f0517a890b24f9b886186ac6e22e2 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 55e090da3d7f0517a890b24f9b886186ac6e22e2 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 55e090d

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 55e090da3d7f0517a890b24f9b886186ac6e22e2 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review -- ✅ PASS

Which legitimate operations does 55e090da3d7f0517a890b24f9b886186ac6e22e2 newly refuse? Updated in place on each push. A script-confirmed regression blocks; the model proposes candidates and never decides a refusal.

Verdict basis: adjudicated, zero confirmed regressions.

Security scope review -- adjudicated candidates

  • macos-latest (platform posix): 15 classified, 0 newly refused, 15 still allowed.
  • ubuntu-latest (platform posix): 15 classified, 0 newly refused, 15 still allowed.
  • windows-latest (platform windows): 4 classified, 0 newly refused, 4 still allowed.

No candidate flipped from allowed to refused.

Scope-Verdict: PASS

Reason: In the deny composite, the only stricter piece is the rm floor's fallback for a command it cannot read. It runs only after _rm_wipe_targets_nested raises, so a command that reads normally cannot be newly refused through it. Two other tightenings are outside the shell classifier and are named under UNADJUDICATED: the 409 approval_ambiguous refusal for a decide by bare id, and log-line masking of token parameters.

TIGHTENING: the rm floor's fail-closed word test _names_rm_word (src/kiro_crew/security/rm_floor.py) -- it refuses rm -fr ~ / rm -fr / hidden behind an unset parameter glued to rm when the walker fails, quoting the hunk: - return bool(_RM_WORD_RE.search(command) or _RM_WORD_RE.search(resolved)) / + return any(_RM_WORD_RE.search(text) for text in (command, resolved, _PARAM_RE.sub("", command))) with the docstring once unquoted parameters are dropped (an unset ``$1`` glued to ``rm`` runs ``rm``). It is reached only from deny_gate.py except Exception around _rm._rm_wipe_targets_nested(tool_name), under component="argv-floor" with the _RM_FLOOR_UNREAD_NOTE.

ADJUDICATED: 19 candidates, 0 confirmed newly-refused

PLATFORM COVERAGE: posix (15 rows) and windows (4 rows); no any rows, since every row names an executable or a path. The diff's one platform assumption is _PARAM_RE, which treats posix $NAME, ${…}, $1, $@ as parameters that can expand to nothing. The posix rows probe that next to rm words and r/m letters: variable rm targets, nested bash -c '… "$1"', git rm / terraform state rm / docker rm / --rm beside a parameter, a ${EDITOR:-vi} default in command position, and --format=$FMT. The windows rows probe the spellings _PARAM_RE sees differently: PowerShell $env:TEMP / $env:FILE, which the new drop removes as $env, and cmd.exe %TEMP%, which it does not touch, under Remove-Item, rmdir /s /q, del /q and git rm. The classifier refuses through this path only if the walker raises, and none of these ordinary commands is expected to make it raise. So the posix and windows legs measure whether the walk stays clean on these shapes, not whether the new fallback over-matches. A command that makes the walker raise, such as one deep enough to hit a RecursionError, is not an operation anyone can be named as running, so no row probes the fallback directly.

UNADJUDICATED:

  • Approval decide by bare id, shared_crew.decisions.resolve_approval_by_id. The call path is POST /api/approvals/{id}/{action} → resolve_approval_by_id → when the id is pending in more than one state._slots entry, it now returns 409 approval_ambiguous instead of settling the first. The session view's native cards now use POST /api/chat/slots/{slot}/approve with origin: "native", request_id, request_mid, per chat-input/approval.ts. The legitimate inputs I would have submitted, which a shell row cannot express:

    • a dashboard owner pressing Approve on a native card that has no mid, while another session holds the same JSON-RPC id;
    • any other caller of the bare-id form, such as a channel approval button or a script using the documented route, in the same two-session collision.

    Those callers now get a 409 they did not get before. I could not find which non-dashboard surfaces still use the bare form, so this is not a demonstrated gap.

  • Log redaction, log_redaction.SecretRedactionFilter.redact with the new _TOKEN_PARAM_RE from credential_patterns.TOKEN_PARAMETER. It masks rather than refuses: a log line carrying ?token= / &token=, such as a URL with a non-secret token parameter like a pagination cursor, now shows [REDACTED] in place of the value. Nothing is refused, so no classifier verdict applies.

[SCOPE-REVIEWED] 55e090d

Partial backport of #31391 (main 4023e84) to the 0.12 line.

Carried:
- get_or_create.py: native Windows keeps a scratch cwd, because no
  scratch-root mask applies there (a Kiro spawn is delegated to Kiro's
  own sandbox). This is the Windows branch the GPT review asked for.
- get_or_create.py: a caller that opts in (fallback_hidden_cwd) and
  names an earlier process's hidden scratch tree as its own cwd starts
  in the default directory instead.
- turn_admission.py and eager_spawn.py: the dashboard chat opts in
  with fallback_hidden_cwd=True.
- test_session_get_or_create.py: #31391's tests, without the notice
  assertions, plus a Windows test adapted from main's
  test_hidden_scratch_notice.py.

Left out: the chat start notice (_note_skipped_hidden_cwd and
HIDDEN_SCRATCH_CWD_NOTICE), _fallback_turn_project in
turn_spec_hooks.py, the ErrorCard and i18n strings, and
test_hidden_scratch_notice.py. The notice surface (startup_notice)
comes from #25347, which is not on 0.12.

The fallback is kept on 0.12 for #31319: without it every MCP server
in that chat fails with ENOENT and the chat is dead, and the hidden
folder is unreachable from the process anyway. With no chat notice
on 0.12, the existing WARNING log line names the hidden folder and
says the session starts in the default directory.

(cherry picked from commit 4023e84, partial)
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 6, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@buluoray

buluoray commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: 55e090d
  • What rule changed: No rule is written only here; the flagged files come from clean cherry-picks squashed into 36477d5785. log_redaction.py and security/redaction.py (fix: keep one more credential value out of log output #30279, main 9fcf80f316) add ?token= / &token= URL values to the log-redaction floor, sharing the spelling the scrubber already used through credential_patterns.TOKEN_PARAMETER. security/rm_floor.py (fix: redact four log lines and tighten two small checks #30199, main 16ff876b5a) also checks the command with unquoted parameters dropped, so $1rm (an unset $1 glued to rm) reads as rm. The second commit, 55e090da3d (part of fix(session): don't start a chat in an earlier process's scratch dir #31391), touches no flagged file.
  • Before -> after (what was allowed/blocked, now): Before, a ?token= value could reach a log line unmasked, and $1rm -rf ... passed the rm floor. After, the token value is replaced by [REDACTED] with token= kept visible, and $1rm is caught as rm.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): Both changes only tighten: more text redacted and more commands read as rm. The worst case is an over-masked log line or a false refusal, never a newly allowed command or an unmasked secret. No credential path, sandbox seal or policy file changes.
  • Evidence checked (which sandbox result proves it): test_log_redaction.py, test_log_sinks_redact_secrets.py, test_credential_patterns.py and test_denied_commands_security_rows.py pass on this branch (single process, -n 0); GPT 6.1 and Opus 5.5 both posted no blocking findings on 55e090da3d, and Security Scope Review passed on it.
  • No regression:
    • Tools still work (which tools/commands were run, result): first commit, 126 related test files, 8305 passed; second commit, 785 files that mention eager_spawn, turn_admission or get_or_create, all green except two tests that fail the same way on clean release/0.12.0 (test_harness_parity.py::test_is_kiro_cli_is_positive, test_auto_improvement_members.py::test_assignments_build_real_context_from_only_their_private_store).
    • Backward compatible (old config / old data / old callers still work, how checked): each source PR's own compatibility note applies unchanged; no config key, stored record or caller signature changes.
    • Existing tests (which suites passed on this head): above, plus flake8 clean on every changed Python file.
  • How to undo: Revert 36477d5785 (the six squashed picks) or 55e090da3d (the fix(session): don't start a chat in an earlier process's scratch dir #31391 part) on release/0.12.0; each is its own commit.

@buluoray
buluoray merged commit c8dedc2 into release/0.12.0 Nov 6, 2026
31 of 42 checks passed
@buluoray
buluoray deleted the crew/slack/0.12.1-batch-1 branch November 6, 2026 23:41
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant