Repository navigation
Conversation
🚨 Severity: HIGH
💡 Vulnerability: The `runSandboxedNodeScript` and `runSandboxedNodeScriptAsync` functions in `packages/core/src/sandbox.ts` were passing `options.env` directly to Node's `child_process.spawn()` and `spawnSync()`. When `options.env` is `undefined` (which it is by default), Node.js automatically inherits `process.env` from the host. This silently leaks sensitive host environment variables (e.g. API keys, secrets) into the sandboxed scripts execution.
🎯 Impact: Untrusted code running in the sandbox could access sensitive credentials from the host environment, bypassing the intended isolation.
🔧 Fix: Updated the `env` option in the spawn calls to `env: options.env ?? {}`, explicitly preventing environment variable inheritance unless an environment is explicitly supplied.
✅ Verification: Ran a test within `SecureSandbox` checking `process.env.PATH` and verified it evaluates to undefined. All unit tests pass.
Co-authored-by: connerkup <72580335+connerkup@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Deploying shielded-shell with
|
| Latest commit: |
276f9d7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://52501a40.shielded-shell.pages.dev |
| Branch Preview URL: | https://sentinel-sandbox-env-leak-88.shielded-shell.pages.dev |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🚨 Severity: HIGH
💡 Vulnerability: The
runSandboxedNodeScriptandrunSandboxedNodeScriptAsyncfunctions inpackages/core/src/sandbox.tswere passingoptions.envdirectly to Node'schild_process.spawn()andspawnSync(). Whenoptions.envisundefined(which it is by default), Node.js automatically inheritsprocess.envfrom the host. This silently leaks sensitive host environment variables (e.g. API keys, secrets) into the sandboxed scripts execution.🎯 Impact: Untrusted code running in the sandbox could access sensitive credentials from the host environment, bypassing the intended isolation.
🔧 Fix: Updated the
envoption in the spawn calls toenv: options.env ?? {}, explicitly preventing environment variable inheritance unless an environment is explicitly supplied.✅ Verification: Ran a test within
SecureSandboxcheckingprocess.env.PATHand verified it evaluates to undefined. All unit tests pass.PR created automatically by Jules for task 8850327109384204980 started by @connerkup