rowboat/apps/x
aeonframework a2fb45a08f fix(security): close & (background) command-executor allowlist bypass
extractCommandNames() splits on shell separators to enumerate the
commands an LLM-generated shell string will invoke, then the allowlist
gate isBlocked() decides whether to ask the user for permission.

The split regex was missing single `&` (background separator), so:

  isBlocked('echo hi & rm -rf $HOME', new Set(['echo']))  // false

The parser saw only `echo`, but bash actually runs `echo hi` in the
background then immediately runs `rm -rf $HOME` — without prompting.

The cli copy of the parser was also missing backtick, `$(`, `(`, and
`)`, so command substitution and subshells (`echo \`rm /x\``,
`echo $(rm /x)`, `(rm /x)`) bypassed it the same way.

Fix: add `&` to both regexes (ordered after `&&` so leftmost-longest
match still picks `&&` first), and bring the cli regex up to parity
with the apps/x version.

Severity: high. CWE-78 (OS Command Injection), CWE-863 (incorrect
authorization).

Detected by Aeon + semgrep + manual parser review.
2026-05-10 19:35:03 +00:00
..
apps fix: resolve TS errors for unused fileContent state and missing JSX namespace 2026-05-09 00:42:03 +05:30
packages fix(security): close & (background) command-executor allowlist bypass 2026-05-10 19:35:03 +00:00
.gitignore chore: ignore test-fixtures dir 2026-05-08 17:04:25 +05:30
ANALYTICS.md feat: live notes — single objective per note replaces multi-track model 2026-05-09 00:30:43 +05:30
eslint.config.mts ignore renderer eslint 2026-01-16 12:05:33 +05:30
LIVE_NOTE.md feat: live notes — single objective per note replaces multi-track model 2026-05-09 00:30:43 +05:30
package.json integrate electron forge 2026-01-17 10:28:44 +05:30
pnpm-lock.yaml fix: context-aware folder/note creation in knowledge panel (#538) 2026-05-08 02:42:55 +05:30
pnpm-workspace.yaml fix pnpm postinstall 2026-01-21 10:47:44 +05:30
tsconfig.base.json bootstrap new electron app 2026-01-16 12:05:33 +05:30