- open-sse/executors/github.ts: replace the Math.random() fallback in
the Copilot correlation-id generators (x-request-id,
x-interaction-id, x-client-session-id, x-agent-task-id) with a
CSPRNG-backed randomIdFallback() (node:crypto randomBytes) — closes
js/insecure-randomness with no behavior change (crypto.randomUUID
stays the primary path).
- tests/unit/cli/_helpers/shellArgs.mjs: collapse the two sequential
global .replace() unescape passes into a single left-to-right regex
replace with alternation — closes js/double-escaping. The prior
two-pass form let the first pass's output feed the second, which is
exactly the double-(un)escaping bug pattern the query flags (e.g. an
escaped-backslash-then-quote sequence could be misread depending on
pass order).
Co-authored-by: Markus Hartung <mail@hartmark.se>
Validated on the combined 12-PR batch board: the touched CLI test files pass (alias-resolver-7791, run-command — incl. the new shellArgs helper), typecheck:core clean. Test-side only, no production behavior change. Thank you @pacocartones!