Repository navigation
docs: match the windows secret-at-rest guide to its dual-grant dacl - #34016
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change only touches docs and one test docstring, and the code confirms the two-grant claim ( [DESIGN-REVIEWED] d84675c Description read[DESCRIPTION-READ] d41fab4cb228d69047e6b38b3f3c39e63313741927facb6008bff1e3e118a85d 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 |
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: |
bd78922 to
f84a8e9
Compare
|
Rebased: main moved in docs/guides/windows-install.md since this head's CI ran (2caa69b -> 01fcf6d); CI re-running. The two [operator: bolichen97] |
f84a8e9 to
e1d20c0
Compare
|
Rebased: main moved in docs/guides/windows-install.md since this head's CI ran (73e3275 -> ed80c1d); CI re-running. The [operator: bolichen97] |
buluoray
left a comment
There was a problem hiding this comment.
Approve on e1d20c0. Pure rebase of the approved f84a8e9 (identical patch-id dfaae8f7); the Windows secret-at-rest guide's two-grant DACL, refusal and file-list claims all still hold against source at the live head; GPT and Opus both PASS with no findings, no BLOCK-MERGE. Decisive lines: src/kiro_crew/platform_owner_compat.py:538, src/kiro_crew/platform_owner_compat.py:641-649, src/kiro_crew/windows_acl.py:813-850, src/kiro_crew/remote_session/relay.py:340-346, src/kiro_crew/hidden_leaf_staging.py:255, src/kiro_crew/cron_script.py:325, src/kiro_crew/secrets/vault.py:82-84
The Windows install guide said a secret file gets one Owner Rights grant, while restrict_to_owner grants Owner Rights plus the invoking user's SID and refuses to apply Owner Rights alone. An operator who checked a secret file with icacls saw a second full-control entry the guide said was not there, and the guide's file list left out .env, the vault key and store, and the relay token. Name both grants and why the second exists, give the two-grant icacls equivalent and say it matches only on a file with no explicit entries of its own, and replace the file list with the rule that selects the files, naming the ones that were missing. Place the cron secret temp file in %TEMP%, where it is created, not under the data home. Fix the test docstring that carried the old wording. Closes #32735
e1d20c0 to
d84675c
Compare
|
Rebased: main moved in docs/guides/ (docker.md, install.md and telemetry-otlp-export.md, the same directory as this PR's guide) since this head's CI ran (ed80c1d -> ba3d142); CI re-running. The The patch is unchanged: the same patch-id as e1d20c0, no file of this PR changed on main, and the body is unchanged. [operator: bolichen97] |
Problem / Motivation
Goal: An operator who checks a Kiro Crew secret file on Windows with
icaclscan tell from the install guide that the two full-control entries they see are the intended lockdown, and finds.env, the vault and the relay token among the files it covers.The Windows install guide's "Secret-at-rest posture on Windows" section describes a one-grant DACL (Owner Rights,
S-1-3-4) and givesicacls /inheritance:r /grant:r "*S-1-3-4:F"as its equivalent.restrict_to_ownergrants two: Owner Rights and the invoking user's own SID, and it refuses to apply Owner Rights alone. Soicaclson a locked-down file prints a second(F)entry the guide says is not there. The guide's file list also leaves out.env, the vault key and store, and the relay token file, which get the same lockdown.Why it matters
The guide invites an
icaclscheck. An operator who runs one sees an extra full-control entry and cannot tell an intended grant from tampering without reading the source. The files they most want to confirm (.envwith the chat-channel tokens, the vault, the relay token) are not on the list, so they cannot check those against the guide at all.Not a goal
restrict_to_owner,restrict_dir_to_owner, or which files they lock down. The code is right; only the guide and one test docstring were stale.What changed (motivation → approach → change)
The guide now describes the lockdown the code already applies, so an
icaclscheck on a secret file matches what the operator reads. The code is unchanged.SYSTEMservice) stays readable by that usericacls ... /grant:r "*S-1-3-4:F"as the equivalenticacls <file> /inheritance:r /grant:r "*S-1-3-4:F" /grant:r "*<your-user-SID>:F"as the equivalent on a new file (on a file with another account's explicit entry,icaclskeeps it and the in-process call removes it), plus whaticacls <file>prints: two(F)entries and no inherited(I)restrict_to_owneror written byatomic_write(restrict_to_owner=True)), naming.env,.vault\.vault_key,.vault\secrets.encand the relay token file, and placing the cron secret temp file in%TEMP%, where it is createdThe
TestRestrictToOwnerdocstring intest/test_platform_compat_owner_only.pysaid the DACL is applied throughicaclswith Owner Rights; it now says in-process, with both grants.Backwards compatibility
Compatible: documentation and one test docstring only; no code, setting or assertion changes.
Removes nothing: every file the old list named is still named, and the section heading is unchanged.
Tests
No assertion changes. The existing two-SID pin in
test/test_platform_compat_owner_only.pyis what the new wording describes../scripts/docs-lint.shpasses on the changed guide.Manual verification
Every claim was checked against the code: the two grants and the refusal (
platform_owner_compat.restrict_to_ownerand its DACL helper), full control asFILE_ALL_ACCESSand the whole-DACL replacement (windows_acl.apply_owner_only),.envthroughhidden_leaf_staging.publish_env, the vault key and store (secrets/vault.py), the cron secret file'smkstempin the temp directory (cron_script.py), and the relay token's direct two-grant lockdown (remote_session/relay.py). The issue's Windows 11 run (3 trials,icaclsafterrestrict_to_owneron a fresh file) printedOWNER RIGHTS:(F)and the user's(F)with no(I), which is what the guide now says. Not re-run on Windows for this PR.Related Issues
Closes #32735
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)