Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
schema: spec-driven
created: 2026-11-19
skip_specs: true
15 changes: 15 additions & 0 deletions openspec/changes/3920-bump-the-pinned-gh-and-drop/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Design

## Decisions

- **Set `GH_FIRST_SAFE_VERSION` to `Version("2.105.0")`.**: The pin is v2.105.0, the first cli/cli release with golang.org/x/net 0.62.0 (the person's check of 2026-11-19 records v2.104.0 with 0.61.0 before it), so the floor now rejects every pin that brings CVE-2026-78661 back.
- **Add `CVE-2026-78661` to `GH_GO_FINDINGS_FIXED_IN_THE_PIN`.**: The test rejects an ignore for a finding that the pinned build fixes, and the Service image scan reads `.trivyignore` only, so a later ignore there fails the test instead of hiding the finding again.
- **Leave the `CVE-2026-78661` entry in `.trivyignore-tofu` and defer its removal to #6389.**: promtool v3.16.0 and OpenTofu v1.13.9 are the newest releases and still vendor x/net 0.61.0 and 0.57.0, and only the Runner Image and MCP Server Image scans read that file, so the Service image scan needs no entry and the runner scan still needs this one.
- **Keep the manual pin and the invariant update, and add no Renovate rule.**: The alternatives check of 2026-11-09 records the verdict partly: Renovate proposes a newer release in the Dockerfile but cannot read a candidate release's go.mod or move the Python constants, so the floor and the fixed set stay manual.

## Rejected alternatives

- **Keep the floor at 2.102.1.**: `tests/invariants/test_service_image.py:27:GH_FIRST_SAFE_VERSION = Version("2.102.1")` accepts a pin at 2.102.1 or 2.104.0, which vendor golang.org/x/net 0.60.0 and 0.61.0, so the test would pass with the finding back.
- **Remove the `CVE-2026-78661` entry from `.trivyignore-tofu` now.**: `.trivyignore-tofu:23:x/net v0.61.0 in promtool v3.16.0 and v0.57.0 in OpenTofu v1.13.9` shows that both newest releases still vendor the older module, and the Runner Image scan reads that file at `.github/workflows/ci.yml:649:trivyignores: .trivyignore,.trivyignore-tofu`, so its scan would fail.
- **Bump gh to a release newer than v2.105.0.**: The staged tree already pins v2.105.0 at `Dockerfile:45:url="https://github.com/cli/cli/releases/download/v2.105.0/gh_2.105.0_linux_amd64.tar.gz"` and at `src/devops_cli/roadmap/runner_tools.py:44:GH_VERSION = "2.105.0"`, so a further bump is a dependency update outside this item.
- **Add a Renovate custom manager for the gh release URL.**: The alternatives check of 2026-11-09 records that Renovate cannot choose the first release whose go.mod holds x/net 0.62.0, cannot move `GH_VERSION` or the floor, and cannot check the scans, so the rule would cover the Dockerfile line alone.
51 changes: 51 additions & 0 deletions openspec/changes/3920-bump-the-pinned-gh-and-drop/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Proposal

## Why

Issue #3920 asks for a gh pin whose golang.org/x/net fixes CVE-2026-78661 (HIGH) and for the end of the time-limited ignore. The staged tree already pins v2.105.0 and the Service image reads no ignore, but the invariant test still names the floor of v2.102.1 and the three findings of the older build, so a downgrade or a new ignore passes it.

## What Changes

- Raise `GH_FIRST_SAFE_VERSION` in `tests/invariants/test_service_image.py` to `Version("2.105.0")`, the first cli/cli release whose `go.mod` holds golang.org/x/net 0.62.0, and rewrite its comment and the docstring of the test that reads it.
- Add `CVE-2026-78661` to `GH_GO_FINDINGS_FIXED_IN_THE_PIN` in the same module and rewrite its comment, so the invariant test rejects an ignore of that finding in `.trivyignore`.
- Change no version, no checksum and no install path: `Dockerfile` already fetches gh v2.105.0, and the `GH_VERSION` pin of the runner tools module already holds `2.105.0`.
- Keep the `CVE-2026-78661` entry in `.trivyignore-tofu` for promtool v3.16.0 and OpenTofu v1.13.9, and leave its removal to #6389 after #6365 and #5866.
- No spec delta: every changed path is under `tests/`, and the change alters only the invariant test that reads committed files, so no consumer-visible behavior changes.
- The change fits one pull request.

## Capabilities

### New Capabilities

None.

### Modified Capabilities

None.

## Impact

- Tests: `tests/invariants/test_service_image.py`

## Feasibility

- The premise of the issue fails at the staging commit: the Dockerfile already pins the safe release, so no bump is left to build. The two asset URLs are `Dockerfile:45:url="https://github.com/cli/cli/releases/download/v2.105.0/gh_2.105.0_linux_amd64.tar.gz"` and `Dockerfile:48:url="https://github.com/cli/cli/releases/download/v2.105.0/gh_2.105.0_linux_arm64.tar.gz"`, and the install step takes the same version at `Dockerfile:55:install -m 755 "/tmp/gh_2.105.0_linux_${TARGETARCH}/bin/gh" /usr/local/bin/gh`.
- `src/devops_cli/roadmap/runner_tools.py:44:GH_VERSION = "2.105.0"` matches that pin, so the statement of the issue that the image pins v2.102.1 is out of date.
- The Service image reads no ignore now: `.trivyignore` has 5 lines and each one is a comment, and its line `.trivyignore:3:The scans of the Service, runner and MCP server images read this file.` names the scans that read it.
- The entry that the issue asks to drop still exists, so that part cannot be built: `.trivyignore-tofu:27:CVE-2026-78661 exp:2026-11-21`, under the reason `.trivyignore-tofu:23:x/net v0.61.0 in promtool v3.16.0 and v0.57.0 in OpenTofu v1.13.9`. Only the Runner Image and MCP Server Image scans read that file, at `.github/workflows/ci.yml:649:trivyignores: .trivyignore,.trivyignore-tofu`, and the Service Image step names no `trivyignores` input at `.github/workflows/ci.yml:522:Scan Service Image for Vulnerabilities`. #6365 and #5866 are open and wait on upstream releases, and #6389 carries the removal, so this plan removes nothing there.
- The work that is left is the two constants of the invariant test: `tests/invariants/test_service_image.py:27:GH_FIRST_SAFE_VERSION = Version("2.102.1")` and `tests/invariants/test_service_image.py:31:GH_GO_FINDINGS_FIXED_IN_THE_PIN = frozenset({"CVE-2026-78667", "CVE-2026-97031", "CVE-2026-78669"})`.
- The `references` tool counted one file for each constant: `GH_FIRST_SAFE_VERSION` gave files 1, lines 2, at `tests/invariants/test_service_image.py` lines 27 and 127, and `GH_GO_FINDINGS_FIXED_IN_THE_PIN` gave files 1, lines 2, at lines 31 and 142, so no other file names either constant.
- The probe lines confirm the cited paths: The path `tests/invariants/test_service_image.py` is a file of the staging commit. The path `.github/renovate.json` is a file of the staging commit. The path `go.mod` that the issue names is no file of the staging commit, because it is the file of another repository, and no tool of this run reads it.
- The premise that v2.105.0 vendors golang.org/x/net 0.62.0 is not checked by this run: no tool here reaches GitHub. The check of the person on 2026-11-19 in the issue comment records Go 1.27.4 and golang.org/x/net 0.62.0 for that release, after v2.104.0 with 0.61.0.
- The first check of the implementation is `uv run devops ci test tests/invariants/test_service_image.py`; it needs a checkout of the repository, no client and no network. The real-system checks that follow run on the pull request: the `Service Image` job at `.github/workflows/ci.yml:522:Scan Service Image for Vulnerabilities` and the `Runner Image` job at `.github/workflows/ci.yml:640:Scan Runner Image for Vulnerabilities`.
- The plan introduces no program and no runner capability: `uv run devops ci test` is an existing row, and `uv` and `pytest` are entries of `src/devops_cli/roadmap/runner_tools.py:94:RUNNER_TOOLS: tuple[RunnerTool, ...] = (`, while no `NOT_IN_RUNNER` program is needed. The only failure class is a failing pytest run, and the test writes no file, so the read-only root of the runner pod is no obstacle.
- The date 2026-11-21 stays as it is: this change moves no expiry, and the removal of the runner entry waits on #6365 and #5866 through #6389.

## Existing Tool Considered

renovatebot/renovate (AGPL-3.0, maintained, last activity 2026-11-08) is the open tool that covers part of the need: it proposes a newer gh release in the Dockerfile from `.github/renovate.json`, but it cannot read a candidate release's go.mod or move `GH_FIRST_SAFE_VERSION` and `GH_GO_FINDINGS_FIXED_IN_THE_PIN`, so this change updates the two test constants by hand and builds no tool.

## Dependencies

- Pull request #6166 shares `src/devops_cli/roadmap/runner_tools.py` with this item; this plan reads `GH_VERSION` there and changes nothing in it, so the two do not conflict.
- Pull request #6390 shares `tests/invariants/test_service_image.py`; it deletes the Trivy ignore tests that read the clock, and this plan leaves those tests alone while it edits the floor and the fixed set.
23 changes: 23 additions & 0 deletions openspec/changes/3920-bump-the-pinned-gh-and-drop/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Tasks

## 1. Raise the gh floor to the pinned v2.105.0

Kind: other. Reads: `Dockerfile`, `src/devops_cli/roadmap/runner_tools.py`, `tests/invariants/test_service_image.py`, `.trivyignore`. Changes: `tests/invariants/test_service_image.py`.

- [ ] 1.1 Set `GH_FIRST_SAFE_VERSION` in `tests/invariants/test_service_image.py` to `Version("2.105.0")` and rewrite the comment above it: gh v2.105.0 is the first cli/cli release whose go.mod holds golang.org/x/net 0.62.0, which ends CVE-2026-78661 (#3920), and it also keeps the Go 1.27.2 bound of #1492. Extend the docstring of `test_service_image_installs_a_gh_release_built_with_go_1_27_2_or_later` to name #3920. The Dockerfile pin and `GH_VERSION` stay at 2.105.0
- Verification: `$ uv run devops ci test tests/invariants/test_service_image.py` passes

## 2. Add CVE-2026-78661 to the findings that the pin fixes

Kind: other. Reads: `tests/invariants/test_service_image.py`, `.trivyignore`, `.trivyignore-tofu`. Changes: `tests/invariants/test_service_image.py`.

- [ ] 2.1 Add `CVE-2026-78661` to `GH_GO_FINDINGS_FIXED_IN_THE_PIN` in `tests/invariants/test_service_image.py` and rewrite the comment above it: the three findings of gh v2.102.0 are fixed by v2.102.1 (#1492), and CVE-2026-78661 in golang.org/x/net 0.60.0 is fixed by v2.105.0 with 0.62.0 (#3920). Extend the docstring of `test_trivyignore_ignores_no_go_finding_that_the_pinned_gh_fixes` to name #3920. Leave the entry in `.trivyignore-tofu`, which the Service image scan does not read
- Verification: `$ uv run devops ci test tests/invariants/test_service_image.py` passes

## Criteria

- Group 1: The pinned release is the first cli/cli release whose `go.mod` has `golang.org/x/net` 0.62.0 or newer (read with `devops gh api repos/cli/cli/contents/go.mod?ref=<tag>`).
- Group 1: The `Dockerfile` has the new version, the SHA-256 checksum of both archives (amd64 and arm64) and the path in the install step. `GH_VERSION` in `src/devops_cli/roadmap/runner_tools.py` and the floor in `tests/invariants/test_service_image.py` match the pin.
- Group 2: The entry `CVE-2026-78661` and its reason are removed from `.trivyignore`.
- Group 2: `Runner Image` and `Service Image` pass on a pull request that changes no image.
- Pending person: This work is done before 2026-11-21, the day the ignore ends. If cli/cli has no release by then, a person decides whether to move the date., Only a person owns the date: the ignore ends on 2026-11-21 and the removal waits on the promtool and OpenTofu bumps in #6365 and #5866 through #6389, so a person decides any move of the date.