Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix execa framework secrets leakage via extendEnv - #425

Open
google-labs-jules[bot] wants to merge 3 commits into
mainfrom
sentinel-execa-extendenv-fix-17946211858758838335
Open

πŸ›‘οΈ Sentinel: [CRITICAL] Fix execa framework secrets leakage via extendEnv#425
google-labs-jules[bot] wants to merge 3 commits into
mainfrom
sentinel-execa-extendenv-fix-17946211858758838335

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: execa defaults extendEnv to true, which re-injects the unfiltered process.env even when a sanitizeEnvironment() object is explicitly passed to the env argument, leaking framework secrets (e.g. API keys).
🎯 Impact: System secrets, API keys, and sensitive environment variables could be exposed via subprocess spawned context or command injection.
πŸ”§ Fix: Explicitly merged process.env and opts.env, ran sanitizeEnvironment() on the result, and passed it to env while setting extendEnv: false on execa in runner.ts and non-interactive.ts.
βœ… Verification: Ran npx oxfmt --write and full bun run test:full locally; confirmed execa in tools and capabilities no longer forwards unsanitized environment.


PR created automatically by Jules for task 17946211858758838335 started by @YoungSx

Explicitly set `extendEnv: false` and explicitly pass the merged sanitized environment everywhere `execa` is used across the codebase, particularly in the core CLI capabilities and tool auth boundaries. This fixes a high-priority risk where unmodified process.env would be implicitly injected.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Explicitly set `extendEnv: false` and explicitly pass the merged sanitized environment everywhere `execa` is used across the codebase, particularly in the core CLI capabilities and tool auth boundaries. This fixes a high-priority risk where unmodified process.env would be implicitly injected. Fixes ESLint import order errors preventing CI from passing.
Explicitly set `extendEnv: false` and explicitly pass the merged sanitized environment everywhere `execa` is used across the codebase, particularly in the core CLI capabilities and tool auth boundaries. This fixes a high-priority risk where unmodified process.env would be implicitly injected. Fixes ESLint import order errors preventing CI from passing by applying facade exports appropriately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants