Skip to content

docs(openspec): plan #2750 Refuse Go, Yarn and uv env keys - #3165

Merged
dan-petty merged 3 commits into
mainfrom
fix/2750-probe-the-go-yarn-and-file
Nov 2, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/2750-probe-the-go-yarn-and-file

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Plans #2750

This plan probes the five keys of #2750 and refuses four of them. GOFLAGS, YARN_YARN_PATH, UV_TOOL_DIR and UV_ENV_FILE join the keys that build_subprocess_env refuses from a caller. An isolated child also 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 probes change two claims of the issue. uv starts a program from UV_TOOL_DIR. UV_ENV_FILE loads keys that the guard refuses. It does not run the file. A person must run the live probe of Yarn 4.

Change: openspec/changes/2750-probe-the-go-yarn-and-file/

🤖 Generated with Claude Code

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 2, 2026 06:04

Copy link
Copy Markdown
Owner

Review of the plan for #2750.

CI: all 18 checks green or skipped (head 0b6c448; the branch base 11dc347 is behind main, which is fine for a docs-only plan). Premise: holds for caller overrides. GOFLAGS, YARN_YARN_PATH and UV_ENV_FILE match no entry of CONST_CODE_LOADING_ENV_PATTERNS (constants.py:1596-1700), and UV_ is an allowed prefix. No code in src/ sets these keys as a caller override (git grep; golangci_lint.py:194 sets no GOFLAGS, and tests/security/test_golangci_lint_scanner.py:257 asserts that).

  1. The plan drops the probe, which is the point of fix(security): Refuse Go, Yarn and uv env keys #2750. The issue asks for "a probe result recorded for each key" (Expected; Reproduction step 2). The plan records "no live probe ran for go and yarn" and gives no result for UV_ENV_FILE, UV_TOOL_DIR or npm_config_cache, although uv and npm are in the devcontainer (the earlier probes of fix(security): the subprocess environment guard accepts the uv and npm keys that make a child run a program #2673 used them; see tests/core/test_subprocess_env_uv_npm.py). The work the item will not do must be a plain bullet that names a follow-up issue under "## Workflow follow-up" (openspec/config.yaml), and the issue says to install the tool. Neither exists in the plan. "The devcontainer has no go" is not verified: in my sandbox go version prints go1.24.7, and go help build documents -toolexec 'cmd args' and go help environment documents GOFLAGS. Fix: probe uv and npm keys now (offline, env -i, temporary HOME, marker program, control run), record each result in design.md, and file the go and yarn probe as a follow-up issue named in the plan. Or, if the item cannot be built as written, return it to New with the evidence (AGENTS.md rule 2).

  2. The reason for UV_ENV_FILE is wrong. Design.md and fix(security): Refuse Go, Yarn and uv env keys #2750 say it "names a file that uv sources, which can execute code". uv run --help (uv 0.11.32 here) says: --env-file <ENV_FILE> Load environment variables from a .env file [env: UV_ENV_FILE=]. It loads variables; it does not run the file. The real risk is that the file sets keys the guard refuses (UV_PYTHON, LD_PRELOAD, and so on), which bypasses the guard, and only for uv run. The refusal is still right, but the text in design.md and ARCHITECTURE.md would state a false mechanism. Fix: write the real reason, and have the probe (point 1) show it: a .env that sets a refused key, then read the child environment.

  3. The spec and tests are narrower than the sibling requirements. The requirement at openspec/specs/subprocess-environment/spec.md:272 says the refusal holds "with environment isolation on and off", in upper and lower case, with the message and error code SECURITY_ERROR, and has a "refused key starts no child" scenario. The new requirement and task 1.1 cover only the default isolation and one spelling. _is_env_override_refused upper-cases the key (process.py:147-153), so lowercase works, but no test says so. Fix: parametrize isolation on and off and the case, and assert the code.

  4. Test location. Task 1.1 creates tests/core/test_process_env_guard.py. The sibling tests are in tests/core/test_subprocess_env_uv_npm.py and test_subprocess_env_file_write.py. Put the cases there (same fixtures), or say why a new file is better.

  5. Documentation duplicates and misplaces. npm_config_cache is already in the "stays accepted" list at spec.md:309 and in ARCHITECTURE.md (File-write bullet: "npm_config_cache stays accepted, because devops install-tools sets it"), so task 2.1 repeats it. UV_TOOL_DIR is in neither place; add it to the requirement at spec.md:309 with MODIFIED (and a scenario) instead of only a sentence in ARCHITECTURE.md. Also the Go and Yarn keys go in the "Uv and npm child environment" bullet; give them their own bullet. Task 2.2 is malformed ("ARCHITECTURE.md, run ..." with no verb).

  6. Feasibility. "First check: run the reproduction command from fix(security): Refuse Go, Yarn and uv env keys #2750" has no output recorded; paste the output and the versions. Existing Tool Considered is acceptable (about 200 tokens, nothing deleted).

Spec check: ADDED requirement Refuse Go, Yarn and uv file keys has no duplicate name; capability subprocess-environment is right. A MODIFIED of the requirement at spec.md:272 would also work and would keep the scenarios in one place; either is acceptable if point 3 is fixed.

Related issues: #1307 and #1333 (tests mirror the source tree and double only process edges; relevant to the new test file in point 4).

Verdict: hold until points 1 to 3 are fixed (probe or follow-up issue, correct UV_ENV_FILE reason, isolation and case coverage).


Generated by Claude Code

Probe the five keys of the issue. GOFLAGS, UV_TOOL_DIR and UV_ENV_FILE
(through the keys of its file) are refused, YARN_YARN_PATH is refused
on the page of Yarn 4, and npm_config_cache stays accepted with the
reason. Correct the reason for UV_ENV_FILE, name the ambient filter for
an isolated child, add the live Yarn 4 probe as a person task.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty dan-petty changed the title docs(openspec): plan #2750 Refuse Go, Yarn and uv file env keys docs(openspec): plan #2750 Refuse Go, Yarn and uv env keys Nov 2, 2026
@dan-petty
dan-petty merged commit 80be095 into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the fix/2750-probe-the-go-yarn-and-file branch November 2, 2026 17: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.

2 participants