Repository navigation
revert: #13273 apps-tree mask breaks every app script cron (release/0.8.0) - #16075
Conversation
….8.0) Backport of #16072. #13273 reached release/0.8.0 inside the batch-2 squash 4b9e9f0 (#15631), so this reverts only #13273's changes from it, on release's own layout; the #15255 command-shell helpers that batch resolved against are kept. #13273 masked `<config_dir>/apps` from both cron exec paths and re-exposed only each app's `data/`, hiding every app cron's own code and the sibling modules it imports, so every app cron failed with ModuleNotFoundError / MODULE_NOT_FOUND. Removed: the cron call-site mask, windows, identity pin and alias inodes; the app-only `sandbox` helpers (`materialize_caller_masked_dir`, `materialize_app_data_window`, `masked_dir_identity`, `refuse_if_an_app_secret_is_linked`, `aliased_app_secret_ids`, `app_data_window_targets`, `AppDataWindow`, `MAX_APP_DATA_WINDOWS`); and `test_cron_apps_secret_mask.py`. Kept, as on main: the caller-pinned `extra_*_ids` parameters and the launcher's pinned window staging, nested re-mask and stage retirement, which behave as name-only with no caller passing identities; their tests move to `test_sandbox_caller_pinned_ids.py`. Trade-off: a cron child can again read other apps' `.app_secret`, as before #13273. The protection is to re-land via #16061. `test_app_script_cron_sibling_import.py` pins the regression for a command cron running bundle code that imports its siblings (release has no bundle-script resolution for script crons); both cases fail on the pre-revert tree.
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the #16061 re-land is tracked against release/0.8.0 — until it backports, cron children read cross-app [DESIGN-REVIEWED] 0deb92d |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The revert keeps Not justified as shipped
What this change shipsInventory (7 items) — 6 justifiedIntent: FIX — restore every app's cron (broken by #13273's apps-tree mask with
[FIRST-PRINCIPLES-REVIEWED] 0deb92d |
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 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/cron_script.py:2063 -- Cron jobs can read installed apps' bearer secrets Adjudication (Opus 5) — is blocking on each finding proportionate?F1 — harm rung: UNBOUNDED (bearer-credential exposure); False positive or not applicable? A repository writer can comment: |
Summary
Backport of #16072 to release/0.8.0. This reverts #13273's apps-tree cron mask, which breaks every app script cron (Taskei Mesh-3988, Mesh-3989). Owner decision, P0.
#13273 came into release/0.8.0 inside the batch-2 squash 4b9e9f0 (#15631, which squashed 8 PRs). So this reverts only #13273's changes, on release's own layout. It keeps the #15255 command-shell helpers (
_no_command_shell_message,_command_argv) that the batch resolved against. #13929, #14960 and #13348 from the same batch are untouched.#13273 replaced
~/.kiro/crew/apps/with an empty mask inside the cron sandbox and re-exposed only each app'sdata/. That hid every app cron's own code and the sibling modules,lib/andnode_modules/it imports, so every app cron failed withModuleNotFoundError/MODULE_NOT_FOUND.Changes (same as #16072)
sandboxhelpers (materialize_caller_masked_dir,materialize_app_data_window,masked_dir_identity,refuse_if_an_app_secret_is_linked,aliased_app_secret_ids,app_data_window_targets,AppDataWindow,MAX_APP_DATA_WINDOWS) andtest/test_cron_apps_secret_mask.py.extra_*_idsparameters and the launcher's pinned window staging, nested re-mask and stage retirement. With no caller passing identities they behave as name-only. Their tests move totest/test_sandbox_caller_pinned_ids.py.Security trade-off
After this revert, cron children can again read other apps'
.app_secret, as they could before #13273. The plan is to re-land the protection through #16061 (re-exposes app code read-only) on main, then backport it.Regression test
test/test_app_script_cron_sibling_import.pycovers a command cron runningpython <bundle>/run.py, whose code imports a siblinghelper.pyand alib/package. Release has no bundle-script resolution for script crons (#12046 is main-only), so the script-cron cases from #16072 are not included here. There are two cases:wrap_argvpassthrough, which requires that no requested mask hides the bundle;Both fail on the pre-revert release tree and pass after.
Validation
pytest test/test_cron*.py test/test_sandbox*.py test/test_mcp_cron*.py+ the new file: 4654 passed, 3 skippedmypy src/kiro_crew/: no issues (1861 files)