Repository navigation
docs(openspec): plan #2735 refuse LESS in subprocess env guard - #2858
Merged
dan-petty merged 1 commit intoOct 31, 2026
Merged
Conversation
Closed
2 tasks done
devops-cli-service
Bot
force-pushed
the
fix/2735-the-subprocess-environment-guard-accepts-less
branch
from
October 31, 2026 13:02
654c786 to
dee6e4c
Compare
Closed
5 tasks
dan-petty
marked this pull request as ready for review
October 31, 2026 13:14
dan-petty
deleted the
fix/2735-the-subprocess-environment-guard-accepts-less
branch
October 31, 2026 13:18
This was referenced Oct 31, 2026
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 #2735
build_subprocess_env accepts LESS, which less(1) reads as options. An option starting with +! runs a shell command. Git and gh use less as their default pager, so a caller override of LESS is a code-execution path for their children. A probe with less 668 confirmed execution via git --paginate and gh help reference. This change adds LESS to CONST_CODE_LOADING_ENV_PATTERNS so that _is_env_override_refused raises SecurityError for any caller override of LESS, in upper or lower case, with or without isolation. The existing refusal of LESSOPEN and LESSCLOSE is unchanged. The fix is one key added to a constant and one test case. No project code sets or reads LESS for a child process, so no caller breaks.
Change:
openspec/changes/2735-the-subprocess-environment-guard-accepts-less/