diagnose-sandbox-report

Warn

Audited by Socket on Apr 16, 2026

1 alert found:

Security
SecurityMEDIUM
scripts/gather-sandbox-context.ts

The script is primarily a diagnostic tool, but it contains a high-severity code-execution risk in resolveExecutorSource: it uses execFileSync('node', ['-e', <template-literal code>]) and directly interpolates values derived from the executor string into JavaScript source. If an attacker can influence the executor/command value (directly or via manipulated Nx config/report/task resolution), this can enable arbitrary code execution. It also downloads and parses reports from arbitrary http(s) URLs, increasing supply-chain/remote content risk, and executes Nx commands based on taskId, enabling potential logic abuse/DoS in the environment. Recommend removing the node -e approach or strictly validating/sanitizing executor strings and using safer module resolution APIs without dynamic code generation.

Confidence: 68%Severity: 75%
Audit Metadata
Analyzed At
Apr 16, 2026, 11:00 AM
Package URL
pkg:socket/skills-sh/nrwl%2Fnx%2Fdiagnose-sandbox-report%2F@fbbbd30f2b6898a7faa9db4f77583fc484595d3e