Repository navigation
Description
Problem
The checks Runner Image and Service Image of the CI Quality Gate fail on a pull request that changes no image. The step Scan Runner Image for Vulnerabilities and the step Scan Service Image for Vulnerabilities both report one finding with severity HIGH:
usr/local/bin/gh (gobinary)
golang.org/x/net CVE-2026-78661 HIGH fixed installed v0.60.0 fixed in 0.62.0
The Dockerfile pins GitHub CLI v2.102.1 (Dockerfile lines 24 to 28). Release v2.103.3 of cli/cli is available (published 2026-10-26). I have not checked that it holds golang.org/x/net 0.62.0 or newer.
Expected
Both image scans pass on a pull request that changes no image. No release of GitHub CLI has the fix yet, so a time-limited ignore carries the scans until the bump.
Delivered by this item
- A time-limited
.trivyignoreentry,CVE-2026-78661 exp:2026-11-21, with its reason and a link to the tracking. The owner allowed it on 2026-11-07. It ends by itself on 2026-11-21. - An invariant test that fails when an entry of
.trivyignorehas no reason, has no exp date, or has an exp date that is past. -
Runner ImageandService Imagepass on a pull request that changes no image, with the entry.
Moved to #3920
- The pinned GitHub CLI release holds
golang.org/x/netat 0.62.0 or newer, shown by the Trivy scan of the image. - The entry for CVE-2026-78661 is removed from
.trivyignore.
Existing tool considered
Trivy already finds the problem, and a new release of GitHub CLI fixes it. The change adds no tool. Renovate or the existing pin update path may cover the bump.
Related
Seen on the pull request for #3651. The bump of the pin moved to #3920.
Proposed design
Problem statement
The CI Quality Gate fails Runner Image and Service Image on pull requests that change no image input. The scan reports CVE-2026-78661 in golang.org/x/net v0.60.0, which the pinned GitHub CLI v2.102.1 vendors. No released cli/cli version holds the fix yet. This item adds the time-limited .trivyignore entry that the owner allowed on 2026-11-07, with its reason and tracking link, and an invariant test that keeps every entry honest. Both image scans then pass on a pull request that changes no image. The pin bump waits in #3920.
Acceptance criteria
Requirement: Time-limited ignore for CVE-2026-78661
.trivyignore SHALL hold one entry for CVE-2026-78661 with the expiry exp:2026-11-21, a reason and a link to the tracking issue #3920.
Scenario: The entry carries a reason and an expiry
- WHEN the test reads the non-comment lines of
.trivyignore - THEN it finds the line
CVE-2026-78661 exp:2026-11-21and the comment block above it names gh v2.102.1,golang.org/x/net0.62.0 and fix(ci): bump the pinned gh and drop the CVE-2026-78661 ignore #3920
Requirement: Every ignore entry is explained and time-limited
The invariant test SHALL fail when a non-comment line of .trivyignore has no comment above it, no exp: token, or an exp: date before today.
Scenario: A bad entry fails the test
- WHEN the helper reads a
.trivyignoretext whose entry has no comment above it, noexp:token, or anexp:date in the past - THEN the helper returns one problem for that entry and the test fails with a message that names the line
Requirement: The existing regression test still passes
The change MUST NOT add CVE-2026-78661 to GH_GO_FINDINGS_FIXED_IN_THE_PIN.
Scenario: The new entry stays outside the fixed-findings set
- WHEN the test
test_trivyignore_ignores_no_go_finding_that_the_pinned_gh_fixesruns - THEN it passes, because the set holds only CVE-2026-78667, CVE-2026-97031 and CVE-2026-78669
Requirement: The gh pin stays for the bump issue
The change MUST NOT move the GitHub CLI pin in the Dockerfile or the value of GH_VERSION.
Scenario: The pin and the constant keep their version
- WHEN the tests read the release tag of the
Dockerfileand the value ofGH_VERSION - THEN the tag is v2.102.1 and
GH_VERSIONis "2.102.1"
Requirement: Image scans pass on an unchanged image input
The Runner Image and Service Image checks SHALL pass on a pull request that changes no image input.
Scenario: Both scans pass with the entry
- WHEN a pull request that changes
src/but not theDockerfileruns the CI Quality Gate - THEN
Runner ImageandService Imagepass and neither scan reports CVE-2026-78661
Existing Tool Considered
No alternatives check has run on this item. Trivy (aquasecurity/trivy) is the open, maintained tool that covers both needs: its scan steps find CVE-2026-78661, and its own .trivyignore format holds the time-limited entry with an exp: date and a reason. It lacks a remediation path: it reports the vendored golang.org/x/net version but cannot rebuild or replace the gh binary, so the fix is the upstream cli/cli release that #3920 pins. It also does not report an ignore that matches no finding, so the invariant test holds that. The change adds no tool and builds no code, so it takes no build-and-keep cost. A custom cli/cli build would add a Go build to build, keep and fix until it matches the upstream tool.
Key questions
- Which mechanism handles CVE-2026-78661 until a cli/cli release carries the fix?: A time-limited
.trivyignoreentry with a reason and an expiry. The owner allowed the entry on 2026-11-07, so it readsCVE-2026-78661 exp:2026-11-21and ends by itself on that date. The bump in fix(ci): bump the pinned gh and drop the CVE-2026-78661 ignore #3920 then removes it. (best practice) [sources: CONTEXT.md, docs/adr/0005-review-findings-come-from-tools-not-models.md, openspec/changes/archive/2026-10-28-1492-drop-gh-go-trivy-ignores/proposal.md]- Chosen: Time-limited
.trivyignoreentry. It is the project's own suppression form: a rule with a reason and an expiry. It needs no code, it ends by itself, and the owner allowed it. - Rejected: Lower the Trivy severity threshold. It hides every HIGH finding, not one finding, and it weakens the gate that ADR 0004 makes authoritative.
- Rejected: Remove the
ghbinary from both images. The Job needsghat run time: it marks a pull request ready, reads check runs, and git reads its token throughgh auth git-credential. That refactor is a large change of its own. - Rejected: Build a custom
ghbinary. It adds a Go build to build, keep and fix until it matches the upstream tool, in place of an open, maintained release.
- Chosen: Time-limited
- Does a new
.trivyignoreentry for CVE-2026-78661 break the existing regression test?: No.GH_GO_FINDINGS_FIXED_IN_THE_PINholds only CVE-2026-78667, CVE-2026-97031 and CVE-2026-78669, and the test fails only when an entry names one of those three. [sources: tests/invariants/test_service_image.py] - Which file holds the suppressions, and how does the current test read it?:
.trivyignoreat the repository root. The test readsREPO_ROOT / ".trivyignore", skips each line that starts with#, and takes the first token of every other line as the finding ID. [sources: tests/invariants/test_service_image.py, .github/workflows/ci.yml] - Where does the new invariant test live?: In
tests/invariants/test_service_image.py, beside the test that already reads.trivyignore. (best practice) [sources: tests/invariants/test_service_image.py]- Chosen: Extend
tests/invariants/test_service_image.py. The module already reads.trivyignoreand holds the gh pin invariants, so one module keeps the image invariants together. - Rejected: Add
tests/invariants/test_trivyignore.py. It repeats the file read and splits one file's invariants across two modules, with no gain.
- Chosen: Extend
- How does the test check the reason and the expiry of an entry?: It requires a comment block directly above each entry, and it reads the
exp:token of the entry line. It fails when the block is empty, the token is absent, or the date is before today. (best practice) [sources: tests/invariants/test_service_image.py, CONTEXT.md]- Chosen: Comment block above the entry, plus the
exp:token on the entry line. The test takes the first token of a non-comment line as the finding ID, so the reason must sit in a comment. Trivy keeps the same split. - Rejected: Put the reason on the entry line. The reason text would join the ID expression and the test and Trivy would read the wrong ID.
- Rejected: Keep the reasons in a separate manifest file. It adds a second source of truth that the scan does not read, so the two can drift.
- Chosen: Comment block above the entry, plus the
- Does this item move the gh pin?: No. The pin bump moved to fix(ci): bump the pinned gh and drop the CVE-2026-78661 ignore #3920. This item keeps the
Dockerfiletag andGH_VERSIONat v2.102.1, and it adds only the time-limited entry and its test. [sources: src/devops_cli/roadmap/runner_tools.py:44, tests/invariants/test_service_image.py:25]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(ci)scope of the title gives the scope.A HIGH CVE blocks CI image scans and prevents merges on any pull request.Unblocks all CI image checks and removes a known HIGH vulnerability from the shipped image.Change one version string in the Dockerfile and confirm the Trivy scan passes.Both bump the gh CLI pin in the Dockerfile to clear a Trivy HIGH finding, but #1800 targets CVE-2026-111943 (crypto/x509) while the candidate targets CVE-2026-78661 (golang.org/x/net).dan-petty commentedon Nov 7, 2026
The checks Runner Image and Service Image of pull request #3883 fail on the same finding: the scan of the image reports CVE-2026-78661 in golang.org/x/net v0.60.0 (fixed in 0.62.0). That pull request changes no image input. It stays a draft until these two checks pass.
dan-petty commentedon Nov 7, 2026
Pull request #3889 hits the same failure: the
Runner ImageandService Imagescans (job "Scan ... Image for Vulnerabilities") fail withgolang.org/x/netv0.60.0, CVE-2026-78661 (HIGH, fixed in 0.62.0). The pull request changes no image input.dan-petty commentedon Nov 7, 2026
PR #3891 (a change to a ConfigMap template only) fails the checks Service Image and Runner Image with this CVE: Trivy reports golang.org/x/net v0.60.0 in usr/local/bin/gh (fixed in 0.62.0), HIGH. The failure does not come from that PR. It stays a draft until this issue is fixed.
dan-petty commentedon Nov 7, 2026
The premise of this item does not hold today (2026-11-07). No release of GitHub CLI holds golang.org/x/net 0.62.0 or newer, so a bump of the pin cannot fix CVE-2026-78661. I wrote no code.
Evidence, read with
devops gh api repos/cli/cli/contents/go.mod?ref=<ref>:v2.103.3(newest release, published 2026-10-26):toolchain go1.27.3,golang.org/x/net v0.60.0.trunk(unreleased):toolchain go1.27.3,golang.org/x/net v0.61.0. This is also below 0.62.0.v2.102.1(the current pin):golang.org/x/net v0.60.0.repos/cli/cli/releases) has no release after v2.103.3.So the scan finding stays on every released gh binary. The fix needs a cli/cli release that moves x/net to 0.62.0 or newer. A suppression in
.trivyignoreis not allowed. A custom gh build would add a tool to build and keep, against the rule to use an open tool first.The item returns to New. Retry when cli/cli publishes a release with x/net 0.62.0 or newer (check
go.modat the tag). Then changeDockerfile(version, both checksums, the path in the install step) andGH_VERSIONinsrc/devops_cli/roadmap/runner_tools.py.devops-cli-service commentedon Nov 7, 2026
Refine cannot set this item to Ready at 163a5c2 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
go.modrequiresgolang.org/x/net0.62.0 or newer; the report on the issue of 2026-11-07 shows the newest releasev2.103.3still at 0.60.0 andtrunkat 0.61.0.dan-petty commentedon Nov 7, 2026
Pull request #3900 (a change of Python dependencies, not of the
ghpin) also failsRunner ImageandService Imagewith the same finding:usr/local/bin/gh(gobinary),golang.org/x/netCVE-2026-78661, HIGH, installed v0.60.0, fixed in 0.62.0. The new packagesddgs,primpandlxmlshow 0 findings in the same scan. #3900 stays a draft until this issue is delivered.dan-petty commentedon Nov 7, 2026
The re-scope (remove the gh binary from the Service image and the Runner image) does not hold. I wrote no code and made no branch.
Premise check (rule 2), read from
origin/mainat 6d105c2. The runner Job and the Service use the gh binary at run time:src/devops_cli/roadmap/implement_pull.py:383(mark_ready):run_gh([CONST_GH_CLI, "pr", "ready", ...]).implement_run.py:1416calls it inside the Job.src/devops_cli/github/check_verdict.py:342and:465:gh api .../commits/<sha>/statusandgh pr checks.implement_run.py:1387,stage_ready.pyandplan_check.pyread check runs through them.src/devops_cli/github/pr_monitor.py,merge_readiness.py,branch_update.py,issues.pyandclient.pybuildghargv fromCONST_GH_CLI.Dockerfile:76-77and:122-123: git reads its token throughgh auth git-credentialin both images. ADR 0015 says the same: "git gets it throughgh auth git-credential".src/devops_cli/roadmap/runner_tools.py:123listsghas a tool of thejob.If the binary goes, the Job cannot mark a pull request ready, read checks, or run
git fetchandgit pushover HTTPS. A change that moves all of these to REST calls (gidgethub, ADR 0006) and to another git credential helper is a refactor of its own. Nobody named it, so I do not start it here.Still true: no released cli/cli version fixes the finding (see the comment of 2026-11-07 02:13Z). A
.trivyignoreentry, a lowered threshold and a custom gh build are not allowed.The owner must decide one of these:
.trivyignoreentry for CVE-2026-78661 with an expiry date, until cli/cli publishes a release withgolang.org/x/net0.62.0 or newer. This is the project's own mechanism and unblocks feat(k8s): Name one chat model for every slot of the Service #3891 and feat(ai): web search falls back to DuckDuckGo #3900 at once. I recommend this.ghcall, another git credential helper). This is a large change.The item stays in New. The pull requests #3891 and #3900 stay drafts and wait for this decision.
dan-petty commentedon Nov 7, 2026
PR #3897 (a refactor with no dependency change) fails the Runner Image and Service Image scans on this CVE: golang.org/x/net v0.60.0 in the pinned GitHub CLI, fixed in 0.62.0. The cause is outside that PR.
devops-cli-service commentedon Nov 7, 2026
Status set to Ready at b6af763 (see proposed design in issue body).
dan-petty commentedon Nov 7, 2026
The checks Runner Image and Service Image fail on draft pull request #3922 (issue #3646) with this finding: Trivy reports CVE-2026-78661 in golang.org/x/net v0.60.0, which the pinned GitHub CLI binary holds (fixed in 0.62.0). The change of #3922 touches no image file. Both checks are not required checks, but
devops pr readyrefuses a pull request while one of them fails. A pull request that runs these image checks stays draft until the bump of the pinned CLI merges.dan-petty commentedon Nov 7, 2026
The checks Service Image and Runner Image of PR #3923 fail on this finding too (Trivy, CVE-2026-78661 in the pinned
ghandpromtool, fixed in golang.org/x/net 0.62.0). The pull request changes no image input.