Skip to content

fix(security): bump opentofu and drop the ignore #5866

Open

Description

@dan-petty

Update 2026-11-26 (infra move): the OpenTofu pin is in dan-petty/devtools, and the .trivyignore entries are gone. The CVEs are not fixed: OpenTofu 1.13.10 of the devtools image still holds the old modules, and the code scanning alerts are open. These scans report and stop no build (SECURITY.md exception, to 2026-12-20). The fix comes with a new devtools image. The pin steps below no longer apply here.


Problem or Motivation

The runner image now holds the pinned OpenTofu v1.13.9 (opt/devops-tools/tools/tofu/1.13.9/tofu), and the Trivy scan of the runner and MCP server images names five HIGH findings in its vendored Go modules. No released OpenTofu version holds the fixes, so .trivyignore holds temporary entries (SECURITY.md, "A Finding with No Fix").

CVE Module v1.13.9 Fixed
CVE-2026-116587 github.com/go-jose/go-jose/v4 v4.1.4 4.1.6
CVE-2026-56864 golang.org/x/mod v0.39.0 0.40.0
CVE-2026-56865 golang.org/x/mod v0.39.0 0.40.0
CVE-2026-78669 golang.org/x/net v0.57.0 0.60.0
CVE-2026-84445 google.golang.org/grpc v1.83.1 1.83.2

Read on 2026-11-15: v1.13.9 (published 2026-11-05) is the newest release and its go.mod holds the versions above. OpenTofu main holds go-jose 4.1.6, x/mod 0.41.0, x/net 0.60.0 and grpc 1.84.0, so the next release should hold every fix.

Proposed Solution & Architectural Design

When an OpenTofu release holds the fixes, dan-petty/devtools takes it, and a new image digest brings it here.

Acceptance Criteria

  • The runner image scan of Trivy names none of the five CVEs.
  • The five .trivyignore entries are gone.

Dependencies

Blocked on a released OpenTofu version that holds the fixes.

Alternatives check of 2026-11-23: in-use.
The repository already uses this tool.
Tool: opentofu/opentofu (https://github.com/opentofu/opentofu), MPL-2.0, last activity 2026-11-23, maintained.
Reason: Searches found no alternative tool; the issue already pins OpenTofu, and a newer upstream release v1.13.10 (2026-11-23) now exists, but no source shows it holds the seven fixed modules, so the bump is only partly answerable.

Covers:

  • A newer upstream release, v1.13.10, exists after the issue's read date
  • Upstream main already carries go-jose 4.1.6, x/mod 0.41.0, x/net 0.60.0, grpc 1.84.0
  • The change needs no code, only pin edits and ignore-entry removal

Lacks:

  • No source confirms v1.13.10 holds the five fixed module versions
  • Two later CVEs also need Go 1.26.11 or 1.27.4 and x/net 0.62.0
  • No release held the fixes on the issue's read date

Proposed design

Problem statement

The runner image and the devcontainer image build FROM the dan-petty/devtools image, which pins OpenTofu 1.13.10. That OpenTofu holds seven HIGH CVEs in its vendored Go modules and its Go standard library, and no released OpenTofu holds the fixes yet. The OpenTofu pin lives in dan-petty/devtools now, and this repository's .trivyignore.yaml holds no OpenTofu entry: the image scans report the findings to code scanning and stop no build until the SECURITY.md exception ends on 2026-12-20. The change moves the devtools tag and digest in this repository to the image that holds a fixed OpenTofu, and a person confirms the alerts close after the merge.

Acceptance criteria

Requirement: DevContainer image scan is clean

The devcontainer image MUST build from a devtools image digest whose OpenTofu holds the seven fixes.

Scenario: The devcontainer image scan names none of the seven CVEs

  • WHEN The live check DevContainer Image runs its step Scan the DevContainer Image for Vulnerabilities (.github/actions/image-scan, Trivy 0.76.2, --ignorefile .trivyignore.yaml) on the image built from the pull request's .devcontainer/Dockerfile.
  • THEN The step log table and the SARIF of category trivy-image-devcontainer hold no finding with CVE-2026-116587, CVE-2026-56864, CVE-2026-56865, CVE-2026-78669, CVE-2026-84445, CVE-2026-97054 or CVE-2026-78661.

Requirement: Runner image scan is clean

The runner image MUST build from a devtools image digest whose OpenTofu holds the seven fixes.

Scenario: The runner image scan names none of the seven CVEs

  • WHEN The live check Runner Image runs its step Scan Runner Image for Vulnerabilities (.github/actions/image-scan, Trivy 0.76.2, --ignorefile .trivyignore.yaml) on devops-cli-runner:local built from the pull request's root Dockerfile.
  • THEN The step log table and the SARIF of category trivy-image-runner hold no finding with CVE-2026-116587, CVE-2026-56864, CVE-2026-56865, CVE-2026-78669, CVE-2026-84445, CVE-2026-97054 or CVE-2026-78661.

Requirement: Pending a person after the merge

The code scanning alerts of the runner and devcontainer images MUST close after the new image publishes.

Scenario: No open alert names the seven CVEs

Existing Tool Considered

opentofu/opentofu (https://github.com/opentofu/opentofu), MPL-2.0, maintained, last activity 2026-11-23. The alternatives check of 2026-11-23 records the verdict in-use, and its block holds the Lacks list that says what the tool does not yet cover. The change adds no code and no replacement: the fix arrives as a dan-petty/devtools image digest, which .github/renovate.json:107 moves in one fix(deps): pull request, so it has no build cost.

Key questions

  • Which fixed versions must the next OpenTofu release hold?: go-jose v4.1.6 or later, x/net v0.62.0 or later, Go 1.26.11 or 1.27.4 or later, plus x/mod v0.40.0 or later and grpc v1.83.2 or later. The repository verifies the go-jose, x/net and Go fixes: the archive proposal of feat(runner): add actionlint, shellcheck, Trivy when scan passes #3108 records that go-jose v4.1.6 fixes CVE-2026-116587, .trivyignore.yaml:50 records that CVE-2026-78661 is fixed in x/net v0.62.0, and the archive proposal of fix(security): bump the pinned gh for CVE-2026-97054 #6352 records CVE-2026-97054 as fixed in Go 1.26.11 and 1.27.4, whose tags are of 2026-11-10. x/net v0.62.0 also carries the v0.60.0 fix of CVE-2026-78669. The x/mod v0.40.0 and grpc v1.83.2 fixes come from the table of the issue body alone: no repository file and no fetched page verifies those two. [sources: openspec/changes/archive/2026-11-14-3108-hold-actionlint-shellcheck-and-trivy/proposal.md:5, openspec/changes/archive/2026-11-14-3108-hold-actionlint-shellcheck-and-trivy/proposal.md:35, .trivyignore.yaml:50, openspec/changes/archive/2026-11-19-6352-bump-go-tools-cve-2026-97054/proposal.md:5, openspec/changes/archive/2026-11-19-6352-bump-go-tools-cve-2026-97054/proposal.md:11, openspec/changes/archive/2026-11-19-6352-bump-go-tools-cve-2026-97054/proposal.md:32]
  • Does the reply of 2026-11-19 change the block?: Yes. The archive proposal of fix(security): bump the pinned gh for CVE-2026-97054 #6352 records the same two findings in the OpenTofu v1.13.9 binary (opt/devops-tools/tools/tofu/1.13.9/tofu): CVE-2026-97054 in Go 1.27.3, fixed in Go 1.26.11 or 1.27.4, and CVE-2026-78661 in x/net v0.57.0, fixed in v0.62.0. So the block also needs Go 1.26.11 or 1.27.4 or later and x/net v0.62.0 or later, and the next OpenTofu release must hold both before the two entries can go. [sources: openspec/changes/archive/2026-11-19-6352-bump-go-tools-cve-2026-97054/proposal.md:5, openspec/changes/archive/2026-11-19-6352-bump-go-tools-cve-2026-97054/proposal.md:11, openspec/changes/archive/2026-11-19-6352-bump-go-tools-cve-2026-97054/proposal.md:31, openspec/changes/archive/2026-11-19-6352-bump-go-tools-cve-2026-97054/proposal.md:32]
  • Where does this repository pin OpenTofu now?: No file of this repository pins OpenTofu. The repository pins the dan-petty/devtools image by tag and digest in .devcontainer/Dockerfile:10, Dockerfile:16 and .github/workflows/rule-pack.yml:39, and .trivyignore.yaml holds only the four kubectl entries (CVE-2026-56851, CVE-2026-78669, CVE-2026-78661 and CVE-2026-97054), each scoped to usr/local/bin/kubectl with a purls list, so no OpenTofu finding is ignored. The devtools image carries OpenTofu, so a new devtools digest brings the fixed OpenTofu here. [sources: .github/workflows/rule-pack.yml:39, .trivyignore.yaml:30]
  • How does the fix reach this repository?: Take the dan-petty/devtools image update. .github/renovate.json:107 groups every devtools reference into one pull request with the prefix fix(deps):, and the root Dockerfile builds the runner image FROM that image. (best practice) [sources: .github/renovate.json:107]
    • Chosen: Take the devtools image update. Renovate moves every devtools reference in one fix pull request, and the runner and devcontainer images build FROM the image.
    • Rejected: Pin OpenTofu in this repository again. The pin moved to dan-petty/devtools, and a second pin here would disagree with it.
    • Rejected: Add an entry to .trivyignore.yaml. The scan is report-only to 2026-12-20, so an entry would hide the finding from the code scanning alert that tracks the fix, and the five OpenTofu entries are already gone.
  • Which proof does the devtools digest bump carry?: The two live image scans. The DevContainer Image job builds from .devcontainer/Dockerfile and scans the image under category trivy-image-devcontainer; the Runner Image job builds from the root Dockerfile and scans it under category trivy-image-runner. Both scans read .trivyignore.yaml, which holds no OpenTofu entry, and both run with exit-code: "0" under the SECURITY.md exception to 2026-12-20, so the pull request shows the finding in the step table and the SARIF, and the alerts close after the merge. (best practice) [sources: .github/workflows/devcontainer-image.yml:103, .github/workflows/ci.yml:692, .github/actions/image-scan/action.yml:56, SECURITY.md:121]
    • Chosen: The two live image scans. They scan the images that hold the OpenTofu binary, and their reports name the CVE IDs.
    • Rejected: A test that reads the Dockerfile digest and a go.mod fixture. It would need a hand-kept go.mod fixture of an upstream release that no tool here updates, and it proves the text of a file, not the OpenTofu in the image that the digest names.
    • Rejected: The hadolint gate row. It lints the Dockerfile syntax, not the content of the image that the digest names.
  • Does the runner image scan stop the build on these findings?: No. The Runner Image scan step sets exit-code: "0" and the DevContainer Image scan step sets exit-code: "0", both report-only, and SECURITY.md:121 records the owner's exception to 2026-12-20. The scans still write the SARIF to code scanning under their categories, so the alerts track the findings. [sources: .github/workflows/ci.yml:704, .github/workflows/devcontainer-image.yml:109, SECURITY.md:121]

Fit

Fits in one pull request.

Suspected block

A released OpenTofu version that holds go-jose v4.1.6, x/mod v0.40.0, x/net v0.62.0, grpc v1.83.2 and Go 1.26.11 or 1.27.4 or later, and a dan-petty/devtools image that pins it.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/security
    status/new
    value/high
    effort/low
    on Nov 15, 2026
  2. dan-petty commented on Nov 15, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. Five HIGH CVE findings are live in the runner image and currently suppressed by temporary .trivyignore entries.
    • Related: fix(security): bump kubectl and drop the MCP server Trivy ignores #5582, which asks for a different change. Both bump a pinned tool and drop Trivy ignore entries, and both list CVE-2026-78669 in golang.org/x/net, but the candidate bumps OpenTofu in .trivyignore while 5582 bumps kubectl in .trivyignore-mcp-server.
  3. added
    priority/p1-high
    on Nov 15, 2026
  4. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Owner question: A released OpenTofu version whose go.mod holds go-jose v4.1.6 or later, x/mod v0.40.0 or later, x/net v0.60.0 or later and grpc v1.83.2 or later.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  5. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    Two more HIGH findings in OpenTofu v1.13.9, read on 2026-11-19 with Trivy v0.76.2 on the linux-amd64 release binary:

    • CVE-2026-97054 in the Go stdlib v1.27.3, fixed in Go 1.26.11 and 1.27.4 (tags of 2026-11-10).
    • CVE-2026-78661 in golang.org/x/net v0.57.0, fixed in 0.62.0.

    v1.13.9 (2026-11-05) is still the newest release. Pull request #6370 adds both IDs to .trivyignore-tofu, with the expiry 2026-11-22 and 2026-11-21. So the next OpenTofu release must also hold Go 1.26.11 or 1.27.4 or later and x/net 0.62.0 or later before the entries can go. promtool (#6365), Trivy (#6366) and actionlint (#6367) share the CVE-2026-97054 entry, so it goes when the last of them is bumped.

  6. added a commit that references this issue on Nov 19, 2026
  7. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (6)

    Tools considered:

    Searches run:

    • OpenTofu latest release version changelog, results: 5
    • OpenTofu go.mod golang.org/x/net grpc go-jose dependency versions, results: 5
    • opentofu 1.13.10 security fixes CVE go modules, results: 5
    • opentofu v1.13.10 release notes, results: 5
    • github opentofu opentofu releases v1.13.10, results: 5
    • "opentofu" release v1.13.10 go.mod dependencies bump, results: 5

    Sources:

  8. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p1-highscope/securitysource/agentstatus/newtype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions