fix(security): replace eval-style interpolation with env var in allowOpenClawPreviewOrigin (#3217)

Pass the preview origin via SPAWN_PREVIEW_ORIGIN env var instead of
interpolating it into the Node.js inline script, preventing potential
command injection if a malicious preview URL were returned by the API.

Fixes #3215

Agent: security-auditor

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-04-06 23:09:45 -07:00 committed by GitHub
parent 00d5a8cd58
commit 52550dbdca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.31.2",
"version": "0.31.3",
"type": "module",
"bin": {
"spawn": "cli.js"