Skip to content

fix(frontend): quote Claude resume commands#349

Open
herikwebb wants to merge 1 commit into
plmbr:mainfrom
herikwebb:security/fix-claude-resume-quoting
Open

fix(frontend): quote Claude resume commands#349
herikwebb wants to merge 1 commit into
plmbr:mainfrom
herikwebb:security/fix-claude-resume-quoting

Conversation

@herikwebb
Copy link
Copy Markdown
Contributor

Route Claude session resume launches through the shared command builder and shell-quote the transcript-derived session id before writing the command to a terminal. This prevents malicious session metadata from breaking out of claude --resume and executing shell commands when a user resumes a listed session.

Route Claude session resume launches through the shared command builder
and shell-quote the transcript-derived session id before writing the
command to a terminal. This prevents malicious session metadata from
breaking out of claude --resume and executing shell commands when a
user resumes a listed session.
@pjdoland pjdoland added the bug Something isn't working label May 26, 2026
Copy link
Copy Markdown
Collaborator

@pjdoland pjdoland left a comment

Choose a reason for hiding this comment

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

LGTM! The quoting fix is clean and correct: shellSingleQuote on sessionId closes the injection vector, and the deduplication through buildResumeCommand removes the inline copy that was missing CWD quoting too. Test coverage is solid, including the explicit breakout payload.

One small thing: CI is failing on a Prettier formatting issue in tests/ts/utils.test.ts. Running jlpm prettier --write tests/ts/utils.test.ts should clear it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants