Skip to content

test: pin comment and expansion handling in the shell char walk - #14620

Closed
iamwhatever wants to merge 1 commit into
mainfrom
fix/shell-chars-parameter-expansion-9241
Closed

iamwhatever wants to merge 1 commit into
mainfrom
fix/shell-chars-parameter-expansion-9241

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #9241 (in-repo PR so CI can run; original is a fork PR by @aniruddhaadak80, preserved as commit author + Co-authored-by).

Problem / Motivation

Goal: Pin the shell-char-walk behavior that already exists in _iter_shell_chars / _matching_close_paren for ${...} parameter expansion and # comment handling, so a future regression fails a named test rather than silently allowing a self-kill.

_iter_shell_chars already emits ${...} interior chars as active=False (a ) inside cannot close a $(...) span), and _matching_close_paren already folds # comments via _opens_comment. These tests pin that behavior.

Why it matters

Without tests, any change to the shell-char walk that re-introduces truncation at a ) inside ${...} or at a ) after a # comment would land silently. Three bash 5.2 shapes that the gate must deny (where the comment or the bare-paren default masks the pgrep operand) are now pinned as named regression tests.

Not a goal

The production-code changes from wip/shell-char-walk-expansion (a new _scan_substitution_close scanner and shared _QuoteState) are NOT included here. Those had confirmed security regressions (three bash 5.2 self-kill shapes main denies were allowed; 2.5 KB input went 1.7 s → 10.7 s). They remain on wip/shell-char-walk-expansion as follow-up work.

What changed (motivation → approach → change)

Tests only; no production code changed.

test/test_security.py — 7 new methods:

  • test_expansion_close_ignores_quoted_braces — a quoted } inside ${...} is literal per POSIX 2.6.2 and must not close the expansion.
  • test_expansion_interior_reports_its_own_quote_state — interior chars report their own quote state so a single-quoted $( reads as data, not a live substitution.
  • test_expansion_nests_only_on_dollar_brace — a bare { does not open an expansion; only ${ does.
  • test_ansi_c_hidden_self_kill_is_denied — a self-kill hidden behind an ANSI-C $'\'' inside ${...} is still DENIED.
  • test_comment_inside_nested_substitution_is_skipped_by_gate — a # comment inside a nested $(...) must not make ) or } reach the outer walk as structural closers. Pins three bash 5.2 shapes where the gate must deny.
  • test_a_hash_right_after_an_empty_substitution_is_a_word_not_a_comment — a # right after $() opens a comment only if a word break precedes it.
  • test_an_interior_quote_opener_is_syntax_not_a_quoted_run — an interior quote delimiter is syntax for the frame it opens from, not quoted data.

test/test_security_gate_liveness.py — 4 new functions:

Backwards compatibility

Tests only; no production code changed.

Tests

All 11 new tests pass on unmodified origin/main — verified locally before pushing.

Manual verification

N/A — tests only.

Screenshots / video

N/A

Related Issues

Closes #9181
Supersedes #9241

Pattern harvest

N/A

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

By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.

@iamwhatever
iamwhatever requested a review from a team as a code owner September 28, 2026 04:24
@iamwhatever iamwhatever added the drive-to-green PR claimed by drive-to-green pipeline label Sep 28, 2026
@iamwhatever iamwhatever self-assigned this Sep 28, 2026
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

The new test docstrings describe fixes that main does not contain. A future maintainer will look for the wrong mechanism when one of these pins fails.

Watch

  • Docstrings describe code from the wip branch. The PR says the _scan_substitution_close / _QuoteState work "remain[s] on wip/shell-char-walk-expansion". The docstrings still state that work as fact: "Before the shared quote model…", "An interior quote DELIMITER now reports the ENCLOSING state", "The shared work budget keeps it linear", "a full _expansion_span". Of the names I grepped, _expansion_span and _QuoteState do not exist in src/kiro_crew/security/, and "work budget" appears nowhere. The pins are meant as a regression tripwire. When one fires, its docstring sends the reader to a mechanism that does not exist, so they cannot tell whether the bug is a regression on main or the wip refactor landing. The liveness tests also name the "fix" that "bounded the failed scan" as the reason they pass, but they pass on main for some other reason that nobody has written down.
  • Clears when: each docstring states the behaviour it pins and the main-side code that provides it today (_iter_shell_chars, _matching_close_paren, _opens_comment), with no wording that assumes the wip scanner or a work budget exists.

[DESIGN-REVIEWED] 18bf21c

Description read

[DESCRIPTION-READ] 472bbb1ef1ed5b486d917c1b7c53781cc8b6a0b45367759a64ca23f67eb6839e

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

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 18bf21c

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

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 18bf21cf4585a3e65d852ca0b54f1c6f48471c1a ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Advisory — does not block merge.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review -- 🟡 CONCERNS

Which legitimate operations does b60e9d8b3e64a996bcc3e0501780518745eeb73b newly refuse? Updated in place on each push. A script-confirmed regression blocks; the model proposes candidates and never decides a refusal.

Verdict basis: the reviewer's own judgement; no confirmed regression.

Security scope review -- adjudicated candidates

  • macos-latest (platform posix): 16 classified, 0 newly refused, 15 still allowed.
  • ubuntu-latest (platform posix): 16 classified, 0 newly refused, 15 still allowed.
  • windows-latest (platform windows): 4 classified, 0 newly refused, 4 still allowed.

No candidate flipped from allowed to refused.

Scope-Verdict: CONCERNS

TIGHTENING: _iter_shell_chars (the shared quote/escape walk that feeds segment splitting, _split_shell_words, _substitution_bodies, the git-push token reader and the self-protection kill floor in argv_floor) now parses unquoted ${...} parameter expansion as a span. The hunk is if ch == "$" and i + 1 < n and text[i + 1] == "{" and not st.prev_dollar: ... close = _expansion_span(text, i, budget); if close is not None: yield from _yield_expansion(...). It yields the span's interior active=False, and it shares one ANSI-C-aware _advance_quote across the four walks. The one threat it refuses: a literal ) / } / escaped $'\'' inside a ${...} default that cut a $(...) body short, hiding a trailing self-kill. The PR's test pins this case: is_denied("kill $(true ${v:-$'\\''}x) ; pkill -f kirocrew") is not None.

ADJUDICATED: 20 candidates, 0 confirmed newly-refused (no harness verdicts were handed to this review; none is claimed)

PLATFORM COVERAGE: posix: 16 rows. They cover the new unquoted ${...} branch in every position the diff reaches:

  • a bare word (echo ${KIROCREW_HOME:-$HOME/.kiro/crew}, the prepare-pr resolution step)
  • path position before a script (the web-verify downscale call)
  • a git refspec (git push -u origin ${BRANCH:-feat/example})
  • before and after ; / && separators
  • inside a $(...) body on the kill floor (kill $(cat ${TMPDIR:-/tmp}/devserver.pid))
  • a bare kill target, and a pgrep status query
  • a % suffix-strip operator
  • two adjacent expansions in one word
  • a nested $(...) inside a default

One double-quoted control row checks that the qstate == 0 guard leaves quoted spellings alone. windows: 4 rows using PowerShell's ${env:USERPROFILE} / ${LASTEXITCODE}. That is the one Windows spelling that also starts with ${, so it reaches the new branch, and backslash separators come right after the closing }, where the posix walk treats \ as an escape. cmd's %VAR% contains no ${, so the change cannot touch it, and no row was spent on it. The diff makes no path, separator, executable-name or interpreter assumption beyond bash ${...} grammar, so this covers both hosts' spellings of it.

UNADJUDICATED: No verdict for this run was handed to this review, so the adjudicated set above is unmeasured rather than empty-and-green. That gap is the reason for CONCERNS. The guard sits entirely in the shell-command composite (is_denied → self-protection floor / push reader → _iter_shell_chars), so all 20 candidates can be classified. The per-leg fold settles them, and PASS stands only if every row comes back allowed on both the base and head refs. One possible over-match is argued, not confirmed. Interior whitespace in an unquoted ${v:-a b} is now inactive, so _split_shell_words returns it as one word. That matches bash's parse-time word, but any consumer that relied on the old split would now see a fused word. No legitimate daily operation that this would refuse was found, so it is not encoded as a row.

[SCOPE-REVIEWED] b60e9d8

@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from eb4cceb to f48fa54 Compare September 28, 2026 04:42
@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 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 18bf21c

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

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

@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from f48fa54 to a32b801 Compare September 28, 2026 05:23
@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 28, 2026
@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from a32b801 to 69a783b Compare September 28, 2026 05:45
@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 28, 2026
@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from 69a783b to f51f25c Compare September 28, 2026 06:07
@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 28, 2026
@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch 2 times, most recently from 0045360 to 3a4836e Compare September 28, 2026 08:19
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 30, 2026
@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from 387428b to 8f89c8b Compare October 1, 2026 07:02
@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 merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Oct 1, 2026
@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from 8f89c8b to cc83a7b Compare October 1, 2026 07:13
@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 Oct 1, 2026
@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from cc83a7b to ea6b6ad Compare October 1, 2026 07:38
@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 Oct 1, 2026
@iamwhatever
iamwhatever force-pushed the fix/shell-chars-parameter-expansion-9241 branch from ea6b6ad to e7d9437 Compare October 1, 2026 08:07
@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 Oct 1, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt e7d9437: GPT declines to review on the diff's shell-injection test strings (a provider content refusal, not a finding); re-runs re-sample it. All deterministic gates plus Design, First Principles, UX and Opus 5 are green on this head.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override scope e7d9437: Security Scope Review's own verdict on this head is PASS (adjudicated, zero confirmed regressions, 0 newly refused on all platforms); the red is a per-head monotonic floor latched from an earlier installation rate-limit fail-closed, not a confirmed regression.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

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

GPT declines to review on the diff's shell-injection test strings (a provider content refusal, not a finding); re-runs re-sample it. All deterministic gates plus Design, First Principles, UX and Opus 5 are green on this head.

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

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

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

Security Scope Review's own verdict on this head is PASS (adjudicated, zero confirmed regressions, 0 newly refused on all platforms); the red is a per-head monotonic floor latched from an earlier installation rate-limit fail-closed, not a confirmed regression.

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

@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt fddf709: GPT declines to review on the diff's shell-injection test strings (a provider content refusal, not a finding); re-runs re-sample it. All deterministic gates plus Design, First Principles, UX and Opus 5 are green on this head.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

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

GPT declines to review on the diff's shell-injection test strings (a provider content refusal, not a finding); re-runs re-sample it. All deterministic gates plus Design, First Principles, UX and Opus 5 are green on this head.

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

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Pausing here for a maintainer design decision

First, thank you to the reviewers — Opus 5 and GPT 5.6 in particular. Each round caught a real deny→allow self-kill bypass with a concrete payload, and that is exactly what kept a subtly-wrong scanner from merging.

Retrospective — the fix keeps relocating the bug

Every round closed the finding it was handed and the next round found a different fidelity gap in the same hand-rolled ${...} / $(...) / # sub-parser:

  1. RecursionError on deeply-nested $( — fixed by making the interior walk a loop with an explicit context stack.
  2. O(n²) rescan — a "${" * k flood rescanned to end-of-text at every opener — fixed with a shared per-call work budget.
  3. Opus round (two BLOCKs): #-comment branch opened a comment on a resumed slice after an empty $(); and the ${…} interior reported the post-transition quote state, dropping an opener and keeping its closer. Both fixed, each with a regression test that denies.
  4. GPT round, now, on 48f3807f (two BLOCKs): the fixes above exposed two more.

The two current blocking payloads (48f3807f)

  • shell_normalizer.py:2257 — budget exhaustion reactivates the delimiter. A ~20,039-byte valid ${...} command passes the MAX_SCANNABLE_COMMAND_CHARS size check, the shared work budget then runs out, _expansion_span returns None, the ${ falls through so the interior ) becomes active, the body truncates before pgrep, and the self-kill is allowed where main denies.
  • shell_normalizer.py:2291 — a commented ) closes a nested substitution. kill $(echo ${v:-$(echo x # )\necho })}; pgrep -f kirocrew) — the ) sitting behind a # comment pops the context-stack frame, extraction omits pgrep, and the self-kill is allowed. (Dropping the generator's # branch in the previous round means the context-stack scan no longer folds comments away, so a #-commented ) inside a nested $(...) is miscounted.)

What is solid

  • One shared quote/escape/$-parity state machine (_QuoteState / _advance_quote) that every consumer walks — the original "two scanners drift" defect is gone by construction.
  • A single nesting-aware span scan (_scan_substitution_close) with one explicit context stack, replacing the earlier pair of hand-rolled matchers.
  • A growing, payload-backed regression suite: every finding above has a test that asserts is_denied denies the exact command bash runs.

The design question

The sequence RecursionError → O(n²) → Opus's two → GPT's two is one shape: a hand-maintained shell sub-parser accreting fidelity bugs one review at a time — the very thing the redesign set out to end, now relocated into the new scanners rather than removed. The real fork is:

  • Keep hardening the in-place ${...} / $(...) / # scanner, fixing :2257 (deny on budget exhaustion instead of treating the span as unclosed) and :2291 (fold comments through the newline before processing closing delimiters) — accepting that another gap may surface; or
  • Replace it with a single real bash tokenizer — one pass that models quotes, ${...}, $(...), backticks, # comments and case uniformly — that the span walkers and is_denied consume, so fidelity is a property of one grammar rather than several hand-rolled scanners.

We are pausing here and leaving this to a maintainer. The PR stays open; nothing further has been pushed and no overrides are posted on this head.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt 7be09e8: provider declined on diff content (shell-normalizer test corpus), not a finding; Opus 5.5, Security Scope (3 OS), CodeQL, First Principles, Design and Semgrep pass on this head; cron gate monotone 0/0 vs main; 11,100-shape fuzz found 0 runnable allows that main denies.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

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

provider declined on diff content (shell-normalizer test corpus), not a finding; Opus 5.5, Security Scope (3 OS), CodeQL, First Principles, Design and Semgrep pass on this head; cron gate monotone 0/0 vs main; 11,100-shape fuzz found 0 runnable allows that main denies.

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

Add regression tests for `${...}` parameter expansion and `#` comment
handling already present in the shell-char walk via `_iter_shell_chars`
and `_matching_close_paren` / `_opens_comment`.

## What these tests pin

**test_security.py (7 new methods in TestBuiltinDenyPatterns /
TestSubstitutionCloserReadsCommandGrammar):**

- `test_expansion_close_ignores_quoted_braces` — a quoted `}` inside
  `${...}` is literal per POSIX 2.6.2 and must not close the expansion.
- `test_expansion_interior_reports_its_own_quote_state` — interior chars
  report their own quote state so a single-quoted `$(` reads as data.
- `test_expansion_nests_only_on_dollar_brace` — a bare `{` does not open
  an expansion; only `${` does.
- `test_ansi_c_hidden_self_kill_is_denied` — a self-kill hidden behind an
  ANSI-C `$'\''` inside `${...}` is still DENIED.
- `test_comment_inside_nested_substitution_is_skipped_by_gate` — a `#`
  comment inside a nested `$(...)` must not make `)` or `}` reach the
  outer walk as structural closers.  Three shapes bash 5.2 runs where the
  gate must still deny: `${v:-$(echo # )\necho y)}`-style and the
  bare-paren-default `: ${v:-(}` shapes.
- `test_a_hash_right_after_an_empty_substitution_is_a_word_not_a_comment`
  — a `#` right after `$()` opens a comment only if a word break precedes.
- `test_an_interior_quote_opener_is_syntax_not_a_quoted_run` — an interior
  quote delimiter is syntax for the frame it opens from, not quoted data.

**test_security_gate_liveness.py (4 new functions):**

- `test_expansion_opener_flood_is_fast` / `test_self_kill_expansion_flood_is_fast`
  — a flood of unclosed `${` openers must not make the gate quadratic via
  the `is_sensitive_bash_command` entry point.
- `test_is_denied_single_trailing_brace_flood_is_fast` /
  `test_is_denied_self_kill_brace_flood_is_fast` — same flood through
  `is_denied` (no size ceiling; Opus finding #1 & #3 from #9241).

## What was NOT kept

Three tests from the earlier PR (#9241 / wip/shell-char-walk-expansion)
reference private functions (`_expansion_span`, `_skip_nested_substitution`)
that exist only on the wip branch; those are follow-up work.

## Related

Closes #9181
Supersedes #9241

Co-authored-by: cixuuz <26782336+cixuuz@users.noreply.github.com>

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes: this would close an open security bug with tests that pass on a walker that has no ${...} handling.

  1. PR body / commit message Closes #9181: ${...} is still not modelled on main (_iter_shell_chars has no ${ branch; _matching_close_paren counts every active )). The issue's repro, _substitution_bodies('kill $(echo ${v:-)}; pgrep -f kirocrew)') returning ['echo ${v:-'], is not pinned here. Use Refs #9181, or add the fix and a test for that exact repro.
  2. test/test_security.py:2862-2878 (test_ansi_c_hidden_self_kill_is_denied): pkill -f kirocrew sits after ;, outside the $(...), so it is denied whether or not the body is extracted. Put the self-kill inside the substitution, e.g. kill $(true ${v:-$'\''}x ; pkill -f kirocrew).
  3. test/test_security.py:2823-2860: both tests pass on main's walker, which treats {/} as plain active characters, so they do not pin the nesting or interior quote-state rule. Add assertions that tell the models apart (e.g. the { inside ${v:-{} is not active, or a ) inside the default via _substitution_bodies).
  4. test/test_security.py:2801-2821: both assertions pass only because of quote handling; no brace-span logic is involved.
  5. Docstrings at test/test_security.py:2866, :2880-2893, :3089-3108 and test/test_security_gate_liveness.py:322-327, :388-411 describe _expansion_span, _QuoteState and a work budget, which do not exist under kiro_crew/security/. Describe the behaviour pinned and the code that provides it today, or say they guard a future ${...} implementation.

AI-assisted review, posted at maintainer request.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Closing (owner decision). After the production change was dropped, this PR only adds tests that already pass on main, so it would close #9181 without fixing it. #9181 stays open. The earlier ${...} walker change is saved on wip/shell-char-walk-expansion for a redesign. Thanks @bolichen97 for the review.

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.

security: _iter_shell_chars does not model parameter expansion or comments, so a literal ) inside them truncates every substitution span

2 participants