Skip to content

fix(security): drop the Go ignores that the pinned gh build does not need - #2402

Merged
dan-petty merged 2 commits into
mainfrom
fix/1492-drop-gh-go-trivy-ignores
Oct 28, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/1492-drop-gh-go-trivy-ignores

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The Service image pins gh v2.102.1. cli/cli builds that release with Go 1.27.3 and golang.org/x/net v0.60.0, so the build does not have CVE-2026-78667 (net/http), CVE-2026-97031 (crypto/tls) or CVE-2026-78669 (HTTP/2). The bump to v2.102.1 (#1800) left the three ignores in .trivyignore. Their reason still named gh v2.102.0 and Go 1.27.1, and they expired on 2026-10-23.

  • Delete the three ignores and their reason from .trivyignore.
  • Keep the gh pin at v2.102.1. The newest release, v2.103.3, has the same Go toolchain and the same golang.org/x/net, and no cli/cli advisory names v2.102.1.
  • Add tests/test_service_image_gh.py. One test requires one gh release for both tarballs of the Dockerfile, at or above v2.102.1, the first release built with Go 1.27.2 or later. The other test fails when .trivyignore ignores one of the three findings again, because Trivy does not report an ignore that matches no finding.

Closes #1492

Change: openspec/changes/1492-drop-gh-go-trivy-ignores/

Add tests/test_service_image_gh.py. The first test requires one gh release for both tarballs of the Dockerfile, at or above v2.102.1, the first release built with Go 1.27.2 or later. The second test fails while .trivyignore ignores CVE-2026-78667, CVE-2026-97031 or CVE-2026-78669, which the pinned gh build does not have.

Plan the change in openspec/changes/1492-drop-gh-go-trivy-ignores/.
…need

Delete CVE-2026-78667, CVE-2026-97031 and CVE-2026-78669 and their reason from .trivyignore. The Dockerfile pins gh v2.102.1, which cli/cli builds with Go 1.27.3 and golang.org/x/net v0.60.0, and Trivy finds none of the three in that build. The ignores expired on 2026-10-23, and their reason still named gh v2.102.0 and Go 1.27.1.
@dan-petty dan-petty added scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/security Type security: a vulnerability or a leak labels Oct 28, 2026
@dan-petty

dan-petty commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner Author

Test results at 11f081a (base origin/main bb46660).

uv run devops ci fail-to-pass --base origin/main:

  failed on base: tests.test_service_image_gh::test_trivyignore_ignores_no_go_finding_that_the_pinned_gh_fixes (AssertionError: assert {'CVE-2026-78...E-2026-97031'} == set())
  passed on base: tests.test_service_image_gh::test_service_image_installs_a_gh_release_built_with_go_1_27_2_or_later
1 failed on base (1 failed and 1 passed in tests/test_service_image_gh.py; 0 errored).

The test test_service_image_installs_a_gh_release_built_with_go_1_27_2_or_later passes on base by design: origin/main already pins gh v2.102.1 (#1800). It stops a later change from going back below that release.

Other checks:

  • uv run devops ci test tests/test_service_image_gh.py tests/test_architectural_invariants.py: 97 passed.
  • uv run ruff check and uv run ruff format --check on tests/test_service_image_gh.py: pass. uv run mypy tests/test_service_image_gh.py: no issues.
  • uv run devops openspec check: pass. uv run devops docs generate --sync-readme changes no file, and uv run devops docs check passes.

Trivy 0.75.0, vulnerability database of 2026-10-28, --scanners vuln --severity HIGH,CRITICAL --ignore-unfixed on the linux_amd64 gh binary:

  • gh v2.102.0 (Go 1.27.1), no ignore file: CVE-2026-78667, CVE-2026-97031, CVE-2026-78669 (stdlib and golang.org/x/net v0.58.0) and CVE-2026-111943.
  • gh v2.102.1 (Go 1.27.3, golang.org/x/net v0.60.0), no ignore file: no finding. With the new .trivyignore: exit code 0.
  • gh v2.103.3 (Go 1.27.3, golang.org/x/net v0.60.0), no ignore file: no finding.

The release run 40626081164 of v0.8.2 (2026-10-28) passed "Scan Service Image for Vulnerabilities" after the ignores expired. This pull request changes .trivyignore, so the CI job Service Image builds and scans the image again.

@dan-petty
dan-petty marked this pull request as ready for review October 28, 2026 14:11
@dan-petty
dan-petty merged commit 6052083 into main Oct 28, 2026
17 of 18 checks passed
@dan-petty
dan-petty deleted the fix/1492-drop-gh-go-trivy-ignores branch October 28, 2026 14:11
dan-petty pushed a commit that referenced this pull request Oct 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.8.3](v0.8.2...v0.8.3)
(2026-10-28)


### Bug Fixes

* **ai:** the gateway sweep's URL error names no credential
([#2400](#2400))
([2e6f1fd](2e6f1fd)),
closes [#909](#909)
* **config:** exit 1 when audit-keys finds a plaintext secret
([#2401](#2401))
([ad0114f](ad0114f)),
closes [#1469](#1469)
* **security:** drop the Go ignores that the pinned gh build does not
need ([#2402](#2402))
([6052083](6052083)),
closes [#1492](#1492)
* **security:** refuse every loader and shell key that loads code into a
child ([#2405](#2405))
([86d5bce](86d5bce)),
closes [#2205](#2205)

---
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/security Type security: a vulnerability or a leak

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(security): the service image ships a gh built with go 1.27.2 or later, and the two go stdlib ignores are dropped

1 participant