Repository navigation
revert(cron): hide every app's secret from cron children, keep own bundle - #16853
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Merging this puts the #12518 exposure back on What this change shipsInventory (5 items) — 5 justifiedIntent: undo a cron-sandbox change that never ran against a real OS sandbox and could break every app cron at once, until a safer version lands. This is a FIX (a revert).
[FIRST-PRINCIPLES-REVIEWED] b7cb104 Description read[DESCRIPTION-READ] 19dbbbbf78ff534cc9abdce1ba939c44bc5ad65a5d408a359d735fc899baa06b That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Before merging, a maintainer should confirm they accept that #12518 is open again: cron children can read every app's [DESIGN-REVIEWED] b7cb104 Description read[DESCRIPTION-READ] 4f12b6ad819fb8629fde919c661bd367b92cdb91286e35d0be44ddeefe42aae9 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ human override acceptedReviewed Human judgment by @iamwhatever overrides the Opus 5.5 finding for [OPUS-OVERRIDE] b7cb104 Verdict recorded from an authorized human decision for commit False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
LGTM. I checked this at head b7cb104485.
It is an exact revert. All ten code, test and app-kit doc files are byte-identical to 69ee1083e1^ (the parent of #16442's squash commit). In docs/system-specs/modules/learn-cron-dashboard.md the revert removes exactly the lines #16442 added, and the later edits from #16279 and #16786 are kept.
The trade-off is the right one for now. #16442's global stop means one hard-linked .app_secret withholds every app's bundle window, so every bundle cron fails to import; and app crons that read their own .app_secret from disk lose it with no migration path. Both are wider outages than the leak they close is being exploited today, and the re-land plan on #12518 (per-window inode scan, a ScriptContext migration, a real-sandbox run on Linux and macOS) addresses them.
Accepted consequence, stated plainly: with this merged, cron children can again read every installed app's .app_secret, which token_auth.validate_app_secret accepts, so a cron can act as another app. That is what the Opus BLOCK describes and what the design lane asks a maintainer to confirm. The Opus block is correct about the effect; it is outweighed by the fail-everything regression, not mistaken.
Before merging
- The title
Revert "…"fails PR Hygiene's conventional-commit check; it needs to berevert: …. - The Opus BLOCK needs a maintainer override citing the accepted #12518 exposure.
- #12518 is CLOSED (#16442 closed it) and this body only says
Refs, so merging will not reopen it. Please reopen it so the exposure stays tracked.
One correction to the body for the record: #16442 did get a real Linux-namespace run during review (own bundle readable with an empty secret, another app's secret ENOENT, symlink and ../ spellings refused); what never ran is macOS Seatbelt.
GPT 6.1 Review — ✅ human override acceptedHuman judgment by @iamwhatever overrides the GPT 6.1 finding for [GPT-OVERRIDE] b7cb104 This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
|
|
Human judgment recorded@iamwhatever marked the fable AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@iamwhatever marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Problem / Motivation
Goal: Take #16442 back out of
main, so no app cron can break from it, until a safer version is re-landed.#16442 (squash commit
69ee1083e1bd9643328a29ee6f47937dce041990) hid every app's.app_secretfrom cron children. The maintainer decided to revert it first and re-land it later, for three reasons:.app_secrethas a second hard link, NO app's bundle window opens. Every app cron then fails withMODULE_NOT_FOUND, so one app's problem takes down all apps..app_secretfrom disk. Third-party apps were never surveyed.Why it matters
Left in, one bad link in one app can stop every app cron on a host. App crons that read their own secret break with no warning. Nothing proves the change works on a real sandbox.
Not a goal
release/0.8.0never had fix(cron): hide every app's secret from cron children, keep own bundle #16442, so nothing changes there.What changed (motivation → approach → change)
#16442 could break every app cron at once and was never run on a real sandbox. So it comes out whole, and comes back later in a safer shape.
This is a plain
git revertof the squash commit. Cron children go back to how they ran before #16442. That means #12518 is open again onmain: a cron child can read other apps'.app_secretuntil the re-land. It is already open onrelease/0.8.0.The revert undoes the mask in
src/kiro_crew/cron_script.py, the extra mask and read-only inputs insrc/kiro_crew/sandbox.py,src/kiro_crew/sandbox_launcher.pyandsrc/kiro_crew/sandbox_seatbelt.py, the cron call insrc/kiro_crew/slack/gateway.py, the two docs, and the tests (one test file is deleted).git diff origin/main...HEAD --name-onlylists exactly the 11 files #16442 touched. Two later commits (#16279, #16786) share one file,docs/system-specs/modules/learn-cron-dashboard.md. It merged cleanly, and their edits stay.Backwards compatibility
Compatible: cron children get back the exact view they had before #16442. App crons that read their own
.app_secretwork again.Reader: src/kiro_crew/cron_script.py:cron_apps_mask -- cron -- its only callers,
run_script_sandboxedandrun_command_sandboxedin the same file, are reverted with it;git grep cron_apps_maskon this head finds nothingReader: test/test_cron_apps_secret_mask.py:cron_apps_mask -- cron -- the test file that pinned #16442 is removed in this revert
Reader: docs/system-specs/modules/learn-cron-dashboard.md:apps-tree mask -- cron -- the spec line goes back to the pre-#16442 wording
Reader: origin/release/0.8.0 -- release -- never had
cron_apps_mask; nothing there reads itTests
No new tests. The revert removes
test/test_cron_apps_secret_mask.pyand #16442's edits to three sandbox tests. Targeted runs on this head:test/test_sandbox_mount_checked.py,test/test_sandbox_mount_pinned_target.py,test/test_sandbox_refactor_generated_programs.py,test/test_sandbox_launcher_*.py,test/test_sandbox_mount_source_sweep.py,test/test_sandbox_refactor_facade.py,test/test_sandbox_refactor_create_guard.py,test/test_cron_script*.py,test/test_slack_gateway.py,test/test_slack_gateway_cron_exec_coverage.py: 1240 passed, 2 skipped.test/test_sandbox_cron_child_audit.py: 11 passed.Manual verification
N/A — this puts back code that ran on
mainbefore #16442. The re-land must carry a real-sandbox run on bare Linux and macOS (plan on #12518).Related Issues
Refs #12518
The re-land plan: #12518 (comment)
Pattern harvest
Rule candidate: review-prompt
Pattern: a sandbox mask that fails closed for ALL apps when ONE app's input is bad; scope the refusal to the one app, and require a real-sandbox run before merge.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)