Skip to content

fix(cron): scan nested shell levels and resolved assignments for braces - #15344

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/cron-brace-scan-nested-levels
Sep 30, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/cron-brace-scan-nested-levels

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: the cron command brace-expansion refusal that #15253 added also covers brace groups hidden behind a third shell level or built from local assignments.

Follow-up to #15253 (thanks @bolichen97), which landed the #7414 port. Two review lanes on #15240 found shapes the scan on main still stores, and both reach a nested shell as a live brace group:

  • /bin/bash -c "/bin/bash -c cat\ /tmp/.q{s\,s}h/x": the escapes sit inside the outer double quotes, so they survive the one quote-removal projection the scan reads. The third shell sees .q{s,s}h. Verified: bash -c 'bash -c "bash -c echo\ p{s\,s}q"' prints psq psq.
  • A={; B=}; sh -c "cat /tmp/.q${A}s,s${B}h/x": the group only exists after the assignments resolve, and the scan reads the raw text. Verified: /bin/sh +B -c 'A={; B=}; sh -c "echo p${A}s,s${B}q"' prints psq psq.

Why it matters

Brace expansion builds a path the stored text never spells out, which is why #15253 refuses it at save time and at every fire. A group that slips past the scan can name any path, including a credential file, so it defeats the refusal in its own class.

Not a goal

What changed (motivation → approach → change)

_has_bash_brace_expansion in src/kiro_crew/mcp_cron.py scanned exactly two projections. It now scans the command, then each successive _strip_shell_quotes projection until quote removal changes nothing, under one step budget shared across levels. Levels 1 and 2 are unconditional. Level N past that is taken only when that level's own text names at least N-1 shell re-parsers (sh, bash, dash, zsh, ksh, ash, busybox, eval, ssh, su). Counting on the projection being entered, not the one just scanned, is what sees a second shell spelled \bash. Argv wrappers (env, timeout, nice, nohup, flock, xargs, find) are not counted: they exec their argument as words, so counting them refused the escaped BRE interval the refusal text recommends.

_vet_shell_command resolves local assignments once, refuses a resolved form over the same 8192-character ceiling, and runs the command-substitution, non-plain ${...} and brace checks on both the raw and the resolved form. A=$; B='(' then ${A}${B}printf ...) spells $( only after resolution. Assignment values now get the shell's own quote removal (_shell_quote_removal, measured equal to bash on 3,155 generated words), so PAT="[0-9]\{1,3\}" keeps its backslashes and B=s\h still becomes sh. The credential-path checks reuse the same resolved form.

Backwards compatibility

Breaking: a command cron whose resolved form exceeds 8192 characters, whose $( or non-plain ${...} only appears after its assignments resolve, or whose brace group only appears after a nested shell's quote removal or after local assignments resolve is now refused at save time and at every fire. Writer sweep on origin/main: cron_add/cron_update, portability._sanitize_imported_crons and vet_job_at_fire_time all route through _vet_shell_command. No other writer stores a command. echo hello and A=x; echo $A still pass.

Tests

In test/test_mcp_cron_security.py:

  • test_brace_scan_follows_every_nested_shell_level pins a group only the third shell expands and a four-level one.
  • test_brace_group_built_from_local_assignments_is_refused pins the A={; B=} shape.
  • test_composition_hidden_from_the_raw_text_is_refused pins the \bash second shell and the A=$; B='(' command substitution. Reverting the gate to count on the scanned level fails the first.
  • test_escaped_bre_interval_in_double_quotes_is_stored pins the BRE rewrite alone, behind timeout, behind flock + timeout, behind env + timeout, after find | xargs, and through PAT="..."; grep "$PAT".
  • test_assignment_values_get_the_shells_quote_removal pins bash's value for seven backslash and quote spellings.
  • test_resolved_form_over_the_ceiling_is_refused_fast pins that an 8189-character command resolving to about 8 MB is refused in under 2 s.
  • test_plain_command_with_a_local_assignment_is_stored pins that resolution refuses nothing ordinary.

Payloads use neutral /tmp targets, since the refusals key on the shape and not the path. Measured on this branch across test_mcp_cron_security.py, test_cron_script.py, test_cron_script_more_coverage.py and test_portability.py: 651 passed, 6 skipped. The two test_script_leaf_swap_never_reads_the_target failures reproduce on main on this host and are host-only.

Manual verification

Both bypass shapes were run in real bash on a host whose /bin/sh is bash (commands above), and each prints the expansion. _vet_shell_command stores both on main and refuses both on this branch.

Related Issues

Follow-up to #15253. Replaces #15240, which carried the same #7414 port and is being closed. Refs #7412.

Pattern harvest

Rule candidate: review-prompt
Pattern: a static scan that models "what a nested parser receives" with a fixed number of projections, or over the raw text only, misses the next level and the resolved form. Scan to a fixed point, over every form the sibling checks already resolve.

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 a review from a team as a code owner September 30, 2026 07:51
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

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

Design-Verdict: PASS

Verify the in-code residual — a brace group behind two-plus nested re-parses where one shell is unlisted — is a maintainer-accepted trade-off.

[DESIGN-REVIEWED] ca8f2ca

Description read

[DESCRIPTION-READ] 54a7bacb92f64f9bbfd455f664630fccc0e610bdc709bd65ea2fe98be4556524

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 Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of ca8f2ca407f40c5c4c155a10c512d7af20ed9f5d — 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: CONCERNS

Resolution now feeds three composition checks but skips _CRON_POSITIONAL_PARAM_RE and _CRON_SHELL_KEYWORD_RE; a positional composed from A=$ escapes every remaining net.

Not justified as shipped

  • Item 3 — symptom-level: the PR's own harvest rule says "scan… over every form the sibling checks already resolve", yet of the 5 raw-text composition checks in _vet_shell_command, 3 now scan composition_forms (src/kiro_crew/mcp_cron.py:1139-1155) and 2 still read only the raw command — _CRON_POSITIONAL_PARAM_RE (:1182) and _CRON_SHELL_KEYWORD_RE (:1191). By the same construction as this PR's A=$; B="(" test, A=$; sh -c "cat ~/.ss${A}1h/x" resolves to a $1 neither check sees, and the leftover net matches names only (_CRON_VAR_REF_RE, :227, [A-Za-z_]), unlike the secret-env case it does backstop.
    Clears when: those two checks scan the resolved form too, or the description states this sibling class is deliberately left at this level.
  • Item 7 — one consumer, generalized: _scan_one_level(command, budget: list[int] | None = None) — grepped _scan_one_level, one caller (src/kiro_crew/mcp_cron.py:688), which always passes a budget; the None branch has zero consumers.
    Subtraction: make budget required and delete the if budget is None default branch.
    Clears when: the deletion is made.

What this change ships

Inventory (7 items) — 5 justified

Intent: close two verified bypasses of the cron command brace-expansion refusal (#15253) — groups hidden behind deeper nested shells or built from local assignments. FIX.

  1. A brace group hidden behind a third or deeper nested shell is now refused — justified
  2. A brace group assembled from local variable assignments is now refused — justified
  3. $(, backticks and non-plain ${...} that appear only after assignments resolve are now refused — symptom-level (2 of 5 sibling checks left on raw text)
  4. A command whose variables resolve past 8192 characters is now refused, with new refusal text — justified
  5. Scan levels 3+ run only when the text names enough shell words; residual fail-open declared in the docstring — justified
  6. Assignment values resolve with bash-faithful quote removal, keeping the documented BRE rewrite accepted — justified
  7. _scan_one_level gains an optional shared-budget parameter — one consumer, generalized

[FIRST-PRINCIPLES-REVIEWED] ca8f2ca

Description read

[DESCRIPTION-READ] 22d16890e2a7faccc9323624e74483242bd00e8b438c5b1cca0e68ee234b255e

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 Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ human override accepted

Human judgment by @iamwhatever overrides the GPT 5.6 finding for ca8f2ca407f40c5c4c155a10c512d7af20ed9f5d; the recorded reason is authoritative for this commit.

[GPT-OVERRIDE] ca8f2ca

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:
/ai-review override gpt ca8f2ca407f40c5c4c155a10c512d7af20ed9f5d: <one-sentence reason>

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=ca4997b9adb7 rebutted (Item 4: budget=None default on _scan_one_level)

Disproportional to push for. The default is not a hole: a caller that omits budget gets a fresh _BRACE_SCAN_STEP_BUDGET for its one scan, which is exactly what main does today for each level. The only caller, _has_bash_brace_expansion, always passes the shared list. Making the argument required is a two-line tidy-up, but a push here re-runs every review lane on a security fix whose GPT lane has twice refused on this code's content. If a later change touches this function, it can make the parameter required then.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

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

Review details

Advisory only: the new composition_forms skips the positional-parameter refusal, so a $1 assembled from a local assignment still stores.

FINDING — src/kiro_crew/mcp_cron.py:1182 — _CRON_POSITIONAL_PARAM_RE.search(command) still reads only the raw text while the three checks above it now scan composition_forms, so A=\$; sh -c "cat ~/.aw${A}1s/credentials" passes every gate (raw has no $+digit; resolved spells $1s, which _CRON_VAR_REF_RE's leftover check skips because 1 is not [A-Za-z_], and which _CRON_CRED_PATH_RE misses because no variant spells .aws) and is stored — at fire time the inner sh -c expands $1 to empty and reads ~/.aws/credentials (readable under cc on macOS, and on Windows with no sandbox backend at all) → Fix: any(_CRON_POSITIONAL_PARAM_RE.search(form) for form in composition_forms), same for _CRON_SHELL_KEYWORD_RE and _CRON_SECRET_ENV_RE, or narrow the line-1115 comment to the three checks it actually describes.

[OPUS-REVIEWED] ca8f2ca

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

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

@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 Sep 30, 2026
@iamwhatever
iamwhatever force-pushed the fix/cron-brace-scan-nested-levels branch from 8f0f5ec to 12ac07f Compare September 30, 2026 08:35
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Opus review on 8f0f5ec: fixed (BLOCKING: resolved-form brace scan defeats the _CRON_MAX_COMMAND_SCAN bound)

Fixed in 12ac07f. Verified first: the reported shape at 8189 characters resolved to about 8 MB and took 22.6 s and 271 MB. _vet_shell_command now resolves once, refuses the resolved form past the same 8192-character ceiling before any per-character scan state is built, then scans it. test_resolved_form_over_the_ceiling_is_refused_fast pins the refusal and a 2 s bound. The advisory FINDING (the fixpoint refusing grep "[0-9]\{1,3\}") is fixed in the same commit: levels past the second are taken only while a re-parser is still named, and test_escaped_bre_interval_in_double_quotes_is_stored pins it.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=b9eb8b7af91b accepted-and-deferred (Watch: re-parser enumeration for levels 3+)

The split is deliberate: levels 1 and 2 refuse by default, and levels 3+ are gated on a named re-parser so the documented BRE rewrite grep "[0-9]\{1,3\}" stays accepted (the ungated walk refused it, which Opus flagged). The residual is a group behind two or more nested re-parses whose launcher is unlisted, which main does not catch at all today. The docstring reconciliation is text-only, and a push re-runs every lane on this security fix, so it is tracked in #15375.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=1bbcccd48edf accepted-and-deferred (Item 4: non-enumeration sentence contradicts the level-3 gate)

Correct: the retained sentence holds for levels 1-2 and not for 3+. The gate is what keeps the documented BRE rewrite accepted, and every level it skips was unscanned on main, so nothing that main refuses is now allowed. Fixing the sentence is text-only; tracked in #15375 rather than re-running every lane on this security fix.

@iamwhatever
iamwhatever force-pushed the fix/cron-brace-scan-nested-levels branch from 12ac07f to e074b8f Compare September 30, 2026 09:51
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Opus review on 12ac07f: fixed (BLOCKING: one launcher opens level 3 and refuses the BRE rewrite)

Fixed in e074b8f. Level N past the second now needs at least N-1 named re-parsers (a count, not a presence test), so timeout 60 grep "[0-9]\{1,3\}" f is stored while the three-level bash -c case and the A={; B=} case stay refused. The docstring paragraph that said enumeration is avoided now states the split (levels 1-2 refuse by default, 3+ count re-parsers) and its residual. test_escaped_bre_interval_in_double_quotes_is_stored covers the launcher form.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 30, 2026
@iamwhatever

iamwhatever commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=cb6f60f00e34 needs-a-decision (Watch: two launchers open level 3 with no shell)

Confirmed: find /tmp -name "*.log" | xargs grep "[0-9]\{1,3\}" is refused, because find and xargs count as two re-parsers. find -exec grep "[0-9]\{1,3\}" {} + is stored. This over-refuses; it does not open a bypass. xargs and find are counted on purpose: find ... -exec sh -c and xargs sh -c really do re-parse, and a launcher-vs-parser split fails open whenever the shell word is spelled in a way the list misses.
Maintainer: this PR has reached its last push on this scan. The maintainer accepted this over-refusal; the shell-token gate is tracked in #15380.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=899954dbc58f needs-a-decision (Suggestion: count only words that perform quote removal)

Same decision as the Watch above: counting only shells/eval/busybox narrows the over-refusal but trusts the list to spell every shell a launcher can reach (xargs -I{} bash -c, env -S, a path to an interpreter). This PR is at its last push on the scan; the maintainer decides whether that trade belongs in a follow-up.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=ed4d0e2c7f28 rebutted (Item 6: budget=None default on _scan_one_level)

Same ruling as on the earlier head: omitting budget gives a fresh _BRACE_SCAN_STEP_BUDGET for one scan, which is what main does per level today, so it is not a hole. The only caller always passes the shared list. This PR has reached its last push on this scan, and a two-line tidy-up does not justify re-running every lane.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=02904f6955d9 needs-a-decision (resolved literals mistaken for brace expansion)

Confirmed as an over-refusal, not a bypass: A="{"; B="}"; echo "${A}1,3${B}" prints {1,3} in bash and is refused here, because the resolved form is scanned at level 1 where bash never brace-expands a parameter expansion. The refusal is loud: cron_add names it, and an import drop is listed in the summary and audited. The suggested fix (scan the resolved form only when a re-parser consumes it) is small, but this PR has reached its last push on this scan by maintainer ruling.
Maintainer: please record an override for this head, or ask for the gate in the follow-up issue #15380 alongside the launcher over-refusal.

@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 Sep 30, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt e074b8f: false positive only (quoted brace built from variables is refused, fail-closed); tracked in #15380

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@iamwhatever marked the gpt AI finding as false positive, not applicable, or explicitly accepted for e074b8f4d036e41fb2ccd1bef81d0f4dcdae9e24.

false positive only (quoted brace built from variables is refused, fail-closed); tracked in #15380

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 30, 2026
@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 Sep 30, 2026
@iamwhatever
iamwhatever force-pushed the fix/cron-brace-scan-nested-levels branch from e074b8f to cae00a8 Compare September 30, 2026 17:45
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 30, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=02904f6955d9 needs-a-decision (pass-through launchers drop valid imported crons)

Confirmed as an over-refusal, not a bypass: env timeout 5 grep "[0-9]\{1,3\}" file is refused, because env and timeout each count as a re-parser and open level 3. It is the same class as the Design Watch already accepted on this PR (find | xargs grep). The refusal is loud: cron_add names it, and an import drop is listed in rejected_crons and audited. This PR is at its last push on this scan by maintainer ruling, and the fix (count only words that re-parse shell text) is tracked in #15380.
Maintainer: please record an override for this head.

… braces

Follow-up to #15253. The cron command vet read brace groups at two levels
over the raw text only, so several shapes reached a nested shell unseen:

- an escape inside the outer quotes survives the first removal, so
  `bash -c "bash -c cat\ p{s\,s}q"` expands only at the third shell;
- `A={; B=}` then `${A}s,s${B}` spells the group only after the
  assignments resolve, and `A=$; B='('` spells `$(` the same way.

The brace scan now follows quote removal until the text stops changing,
under one shared step budget. Level N past the second is taken only when
that level's own text names at least N-1 shell re-parsers; argv wrappers
such as env, timeout, flock, xargs and find are not counted, so the
documented BRE rewrite `grep "[0-9]\{1,3\}"` stays accepted behind them.

The vet resolves local assignments once, with the shell's own quote
removal so `PAT="[0-9]\{1,3\}"` keeps its backslashes, refuses a resolved
form over the 8192-character ceiling, and runs the command-substitution,
non-plain `${...}` and brace checks on both the raw and resolved forms.
@iamwhatever
iamwhatever force-pushed the fix/cron-brace-scan-nested-levels branch from cae00a8 to ca8f2ca Compare September 30, 2026 19:24
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Opus and GPT reviews on cae00a8: fixed in ca8f2ca.

Both Opus bypasses were confirmed on real bash first. bash -c "\bash -c cat\ p{s\,s}q" prints psq psq, and A=$; B="("; sh -c "echo p${A}${B}printf qq)q" prints pqqq. Both are now refused and pinned in test_composition_hidden_from_the_raw_text_is_refused.
Re-parsers are counted on the level being entered, and only shells count: sh, bash, dash, zsh, ksh, ash, busybox, eval, ssh, su. Assignment values get the shell's own quote removal, measured equal to bash on 3,155 generated words. The $( and non-plain ${ checks run on the raw and resolved forms. The resolved form is computed once, and the numbered docstring contract states the level-3 gate.
These are now stored: env timeout 5 grep "[0-9]\{1,3\}", flock ... timeout 60 grep "[0-9]\{1,3\}", find | xargs grep "[0-9]\{1,3\}" and PAT="[0-9]\{1,3\}"; grep "$PAT".

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=02904f6955d9 rebutted (raw-forbidden commands can exhaust memory before rejection)

Measured on this head, it does not reproduce. _substitute_local_assignments caps each stored value at _CRON_MAX_EXPANDED_VALUE (5000) and tracks at most _CRON_MAX_ASSIGNMENTS (64) names, so doubling stops after about 12 steps. The reported shape (A0=ab plus 30 doubling assignments plus echo $(true)) is refused in 0.03 s at 73 MB peak RSS. The worst case I could build under the 8192-character ceiling (62 doubling assignments, then $A62 repeated to the ceiling, plus $(true)) is refused in 0.15 s at 92 MB. Both go through the resolved-length refusal, which runs before any per-character scan state is built.
Maintainer: please record an override for this head.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=a9bd2da1295c accepted-and-deferred (Item 3: two raw-only composition checks)

The positional-parameter and loop-keyword refusals still read only the raw text. Neither composes a path by itself: a resolved $1 or for still needs a second parse to act, and this PR is at its last push on this scan by maintainer ruling. Tracked in #15380, which now lists running those two on the resolved form.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=4cb4a419b09e rebutted (Item 7: budget=None default on _scan_one_level)

Same ruling as on the earlier heads: omitting budget gives one fresh _BRACE_SCAN_STEP_BUDGET, which is what main does per level today, so it is not a hole. The only caller always passes the shared list, and this PR is at its last push on this scan.

@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 Sep 30, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt ca8f2ca: The OOM this claims requires unbounded value growth, but mcp_cron.py:916 truncates every stored value to 5000 chars, :915 caps tracked names at 64, and :1085 refuses a raw command over 8192 before resolution runs, so the pre-refusal allocation is bounded to tens of MB (pinned at test/test_mcp_cron_security.py:444) rather than exponential.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@iamwhatever marked the gpt AI finding as false positive, not applicable, or explicitly accepted for ca8f2ca407f40c5c4c155a10c512d7af20ed9f5d.

The OOM this claims requires unbounded value growth, but mcp_cron.py:916 truncates every stored value to 5000 chars, :915 caps tracked names at 64, and :1085 refuses a raw command over 8192 before resolution runs, so the pre-refusal allocation is bounded to tens of MB (pinned at test/test_mcp_cron_security.py:444) rather than exponential.

This decision applies only to this commit. A new push requires a new judgment.

@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 Sep 30, 2026
@chenmingwei23
chenmingwei23 merged commit 481476a into main Sep 30, 2026
142 of 145 checks passed
@chenmingwei23
chenmingwei23 deleted the fix/cron-brace-scan-nested-levels branch September 30, 2026 23:23
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 30, 2026
bolichen97 added a commit that referenced this pull request Oct 1, 2026
…release/0.8.0 (#15631)

* fix(security): backport the MCP registry, config seal, cron brace and folder-picker fixes (#14629, #14748, #14486, #15344)

Backport of #14629, #14748, #14486, #15344 to release/0.8.0, cherry-picked in main's merge order.

* fix(knowledge): require a direct local request for the native folder picker (#14629)
  (cherry picked from commit a25b321)
* fix(security): write-protect the kiro-cli MCP registry (#14748)
  (cherry picked from commit d55957e)
* fix(sandbox): mount config.json and config.local.json read-only (#14486)
  (cherry picked from commit 909e0fc)
* fix(cron): scan every nested shell level and resolved assignments for braces (#15344)
  (cherry picked from commit 481476a)

Co-authored-by: Joe Guo <zejiangg@amazon.com>
Co-authored-by: leonlaiyc <276034861+leonlaiyc@users.noreply.github.com>
Co-authored-by: Leon <leon.lai.yc@gmail.com>

* fix(security): backport the apps-tree cron mask, listener-scoped credentials and dev-fleet git hardening (#13273, #13929, #14960, #13348)

Backport of #13273, #13929, #14960, #13348 to release/0.8.0, cherry-picked in main's merge order.

* fix(cron): mask the apps tree from every cron child that runs model-supplied code (#13273)
  (cherry picked from commit 0496784)
* fix(electron): scope the local-token mint to the dialed listener (#13929)
  (cherry picked from commit 497361d)
* fix(instances): pair the internal-API credential read with the dialed listener (#14960)
  (cherry picked from commit 2087cde)
* fix(dev-fleet): harden every git read, and resolve the base branch per repository (#13348)
  (cherry picked from commit 64b0a33)

Co-authored-by: kirocrew-agent <agent@kirocrew.local>
Co-authored-by: wave1 verify <worker@localhost>

---------

Co-authored-by: Joe Guo <zejiang.guo@gmail.com>
Co-authored-by: Joe Guo <zejiangg@amazon.com>
Co-authored-by: leonlaiyc <276034861+leonlaiyc@users.noreply.github.com>
Co-authored-by: Leon <leon.lai.yc@gmail.com>
Co-authored-by: Raymond Chen <45910466+chenmingwei23@users.noreply.github.com>
Co-authored-by: kirocrew-agent <agent@kirocrew.local>
Co-authored-by: wave1 verify <worker@localhost>
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.

2 participants