Skip to content

docs(openspec): plan #2735 refuse LESS in subprocess env guard - #2858

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

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

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

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/

@devops-cli-service
devops-cli-service Bot force-pushed the fix/2735-the-subprocess-environment-guard-accepts-less branch from 654c786 to dee6e4c Compare October 31, 2026 13:02
@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 13:14
@dan-petty
dan-petty self-requested a review as a code owner October 31, 2026 13:14
@dan-petty
dan-petty merged commit c3354bb into main Oct 31, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2735-the-subprocess-environment-guard-accepts-less branch October 31, 2026 13:18
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