fix(security): validate remotePath and harden base64 interpolation in uploadConfigFile (#2669)

Add strict character validation for remotePath to prevent command injection
via crafted paths. Use shellQuote for tempRemote in the shell command. Add
a base64 output assertion to document and enforce the safety of single-quoted
interpolation for settingsB64.

Fixes #2668

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-03-15 19:04:19 -07:00 committed by GitHub
parent 6b2001def4
commit 4f4b535c8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 27 additions and 2 deletions

View file

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