Skip to content

fix(security): bump kubectl and drop the MCP server Trivy ignores #6084

Open
1 of 1 issue completed
Open

Description

@dan-petty

Update 2026-11-26 (infra move): kubectl now comes from the devtools image.

tools.lock and .trivyignore-mcp-server are gone, and the entries are in .trivyignore.yaml (to 2026-12-15). devtools 1.2.4 has kubectl v1.37.3, which still holds the old x/net and x/text. When a fixed kubectl is in dan-petty/devtools, take that image here and delete the entries. The Go stdlib 1.26.10 entry may now match nothing.


Problem

The scan of the MCP server image ignores three findings of the pinned kubectl v1.37.2 in .trivyignore.yaml:

  • CVE-2026-56851 (HIGH) in golang.org/x/text v0.40.0, fixed in 0.41.0 (GO-2026-6629).
  • CVE-2026-78669 (HIGH) in golang.org/x/net v0.57.0, fixed in 0.60.0 (GO-2026-6611).
  • CVE-2026-78661 (HIGH) in golang.org/x/net v0.57.0, fixed in 0.62.0 (GO-2026-6860).

On 2026-11-17, kubectl v1.37.2 is the newest stable release (https://dl.k8s.io/release/stable.txt). Its go.mod and the go.mod of the branch release-1.37 hold x/net v0.57.0 and x/text v0.40.0. Only the pre-release v1.38.0-beta.0 holds x/net v0.62.0 and x/text v0.43.0. #6079 renews the three entries to 2026-11-20. The first entries are from 2026-11-08, so the limit of 14 days in all is 2026-11-22 (SECURITY.md, "A Finding with No Fix"). #5582 tracked the bump before and is closed.

Expected behavior

  • When a stable kubectl release holds x/net 0.62.0 or later and x/text 0.41.0 or later, take the dan-petty/devtools image that holds it (Dockerfile, .devcontainer/Dockerfile), and delete the three entries of .trivyignore.yaml.
  • On 2026-11-20, if no such release exists, renew the entries to 2026-11-22 at most. After 2026-11-22, the owner decides.

Source: #6079

regression of #5582

Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: Renovate (https://github.com/renovatebot/renovate), AGPL-3.0, last activity 2026-12-01, maintained.
Reason: Searches found no tool that reads the Go modules of a kubectl release. Renovate proposes dependency updates and covers the version pin only. The go.mod check and the Trivy entry removal stay manual until a fixed kubectl ships.

Covers:

  • Proposes updates of pinned dependency versions
  • Keeps each version bump as a reviewable pull request
  • Reads many manifest and image tag formats

Lacks:

  • Reads the go.mod of a candidate kubectl release
  • Confirms the x/net and x/text fixed versions
  • Deletes the expired Trivy ignore entries
  • No stable kubectl release holds the fixes yet

Proposed design

Problem statement

The MCP server image pins kubectl v1.37.2. That release vendors golang.org/x/net v0.57.0 and golang.org/x/text v0.40.0, and three HIGH CVEs affect those modules. The entries in .trivyignore-mcp-server suppress the three findings until 2026-11-22. On 2026-11-20, no stable kubectl release holds the fixes; only the v1.38.0-beta.0 pre-release does. This item bumps kubectl to the first stable release with the fixes, and then deletes the three entries.

Acceptance criteria

Requirement: Kubectl pin uses a fixed stable release

The kubectl pin in src/devops_cli/tools_lock/tools.lock SHALL name a stable kubectl release whose go.mod requires golang.org/x/net v0.62.0 or later and golang.org/x/text v0.41.0 or later.

Scenario: The tools lock test reads the kubectl pin

  • WHEN uv run pytest tests/tools_lock runs after the bump
  • THEN the test passes, and the kubectl version has no -alpha, -beta or -rc suffix.

Requirement: Kubectl platform checksums

Each of the four kubectl platform entries in src/devops_cli/tools_lock/tools.lock MUST hold the sha256 of its release asset, checked against the release kubectl.sha256 file.

Scenario: The install check confirms each kubectl platform

  • WHEN uv run devops install-tools --check --target-dir <dir> runs after the bump
  • THEN the command reports each of the four kubectl platforms as present, and reports no sha256 mismatch.

Requirement: Devcontainer pins match the tools lock

The kubectl version and the linux-amd64 and linux-arm64 sha256 values in .devcontainer/Dockerfile and .devcontainer/image/devcontainer.json MUST match src/devops_cli/tools_lock/tools.lock.

Scenario: The built devcontainer reports the tools lock kubectl

  • WHEN the devcontainer image builds from .devcontainer/Dockerfile and kubectl version --client runs in the image
  • THEN the build succeeds, and the command reports the kubectl version of src/devops_cli/tools_lock/tools.lock.

Requirement: MCP server scan holds no kubectl suppression

The MCP server image scan SHALL report CVE-2026-56851, CVE-2026-78669 and CVE-2026-78661 as no finding, and .trivyignore-mcp-server SHALL list none of them.

Scenario: The MCP Server Image check passes with no kubectl suppression

  • WHEN the pull request changes the MCP server image content and the MCP Server Image check runs
  • THEN the check passes, and its Trivy output lists none of the three CVE IDs.

Existing Tool Considered

Renovate (renovatebot/renovate), verdict in-use: the repository already uses it. The alternatives check in the issue body lists what the tool covers and lacks. This proposal does what the tool lacks: the implementer reads the go.mod of the candidate stable release. The implementer then edits the binary kubectl pin in src/devops_cli/tools_lock/tools.lock and the devcontainer pins by hand, and deletes the three ignore entries. The change waits on a stable release with the fixed modules.

Key questions

  • Which stable kubectl release holds the fixed Go modules?: None on 2026-11-20. v1.37.2 is the newest stable release, and its go.mod holds golang.org/x/net v0.57.0 and golang.org/x/text v0.40.0. Only the v1.38.0-beta.0 pre-release holds golang.org/x/net v0.62.0 and golang.org/x/text v0.43.0. [sources: src/devops_cli/tools_lock/tools.lock]
  • Where do the kubectl pin, the devcontainer pins and the Trivy entries live?: src/devops_cli/tools_lock/tools.lock holds the kubectl version, the four platform URLs and the sha256 values. .devcontainer/Dockerfile and .devcontainer/image/devcontainer.json hold the devcontainer pins. .trivyignore-mcp-server holds the three kubectl CVE entries and their expiry dates. [sources: src/devops_cli/tools_lock/tools.lock, .devcontainer/image/devcontainer.json]
  • What is the limit of each kubectl suppression?: SECURITY.md allows 3 days for the first entry and at most 14 days in all. The three entries first added on 2026-11-08 reach the 14-day limit on 2026-11-22. fix(security): Renew or drop the expired kubectl ignores of the MCP image #6079 renews the three entries to 2026-11-20. [sources: SECURITY.md]
  • Should the change bump kubectl to the v1.38.0-beta.0 pre-release now, or wait for a stable release?: Wait for a stable release. The item asks for a stable release, and the lock pins exact released versions. (best practice) [sources: src/devops_cli/tools_lock/tools.lock, AGENTS.md]
    • Chosen: Wait for a stable release. The item asks for a stable release, and src/devops_cli/tools_lock/tools.lock pins exact released versions.
    • Rejected: Bump to v1.38.0-beta.0 now. It is a pre-release, and the item asks for a stable release.
    • Rejected: Build kubectl from the release branch. AGENTS.md prefers a released pin before code that the project builds and keeps.
  • Which open, maintained tool covers the kubectl pin update?: Renovate (renovatebot/renovate), verdict in-use. The repository already runs it, and the alternatives check in the issue body lists what it covers and lacks. The implementer edits the binary kubectl pin and the devcontainer pins by hand, because no configured manager reads them. (best practice) [sources: src/devops_cli/tools_lock/tools.lock]
    • Chosen: Renovate, with a hand edit for the kubectl pins. The repository already runs Renovate, and no configured manager reads the binary kubectl entry or the Dockerfile URL and sha256 lines.
    • Rejected: A project-built updater. AGENTS.md prefers an open tool; a project updater costs tokens to build, keep and fix.
    • Rejected: A hand edit with no updater. The repository already runs Renovate, so a hand edit alone would miss the next release.
  • Who decides after the 2026-11-22 limit, and what is the recommendation?: The owner decides after 2026-11-22. The recommendation is to remove kubectl from the MCP server image, or to record a new bounded exception with a reason and a new expiry. (a person decides) [sources: SECURITY.md]

Open questions

  • Who decides after the 2026-11-22 limit, and what is the recommendation? (a person decides)

Fit

Fits in one pull request.

Suspected block

A stable kubectl release whose go.mod holds golang.org/x/net v0.62.0 or later and golang.org/x/text v0.41.0 or later, and the owner decision after the 2026-11-22 limit of the entries.

Dependencies

None.

Watched files

A commit on the default branch that changes one of these files starts the next refine round.

  • src/devops_cli/tools_lock/tools.lock

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

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

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. Three live HIGH CVEs in a shipped image with ignore entries expiring on 2026-11-22.
  3. added
    priority/p1-high
    on Nov 17, 2026
  4. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Owner question: Who decides after 2026-11-22, and what is the recommendation? (a person decides)

    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. devops-cli-service commented on Nov 18, 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 (10)

    Tools considered:

    Searches run:

    • Renovate custom manager update kubectl binary version in Dockerfile and lock file, results: 5
    • tool to check which Go modules a kubectl release vendors vulnerabilities, results: 5
    • Renovate regex customManager documentation github-releases datasource, results: 5
    • govulncheck kubectl binary Go module versions, results: 5
    • Trivy ignore file expiry date CVE fixed version renewal tool, results: 5
    • renovatebot renovate custom manager regex file, results: 5
    • kubernetes kubectl release notes vendored dependencies golang.org/x/net version, results: 5
    • dependency update bot for binaries with sha256 checksums Dockerfile, results: 5
    • docs.renovatebot.com custom managers regex, results: 5
    • Renovate dependency updates Kubernetes releases, results: 5

    Sources:

  6. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    One more HIGH finding in kubectl v1.37.2, read on 2026-11-19 with Trivy v0.76.2 on the linux-amd64 release binary: CVE-2026-97054 in the Go stdlib v1.26.10, fixed in Go 1.26.11 and 1.27.4 (tags of 2026-11-10). v1.37.2 (2026-10-28) is still the newest stable release; v1.38.0-beta.0 is a pre-release.

    Pull request #6370 adds a CVE-2026-97054 entry to .trivyignore-mcp-server with the expiry 2026-11-22. Its limit of 14 days in all is 2026-12-03. The bump of kubectl must also hold Go 1.26.11 or 1.27.4 or later before this entry can go.

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

    @devops-cli-service
    Contributor

    Owner question: Who decides after the 14-day limits, and what is the recommendation? (a person decides)

    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

  9. 1 remaining item

  10. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    PR #6487 (#6412) also fails the MCP Server Image check for this reason: Trivy reports CVE-2026-56851 (golang.org/x/text v0.40.0 in kubectl v1.37.2) as HIGH, because its ignore entry expired on 2026-11-20. Job: https://github.com/dan-petty/devops-cli/actions/runs/44647316241/job/135993090046. The change of #6487 does not touch the image tools. PR #6488 renews the entry.

  11. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block and Watched files 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

  12. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions and Watched files 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

  13. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    PR #6572 (#6417) fails the MCP Server Image check for this reason. Trivy reports CVE-2026-78661 and CVE-2026-78669 (golang.org/x/net v0.57.0 in usr/local/bin/kubectl) as HIGH, because their entries in .trivyignore.yaml on main have expired_at: 2026-11-21. Job: https://github.com/dan-petty/devops-cli/actions/runs/44840721282/job/136648122309. The change of #6572 does not touch the image tools. No open pull request renews the 2 entries. Each pull request that changes the content of the MCP server image fails this check until a kubectl bump or a renewal of the entries merges.

  14. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    PR #6571 (#6407) also fails the MCP Server Image check for this cause: CVE-2026-78661 and CVE-2026-78669 in usr/local/bin/kubectl, entries with expired_at: 2026-11-21. Job: https://github.com/dan-petty/devops-cli/actions/runs/44840574144/job/136647626260. After #6407 merges, the next release fails only the Verify job of the MCP server image for this cause, and the service and runner images still get their tags.

  15. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 21, 2026
  16. added
    status/ready
    and removed
    owner/agent
    status/in-progress
    on Nov 21, 2026
  17. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    Evidence for the kubectl entries in .trivyignore.yaml, read on 2026-11-21 (about 00:07 UTC).

    Scanner (MCP Server Image, job 136648122309, target usr/local/bin/kubectl (gobinary), Total: 2 HIGH):

    • CVE-2026-78661: golang.org/x/net v0.57.0, fixed in 0.62.0.
    • CVE-2026-78669: golang.org/x/net v0.57.0, fixed in 0.60.0.
    • The other entries: CVE-2026-56851 (x/text v0.40.0, fixed in 0.41.0) and CVE-2026-97054 (Go stdlib v1.26.10, fixed in Go 1.26.11).

    Newest stable kubectl: v1.37.2 (published 2026-10-28). https://dl.k8s.io/release/stable.txt and stable-1.37.txt give v1.37.2. No v1.37.3 tag exists.

    go.mod of kubernetes/kubernetes:

    • v1.37.2: x/net v0.57.0, x/text v0.40.0, .go-version 1.26.10.
    • release-1.37: x/net v0.57.0, x/text v0.40.0, .go-version 1.26.11.
    • v1.38.0-beta.0 (pre-release, 2026-11-06): x/net v0.62.0, x/text v0.43.0.
    • v1.36.6 and v1.35.10: x/net v0.56.0, x/text v0.39.0.

    Source of kubectl: Dockerfile:169 copies /usr/local/bin/kubectl from the devtools image (Dockerfile:15). The devtools repository pins kubectl = "1.37.2" in mise.toml (aqua backend in mise.lock). A devtools bump has no newer stable release to take.

    14-day counts (git log -S on .trivyignore.yaml, .trivyignore-mcp-server and .trivyignore):

    Local check: Trivy v0.76.2 (DB of 2026-11-20), trivy rootfs --scanners vuln --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 on a root with the kubectl v1.37.2 binary at usr/local/bin/kubectl: exit 1 with the ignore file of main (CVE-2026-78661 and CVE-2026-78669), exit 0 with the file of #6574.

    Owner decision of 2026-11-21: extend the four kubectl entries to 2026-12-15, past the 14-day limit. #6574 (Closes #6573) sets the date. The kubectl bump of #6084 deletes the entries.

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/readytype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions