Repository navigation
docs(openspec): plan #2747 refuse pytest and npm env keys in guard - #2870
Merged
dan-petty merged 1 commit intoOct 31, 2026
Merged
Conversation
2 tasks done
dan-petty
marked this pull request as ready for review
October 31, 2026 13:59
dan-petty
deleted the
fix/2747-the-subprocess-environment-guard-accepts-the
branch
October 31, 2026 13:59
This was referenced Nov 1, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/