Skip to content

fix(sandbox): mask the vault under a relocated data home - #18412

Merged
iamwhatever merged 1 commit into
mainfrom
fix/r18-relocated-vault-mask
Oct 10, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/r18-relocated-vault-mask

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The secret vault stays hidden from sandboxed agent processes when KIROCREW_HOME is outside $HOME.

The sandbox tiers name the vault only at ~/.kiro/crew/.vault and ~/.kirocrew/.vault. When the data home moves out from under $HOME, the real vault folder is in no masked tree. kas and policy_cache are already hidden at the moved home. The vault was the gap.

Why it matters

The vault folder holds the vault key and every stored secret. A sandboxed shell on a host with a moved data home could read both. The tool gate still fences the vault, but a spawned python -c or shell never goes through the tool gate.

Not a goal

  • Changing how the vault saves or loads secrets.
  • Changing the default-home masks.
  • Adding .vault to _CREW_HIDDEN_LEAVES, which would also put the vault under the alias walk and the planted-link spawn refusal.
  • Any other leaf, or Windows, which has no OS-level sandbox.

What changed (motivation → approach → change)

Symptom: with KIROCREW_HOME outside $HOME, config_dir()/.vault is not in the sandbox plan's masked folders, in any tier.

Root cause: the tier lists spell the vault only $HOME-joined. The re-anchoring for a moved data home (_relocated_crew_targets) only reads _CREW_HIDDEN_LEAVES, and the vault is not in that list.

Change in src/kiro_crew/sandbox.py:

  • A new _RELOCATED_CREW_HIDDEN_LEAVES = (".vault",) names the leaves masked at a moved data home on top of _CREW_HIDDEN_LEAVES.
  • Both readers of the re-anchored hidden set pass both lists: the plan host (_live_plan_host) and the carve-out shadow check.
  • The two lists are joined at each call site, so a patched _CREW_HIDDEN_LEAVES still reaches the plan.

Result: the moved vault is masked on the namespace plan, and denied for read and write on the Seatbelt plan. That is the same treatment the moved kas gets. At the default home, the moved path equals the $HOME path, so nothing is added.

The precreate pass already makes .vault through config_dir(), so the mask always has a target.

Two test files move with it:

  • test/test_sandbox_protected_name_holds.py: the leaf-only ratchet is +1 per tier, with a note. The conftest pins a moved data home, so the moved vault is one more leaf-only name, held like kas.
  • test/test_sandbox_refactor_generated_programs.py: the Seatbelt golden gains the four <ROOT>/crew/.vault deny lines.

Backwards compatibility

Compatible: the vault saves and loads exactly as before. Every reader runs in the gateway, outside the sandbox. The default-home masks are unchanged.

Reader: src/kiro_crew/dashboard/handlers/secrets.py:SecretVault -- crew page -- gateway process, unsandboxed; test_vault_save_and_load_round_trip_under_relocated_home
Reader: src/kiro_crew/cron_script.py:_resolve_secret_env -- cron -- runs in the gateway's cron pool thread before the child spawns
Reader: src/kiro_crew/mcp_gateway/secret_uri.py:SecretVault -- chat -- MCP gateway resolves secrets in the gateway process
Reader: src/kiro_crew/dashboard/handlers/connections.py:SecretVault -- crew page -- gateway process, unsandboxed
Reader: sandboxed agent subprocesses -- chat|cron|subagent|app -- already cannot see the default-home vault in any tier; the moved vault now matches

Tests

New test/test_sandbox_relocated_vault_mask.py (16 cases, tmp home and a fake secret only):

  • the moved vault is masked on the namespace and Seatbelt plans, in standard, cc and strict;
  • the Seatbelt profile denies read and write on it, in all three tiers;
  • at the default home, the vault shows up only at its two $HOME spellings;
  • a vault save and load round trip still works after every plan is built.

Fails before: with the sandbox.py change reverted, the 9 moved-vault cases fail on the vault check. The default-home cases and the round trip pass on both trees.

Determinism: 20/20 green at -n0; 10/10 green at -n 4 --dist loadgroup --max-worker-restart=2 beside test_sandbox_plan.py and test_sandbox_governance_mask.py; shuffled order, seed 23695, 16 passed.

Sandbox suites (every test_sandbox*.py plus every test naming the vault or the hidden leaves): 5978 passed, 0 failed.

Manual verification

N/A — unit coverage sufficient: the plan and the Seatbelt profile are pure functions of the host inputs, and the tests drive both on a moved tmp home.

Related Issues

Closes #18397

Pattern harvest

Rule candidate: review-prompt
Pattern: a secret leaf spelled only $HOME-joined in a tier list, with no re-anchoring for a moved data home.

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

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 9, 2026 08:55
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 4d7b3a7bb3469d28dddabd136c89691d18248667 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 4d7b3a7bb3469d28dddabd136c89691d18248667 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that an agent-run shell under a KIROCREW_HOME outside $HOME really cannot open .vault/.vault_key on a Linux host and a macOS host. The tests only check the generated plans.

[DESIGN-REVIEWED] 4d7b3a7

Description read

[DESCRIPTION-READ] 787abe70720b33b55609a5b21bb71cd01abb6382954ad3333b719a16cb09a95b

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 Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 4d7b3a7bb3469d28dddabd136c89691d18248667 — 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/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (5 items) — 5 justified

Intent: keep stored secrets unreadable to sandboxed agent shells when KIROCREW_HOME lives outside $HOME. This is a FIX (#18397, plus 9 new cases that fail on the base commit).

  1. With a moved data home, the vault folder is now masked on the Linux namespace plan in standard, cc and strict modes. — justified
  2. With a moved data home, the macOS Seatbelt profile now denies read, write and link on the vault folder. — justified
  3. An app's carve-out under the moved vault is now refused as shadowed by a foreign mask. — justified
  4. The default-home masks are unchanged, and the moved vault adds no rule there. — justified
  5. The governance spec and the _relocated_policy_cache_dirs docstring no longer call the vault a moved-home gap. — justified

[FIRST-PRINCIPLES-REVIEWED] 4d7b3a7

Description read

[DESCRIPTION-READ] 11cc434e41b6cfca7074a4f916b4abfaa827a36533b91f4186ef14e57afd128c

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 Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 4d7b3a7bb3469d28dddabd136c89691d18248667 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4d7b3a7

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 4d7b3a7bb3469d28dddabd136c89691d18248667: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 4d7b3a7bb3469d28dddabd136c89691d18248667 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 4d7b3a7

Verdict parsed from the review's SHA-scoped output markers for commit 4d7b3a7bb3469d28dddabd136c89691d18248667.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 4d7b3a7bb3469d28dddabd136c89691d18248667: <one-sentence reason>

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: 38d8184
  • What rule changed: the sandbox now masks <KIROCREW_HOME>/.vault when the data home is outside $HOME. Before, it masked the vault only at ~/.kiro/crew/.vault and ~/.kirocrew/.vault.
  • Before -> after (what was allowed/blocked, now): before, a sandboxed process could read the moved vault folder (vault key and ciphertext) in standard, cc and strict. Now it is hidden on the namespace plan, and denied for read and write on the Seatbelt plan, the same way the moved kas folder is. Nothing changes at the default home.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): a sandboxed process that reads the moved vault would see an empty folder. No such reader exists: every vault reader (dashboard secrets and connections handlers, the cron secret resolver, the MCP gateway) runs in the gateway, outside the sandbox. And the default-home vault is already hidden this way in every tier.
  • Evidence checked (which sandbox result proves it): test/test_sandbox_relocated_vault_mask.py builds the real plan on a moved tmp home: the vault is in sensitive_dirs for namespace and Seatbelt in all three tiers, and the Seatbelt profile has deny file-read* and deny file-write* on it. With the sandbox.py change reverted, those 9 cases fail on the vault check.
  • No regression:
    • Tools still work (which tools/commands were run, result): a vault save, then a load, then a second save and load, under a moved tmp home after every plan is built: same fake value back each time.
    • Backward compatible (old config / old data / old callers still work, how checked): the default-home plan is unchanged; the test checks the vault appears only at its two $HOME spellings there, and that the moved-only leaf adds nothing when the home is under $HOME. The vault's on-disk format and paths are untouched.
    • Existing tests (which suites passed on this head): every test/test_sandbox*.py file plus every test naming .vault or the hidden leaves: 5978 passed, 0 failed. Scoped backend set: its 54 reds fail identically on an untouched origin/main archive.
  • How to undo: revert the commit; _RELOCATED_CREW_HIDDEN_LEAVES and its two call sites are the whole source change.

@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 Oct 9, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Self-review (crew-pr-reviewer, read-only): HOLD for a maintainer / security owner

This closes a real gap at the root cause. When KIROCREW_HOME is outside $HOME, the tier lists only spell .vault joined to $HOME, and _relocated_crew_targets only reads _CREW_HIDDEN_LEAVES. So the moved vault (key plus ciphertext) was readable from a sandboxed shell. The new _RELOCATED_CREW_HIDDEN_LEAVES = (".vault",) is joined in at both readers of the relocated hidden set (_live_plan_host and carveout_shadowed_by_foreign_mask). I grepped for other relocated-target readers. app_backend_visible_targets only lifts an app's own owned leaves, and the alias walk and planted-link refusal deliberately stay keyed to _CREW_HIDDEN_LEAVES. I tried to get around the mask. A symlink to the moved .vault placed anywhere still resolves onto the bind-mounted (namespace) or Seatbelt-denied real path. The Seatbelt deny uses the config_dir() spelling, so it is resolved the same way the already-masked moved kas is. Every listed vault reader runs in the gateway, outside the sandbox, so nothing loses access. The new test file builds the real plans in all three tiers on both backends. The author says the 9 relocated cases fail on the base, and the default-home plan is pinned unchanged. All checks are green, Sensitive Change Review has the author's complete template, and every AI lane passed. HOLD only because the diff touches the sandbox and secret masking (src/kiro_crew/sandbox.py), which the review rules route to a human sign-off. I found no defect. — crew-pr-reviewer

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Self-review (crew-pr-reviewer, read-only): RECOMMEND APPROVE

Updated verdict (replaces my earlier HOLD on this head). A human code-owner review is required anyway. I found no defect: the moved .vault is now masked at both relocated-target readers, a symlink to it still resolves onto the masked real path, and every vault reader runs outside the sandbox, so nothing loses access. Reviewer note: this touches sandbox secret masking, so please confirm the three-tier plan tests. — crew-pr-reviewer

@iamwhatever
iamwhatever enabled auto-merge (squash) October 9, 2026 17:28

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is correct, but the owning spec needs a matching update before this auto-merges.

Verified

  • Real Linux namespace sandbox, data home outside $HOME, canary in the vault:
    • On the base tree, the canary is readable from a sandboxed shell. This reproduces #18397.
    • On this head, the vault reads as empty in standard and strict.
    • It also stays masked through both spellings when $HOME is a symlink and the data home sits at the resolved path.
  • Odd vault paths fail closed. With a moved data home, a symlinked .vault or a dangling one refuses the spawn, and a missing one is created empty first. All of this comes from the existing precreate pass, which already resolves against the moved root.
  • Default-home users are unaffected. _relocated_crew_targets only adds a path that differs from the $HOME spelling.
  • No in-sandbox reader is cut off. Every vault reader runs in the gateway.
  • Scope matches the issue. It asks for this mask in all three tiers, with save and load unchanged.
  • The new plan-host guard is pinned. Reverting the _live_plan_host change reddens the nine moved-vault cases and the Seatbelt golden.

Blocking (spec drift, in scope)
docs/system-specs/modules/governance.md around lines 901-904 still says the $HOME-relative relocation gap is "a limitation shared with the vault entries". After this change that is no longer true. Please reword it in this PR to say the vault (_RELOCATED_CREW_HIDDEN_LEAVES) is re-anchored at a moved data home, like policy_cache. A clause in the security.md vault "Sandbox-hidden" bullet would help too. With auto-merge on, an approval would land the stale sentence on main.

Non-blocking follow-up
The matching change in carveout_shadowed_by_foreign_mask has no test: reverting it alone keeps the suite green. No carve-out sits under the vault today, so nothing is exposed. A case that refuses a carve-out beneath the relocated vault would keep the two readers in step.

CI on this head: 90 success, 10 skipped, no failures.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 9, 2026

@cruisercohen cruisercohen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sandbox.py change does what #18397 asks: with the change reverted, 9 of the 16 new cases in test/test_sandbox_relocated_vault_mask.py fail, and on this head they pass together with the protected-name, generated-program, plan and governance-mask suites (788 passed).
Two things need a new revision on 38d8184: the branch now conflicts with main in test/test_sandbox_protected_name_holds.py, where main moved EXPECTED to 268/275/276 (#18407), so the +1 per tier should be re-applied on top of those numbers.
docs/system-specs/modules/governance.md line 902 still calls the $HOME-relative gap "a limitation shared with the vault entries", which stops being true here, so it should say the vault is re-anchored through _RELOCATED_CREW_HIDDEN_LEAVES.
Optional: a case that refuses a carve-out beneath the relocated vault would cover the carveout_shadowed_by_foreign_mask change, which no test fails without.

@iamwhatever
iamwhatever force-pushed the fix/r18-relocated-vault-mask branch from 38d8184 to d143210 Compare October 9, 2026 23:06
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 9, 2026

@cruisercohen cruisercohen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the rebase: the protected-name counts now sit on top of main (269/276/277), and on this head the new vault test plus the protected-name, generated-program and plan suites all pass (788 tests) with the comment-history check clean.
One item from the previous round is still open: docs/system-specs/modules/governance.md line 902 still says the moved-home gap is "a limitation shared with the vault entries", which this change makes untrue, so that sentence needs updating to say the vault is now masked at a relocated data home as well.
Separately, the Sensitive Change Review check is red on this head only because its reasoning template names the earlier head commit; re-posting it with d1432104 clears it.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 9, 2026
@iamwhatever
iamwhatever force-pushed the fix/r18-relocated-vault-mask branch from d143210 to 47caa58 Compare October 9, 2026 23:25
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: 47caa58
  • What rule changed: the sandbox now masks <KIROCREW_HOME>/.vault when the data home is outside $HOME. Before, it masked the vault only at ~/.kiro/crew/.vault and ~/.kirocrew/.vault.
  • Before -> after (what was allowed/blocked, now): before, a sandboxed process could read the moved vault folder (vault key and ciphertext) in standard, cc and strict. Now it is hidden on the namespace plan, and denied for read and write on the Seatbelt plan, the same way the moved kas folder is. Nothing changes at the default home.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): a sandboxed process that reads the moved vault would see an empty folder. No such reader exists: every vault reader (dashboard secrets and connections handlers, the cron secret resolver, the MCP gateway) runs in the gateway, outside the sandbox. The default-home vault is already hidden this way in every tier.
  • Evidence checked (which sandbox result proves it): test/test_sandbox_relocated_vault_mask.py builds the real plan on a moved tmp home: the vault is in sensitive_dirs for namespace and Seatbelt in all three tiers, and the Seatbelt profile denies file-read* and file-write* on it. With the sandbox.py change reverted, those 9 cases fail on the vault check.
  • No regression:
    • Tools still work (which tools/commands were run, result): a vault save, load, second save and load under a moved tmp home after every plan is built: same fake value back each time.
    • Backward compatible (old config / old data / old callers still work, how checked): the default-home plan is unchanged; the test checks the vault appears only at its two $HOME spellings there. The vault's on-disk format and paths are untouched.
    • Existing tests (which suites passed on this head): every test/test_sandbox*.py file plus every test naming .vault or the hidden leaves passed on the rebased code (6003 passed, 0 failed); this head adds only a spec sentence and a docstring line, and the relocated-vault tests plus the PoC pass on it (22 passed). Comment-history and docs-lint gates pass.
  • How to undo: revert the commit; _RELOCATED_CREW_HIDDEN_LEAVES and its two call sites are the whole source change.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

@buluoray @cruisercohen thanks — the spec drift you both flagged is fixed in 47caa58.

  • docs/system-specs/modules/governance.md (the sentence at line 902): it no longer calls the moved-home gap "shared with the vault entries"; it now says the vault avoids that gap through _RELOCATED_CREW_HIDDEN_LEAVES.
  • src/kiro_crew/sandbox.py, the _relocated_policy_cache_dirs docstring said the same thing, so it gets the same one-line fix.

No code changed in this revision. The protected-name counts stay on top of main (269/276/277). Comment-history and docs-lint pass, and the relocated-vault tests pass. The Sensitive Change Review template is re-posted for this head.

The optional carve-out-beneath-the-vault case is left out to keep the fix to the reported hole.

The tier lists name .vault only at its two $HOME-joined spellings, so a KIROCREW_HOME outside $HOME left config_dir()/.vault unmasked. Re-anchor it through _relocated_crew_targets the way kas is, on both the namespace and Seatbelt plans.
@iamwhatever
iamwhatever force-pushed the fix/r18-relocated-vault-mask branch from 47caa58 to 4d7b3a7 Compare October 10, 2026 00:25
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: 4d7b3a7
  • What rule changed: the sandbox now masks <KIROCREW_HOME>/.vault when the data home is outside $HOME. Before, it masked the vault only at ~/.kiro/crew/.vault and ~/.kirocrew/.vault.
  • Before -> after (what was allowed/blocked, now): before, a sandboxed process could read the moved vault folder (vault key and ciphertext) in standard, cc and strict. Now it is hidden on the namespace plan, and denied for read and write on the Seatbelt plan, the same way the moved kas folder is. Nothing changes at the default home.
  • Worst case if wrong (breaks commands / leaks secret / locks user out): a sandboxed process that reads the moved vault would see an empty folder. No such reader exists: every vault reader (dashboard secrets and connections handlers, the cron secret resolver, the MCP gateway) runs in the gateway, outside the sandbox. The default-home vault is already hidden this way in every tier.
  • Evidence checked (which sandbox result proves it): test/test_sandbox_relocated_vault_mask.py builds the real plan on a moved tmp home: the vault is in sensitive_dirs for namespace and Seatbelt in all three tiers, and the Seatbelt profile denies file-read* and file-write* on it. With the sandbox.py change reverted, those 9 cases fail on the vault check.
  • No regression:
    • Tools still work (which tools/commands were run, result): a vault save, load, second save and load under a moved tmp home after every plan is built: same fake value back each time.
    • Backward compatible (old config / old data / old callers still work, how checked): the default-home plan is unchanged; the test checks the vault appears only at its two $HOME spellings there. The vault's on-disk format and paths are untouched.
    • Existing tests (which suites passed on this head): this head is a pure rebase of 47caa58 onto main (sorted -U0 line sets identical, 117 lines). On it: protected-name, generated-program, relocated-vault, plan and governance-mask suites plus the PoC, 794 passed.
  • How to undo: revert the commit; _RELOCATED_CREW_HIDDEN_LEAVES and its two call sites are the whole source change.

@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 Oct 10, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Self-review (crew-pr-reviewer, read-only): RECOMMEND APPROVE

Recommend approve. This fixes #18397 at the root cause: the tier lists spelled .vault only joined to $HOME, and _relocated_crew_targets only re-anchored _CREW_HIDDEN_LEAVES. The new _RELOCATED_CREW_HIDDEN_LEAVES = (".vault",) is joined in at both readers of the relocated hidden set (_live_plan_host and carveout_shadowed_by_foreign_mask, src/kiro_crew/sandbox.py:1359 and :7542). Both change requests are addressed on head 4d7b3a7. buluoray's blocking spec drift is fixed: governance.md:901-903 now says the vault avoids the gap through _RELOCATED_CREW_HIDDEN_LEAVES. cruisercohen's rebase point is fixed: EXPECTED is 269/276/277, on top of main's 268/275/276, and that same governance.md sentence is updated. I tried to break the mask again with a scratch test that builds the real plans on both backends in all three tiers (42 cases, all masked): KIROCREW_HOME under $HOME at a non-default name, $HOME itself a symlink, KIROCREW_HOME a symlink (config_dir resolves it, so the mask lands on the real rc3/.vault), a pod home, a vault not created yet (the mask is still planned, and precreate makes the directory), and a trailing-slash override. The Seatbelt profile denies read and write at the resolved path. I could not run a live namespace canary because this host refuses unshare -U (EPERM). buluoray reports the live canary was readable on base and empty on head, in standard and strict. The related suites (81) pass on head. All checks are green, and all five AI lanes PASS or report no findings. Two optional points from both reviewers remain open and are not blocking: there is still no test that fails if the carveout_shadowed_by_foreign_mask change is reverted, and the security.md "Sandbox-hidden" vault bullet does not yet mention the relocated home. Reviewer note: this touches sandbox secret masking, and both reviewers' CHANGES_REQUESTED must be dismissed or re-approved before it can merge. — crew-pr-reviewer

@CrysisDeu CrysisDeu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff: narrowing-only sandbox change, the relocated .vault is re-anchored the same way kas is and kept out of _CREW_HIDDEN_LEAVES for the stated reason, the protected-name counts sit on main's numbers, and the governance.md sentence the earlier reviews asked for is now updated. Sensitive Change Review is green on this head. All checks green.

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at 4d7b3a7. This supersedes my CHANGES_REQUESTED on 38d8184: the spec now matches the code.

docs/system-specs/modules/governance.md:901-903 no longer says the relocated-home limitation is "shared with the vault entries"; it now says the vault avoids it through _RELOCATED_CREW_HIDDEN_LEAVES (sandbox.py:535, used at :1359 and :7542). The _relocated_policy_cache_dirs() docstring carries the same correction.

Against the previous head, the range-diff shows only that spec/docstring wording plus the protected-name EXPECTED counts moving by +3 per tier, which comes from the rebase onto main (three new sealed names there), not from this change. My earlier verification of the mask itself (real namespace sandbox, relocated data home, vault reads empty in standard and strict, fail-closed on a symlinked or dangling .vault) stands.

CI on this head: 85 success, 13 skipped, 0 failures. I did not re-run tests on this head.

@iamwhatever
iamwhatever disabled auto-merge October 10, 2026 07:53
@iamwhatever
iamwhatever merged commit cd38e8b into main Oct 10, 2026
104 checks passed
@iamwhatever
iamwhatever deleted the fix/r18-relocated-vault-mask branch October 10, 2026 07:53
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 10, 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.

The secret vault is not hidden from the sandbox when KIROCREW_HOME is outside HOME

4 participants