Skip to content

fix(security): Refuse Go, Yarn and uv env keys - #3845

Merged
dan-petty merged 3 commits into
mainfrom
fix/2750-refuse-go-yarn-uv-env-keys
Nov 6, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/2750-refuse-go-yarn-uv-env-keys

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The subprocess guard accepted four environment keys that make a child run a program. GOFLAGS carries -toolexec, and go ran the program in a probe. YARN_YARN_PATH names a file that Yarn 4 runs. UV_TOOL_DIR names a tool directory whose executable uv starts. UV_ENV_FILE loads keys such as LD_PRELOAD into the program of uv run. A caller override of each key now raises SecurityError, and an isolated child gets no UV_TOOL_DIR and no UV_ENV_FILE from the environment. npm_config_cache stays accepted because devops install-tools sets it. The plan was rewritten so the plan reader accepts it.

Closes #2750

Change: openspec/changes/archive/2026-11-06-2750-probe-the-go-yarn-and-file/
Elapsed: 4.46s

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault labels Nov 6, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test record for this pull request.

  • fail-to-pass (uv run devops ci fail-to-pass --base origin/main): 18 tests failed on the base and pass on the branch (all in tests/core/test_subprocess_env_go_yarn.py and tests/core/test_subprocess_env_uv_npm.py; each failed with DID NOT RAISE SecurityError, or with the uv keys still in the isolated child).
  • Narrow run (go_yarn, uv_npm, boundary, file_write, gh_kubectl, install_tools tests): 752 passed.
  • uv run devops roadmap plan-recheck --source . --branch HEAD: the folder of fix(security): Refuse Go, Yarn and uv env keys #2750 gives ok on the branch. On the default branch it gave new-plan (gate paths: a Reads: line named UV_PROJECT_ENVIRONMENT in a code span).
  • Full uv run devops ci (host shared): 20030 passed, 2 failed, 1 error. The failures are the known host failures tests/commands/test_devcontainer_install_tools_dry_run.py and tests/ai/test_tool_executor_contract.py (fix(ci): host state fails four tests and one case #3585). The test row took 5m 55s (fix(ci): the pytest step of devops ci exceeds the 5-minute budget #3593), and coverage did not run because of the test failures.
  • Not run: a live probe of YARN_YARN_PATH with Yarn 4. The plan lists it as "Pending a person".

@dan-petty
dan-petty marked this pull request as ready for review November 6, 2026 20:20
@dan-petty
dan-petty merged commit 235a807 into main Nov 6, 2026
24 checks passed
@dan-petty
dan-petty deleted the fix/2750-refuse-go-yarn-uv-env-keys branch November 6, 2026 20:20
dan-petty pushed a commit that referenced this pull request Nov 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.73.0](v0.72.1...v0.73.0)
(2026-11-06)


### Features

* **pr:** check-readiness blocks a body that breaks the form
([#3849](#3849))
([6c973a5](6c973a5)),
closes [#3259](#3259)
* **roadmap:** Allow read pipes to a table of allowed programs
([#3838](#3838))
([89daf41](89daf41)),
closes [#3520](#3520)
* **roadmap:** size the runner Job resources from the plan
([#3848](#3848))
([32328b1](32328b1))


### Bug Fixes

* **ai:** fix MCP ai_benchmark models description
([#3840](#3840))
([26a0ef4](26a0ef4))
* **review:** catch findings.json validation errors
([#3841](#3841))
([bc5f241](bc5f241))
* **security:** Refuse Go, Yarn and uv env keys
([#3845](#3845))
([235a807](235a807))


### Performance Improvements

* **k8s:** use tag_digest HEAD for image pins
([#3843](#3843))
([a61d671](a61d671))


### Code Refactoring

* **roadmap:** the in-memory store leaves src
([#3839](#3839))
([558c5e0](558c5e0))

---
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

scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(security): Refuse Go, Yarn and uv env keys

1 participant