diagnose-sandbox-report
Audited by Socket on Apr 16, 2026
1 alert found:
SecurityThe 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.