fix(security): 2 improvements across 2 files#354
Conversation
- Security: Command injection risk in signing script via shell command construction - Security: Renderer-exposed IPC allows arbitrary shell command execution Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Command injection risk in signing script via shell command construction - Security: Renderer-exposed IPC allows arbitrary shell command execution Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
|
@tomaioo is attempting to deploy a commit to the Raphael's projects Team on Vercel. A member of the Team first needs to authorize it. |
Security Audit ReviewChange 1:
|
Summary
fix(security): 2 improvements across 2 files
Problem
Severity:
High| File:packages/launcher/scripts/azure-sign.js:L57The Windows signing helper builds a shell command string with unescaped values (
endpoint,account,certProfile, andfilePath) and executes it withexecSync. If any of these values contain shell metacharacters (or iffilePathis attacker-controlled in a compromised build environment), arbitrary command execution can occur during CI/build.Solution
Avoid string-based shell execution. Use
execFileSync/spawnSyncwith argument arrays, and validate/whitelist expected formats for environment variables and file paths before execution.Changes
packages/launcher/scripts/azure-sign.js(modified)packages/launcher/src/main/preload.js(modified)