Skip to content

fix: prevent shell options from environment variables - #1508

Open
andrewcodess wants to merge 1 commit into
google:mainfrom
andrewcodess:fix-1435
Open

fix: prevent shell options from environment variables#1508
andrewcodess wants to merge 1 commit into
google:mainfrom
andrewcodess:fix-1435

Conversation

@andrewcodess

Copy link
Copy Markdown

Fixes #1435.
This change prevents ZX_SHELL, ZX_PREFIX, and ZX_POSTFIX from being used to configure shell execution through environment variables.
Changes
Removed shell, prefix, and postfix from ENV_OPTS in src/core.ts.
Updated docs/cli.md to document the security restriction.
Removed the ZX_SHELL environment-variable example from docs/shell.md.
Existing CLI and JavaScript API configuration remains available.
Testing
The relevant behavior was manually verified:
ZX_PREFIX is no longer loaded.
ZX_POSTFIX is no longer loaded.
ZX_SHELL is no longer loaded from the environment.
Other supported environment variables continue to work.
The full local test/pre-push suite could not be completed in my Windows environment due to environment-specific failures in the size, license, and circular-dependency checks.

@google-cla

google-cla Bot commented Aug 23, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@andrewcodess andrewcodess reopened this Aug 24, 2026
@andrewcodess andrewcodess reopened this Aug 24, 2026
@andrewcodess
andrewcodess deleted the fix-1435 branch August 24, 2026 03:28
@andrewcodess
andrewcodess restored the fix-1435 branch August 24, 2026 03:38
@andrewcodess andrewcodess reopened this Aug 24, 2026
@andrewcodess andrewcodess reopened this Aug 24, 2026
@andrewcodess andrewcodess reopened this Aug 24, 2026
@andrewcodess andrewcodess reopened this Aug 24, 2026
@andrewcodess andrewcodess reopened this Aug 24, 2026
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.

[Bug]: ZX_PREFIX / ZX_POSTFIX allow implicit global command injection via environment variables

1 participant