Skip to content

docs(openspec): plan #2747 refuse pytest and npm env keys in guard - #2870

Merged
dan-petty merged 1 commit into
mainfrom
fix/2747-the-subprocess-environment-guard-accepts-the
Oct 31, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/2747-the-subprocess-environment-guard-accepts-the

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #2747

Add PYTEST_ADDOPTS and the NPM_CONFIG_* family to CONST_CODE_LOADING_ENV_PATTERNS so that build_subprocess_env raises SecurityError for caller overrides of these keys. PYTEST_ADDOPTS lets pytest write a JUnit file or load a plugin. NPM_CONFIG_* keys let npm write a log or cache file into a caller-named directory. The guard already refuses the same kind of key for curl, git, Python, Node.js and the glibc loader. This change closes the gap for pytest and npm, using the same fnmatch pattern mechanism and the same constant. No new code path is added; two entries join the existing tuple.

Change: openspec/changes/2747-the-subprocess-environment-guard-accepts-the/

@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 13:59
@dan-petty
dan-petty self-requested a review as a code owner October 31, 2026 13:59
@dan-petty
dan-petty merged commit 256e8e4 into main Oct 31, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2747-the-subprocess-environment-guard-accepts-the branch October 31, 2026 13:59
dan-petty added a commit that referenced this pull request Nov 1, 2026
This pull request corrects the plan for issue #2747. The Service staged
the plan in pull request #2870.

The corrected plan makes the subprocess environment guard refuse two
more keys: PYTEST_ADDOPTS and npm_config_logs_dir. Probes showed these
keys. No caller sets them.

The plan keeps npm_config_cache and the rest of the npm_config_* family
accepted. It now states the reason. The install_npm_tool function sets
npm_config_cache, so a refusal would need a code change.

The change touches only the plan folder. It changes no code and no test.

Plans #2747
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.

1 participant