fix(runtime): harden command runner per review (#1387)#1548
Merged
oscharko merged 1 commit intoJun 26, 2026
Merged
Conversation
Addresses review findings on PR #1546 (security audit + verifier + PR review): - contracts: cap taskId (<=256) and requestId (<=128, token charset) at the parse boundary so an oversized/non-token id cannot reach the manager, audit ledger, or SSE fan-out (the 16 KB body cap was the only prior backstop) + tests - server: document the per-run catalog re-discovery as an intentional untrusted-taskId re-validation; add a test proving a throwing SSE subscriber does not block fan-out to other subscribers - routes: assert Layer-2 redaction is applied to every SSE event frame - ui: render the project path as the Tasks window subtitle (connectionUtils) - e2e: deterministically mock the SSE channel and assert a run lifecycle event reaches the bounded events log - docs: correct the audit-evidence note (the standard manifest workspaceRoot path is retained; argv values, output bytes, and secrets are excluded) Refs #1387 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9a40655
into
feat/keiko-agent-native-editor-foundation-and-runtime
12 checks passed
73 tasks
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
Follow-up to PR #1546 (merged) landing the review-driven hardening for Issue #1387's controlled command executor. The core implementation merged at
8be49afe; this PR addresses the actionable findings from the security audit, verifier, and PR review.Refs #1387
Scope
Changes (review finding → fix)
taskId/requestIdunbounded at the parse boundarytaskId≤256 andrequestId≤128 (token charset[A-Za-z0-9._:-]) inparseCommandTaskRunRequest, so an oversized/non-token id cannot reach the manager, audit ledger, or SSE fan-out (the 16 KB body cap was the only prior backstop) + testsconnectionUtils.subTextnow renders the project path forcommands(consistent withterminal/cwd)taskIdre-validation (re-derive the vetted task from the current package.json, never trust the client's catalog)/api/commands/eventsand asserts a run lifecycle event reaches the bounded events logworkspaceRootpath is retained; argv values, output bytes, and secrets are excludedDispositioned (not changed): audit M1 (the
deniedvsspawn-errorlabel uses a string match on the sharedCommandDeniedError.message; adding a structuredkindfield is a cross-package change to a shared error, out of #1387 scope — both branches are tested and only the audit label, never execution, is affected) and review M3 (Cancel usesaria-disabledwithoutdisabled, mirroring the deliberate, axe-passingTerminalWidgetF018 C124 focus-management pattern;onAbortis guarded against activation).Verification
🤖 Generated with Claude Code