Skip to content

Validate sandbox sessionId to prevent command injection#4

Closed
ericksoa wants to merge 1 commit intomainfrom
vincentkoc-validate-sessionid
Closed

Validate sandbox sessionId to prevent command injection#4
ericksoa wants to merge 1 commit intomainfrom
vincentkoc-validate-sessionid

Conversation

@ericksoa
Copy link
Copy Markdown
Contributor

Migrated from NVIDIA/openshell-openclaw-plugin#17 by @vincentkoc

Summary

Validate sessionId on the /api/sandbox-chat path before it is used to build the sandbox execution command.

Changes

  • add normalizeSessionId() and require sessionId to match ^[A-Za-z0-9_-]{1,64}$
  • reject empty message values and invalid sessionId values with 400
  • use the normalized session id for logging and for the sandbox execution path

Testing

  • node --check .jensenclaw/server.js

Signed-off-by: Vincent Koc <vincentkoc@ieee.org>
@ericksoa
Copy link
Copy Markdown
Contributor Author

Egg was removed, closing issue

@ericksoa ericksoa closed this Mar 16, 2026
jessesanford pushed a commit to jessesanford/NemoClaw that referenced this pull request Mar 24, 2026
Fix Brev CLI link and add Brev account link in README
jyaunches pushed a commit to jyaunches/NemoClaw that referenced this pull request Apr 14, 2026
- Guard runArgv/runArgvCapture against shell:true to prevent security
  bypass (finding NVIDIA#1) — throws if a caller attempts to re-enable shell
  interpretation. Added 2 tests.
- Document the intentional bash -c exception in getOllamaWarmupCommand
  explaining why it's safe (finding NVIDIA#2).
- Remove dead getOpenshellCommand() from policies.ts (finding NVIDIA#3).
- Remove unused shellQuote import from nim.ts (finding NVIDIA#4).
- Fix brittle indexOf assertion in onboard-readiness test (finding NVIDIA#5).
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.

2 participants