Skip to content

fix(security): put built-in apps' credentialMasks on the agent tool gate - #34346

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/32681-tool-gate-row
Nov 10, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/32681-tool-gate-row

Conversation

@JLargent42

@JLargent42 JLargent42 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A credential file a built-in app declares in credentialMasks is refused by the agent's file tools as a core credential is, without a core row that names the app.

credentialMasks hides a declared file in every sandbox, but nothing feeds it to the agent tool gate (security._CREW_SECRET_LEAVES / is_sensitive_path). That gate also guards gateway-side file surfaces (dashboard file I/O, artifacts, knowledge indexing) and sessions without a sandbox, so a declaring app has to get a hand-written core row. PR #34296 (Ops Mission Control's token store moving onto the seam) needed exactly that: "apps/ops-mission-control/data/secrets.json" in paths_lists.py, plus a new KNOWN_NAME_REFERENCES row in the shrink-only decoupling gate. Review blocked that row.

Why it matters

Without this, every built-in that moves a credential onto credentialMasks must grow the core again with an app-named tool-gate row, which is the coupling #26967 is removing. Without either, the declared file is readable through the gateway's own file surfaces.

Not a goal

What changed (motivation → approach → change)

Goal → approach → change. The tool gate's crew-home list is built once at import, so the seam reads the one source that is fixed for the process: the shipped built-in packages' manifests. credential_masks.declared_crew_leaves(installed=False) returns their declared leaves at both data spellings (apps/<app>/data/<entry> and the lifecycle's move-aside), and _CREW_SECRET_LEAVES splats it. Everything derived from that list follows with no second entry: the read+write floor at both crew prefixes and the .tmp / .lock publish-artifact fence beside the leaf. A declared leaf is HIDDEN in the spawn plan, so the governance-mask pin (every tool-gate crew entry has a sandbox disposition) holds for it.

Ratchets: the shrink-only decoupling list does not grow (the seam names no app; #34296 can drop its proposed row). The security package's line budget (35,160) does not grow either: the import and the splat in paths_lists.py, and the TYPE_CHECKING line the paths facade needs for any name an owner imports from outside the family (test_paths_facade.py), are offset by collapsing three redundant double blank lines between top-level assignments in paths_lists.py, two of them beside the lists this change feeds. No baseline or budget was edited.

Docs: security.md and app-kit-platform.md section 37 (the statement that no tool-gate row reads a declaration), the credential_masks module docstring.

Backwards compatibility

Compatible: on main no built-in declares a mask, so the gate list is unchanged until one does; for a declaring built-in, the gate only adds refusals.

Removes nothing: the change only adds entries to the tool gate's refusal floor.

Tests

  • test_only_the_shipped_manifests_feed_the_gate: a shipped manifest feeds it, an installed one does not.
  • test_the_gate_takes_a_shipped_declaration_when_it_loads: a fresh interpreter with a patched shipped manifest loads kiro_crew.security; the declared file is refused and a sibling is not, which proves the import-time wiring.
  • test_every_shipped_declaration_is_on_the_tool_gate_floor: live pin over the real shipped set.

Proof: PROVEN test_app_credential_masks.py::TestTheToolGateReadsTheShippedDeclarations (3 tests) (head ef934d3)

Local: every test/test_sandbox*, test/test_security*, test/test_app_credential*, test/test_app_backend*, every facade/mirror test and the decoupling gate at -n 2: 15,150 passed; the one failure, test_the_seatbelt_profile_is_the_golden, fails identically on main on this host. Line budget 35,160 / 35,160.

Manual verification

N/A — unit coverage sufficient, including a clean-interpreter test of the import-time wiring.

Related Issues

Part of #32681. Needed by #34296; companion seam #34339.

Sibling sweep

Swept: git grep -n "declared_crew_leaves|credential_masks" -- src/kiro_crew
Sibling: src/kiro_crew/sandbox_aliases.py -- not affected -- already reads every declaration per spawn
Sibling: src/kiro_crew/sandbox_argv.py -- not affected -- already reads every declaration per spawn

Pattern harvest

Not generalizable: the one consumer of a declaration that is built at import instead of per spawn.

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.

@JLargent42
JLargent42 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 05:30
@JLargent42
JLargent42 requested a review from Zedmor November 10, 2026 05:30
@JLargent42 JLargent42 self-assigned this Nov 10, 2026
@JLargent42

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: f16d95f

  • What rule changed: security._CREW_SECRET_LEAVES now also holds every shipped built-in app's credentialMasks leaf (credential_masks.builtin_crew_leaves(), read once at import), at both data spellings, so the read+write floor and the publish-artifact fence cover them.
  • Before -> after: before, a built-in's declared credential file was hidden in the sandbox but readable through the agent tool gate unless someone added an app-named core row. After, the gate refuses it with no core row; installed apps' declarations still do not reach the gate.
  • Worst case if wrong: an import-time failure reading a shipped manifest would break kiro_crew.security import. The reader returns nothing for an absent, unreadable or invalid manifest (the same _read_entries the sandbox uses per spawn), so the worst case is a missing refusal, never a crash or a loosening.
  • No regression:
    • Evidence checked: the new tests fail on main and pass here; a clean-interpreter test proves a shipped declaration reaches is_sensitive_path and a sibling file does not.
    • Tools still work: on main no built-in declares a mask, so the gate list is byte-identical until one does; only refusals are ever added.
    • Backward compatible: nothing previously allowed by the gate becomes allowed; the governance-mask disposition pin still passes because a declared leaf is HIDDEN in the spawn plan.
  • Existing tests: 10,416 sandbox, security, app-credential-mask, app-backend and decoupling tests pass locally at -n 2; the Seatbelt profile golden fails identically on main on this host.
  • How to undo: revert the commit; the splat and the helper go away and the gate is as on main.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/security/paths.py

  • src/kiro_crew/security/paths_lists.py

  • @JLargent42 posted a complete reasoning template for ef934d3.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision ef934d3edab7f4e937445de296a6666174de231b touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

No design-level concerns: the tool gate reads the one fixed source, the shipped manifests, and only adds refusals, so no core row has to name an app.

Notes

  • security.paths_lists now loads kiro_crew.apps.credential_masks and reads files when it is imported. The reads fail soft (OSError and malformed manifests are caught), so this is safe today. Keep credential_masks free of heavier imports from apps (manager, bridges), or a later edit could create an import cycle when security loads.

[DESIGN-REVIEWED] ef934d3

Description read

[DESCRIPTION-READ] b3009e57f0fd3edc4a56cebb654137b1c097147e3e9eb98999f3e3cd3a0e38d4

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 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ef934d3edab7f4e937445de296a6666174de231b — 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

No built-in declares credentialMasks on main, so the new tool-gate entry changes nothing until #34296 lands. The gap is real, and the change removes it without adding an app-named row to core.

Notes

What this change ships

Inventory (5 items) — 3 justified

Intent: let a built-in app's declared credential file be refused by the agent's file tools and the gateway's file surfaces, with no core row that names the app. This is a FIX.

  1. The agent file tools and gateway file surfaces refuse files that shipped built-ins declare in credentialMasks (both data spellings, plus .tmp/.lock siblings) — zero consumers (no built-in declares one yet)
  2. declared_crew_leaves gains an installed keyword; one caller passes False — justified
  3. Importing kiro_crew.security now reads the shipped built-in manifests — undeclared as a boot-time read; a subprocess test covers it
  4. A TYPE_CHECKING import in the paths facade, which test_paths_facade.py requires — justified
  5. Three double blank lines collapsed in paths_lists.py to stay within the line budget — rides along; the description declares it
  6. The docs in security.md, app-kit-platform.md and the module docstring now state that the tool gate reads the shipped declarations — justified

[FIRST-PRINCIPLES-REVIEWED] ef934d3

Description read

[DESCRIPTION-READ] 706c16597df56b33961c8a0e01d3754e691df07bf1d08ddaf44d3a408a912d4f

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 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] ef934d3

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

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

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ef934d3

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

@Zedmor

Zedmor commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Code change approver recommendation: Approve

Automated, not a person, and not a review: a maintainer still decides.

decider-v3c@217fe607 · p_defect 0.12 · router R0 (approves only when p_defect <= 0.12, on changes of at most 400 changed lines) · head bd7b1104cf · 106 changed lines

Why: the decider approves with p_defect 0.12 <= 0.12 and every rail passes.

At import, the shipped built-ins' declared credentialMasks leaves are added to security._CREW_SECRET_LEAVES; installed apps are left out on purpose. Checked: (1) no import cycle: kiro_crew.apps loads its exports lazily, and credential_masks imports only atomic_write and config.paths, which security already imports; (2) the built-in-only read never touches config_dir and returns nothing on any error instead of raising, so importing security can't break; (3) app_declared_mask_targets judges 'core' from the sandbox_leaves tables, not the security list, so a built-in's backend still gets its declared file back; (4) the governance-mask pin compares the tool gate with the spawn plan, which already hides declared leaves; (5) the other readers of sensitive_home_dirs (adapter credential mask, papyrus/office_slides) only gain refusals. No built-in declares masks on main, so nothing changes at runtime today. A fresh-interpreter test proves the import-time wiring. The earlier @_POSIX_ONLY misplacement is fixed at this head.

If this recommendation is wrong, reply here; the replies are how the approver is evaluated.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review -- ✅ PASS

Which legitimate operations does ef934d3edab7f4e937445de296a6666174de231b 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): 9 classified, 0 newly refused, 9 still allowed.
  • ubuntu-latest (platform posix): 9 classified, 0 newly refused, 9 still allowed.
  • windows-latest (platform windows): 5 classified, 0 newly refused, 5 still allowed.

No candidate flipped from allowed to refused.

Scope-Verdict: PASS

Reason: The change adds the built-in apps' declared credentialMasks leaves to _CREW_SECRET_LEAVES, which feeds _SENSITIVE_HOME_DIRS. That list is the file-tool path gate (is_sensitive_path), not one of the three shell tiers in SHELL_DENY_TIERS, so shell candidates can only show that command lines stay allowed. No shipped builtins/*/app.json at base declares credentialMasks, so the added set is empty for now and no confirmed regression is possible. The path-gate gap and the cron and skill text scanners that read the same list are named under UNADJUDICATED.

TIGHTENING: the crew-home secret-leaf list behind _SENSITIVE_HOME_DIRS (the file-tool read and write fence) -- it refuses agent file-tool access to a shipped built-in's declared credential file, with no core row naming the app: + *credential_masks.declared_crew_leaves(installed=False), # built-ins' credentialMasks in src/kiro_crew/security/paths_lists.py.

ADJUDICATED: 14 candidates, 0 confirmed newly-refused

PLATFORM COVERAGE: posix and windows. The diff assumes crew-home-relative leaves (apps/<app>/data/<entry>) joined under each _CREW_HOME_PREFIXES spelling. The posix rows probe ~/.kiro/crew/apps/... reads, listings, log tails, moves and the retained .<name>-credential-masks.json record. The windows rows probe the same operations with %USERPROFILE% and $env:USERPROFILE spellings and \ separators, in cmd and PowerShell. None of the 14 rows uses any, because every row carries a path or an executable name. The windows rows cover the drive-letter and backslash forms, but I wrote no UNC-path row.

UNADJUDICATED:

  • Guard: security.is_sensitive_path / is_sensitive_write_path (_path_in_home_dirs(resolved, _SENSITIVE_HOME_DIRS, ...), src/kiro_crew/security/paths.py:288, :378, :390). Call path: agent file tool (Read/Write/Edit) → hook gate path rule → is_sensitive_path(resolved) → membership in _SENSITIVE_HOME_DIRS, which paths_lists.py:835 builds from _CREW_SECRET_LEAVES × _CREW_HOME_PREFIXES at import. Inputs I would have submitted: a file-tool read of a built-in app's non-secret sibling file (for example apps/<builtin>/data/settings.json, which the new test shows stays allowed as other.json → False); a read of the same app's .deleted/move-aside staged directory listing; and a backend-owned write to its own declared leaf, which should go through the app_declared_mask_targets carve-out and not the agent file tools. All of these are empty sets today because no built-in declares a mask. The first built-in that does will widen this fence with no core-row review.
  • Guard: the cron command-text scanner mcp_cron_shell_scan (_SENSITIVE_HOME_DIRS regex at lines 40 and 50, loop at line 896) and skills_script_validator (line 52). Both build regexes from the same list at import, so a built-in's declared leaf, once there is one, becomes a refused literal in cron command text and skill scripts. Neither scanner is in SHELL_DENY_TIERS, so the classifier cannot adjudicate them. Inputs I would have submitted: a cron ls ~/.kiro/crew/apps/<builtin>/data job and a skill script that mentions the app's data directory without naming the declared file. Only a path whose prefix is a declared leaf would match, so a directory-level reference should stay allowed. Neither point blocks.

[SCOPE-REVIEWED] ef934d3

@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 10, 2026
@JLargent42
JLargent42 force-pushed the fix/32681-tool-gate-row branch from f16d95f to bd7b110 Compare November 10, 2026 06:01
@JLargent42

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: bd7b110

  • What rule changed: security._CREW_SECRET_LEAVES now also holds every shipped built-in app's credentialMasks leaf (credential_masks.declared_crew_leaves(installed=False), read once at import), at both data spellings, so the read+write floor and the publish-artifact fence cover them.
  • Before -> after: before, a built-in's declared credential file was hidden in the sandbox but readable through the agent tool gate unless someone added an app-named core row. After, the gate refuses it with no core row; installed apps' declarations still do not reach the gate.
  • Worst case if wrong: an import-time failure reading a shipped manifest would break kiro_crew.security import. The reader returns nothing for an absent, unreadable or invalid manifest (the same _read_entries the sandbox uses per spawn), so the worst case is a missing refusal, never a crash or a loosening.
  • No regression:
    • Evidence checked: the new tests fail on main and pass here; a clean-interpreter test proves a shipped declaration reaches is_sensitive_path and a sibling file does not.
    • Tools still work: on main no built-in declares a mask, so the gate list is byte-identical until one does; only refusals are ever added.
    • Backward compatible: nothing previously allowed by the gate becomes allowed; the governance-mask disposition pin still passes because a declared leaf is HIDDEN in the spawn plan.
  • Existing tests: 10,416 sandbox, security, app-credential-mask, app-backend and decoupling tests pass locally at -n 2; the Seatbelt profile golden fails identically on main on this host.
  • How to undo: revert the commit; the splat and the helper go away and the gate is as on main.

@JLargent42

Copy link
Copy Markdown
Contributor Author

AI review notes on f16d95f, addressed in bd7b110:

  • Opus 5.5 Review, test/test_app_credential_masks.py:316, the new class landed between @_POSIX_ONLY and TestTheAliasPassesCoverTheDeclaredLeaves: fixed. The decorator is back on the alias-pass class; the new class needs no POSIX skip (it reads manifests and the gate, no sandbox).
  • First Principles, item 2, builtin_crew_leaves duplicated declared_crew_leaves: fixed. builtin_crew_leaves is gone; declared_crew_leaves takes installed= and the gate calls declared_crew_leaves(installed=False), so there is one comprehension.
  • First Principles, item 1, adds nothing on main: correct and intended. The seam is a no-op until a built-in declares a mask; fix: move ops secret store under its data dir and declare its mask #34296 is that built-in, and it drops its app-named tool-gate row once this lands. The clean-interpreter test proves the wiring without one.
  • Design, installed apps' declarations never reach the gate, so the seam covers nobody once Ops Mission Control leaves as an installed app (Move every built-in app out to KiroCrewApps and forbid built-in apps #26967): out of goal, and stated in Not a goal. A static gate cannot follow a sandbox-writable manifest read per spawn; covering installed apps needs a per-call reader on the gate's hot path, a separate decision for Move every built-in app out to KiroCrewApps and forbid built-in apps #26967 before Ops Mission Control's move, not this seam.

@JLargent42
JLargent42 force-pushed the fix/32681-tool-gate-row branch from bd7b110 to 4262a1d Compare November 10, 2026 06:59
@JLargent42

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: 4262a1d

  • What rule changed: security._CREW_SECRET_LEAVES now also holds every shipped built-in app's credentialMasks leaf (credential_masks.declared_crew_leaves(installed=False), read once at import), at both data spellings, so the read+write floor and the publish-artifact fence cover them.
  • Before -> after: before, a built-in's declared credential file was hidden in the sandbox but readable through the agent tool gate unless someone added an app-named core row. After, the gate refuses it with no core row; installed apps' declarations still do not reach the gate.
  • Worst case if wrong: an import-time failure reading a shipped manifest would break kiro_crew.security import. The reader returns nothing for an absent, unreadable or invalid manifest (the same _read_entries the sandbox uses per spawn), so the worst case is a missing refusal, never a crash or a loosening.
  • No regression:
    • Evidence checked: the new tests fail on main and pass here; a clean-interpreter test proves a shipped declaration reaches is_sensitive_path and a sibling file does not.
    • Tools still work: on main no built-in declares a mask, so the gate list is byte-identical until one does; only refusals are ever added.
    • Backward compatible: nothing previously allowed by the gate becomes allowed; the governance-mask disposition pin still passes because a declared leaf is HIDDEN in the spawn plan.
  • Existing tests: 10,416 sandbox, security, app-credential-mask, app-backend and decoupling tests pass locally at -n 2; the Seatbelt profile golden fails identically on main on this host.
  • How to undo: revert the commit; the splat and the helper go away and the gate is as on main.

@JLargent42

Copy link
Copy Markdown
Contributor Author

Backend Tests (3.12, 1) on bd7b110: test_paths_facade.py::test_every_name_served_from_outside_the_family_is_visible_to_type_checkers caught the new outside import in paths_lists.py. Fixed in 4262a1d: the paths facade's TYPE_CHECKING block names credential_masks, as it names every other outside import. The review lanes on bd7b110 failed on the installation's primary rate limit (06:02Z), not on the diff; this push re-runs them.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 10, 2026
@JLargent42
JLargent42 force-pushed the fix/32681-tool-gate-row branch from 4262a1d to ef934d3 Compare November 10, 2026 08:26
@JLargent42

Copy link
Copy Markdown
Contributor Author

Sensitive change review

Head: ef934d3

  • What rule changed: security._CREW_SECRET_LEAVES now also holds every shipped built-in app's credentialMasks leaf (credential_masks.declared_crew_leaves(installed=False), read once at import), at both data spellings, so the read+write floor and the publish-artifact fence cover them.
  • Before -> after: before, a built-in's declared credential file was hidden in the sandbox but readable through the agent tool gate unless someone added an app-named core row. After, the gate refuses it with no core row; installed apps' declarations still do not reach the gate.
  • Worst case if wrong: an import-time failure reading a shipped manifest would break kiro_crew.security import. The reader returns nothing for an absent, unreadable or invalid manifest (the same _read_entries the sandbox uses per spawn), so the worst case is a missing refusal, never a crash or a loosening.
  • No regression:
    • Evidence checked: the new tests fail on main and pass here; a clean-interpreter test proves a shipped declaration reaches is_sensitive_path and a sibling file does not.
    • Tools still work: on main no built-in declares a mask, so the gate list is byte-identical until one does; only refusals are ever added.
    • Backward compatible: nothing previously allowed by the gate becomes allowed; the governance-mask disposition pin still passes because a declared leaf is HIDDEN in the spawn plan.
  • Existing tests: 10,416 sandbox, security, app-credential-mask, app-backend and decoupling tests pass locally at -n 2; the Seatbelt profile golden fails identically on main on this host.
  • How to undo: revert the commit; the splat and the helper go away and the gate is as on main.

@JLargent42

Copy link
Copy Markdown
Contributor Author

Re-head only, same tree as 4262a1d (git rev-parse HEAD^{tree} unchanged): Security Scope Review re-measured 4262a1d as PASS (0 newly refused), but the lane held it at the failure the first, rate-limited run published for that head. Its own remedy is a fresh head. Security Scope note for the record: once a built-in declares a mask (#34296), the cron shell scanner and skills_script_validator, which also derive from _SENSITIVE_HOME_DIRS, will refuse a cron or skill script that names that file. That's intended: the same refusal a core credential leaf already gets.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 10, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 10, 2026 09:41

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. On head ef934d3 the review read the whole diff and checked four things. First, _CREW_SECRET_LEAVES now takes credential_masks.declared_crew_leaves(installed=False). Second, the import-time read never raises and reads only the shipped builtins tree, not the data home. Third, there is no import cycle. Fourth, the governance reconciliation pin still holds. CI on this head shows all 8 Linux and all 8 Windows Backend Tests shards passed, along with the Flake Pattern Ratchet and the Static Ratchet Gate.

Security: this PR touches the agent tool gate's refusal floor and credential handling. The risk is not realized, because the change can only add refusals. It reads only the shipped manifests, which are fixed for the process, and never the agent-writable installed manifests. The built-in's own backend carve-out in sandbox_tiers is built from separate static tables, so it is unaffected. On main no built-in declares a mask yet, so runtime behaviour is unchanged until #34296 lands.

Done well: test_the_gate_takes_a_shipped_declaration_when_it_loads proves the import-time wiring in a fresh interpreter. It checks that the declared file is refused and that a sibling file stays readable, without reloading a shared module in-process.

Optional:

  • test/test_app_credential_masks.py:356: pass timeout=FALLBACK_TIMEOUT_SECS to the child subprocess.run. A hang would then fail this test by name instead of costing the xdist worker on Windows.
  • test/test_app_credential_masks.py:367: test_every_shipped_declaration_is_on_the_tool_gate_floor loops over an empty set until a built-in declares a mask. A one-line docstring saying so would keep readers from treating it as current evidence.
  • No test fails if the gate call at paths_lists.py:833 changes to installed=True. The fresh-interpreter test could install a demo app under a tmp KIROCREW_HOME and assert that its leaf stays off the gate.

@KiroCrewCaptain
KiroCrewCaptain merged commit adfd1fb into main Nov 10, 2026
107 of 112 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/32681-tool-gate-row branch November 10, 2026 09:42
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 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.

3 participants