Repository navigation
Conversation
Sensitive Change ReviewSensitive files changed:
|
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: it reuses the existing one-step owner-consent shape from Notes
[DESIGN-REVIEWED] da854d4 Description read[DESCRIPTION-READ] 32f66c7eff07fb0d461a44c5b438417ff9db86d075e9024cedec1934b7374d30 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 |
UX Review (Opus 5.5) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK Users won't press "Allow for these sessions" because they can't tell which sessions it covers. The PR says this two-group card is the usual default, so most owners will see this label. Blockers"Allow for these sessions" doesn't say which sessions Notes
[UX-REVIEWED] da854d4 Description read[DESCRIPTION-READ] b1c9ac21247451c4b8ac4a86cff0896c7d431ae8a1500f895c29ff58b27d6704 That sha256 names everything this verdict read: the PR description, plus the 30 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. One field in the GET response repeats what two other fields already say. Notes
What this change shipsInventory (10 items) — 7 justifiedIntent: let the operator allow, see and withdraw SSH agent forwarding from Settings → Security instead of hand-editing a keystone file (#18223). ADDITION.
[FIRST-PRINCIPLES-REVIEWED] da854d4 Description read[DESCRIPTION-READ] 38ed6d184c59b992fdba473b987b1aa50d2a102bf1432ca781dcf1073fe66318 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: |
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS Reason: The new ungated argv floor only refuses the product CLI when its leading operands are exactly TIGHTENING: Self-protection argv floor (sensitive-command tier, ADJUDICATED: 21 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: posix -- covers the real OpenSSH UNADJUDICATED: (1) File-tool secret-leaf gate: [SCOPE-REVIEWED] 94d0c69 |
e045be1 to
224dfd6
Compare
Sensitive change review
|
|
|
|
|
|
|
|
|
|
224dfd6 to
c520b6f
Compare
Code change approver recommendation: A person should decideWhy: the decider raised 1 possible problem and estimates a 55% chance that this change introduces a defect; a person should check it. This PR adds an owner-gated GET/POST/DELETE handler and a Settings → Security → SSH agent card, so the owner can grant and withdraw the keystone Things to check (possible problems the decider raised; at this confidence many turn out to be fine):
An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
|
|
Rebase only: head |
Sensitive change review
|
Sensitive change review
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review found one blocking problem on this head (0ffe0e3) in the code this PR adds.
website/src/pages/settings/SecurityPanelSshAgent.tsx:189-206, withwebsite/src/i18n/locales/en.manual.json:10248and:10260. Take the default scoped state: Kiro CLI or Claude Code forward the agent at the standard sandbox level, and only the masked harnesses wait for the grant. The row shows the label "The SSH agent on this computer" with a "Not allowed" badge, but some sessions already have the operator's SSH agent. The only correction is muted 11px text: the "For new ... sessions only" line, and a note below the action that adds "whatever this setting says". The headline understates the exposure, which is the dangerous direction for a security consent, and the "see" half of the goal fails in the most common state. The UX lane recorded this as a BLOCK on this head with both a Trigger and an Outcome. Its header reads PASS only because the Outcome text starts on the next line. No disposition answers it yet. Smallest fix: scope the headline to the sessions the setting decides, for example a label and status per group of sessions, so the Kiro CLI sessions read "On at your sandbox level". Open the note with what Allow covers and drop "whatever this setting says". Then refresh the default-state screenshots. If you think the current layout is right, post a disposition for this blocker on this head.
The standing change request from 2026-10-21 also still needs its reviewer to re-review or dismiss it before this can merge.
Optional:
- The body says a maintainer asked for the one-step grant shape. The thread shows the question to the reviewer, but no answer. Please reword that line so a maintainer can rule on dropping the step-up.
- The
ssh_auth_sock_consent_pathdocstring insrc/kiro_crew/config/loader_locations.py:513-517still says Kiro Crew only reads this leaf. The body says writes useatomic_write, but the code usesrewrite_in_place, which is the right choice because it keeps the inode under the read-only bind. Please fix both, and the sibling-sweep line. SecurityPanelSshAgent.tsx:70-76rebuilds the client retry default by hand. ImportingretryPolicy, asSecurityPanelRedaction.tsxdoes, removes a second copy that can drift.
Sensitive change review
|
|
Reply to KiroCrewCaptain's CHANGES_REQUESTED review 5963164673 (2026-11-18T19:01:29Z, head 0ffe0e3). Head: 1. Blocker: "Not allowed" headline while some sessions already have the agent. Fixed in commit 1 (the commit that adds the card).
2. UX lane header reads PASS on a BLOCK. On 0ffe0e3 the lane wrote a Blocker with 3. The UX BLOCK that had no disposition. Answered by item 1. The lane's own Fix asked for exactly that: open the note with what Allow covers, name the always-on sessions as a separate fact with the sandbox link, and drop "whatever this setting says". Its notes are not changed here:
4. @dodgeblaster's 2026-10-21 change request (review 5596721843, on 7fb2c12). All three points were answered in #18395 (comment):
Optional items (not changed in this push):
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review found one blocking problem in the code this PR adds, on head 9166a54.
src/kiro_crew/ssh_auth_sock_consent.py:430, withtest/test_ssh_auth_sock_consent_grant.py:495-512. A Shared Crew teammate (an invite guest, relay teammate or tailnet collaborator) sends POST or DELETE/api/ssh-agent/consent.is_owner_dashboard_requestadmits them throughteammate_passes_owner_gate, because no owner-only rule inteammate_access.is_owner_only_for_teammatescovers this route.record_grantorrevokethen callsaudit_decision, which hardcodescaller="owner". The SEL row therefore names the owner as the person who allowed or withdrew forwarding of the owner's ssh-agent keys. That breaks the rule inshared_crew/teammate_access.pythat every audit row names the teammate. Refusals record"gateway"and drop the refused caller. The audit test callsrecord_grant/revokewith no request and asserts"owner", so the suite pins the wrong value. Smallest fix: add acallerargument toaudit_decision,record_grantandrevoke. Passstr(request.get("user") or "anonymous")from all three handler sites, assource_providers._audit_source_apidoes. Use it for every outcome. Replace the:509assertion with a test driven through the handler, for both an owner request and a teammate request. Keep the authorization policy as it is. Admitting the teammate follows the recorded Shared Crew policy. Then correct the handler docstring atdashboard/handlers/ssh_auth_sock_consent.py:10and the body, so they say the owner or an admitted teammate can use these routes. This one fix also clears the open automated security BLOCK at the same line.
Follow-up on my earlier review (0ffe0e3):
- "Not allowed" headline understating exposure: partly fixed. The card now shows a status for each group of sessions, so it no longer understates. But in the default mixed state both rows use the same label, "The SSH agent on this computer", with opposite badges, and the UX lane blocks this head on that. Smallest fix: drop the label and badge row at
SecurityPanelSshAgent.tsx:301-304and keep the names line, the tier note and the sandbox link. Or give each row a label that names its group. Then update the assertions atSecurityPanel.sshAgent.test.tsx:176and:212-213. - Optional items (step-up wording,
loader_locations.pydocstring andatomic_writebody line, hand-built retry): declined for now, which is fine because they were optional.
The change request from 2026-10-21 still needs its reviewer, or a maintainer, to re-review or dismiss it before this can merge.
Optional:
src/kiro_crew/config/loader_locations.py:514-515still says Kiro Crew only reads this leaf, and the new handler says it is the only writer. One sentence fixes the contradiction.docs/system-specs/modules/security.md:1825documents the GET withoutforwarded_harnessesandharness_labels, which the card depends on.- The refusal-generation cache in
SecurityPanelSshAgent.tsx:39-115could become the one-lineretry: (c, e) => !isOwnerGateRefusal(e) && retryPolicy(c, e)that the sibling Security cards use.
Sensitive change review
|
|
Reply to the review of 2026-11-18T22:40:57Z (on 9166a54). Every point is addressed on head 2208121. The PR is still 2 commits, and each change is in the commit that added the code it touches. 1. Blocker: the audit row named the owner for a teammate's grant or withdrawal. Fixed in commit 1.
2. Both mixed-scope rows used the same label with opposite badges. Fixed in commit 1, with existing strings only.
3. Optional items.
4. zh-CN wording. Every SSH agent string in zh-CN uses 沙箱, "strict 级别", and 进程沙箱 for the Process Sandbox control, as main's zh-CN does. The Known limitations line about it is removed from the description. 5. The 2026-10-21 change request from @dodgeblaster (review 5596721843, on 7fb2c12) still needs that reviewer, or a maintainer, to re-review or dismiss it before this can merge. Its points were answered in #18395 (comment), and the branch merges cleanly with current main. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review found one blocking problem on head 2208121, in the code this PR adds.
website/src/pages/settings/SecurityPanelSshAgent.tsx:145and:206, withssh_auth_sock_consent.py:309and:354.- Trigger: the usual default, the Kiro CLI on the
standardsandbox level.harness_labels()returns a label for every harness inACP_BACKEND_ROUTING.decidedNameskeeps every one of them that does not forward. Every enforced harness hides~/.ssh, so all of them land in the decided group. - Outcome: the capture shows the row above Allow as "For new OpenAI Codex, GitHub Copilot CLI, DeepSeek Harness, goose, Kiro Agent, OpenCode, Pi sessions only". A real gateway lists even more. Most operators never configured any of these harnesses, so they cannot tell whether Allow affects their own sessions. The body says this row reads "For new OpenAI Codex sessions only", but no configuration renders that. The UX lane blocks this head on the same state, and no disposition answers it.
- Smallest fix: label each group by what it means, for example "Sessions whose sandbox hides your SSH keys" and "Sessions whose sandbox level already gives them your SSH agent". Or name only the harnesses the operator has configured or selected. Then add a mixed-scope test whose
harness_labelsmatches the real set. Finally, correct the body's mixed-scope paragraph and screenshots so they match the head.
- Trigger: the usual default, the Kiro CLI on the
Follow-up on my earlier reviews:
- The audit row named the owner when a teammate made the change (9166a54): fixed. Every handler site passes the requesting user as
caller. Handler-driven tests cover the owner, a teammate, refusals and failed writes. - Both mixed-scope rows shared one label with opposite badges (0ffe0e3, 9166a54): fixed. Each group now has its own label. The name list that replaced the shared label is item 1 above.
- Optional: the
loader_locations.pydocstring and thesecurity.mdGET fields are fixed.
The change request from 2026-10-21 still needs its reviewer, or a maintainer, to re-review or dismiss it before this can merge. The body asks whether Withdraw may drop the mcp_gateway_backends grant when the store cannot be read. That question still needs a maintainer ruling.
Optional:
forwarded_without_consentrepeats whatforwarded_harnessesandharness_labelsalready say. The client can work out the "all" scope from those two fields, or a disposition can rebut the First Principles note.- No test fails if
redact_log_via_contextis removed from the audit write atssh_auth_sock_consent.py:438. One test would pin it: send a refused request whose app id carries a token fromkiro_crew.testing.synthetic_credentials. test_socket_present_answers_as_the_spawn_path_wouldreplaces the globalos.path.existswith a lambda that only accepts strings. The fake resolver could return a real path undertmp_pathinstead, which avoids the global patch.
Sensitive change review
|
|
Reply to KiroCrewCaptain's CHANGES_REQUESTED review 5968341865 (2026-11-19T02:16:11Z, on 2208121). All points are addressed on head 68a2a82. The PR is still 2 commits. 1. Blocker: the mixed-scope row labels were harness-name lists. Fixed in commit 1.
2. Optional,
3. Other optionals: not taken.
Still open, for a maintainer:
|
|
This head fixes the blocking item from my last review, but it cannot be approved yet. Follow-up on my review of 2208121:
The review of this head found no blocking problem in correctness, security, scope or tests. The owner gate covers all three verbs. The store stays a read-only keystone leaf. Writes go through Before this can merge:
Optional:
|
The owner grants or withdraws the SSH_AUTH_SOCK forward consent from Settings > Security > SSH agent. The owner-gated POST writes the keystone grant directly, the same one-step shape as the paid-AWS consent; DELETE withdraws it. No CLI verb and no host step-up, following main.
… read it once A viewer the owner gate refuses saw "Could not read whether sessions can use your SSH agent", and every open and refocus re-read the route, writing a new audited refusal each time. The card now tells an owner-gate refusal apart with the redaction card's isOwnerGateRefusal, says only the owner can see or change it, does not retry that refusal, and keeps it cached for the tab so focus and remount do not repeat it. An owner keeps the re-read on focus and remount. The non-owner test settles react-query's focus pass with the shared refocusWindow barrier before it checks that the refused read was not repeated. The owner-only refusal is cached for the tab, so the card re-reads its grant on mc-auth-recovered: a stale pre-owner session that signs in again as the owner would otherwise stay on the refusal, since the client's recovery refetch skips an error that kept earlier data. The card loads as its own lazy chunk, which keeps the SettingsPage chunk within its bundle budget.
Sensitive change review
|
|
Re the UX Review BLOCK on 68a2a82. This is addressed on head da854d4; the PR is still 2 commits.
|
Problem / Motivation
Goal: An operator can allow, see, and withdraw SSH agent forwarding into sessions from Settings → Security, instead of hand-editing a keystone file.
The sandbox env scrub removes
SSH_AUTH_SOCKfrom agent spawns whose sandbox hides~/.ssh(strict, or a harness mask over~/.ssh), sogit fetch/pushover SSH and SSH commit signing fail inside those sessions. The sanctioned re-enable is the keystone leafssh_auth_sock_consent.json→{"enabled": true}, but the only grant path is that hand edit: no Settings control, no risk text at grant time, no audit record. Issue #18223.Why it matters
A developer whose
git fetchstops working inside a session has to know the forward was removed, that a consent file exists, its exact path and strict-boolean semantics, and then edit a keystone file by hand. The sibling keystone consents (aws_service_consent.json,credential_redaction.json,registry_trust.json) all have an owner-gated Settings surface; this one did not.Not a goal
config.json; noagent.*field.ssh_auth_sock_consent.pystates.handlers/aws_consent.py): no CLI verb, no nonce leaf, no approve route, no argv floor.Intended? / Repro
Intended? No. The consent exists on main and is read at spawn (
src/kiro_crew/sandbox_unavailable.py:258ssh_auth_sock_consent_notice,src/kiro_crew/ssh_auth_sock_consent.pyis_granted), but main has no surface that writes it:ssh_auth_sock_consent.pyon main is read-only, and the notice tells the operator to hand-write the file from a terminal. #18223 asks for the Settings control; the maintainer review on this PR asked for it to follow main's grant shape.Repro (current main
e858e5b378): open Settings → Security. The rail has no SSH agent section (before frame below), and?section=ssh_agentlands on Live Security Posture. Withagent.sandbox = "strict"and an ssh-agent running, a new session starts withoutSSH_AUTH_SOCKand the gateway log's only remedy is "write {"enabled": true} to …/ssh_auth_sock_consent.json from a terminal outside Kiro Crew".What changed (motivation → approach → change)
Approach: the repository's existing one-step owner consent (
handlers/aws_consent.py): an owner-gated GET/POST/DELETE handler that writes the keystone leaf directly.Backend:
src/kiro_crew/ssh_auth_sock_consent.py:is_granted()unchanged. Addsread_grant,record_grant({"enabled": true, "granted_at": …}),revoke(writes an explicit{"enabled": false}, even when the current record cannot be read; a write failure propagates),socket_present(resolved the way the spawn resolves it, viaagent_sdk.drivers.acp.resolve_ssh_auth_sockon a copy of the environment, then anexistscheck),forwarding_harnesses(the harnesses, in the config-file spelling viabackend_to_storedso Kiro CLI's empty runtime id readskiro, whose new sessions keep the socket without the grant: the configured tier leaves~/.sshreadable and the harness's declared credential mask does not hide it, judged by the spawn's own_forwards_without_consentover eachadapter_hidden_credential_dirs, the same inputskirocrew doctorreads) andforwarded_without_consent(that list covers every harness),harness_labels(config id -> display name for every harness the verdict covers) andaudit_decision(caller=…)(SELssh_auth_sock_forward_consent.<granted|revoked|refused>, naming the requesting dashboard user for every outcome;record_grantandrevoketake the samecaller). Writes go throughrewrite_in_place(restrict_to_owner=True), which keeps the inode under a running sandbox's read-only bind, under an in-process lock (no agent-reachable lock file). Docstring says how the grant is made now.src/kiro_crew/dashboard/handlers/ssh_auth_sock_consent.py(new) + routes inroutes/system.pyright after the AWS consent:GET,POST,DELETE /api/ssh-agent/consent. Every verb, GET included, refuses anyone the owner gate (is_owner_dashboard_request) does not admit: the dashboard owner and a Shared Crew teammate it admits can use these routes; app tokens and allow-listed messaging non-owners are refused. Every grant, every withdrawal that removed a grant, and every refusal is audited undercaller = str(request.get("user") or "anonymous"), assource_providers._audit_source_apidoes. A refused app token carries its human's id asuser, so its refusal row also names the app in the detail. A withdrawal when nothing was granted records no row, except on an unreadable store, where it records arevokedrow saying anymcp_gateway_backendsgrant was not kept. POST/DELETE answer only after the write landed; a failed write is a 500, never a 200.sandbox_unavailable.ssh_auth_sock_consent_notice: the remedy now names Settings > Security > SSH agent first, the hand edit second.Frontend (
website/):SecurityPanelSshAgent.tsx(new), wired intoSecurityPanel.tsxas rail sectionssh_agentunder Your settings. Purpose line first, then the always-visible risk text as two short lines (what a session can do as you; a running session keeps it until it ends), then one row: a badge, one primary control (Allow SSH agent, or "Allow for these sessions" when the row is scoped) or Withdraw. Beside Allow, the row says what it gets you ("Lets new sessions run git push, git fetch and commit signing with your SSH keys.") and that it can be withdrawn at any time. The risk text makes no claim about the key files: on the standard level~/.sshstays readable, so "hidden" would be false there. The purpose line reads "Turn this on if git push, git fetch over SSH, or commit signing fails inside a session." The card has three scopes, read from the GET:standard, while masked harnesses such as codex need the grant): the card shows one status per group of sessions. A short line above both rows says "Some sessions already get your SSH agent from their sandbox level.", so the first row's "Not allowed" is never read alone; like the labels, it names no harness. Each group's label says what the group is, so two rows never share a label with opposite badges. The first group, the sessions this setting decides, is labelled "Sessions whose sandbox hides your SSH keys" with the Not allowed / Allowed badge, and Allow reads "Allow for these sessions" ("Allow SSH agent" when the gateway names no harness this setting decides). Below the action, the second group, the sessions that already forward, is labelled "Sessions whose sandbox level already gives them your SSH agent" with the "On at your sandbox level" badge and the note "Allow does not change the sessions your sandbox level already gives your SSH agent to. To stop that, choose the Strict level of Process Sandbox and leave this setting at Not allowed. Both apply to new sessions only." When every session is decided by this setting, or every session forwards, only one group shows, labelled "The SSH agent on this computer". Strict alone is not enough when a grant is held, because a retained grant forwards on Strict too, so the note names both steps. The card lists no harness names: most are harnesses the operator never configured, so a list does not tell them whether Allow covers their own sessions. The new GET fieldharness_labelsonly decides whether Allow says "for these sessions". A link ("Change Process Sandbox") opens Process Sandbox;warnbadge, never the greenok, because that is the risky state; "On at your sandbox level" is a different fact (no grant involved), so it uses the neutral badge with a layers icon.Allow is held when no ssh-agent is visible, with the concrete steps; the query re-reads on focus and remount (
staleTime: 0), so another owner tab's change shows; a hand-written grant says where it came from; a granted row says "Applies to new sessions." An unreadable state renders no state (gated onisError), and the card invalidates after every write instead of asserting the new state.isOwnerGateRefusal) sees "Only the dashboard owner can see or change whether sessions can use the SSH agent." instead of "Could not read". That refusal is not retried and stays cached for the tab, so focus and remount do not repeat it: one audited refusal per tab, not one per open or refocus. An owner keeps the re-read on focus and remount. Any other failed first read (for example a 502 that used up its retries) is read again when the section is reopened, so the card recovers without a focus change.api/client/security.ts:sshAgentConsent,grantSshAgentConsent,revokeSshAgentConsent;SshAgentConsentStatustype.pages.settings.securityPanel.ssh_agent_*keys in every catalog, including the two group labelsssh_agent_group_decidedandssh_agent_group_forwardedand the mixed-scope linessh_agent_mixed_intro; en-XA regenerated;ui-index.generated.jsonregenerated.scripts/capture-ssh-agent-consent.mjs: screenshot harness.Docs:
docs/system-specs/modules/security.md(how the grant is made; who may call the routes (owner or admitted teammate), the audited caller, and the GET'sforwarded_harnesses/harness_labels),docs/architecture/security-deep-dive.md,docs/feature-map/README.md.Security
area: security. The consent authorizes session-long USE of the operator's ssh-agent keys. The only new writer is a dashboard handler behind the owner gate (the owner, or a Shared Crew teammate it admits, each audited by name), the same trust shape main uses for the paid-AWS consent and, since #24792, for flagged-file delivery. The leaf stays on_CREW_SECRET_LEAVESand the read-only sandbox leaves, so an agent still cannot write it with file tools or a shell. No route is exposed beyond the existing authenticated dashboard; reads are behind the same gate because the answer says whether the owner's agent is reachable from a session.Open, for a maintainer to rule: GPT 6.1 (security-class, fenced) flags
ssh_auth_sock_consent.pyrevoke: when the consent file exists but cannot be read, Withdraw still writes{"enabled": false}and so drops anymcp_gateway_backendslist (logged and audited asrevokedwith a detail saying the backend grant was not kept). This is the chosen design: a Withdraw always turns the forward off. The alternative GPT proposes, failing the DELETE with 500 and writing nothing, keeps the backend list but leaves forwarding on until the read error is fixed. Not changed here; a maintainer decides which loss is worse.Backwards compatibility
Compatible:
is_granted()is the same check, so an existing hand-written{"enabled": true}keeps forwarding and renders as "Allowed" with no timestamp. Removes nothing: only routes and a Settings section are added; the hand-edit path stays valid.Tests
Backend (
test/test_ssh_auth_sock_consent_grant.py, new): store round trip and shape, hand-written grant equivalence, strict-boolean read, revoke writes false even on an unreadable store, a failed revoke write propagates, owner-only mode, no lock artifact,socket_present/forwarding_harnesses/forwarded_without_consentverdicts (mixed, keyed by the real runtime ids so Kiro CLI comes out askiro, and all-harness) and fail-closed, keystone fencing, no CLI verb or step-up symbols, non-owner refusal on every verb (audited, grants nothing), owner GET shape, POST→GET→DELETE round trip, 500 on failed grant / withdraw, audit events driven through the handler for an owner request and an admitted-teammate request, each checking the audited caller, a refused app token named in the detail, a refused non-owner audited by name, a refusal with no user audited asanonymous, the caller on both a failed grant and a failed withdraw, and that a synthetic token in a refused app id reaches no field of the audit call.Frontend (
SecurityPanel.sshAgent.test.tsx, new): risk text always visible and makes no "hidden" claim, benefit line beside Allow, purpose before risk, Allow is one POST then a server re-read, all-harness scope (On badge, no Allow, sandbox link, no "until you withdraw"), mixed scope (each status row's label says what its group means and no harness names are listed; a test over the fullACP_BACKEND_ROUTINGharness set, with the default-level forwarded set claude / kas / kiro, asserts both labels; the mixed-scope tests assert the line above the rows by exact text, and the single-scope tests assert it is absent; scoped badge for both grant states, the two-step note, sandbox link), outside mixed scope the single row keeps the label "The SSH agent on this computer", tier note with the plain "Withdraw" label and the effect-first help line, no-socket note holds Allow, hand-written grant wording, grant time + "Applies to new sessions." + Withdraw is a DELETE, failed read never shows Not allowed, a transient first-read failure re-reads on remount while a cached owner refusal does not, failed re-read after Allow, failed grant, failed withdraw, rail row has no summary.SecurityPanel.rail.test.tsx,SecurityPanel.owners.test.tsxandApiClient.refactor.surface.test.tslist the new section, file and methods.Manual verification
Static gates on the changed files: black, isort, flake8;
tsc --noEmit, eslint,i18n-check.mjs(withI18N_BASE_REF=origin/main),gen-ui-index.mjs --check, pseudolocale regenerate (no diff). Test suites run in CI. The capture harness builds the SPA and asserts each state rendered before its frame; the before frame is main built and served by the same harness.Screenshots / video
Before (main): no SSH agent section; the deep link lands on Live Security Posture.
After, on head da854d4, some harnesses forward at this level (the usual default): one line saying some sessions already get the SSH agent from their sandbox level, then two groups, each labelled by what it means, with its own status and no harness-name list; the first is Not allowed with "Allow for these sessions", the second is "On at your sandbox level" with the note and the Process Sandbox link. (The "Couldn't load your starred bots" toast in these frames is a dashboard endpoint the capture script does not stub, not part of this card.)
Light theme:
Same, with the grant held (Allowed, Withdraw):
Same, from a gateway that sends no session names: the labels are the same, and Allow reads "Allow SSH agent":
Same, no session names, with the grant held:
Same, no session names, light theme:
The frames below, down to "More states", are from earlier heads of this PR (9166a54 or before); none of them shows the mixed scope. After, every harness forwards: "On at your sandbox level" in its own neutral badge with a layers icon (Allowed keeps the yellow warn badge), no Allow, sandbox link:
Same, with a grant already held (frame from before the UX fix; the current label and help line are in the UX fix section below):
After, not allowed (the setting decides every session):
After, allowed (warn badge, timestamp, "Applies to new sessions.", Withdraw):
More states
Hand-written
{"enabled": true}(granted, no timestamp):No ssh-agent visible (Allow held, concrete steps):
Grant write failed (row still Not allowed, save-failed notice):
Consent read failed (renders as unknown, not as "Not allowed"):
Light theme:
Narrow (rail stacks above the pane):
A viewer the owner gate refuses (403
dashboard_owner_required) sees the owner-only notice, with no grant row and no "could not read" message. Light and dark, from the built SPA on head 1d91437:UX fix on a7bf097 (UX Review BLOCK on b85ca74)
The withdraw button reads "Withdraw" in every state; at a level that already forwards the SSH agent, the help line under it says what it changes now. On that head the row label kept one noun in every scope with the scoping on a muted line; da854d4 labels each group by what it means, with no harness-name list and a line above both groups (frames above). Before is b85ca74, after is a7bf097, from the same capture harness (
scripts/capture-ssh-agent-consent.mjs).Grant held, every harness forwards, before / after (dark):
Same, light:
Some harnesses forward, not allowed, before (b85ca74) / after (a7bf097), row label and muted line as they were on those heads:
Some harnesses forward, allowed, before (b85ca74) / after (a7bf097):
Still open from the same UX Review: the owner-only notice keeps its "Ask the agent" action. The blocking
errors-use-error-noticerule (website/AUTOSDE.yaml) requires a refusal notice to keepaskAgent, and relabelling it only here would differ from the rest of the app.Known limitations
docs/system-specs/modules/security.md's withdrawal sentence does not say that a store whose read raised noOSErrorcounts as readable even when it is malformed (a malformed store is read as empty, so that withdrawal records no row).mcp_gateway_backendsgrant it read; only theenabledfield is set to false.agent.sandbox_allow_no_isolation): such sessions run with no sandbox at all. Main's own text makes the same assumption, so this PR does not change it.Related Issues
Closes #18223. Context: #9131 (the consent leaf), #24792 (main dropped the host step-up; this PR follows it).
Sibling sweep
Swept: git grep -n "ssh_auth_sock_consent" -- src/ docs/
Sibling: src/kiro_crew/sandbox_unavailable.py -- changed here (the withheld-socket notice names the new control)
Sibling: src/kiro_crew/config/loader_locations.py -- changed here (the docstring said Kiro Crew only reads the leaf; it now names the dashboard handler as the only in-tree writer)
Sibling: src/kiro_crew/doctor_checks/confinement.py -- not affected (prints the same notice text)
Sibling: docs/request-for-change/rfc-host-credential-vending.md -- not affected (draft RFC, describes the leaf, not how it is granted)
Pattern harvest
Rule candidate: none. This is the third owner consent with the same GET/POST/DELETE handler shape (
aws_consent.py,credential_redaction.py); no new rule beyond following that shape.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.