Skip to content

fix(security): the subprocess environment guard accepts LESS, which... - #2896

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

dan-petty merged 2 commits into
mainfrom
fix/2735-the-subprocess-environment-guard-accepts-less

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2735

#2735 reports that build_subprocess_env in src/devops_cli/core/process.py refuses LESSOPEN and LESSCLOSE but accepts LESS. The less(1) pager reads options from LESS, and the +! option runs a shell command. Git and gh use less as their default pager, so a caller override of LESS is a code-execution path. A probe with less 668 confirmed that LESS=+! made git --paginate and gh help reference run a marker program.

Change: openspec/changes/archive/2026-10-31-2735-the-subprocess-environment-guard-accepts-less/

@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The steps of the job:

  • group 1 (Add LESS to the denied patterns and test it): done, 46 model requests, commit 89e75b4bbd0b

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review October 31, 2026 18:27
@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 18:27
@dan-petty
dan-petty self-requested a review as a code owner October 31, 2026 18:27
@dan-petty
dan-petty merged commit 1545b85 into main Oct 31, 2026
20 of 21 checks passed
@dan-petty
dan-petty deleted the fix/2735-the-subprocess-environment-guard-accepts-less branch October 31, 2026 18:27
dan-petty-release Bot added a commit that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.31.0](v0.30.0...v0.31.0)
(2026-10-31)


### Features

* **terraform:** preview requests in dry run for tf commands
([#2895](#2895))
([980a9be](980a9be)),
closes [#2249](#2249)


### Bug Fixes

* **security:** the subprocess environment guard accepts LESS, which...
([#2896](#2896))
([1545b85](1545b85))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.

fix(security): the subprocess environment guard accepts LESS, which makes less run a program

1 participant