Repository navigation
fix(apps): bind signatures to packaged app content - #34469
bolichen97 wants to merge 1 commit into
Conversation
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 30% chance that this change introduces a defect, above the 12% limit for approving on its own. Scheme 2 signs the whole manifest plus a SHA-256 list of every packaged file. Under require_signature, that list is checked at install, enable, boot, backend spawn, lifecycle scripts, hook loads and resource registration. Signer and verifier share one file walk that matches the install copy's exclusions. The builtin admission exemption at enable, boot and registration now requires shipped provenance (is_installed_builtin_app), and every shipped builtin uses a module-style backend, so none loses its exemption. Boot persists a disable only for a proven content mismatch. With no policy, the new checks return early; the MCP rebuild gate matches live registration's existing execution decision. The restart-path builtin exemption is a declared residual, not a gap in the content check, because the spawn re-checks content from the executed path. The GPT lane's blocking finding is a fail-closed edge case. I found no concrete regression, data-loss or fail-open path, so I approve with non-blocking notes. 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 |
|
PR Policy portability finding: rebutted for 3479d58. The only matched added line is |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: dropping scheme 1 is declared as Notes
[DESIGN-REVIEWED] 7beca76 Description read[DESCRIPTION-READ] cd9299c2cbaaf04fde311a6a2d4bedd9c46452fc6024f7ef87e7c316d8bc6c6a 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Every item follows from the stated defect: a signature stayed valid after packaged files changed. One note: the PR re-spells a signing primitive the repo already has. Notes
What this change shipsInventory (10 items) — 8 justifiedIntent: let a fleet that requires signatures trust that a signed app runs exactly the files its publisher signed. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 7beca76 Description read[DESCRIPTION-READ] 32a33bf795fe1fbf7b041192d41099b699989c6c86ea630aeb52e490c573d3d3 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — 🔴 changes requested (blocking)Reviewed Blocks: with BLOCKING — src/kiro_crew/apps/bridges_sources.py:187 [BLOCK-MERGE] 7beca76 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 — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/apps/signed_content.py:130 -- Case-aliased manifests invalidate their own signed inventory
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 (fenced): I confirmed the defect, but it does not lead to unbounded harm. It needs a manifest whose on-disk name has non-canonical casing (e.g.
🏷️ Fenced finding(s) machine-flagged as likely edge caseThe security fence keeps these findings blocking regardless of adjudication; the only clearance path is a human override. The annotate-only pass judged the condition combination each one requires extreme, and pre-drafted the override rationale below. A repository writer must independently verify a rationale before posting it — it is machine-authored, and a wrong override on a security-class finding ships exactly the class the fence exists to stop.
Replace False positive or not applicable? A repository writer can comment: |
|
|
|
|
|
Forward-only repair 898a514 preserves the original public commit 3479d58 as its first parent and incorporates main ed80c1d as its second parent. The PR has two commits; no public history was rewritten. The uninstall overlap preserves both protected-state cleanup and app-pycache cleanup. Windows traversal-refusal assertions now match the quoted OSError filename. Auto-merge is disabled. Current-head tests and review verification are delegated to GitHub Actions; no local execution result is claimed. |
898a514 to
5d8afa4
Compare
1238a18 to
454fb1f
Compare
buluoray
left a comment
There was a problem hiding this comment.
Request changes on 454fb1f. Every point in our CHANGES_REQUESTED review 6593e5b is fixed and mutation-tested. The signed-hook preparation now clears the app's subtree under the external bytecode prefix, through pinned directories, and fails closed on a linked mirror or a cleanup error. The two broken tests are repaired. The new delta (self-managed registry apps verify and run from the publisher checkout; self-registered apps with an empty metadata directory admit declarative registrations on signature alone; MCP -X pycache_prefix) tightens or keeps fail-closed. Caveat for the lead: the live head has NO real CI, GPT or Opus results. The author cancelled CI, and GPT/Opus/Design/UX/First Principles failed on "API rate limit exceeded". The patch is identical (git range-diff "=") to 1238a18, where all 82 non-skipped checks passed and GPT and Opus both reported no blocking findings. The base differs (main moved in touched files), so the re-run on 454fb1f must go green before merge. Lead note (c139, reclassified from APPROVE after the rate-limited lanes were re-run and both posted [BLOCK-MERGE] on 454fb1f; I read GPT comment 6763915013 and Opus comment 6763884669): REQUEST_CHANGES, security. The points from our earlier review 6593e5b stay fixed. Two new findings hold. (S1, GPT, security-class, adjudication upheld) Signed content is checked once (src/kiro_crew/apps/backend.py:532), then provision_app_deps (src/kiro_crew/apps/backend.py:725) runs pip with write access to the app tree (src/kiro_crew/apps/backend_runtime/provisioning.py:861-899, cwd=root). A dependency that ships as a source package can run a build hook that rewrites backend/server.py. Only the npm branch checks the content again (src/kiro_crew/apps/backend.py:1054-1068); the Python path and src/kiro_crew/apps/bridges_mcp.py:976-978 and :1030 go straight on to spawn or register. So with signatures required, the backend can run source that does not match the publisher's signed inventory. Fix: verify the final packaged tree against the execution manifest after dependency provisioning and before spawning or registering. (D1, Opus) A boot under require_signature records every unsigned, scheme-1-signed or untrusted-key app as disabled by its owner (src/kiro_crew/apps/admission.py:567 returns _SignatureRefusal; src/kiro_crew/apps/startup.py:178, :238 call _disable_denied_app). These are outcomes of the policy, not tampering, so after the administrator relaxes the policy or restores the key the apps stay off and each must be re-enabled by hand. Fix: return the _SignatureRefusal marker only after a trusted signer's signature was checked and failed; a missing signature, an unknown signer or an unverifiable scheme should refuse this boot without persisting a disable. We never override security findings. Decisive lines: src/kiro_crew/apps/signed_imports.py:181-214 (clear_app_bytecode clears the app's mirror under sys.pycache_prefix), src/kiro_crew/apps/module_loader.py:384, test/test_app_signed_cache_mirror.py::test_external_mirror_cannot_supply_unsigned_direct_loader_bytecode, test/test_app_signed_review_repairs.py:99-103, test/test_apps_registry_identity_admission.py:425, src/kiro_crew/apps/admission.py:582-585
454fb1f to
2beb8fe
Compare
|
Rebased: main moved in 11 files this PR also touches, from base
The same push also adds the app MCP materialization gate: app MCP entries carry an |
2beb8fe to
81cbc2d
Compare
buluoray
left a comment
There was a problem hiding this comment.
Request changes on 81cbc2d. Requesting changes on 81cbc2d (security). The new commit adds a useful guard: when the agent spec is rebuilt, each app's MCP servers now pass the same admission and signed-content decision as live registration, and a copy already on disk cannot bring back an entry that registration refused. Two mutations of this guard turn 7 and 5 tests red. But neither point from our review on 454fb1f is fixed, because the PR's changes to backend.py, provisioning.py, admission.py and startup.py are identical on both heads. (1) The app backend still checks its signed content once (src/kiro_crew/apps/backend.py:532) and then provisions Python dependencies (src/kiro_crew/apps/backend.py:725). That step runs the package installer with the app directory as its working directory and write access to it (src/kiro_crew/apps/backend_runtime/provisioning.py:861-899). A dependency's build step can therefore change a signed file, and the backend is then started with no second check. Only the npm branch checks again (src/kiro_crew/apps/backend.py:1054-1068). The MCP registration path has the same order (src/kiro_crew/apps/bridges_mcp.py:978 and :1030). The new rebuild check narrows that MCP window, but the backend path stays open. With signatures required, a publisher whose dependency misbehaves, or anyone who controls a dependency, can get unsigned source run as if it were signed. Please check the final tree against the signed inventory after dependency provisioning and before starting or registering. (2) A boot under required signatures still marks every app that is unsigned, signed by an unknown key or signed with an old scheme as disabled by its owner (src/kiro_crew/apps/admission.py:567, src/kiro_crew/apps/backend_runtime/startup.py:179 and :239). If an administrator later relaxes the policy or restores the key, those apps stay off and each one must be turned back on by hand. Please save the disable only when a trusted key's signature was checked and did not match; in other cases, refuse this boot without saving a disable. Also, Backend Lint is red because black would reformat test/test_app_bridges_mcp.py:674, so no test shard ran on this head. GPT and Opus were cancelled on this head and have not reviewed it. Decisive lines: src/kiro_crew/apps/backend.py:532, src/kiro_crew/apps/backend.py:725, src/kiro_crew/apps/backend_runtime/provisioning.py:861-899, src/kiro_crew/apps/bridges_mcp.py:978, src/kiro_crew/apps/bridges_mcp.py:1030, src/kiro_crew/apps/admission.py:567, src/kiro_crew/apps/backend_runtime/startup.py:179, src/kiro_crew/apps/backend_runtime/startup.py:239, test/test_app_bridges_mcp.py:674
|
Rebased: main moved in no files this PR touches, from base The same push adds:
The PR's changed test files plus the MCP merge suites pass locally (1834 passed). |
buluoray
left a comment
There was a problem hiding this comment.
Request changes on 49c1e83. Requesting changes on 49c1e83 (security and existing users). The new commit fixes the formatting problem we raised and adds a one-time cleanup of old MCP entries, which is backed by tests (turning the cleanup off makes 18 of them fail). The two security points from our last review are still open, because the PR's changes to backend.py, admission.py and startup.py are the same as on the previous head. First, the app backend still checks its signed content once and then installs Python dependencies into the app directory, and it starts the backend with no second check. A dependency's build step can therefore change a signed file and have it run as signed content. Only the npm path checks again. Please compare the final tree with the signed file list after dependencies are installed and before the backend starts or MCP servers are registered. Second, a boot that requires signatures still saves an owner disable for every app that is unsigned, signed by a key that is not trusted, or signed with the old scheme. If an administrator later relaxes the policy or restores the key, those apps stay off until someone turns each one back on. Please save the disable only when a trusted key's signature was checked and did not match. The new cleanup also changes things for existing users on every fleet, including fleets with no signature policy. On the first rebuild it removes any command-based MCP entry in the default agent spec that has no app or card mark and that no current source declares, including entries a person added by hand. It writes a log warning with the name but keeps no copy of the removed settings. The PR description does not mention it. Please say this in the description, and either keep a copy of what was removed or limit the cleanup to entries that an app wrote before. Decisive lines: src/kiro_crew/apps/backend.py:532, src/kiro_crew/apps/backend.py:725, src/kiro_crew/apps/backend.py:1058, src/kiro_crew/apps/admission.py:567, src/kiro_crew/apps/backend_runtime/startup.py:179, src/kiro_crew/apps/backend_runtime/startup.py:239, src/kiro_crew/agent_materialization/legacy_mcp.py:61-97, src/kiro_crew/agent_materialization/default_spec_commit.py:458-471, src/kiro_crew/agent_parts/spec_rebuild.py:685
|
Rebased: main moved in no files this PR touches, from base The same push addresses the blocking GPT finding on |
buluoray
left a comment
There was a problem hiding this comment.
Request changes on c53ffe5. Requesting changes on c53ffe5 (security and existing users). This push rebases onto a newer main and adds a check that MCP entries rebuilt for a signed Python app use a bytecode cache directory outside the app's files. That check is tested: removing it in either place where it runs makes 16 and 90 tests fail. The three points from our last review are still open, because the PR's changes to backend.py, admission.py, startup.py and legacy_mcp.py are the same as on the previous head. First, the app backend still checks its signed content once and then installs Python dependencies into the app directory, and it starts the backend with no second check, so a dependency's install step can change a signed file before it runs. Only the npm path checks again. Second, a boot that requires signatures still saves an owner disable for every app that is unsigned, signed by a key that is not trusted, or signed with the old scheme, so those apps stay off after an administrator relaxes the policy or restores the key. Please save the disable only when a trusted key's signature was checked and did not match. Third, the one-time cleanup still removes command-based MCP entries that exist only in the default agent spec, including entries a person added by hand, on every fleet. It keeps no copy of the removed settings, and the PR description still does not mention it. Please either keep a copy or limit the cleanup to entries that an app wrote, and describe it in the PR. Decisive lines: src/kiro_crew/apps/backend.py:532, src/kiro_crew/apps/backend.py:725, src/kiro_crew/apps/backend.py:1058, src/kiro_crew/apps/admission.py:566-567, src/kiro_crew/apps/backend_runtime/startup.py:178-179, src/kiro_crew/apps/backend_runtime/startup.py:238-239, src/kiro_crew/agent_materialization/legacy_mcp.py:61-97
|
Rebased: main moved in The same push:
The PR's changed test files plus the MCP merge, adoption and cron suites pass locally (2173 passed). |
|
Follow-up on head What happens on upgrade. At boot, an app that is unsigned, signed with an unknown key, or signed with the old scheme is treated as a signature refusal. What the user sees. Nothing tells them: the only trace is a Suggested fix.
Still open from the earlier review (S1). The signed content is checked once. Then the Python dependencies are installed into the app directory, and nothing checks the content again. The npm path does check again. Running |
|
buluoray
left a comment
There was a problem hiding this comment.
Request changes on 74a7566. Requesting changes on 74a7566. This push only declares the new launch check in signed_mcp.py in the link-screen baseline, which fixes the PR's own red guard tests. No product code changed, so the main blocker is still open. When a fleet requires signatures, a boot saves a permanent owner disable for every app that is unsigned, signed by a key the fleet does not trust, or signed with the old scheme. On main such an app is only skipped for that boot. Because this PR makes every old-scheme signature fail, the first boot after upgrade turns those apps off for good, and the user only gets a log line. Please save the disable only when a trusted key's signature was checked and the content did not match, and tell the user which app was turned off, why, and what to do. Separately, there is still a gap in the promise this PR makes: the signed content is checked once, then Python dependencies are installed with the app directory as the working directory, and the backend starts and MCP servers register with no second check. Only the npm path checks again. Main has no check here, so this is not a regression. Decisive lines: src/kiro_crew/apps/admission.py:567, src/kiro_crew/apps/backend_runtime/startup.py:41-51, src/kiro_crew/apps/backend_runtime/startup.py:179, src/kiro_crew/apps/backend_runtime/startup.py:239, src/kiro_crew/apps/backend.py:535, src/kiro_crew/apps/backend.py:728, src/kiro_crew/apps/backend.py:1042-1046, src/kiro_crew/apps/bridges_mcp.py:976-978, src/kiro_crew/apps/backend_runtime/provisioning.py:899
|
|
|
@buluoray thanks, both points are fixed in 55030fd. 1. Boot no longer saves a permanent disable for apps it cannot verify.
2. Signed content is checked again after Python provisioning.
|
Bind publisher signatures to the manifest and packaged file inventory at installation, activation and executable-resource registration. Preserve no-policy behavior and existing runtime data. Use interpreter cache options for signed Python MCP launches, preserving isolation flags. Verify self-managed registry execution against its publisher checkout and keep metadata files outside that authentication.
buluoray
left a comment
There was a problem hiding this comment.
Approve on 7beca76. This PR binds each app signature to the files the app ships, and checks those files again right before installed app code runs. The rebase onto main changed one test: it now says that a null author or licence is signed as written, which matches how this PR signs the whole app.json document. Main's new chat slot permission and main's fix for a null author or licence both survive, and the signature covers both. All three points from our earlier change request still hold on this head, and each has a test that fails without it. One edge case remains: on a case-insensitive disk, a manifest saved as App.json instead of app.json signs without error and is then refused at install. No tool or template in the repository writes that name, nothing unsigned or changed is ever let in, and the publisher fixes it by renaming the file and signing again. Two review lanes block this head. One block is that edge case. The other is a startup cost: under a signature policy, boot hashes each app's packaged files more than once. A maintainer has to decide both blocks before this can merge. Decisive lines: src/kiro_crew/apps/manifest_sections.py:117-118,598,642-643,679 (PR's comment-only hunks plus main's #36356 chatSlots field, both present); src/kiro_crew/apps/manifest.py:898-915 (signing_payload signs the document as written, so chatSlots and the #36426 null author/licence are covered); src/kiro_crew/apps/signed_content.py:47,130,234,260-274,297-311 (GPT F1: fail-closed only); src/kiro_crew/apps/admission.py:496-522,610-613,638 (D1a); src/kiro_crew/apps/backend_runtime/startup.py:179-181,240-242 (D1a/D1b); src/kiro_crew/apps/backend.py:733-747 and src/kiro_crew/apps/bridges_mcp.py:1033-1048 (S1)
|
Closing this PR. The signed-content check is moving to the App SDK instead of the gateway. Why: binding a signature to every packaged file means hashing each enabled app's tree. Under Fleets without a signature policy were never affected. Tracking continues in #34319. The branch |
Problem / Motivation
Goal: Make a publisher's app signature bind the packaged content used at installation, activation and executable-resource registration.
A signature can remain valid when packaged files change. Installed apps also lack a signed-content check at later activation boundaries.
Why it matters
Fleets that require signatures need those checks to identify the publisher's packaged content, including backend code, hook modules, scripts, agents and skills.
Not a goal
What changed (motivation → approach → change)
The signature covered manifest fields but not packaged file contents. Scheme 2 signs the complete manifest and a SHA-256 inventory matching the install copy. Existing admission and execution boundaries compare the signed package and the manifest object they use. Publisher-source runtime entries and tracked, inventory-excluded files in reused registry checkouts are refused without changing installed runtime-data preservation.
Signed Python hooks and normal imports compile verified source. Threaded hook preparation clears every in-tree cache and the app-specific active external mirror under both the path spelling the hook sees and its canonical path, through pinned directories, refusing cleanup failures while leaving unrelated caches and the process-wide prefix unchanged. A cache-preparation failure before a lifecycle script is a failed script result, so enable rolls back and uninstall still removes the backend and runtime. Python children and signed registry install scripts use fresh external caches. Registration carries its actual manifest, builtin admission requires shipped provenance, and boot refuses prompts as well as backends without aborting other apps on a failed record write. The admission exemption at enable and in both boot passes applies only when the install is builtin-owned, declares the shipped backend entry, and that backend resolves inside the shipped package, so an app shadowing a builtin name is checked like any other. A self-registered app whose installed directory holds no packaged file is admitted on its manifest signature; any packaged file found there is still compared. A malformed
trust_keysvalue makes the policy fail closed instead of stopping startup. Signed Node provisioning honours a packaged lockfile withnpm ci, without rewriting it; lockfile-free apps retain non-writing installation. Any attempted npm provisioning is followed by a content check before Node starts, including failed npm runs. Signed-content refusals reach one shared, payload-free security audit boundary. Boot persists disable only for proven signature or content refusals; policy denials and unreadable state remain refused for that boot and recover on a later boot.src/kiro_crew/cli_commands_app.pyimplements publisher signing,src/kiro_crew/cli_parser_agent.pydeclares its arguments, andsrc/kiro_crew/cli_commands.pyexposes dispatch. Publisher, notification and security docs describe the contract and limits..github/black-baseline.txtremoves the now-formatted backend file from the shrinking formatting baseline.Backwards compatibility
Breaking: Fleets with
require_signaturemust re-sign apps. A build oronInstallthat changes packaged files is refused for signed apps. Signed Node apps ship their final lockfile. Signed local install/update sources cannot seed rootdataorapp-crons.json; registry publisher trees also cannot carry root.app_secret, including entries produced by build/install scripts. Installed runtime data stays preserved and outside the inventory.Writer sweep on origin/main @ 32d5f13: no shipped
app.jsondeclares a signer. Signature verification usesAppManifest.signing_payloadin app admission. A separate downstream-edition owned-source sweep found no signer or caller ofsigning_payload,require_signatureortrust_keys. External publishers using the earlier payload must re-sign. Without a signature policy, source-copy and npm provisioning behavior remain unchanged. Boot bans, allowlist denials, unreadable manifests and inventory I/O errors do not change persisted enablement. The app remains down in that boot and can recover when the policy or fault is resolved. Only proven signature or packaged-content refusals persist disable; a persistence failure still refuses the app in that boot.Reader: src/kiro_crew/apps/admission.py:app_admission_denied -- app -- source and activation callers supply the tree; source-only refusals do not apply to installed runtime data.
Reader: src/kiro_crew/apps/backend.py:_start_app_backend_body -- app -- the executed manifest and backend tree are checked before spawn.
Reader: src/kiro_crew/apps/module_loader.py:load_app_module -- app -- prepared verdict includes off-loop cache cleanup; synchronous fallback remains; paired no-policy controls pass.
Reader: src/kiro_crew/apps/lifecycle_scripts.py:run_lifecycle_script -- app -- script text is bound to the verified setup declaration.
Reader: src/kiro_crew/apps/bridges_sources.py:_registration_denied -- app -- agents, skills, cron and MCP callers verify the manifest they register.
Reader: src/kiro_crew/apps/bridges_crons.py:_admitted_app_cron_defs -- cron -- signed definitions come from the verified manifest rather than the unsigned record.
Reader: src/kiro_crew/apps/manager_activation.py:enable_app -- app -- an installed origin claim cannot grant the shipped builtin exemption.
Reader: src/kiro_crew/apps/backend_runtime/startup.py:start_enabled_app_backends -- app -- admission failures keep apps down even when saving the disabled record fails.
Tests
Proof: not provable -- other: the regression files below were run red on the parent head and green on this head; the full-diff revert proof was PROVEN at 5249a228a0c3
test/test_app_signed_external_register.pykirocrew app signactivates at boot, enable and restart; a file planted in its metadata directory is refused; code run from that directory is still refused; no-policy controltest/test_app_signed_round4.pytrust_keysfails closed without raising; a cache-preparation failure is a failed script result, enable rolls back and uninstall still removes the app; listing and unlink failures propagate; the lexical-path mirror is cleared when the app is reached through a linked ancestor; a traverse-only ancestor does not block cleanup; no-policy controlstest/test_app_signed_content.py,test/test_app_signed_round3.py,test/test_app_signed_review_repairs.py,test/test_app_signed_audit.py,test/test_app_signed_provisioning.py,test/test_app_signed_cache_mirror.pyNew regressions were red on the parent head (
test_app_signed_external_register.py: 3 failed;test_app_signed_round4.py: 15 failed, then 7 failed for the lexical-mirror and traverse-only cases) and green on this head. On this head the signed-app files, the link-screen and facade tree scans, and the lifecycle, uninstall, module-loader and route-registry files pass locally (262 passed, 2 skipped; 626 passed on the wider signed set). isort, flake8, black, mypy on the touched modules, the flake-pattern ratchet and the repository semgrep rules pass. The full suites, Windows and macOS run in GitHub Actions.Manual verification
A cross-platform harness runs isolated gateways (own home, loopback-only ephemeral port) from the base and from this head:
backend/server.pychanged after signing is admitted on the base and refused on this head, at install and after a change to the installed copy; an unchanged signed app installs and enables on this head.todo-ledgeranddynatraceare refused on both because their manifests declare crons without the cron permission.Linux arm64 at the parent head: repro PASS, every existing app identical on base and head. Results on this head for Linux x86-64, Windows Server 2025 and macOS, including three apps from a second, self-hosted git registry, are posted as a PR comment when each host finishes.
Screenshots / video
N/A. No UI change in this PR.
Related Issues
Closes #34319
Sibling sweep
Swept: signing payload consumers, inventory exclusions versus copied/source-executed entries, installed-content checks, resource-registration guards, builtin provenance and every hook cache-preparation caller.
Sibling: src/kiro_crew/apps/manager_install.py -- changed here
Sibling: src/kiro_crew/apps/registry_pipeline/install_clone.py -- changed here
Sibling: src/kiro_crew/apps/registry_pipeline/install.py -- changed here
Sibling: src/kiro_crew/apps/bridges_register.py -- changed here
Sibling: src/kiro_crew/apps/bridges_skills.py -- changed here
Sibling: src/kiro_crew/apps/bridges_mcp.py -- changed here
Sibling: src/kiro_crew/apps/lifecycle.py -- changed here
Sibling: src/kiro_crew/apps/backend_runtime/startup.py -- changed here
Sibling: src/kiro_crew/apps/signed_imports.py -- changed here
Pattern harvest
Rule candidate: review-prompt
Pattern: Bind signatures to executable package bytes and the exact manifest consumed. Source entries excluded from the inventory must not enter execution unsigned. Prepared verification must include blocking cleanup and surface traversal errors.
Residuals and maintainer decision
The installed tree remains writable. Check-then-use races remain, including direct file loaders that bypass the verified-source finder. Gateway-provisioned
.venvand its.pth,node_modules, anddata/.kirocrew-depsare not signed publisher content. The UI bundle is served per request, skills remain live links, stdio MCP is started per session by the external harness, and cron scripts are read at fire time without a new per-use check. Reused registry checkouts reject publisher-tracked files under inventory-excluded names; generated, untracked dependency directories remain permitted. The root-only unsigned source-runtime check also applies. HMAC requires the verifier to hold the shared secret; asymmetric keys and commit pinning are follow-ups. The backend restart re-vet inbackend_runtime/restart.pystill exempts a record whose origin is builtin, as on the base; aligning it with the enable and boot provenance check is a follow-up.needs-a-decision: Should installed app trees become read-only for sandboxed agents? This PR leaves that OS-layer scope decision to the maintainer and adds no seal.
Checklist
Contribution License Agreement
Contributions are provided under the project's Apache-2.0 license.