Skip to content

fix(output): parse GUARDEX_COMPRESS_CMD with shell-quote awareness#650

Merged
NagyVikt merged 1 commit into
mainfrom
agent/claude/harden-guardex-compress-cmd-shell-quote-2026-06-18-11-43
Jun 18, 2026
Merged

fix(output): parse GUARDEX_COMPRESS_CMD with shell-quote awareness#650
NagyVikt merged 1 commit into
mainfrom
agent/claude/harden-guardex-compress-cmd-shell-quote-2026-06-18-11-43

Conversation

@NagyVikt

Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

resolveCompressCommand split the command on whitespace, so a value with
quoted args (e.g. sh -c "tr a-z A-Z") was mis-split into broken argv. Add
tokenizeCommand: honors single/double quotes + backslash escapes, returns
null on malformed input (unterminated quote or dangling backslash) so the
caller falls back to plain, uncompressed output. argv still runs via
spawnSync shell:false (no shell injection). Unset/plain values unchanged.

Tests: +5 (quoted parsing, malformed->null, quoted end-to-end transform,
deterministic timeout/partial-stdout fallback). 28 pass, 0 fail.

Follow-up to #649.
@NagyVikt NagyVikt merged commit 749ec0b into main Jun 18, 2026
@NagyVikt NagyVikt deleted the agent/claude/harden-guardex-compress-cmd-shell-quote-2026-06-18-11-43 branch June 18, 2026 09:50
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.

1 participant