Skip to content

feat(roadmap): Add kubectl and kube-linter to runner tool catalog #3562

Open

Description

@devops-cli-service

Update 2026-11-26 (infra move): RUNNER_TOOLS already holds kubectl and kube-linter, from the dan-petty/devtools image, and NOT_IN_RUNNER names neither. The first part below is out of date. Follow the proposed design: only its guard test is left, and the item still waits on #6521.


Split from #3041.

The implement agent cannot inspect manifests with kubectl or kube-linter. The runner image holds both tools from the devtools image (RUNNER_TOOLS in src/devops_cli/roadmap/runner_tools.py). A Job has no cluster token. A scanner on PATH also fails tests that pass in the gate (#2165). Adding them changes the runner image and needs a new security decision. This part is deferred from #3041. Acceptance criteria: the runner image SHALL include kubectl and kube-linter; the catalog SHALL list both tools with a read-only policy and no cluster token; a test SHALL verify that kubectl version --client and kube-linter version run in the runner shell; a test SHALL verify that neither tool can change a cluster resource.

Dependencies

Proposed design

Problem statement

Add one guard test. The runner catalog already holds kubectl and kube-linter. No test fails when either entry leaves the catalog. The guard test keeps both entries, their devtools source and their version checks. The live-cluster read-only proof moves to a new issue. The item waits on #6521.

Acceptance criteria

Requirement: Catalog guard keeps both clients

The catalog guard test SHALL assert that tool_names() holds kubectl and kube-linter and that NOT_IN_RUNNER holds neither name.

Scenario: Both clients stay in the catalog

  • WHEN uv run pytest tests/roadmap/test_roadmap_runner_tools.py -q runs.
  • THEN It exits 0, and the guard test finds kubectl and kube-linter in tool_names() and neither name in NOT_IN_RUNNER.

Requirement: Entries keep their source and check

The kubectl entry MUST keep ToolSource.DEVTOOLS and the check ("kubectl", "version", "--client"), and the kube-linter entry MUST keep ToolSource.DEVTOOLS and the check ("kube-linter", "version").

Scenario: Source and check of each client

  • WHEN The guard test reads the kubectl and kube-linter entries of RUNNER_TOOLS.
  • THEN kubectl has source ToolSource.DEVTOOLS and check ("kubectl", "version", "--client"); kube-linter has source ToolSource.DEVTOOLS and check ("kube-linter", "version").

Requirement: Runner image smoke step proves both clients

The runner image smoke step SHALL keep python -m devops_cli.roadmap.runner_tools as its check, and the step MUST exit 0 only when the checks of kubectl and kube-linter pass.

Scenario: Image smoke step

  • WHEN The runner image smoke step runs python -m devops_cli.roadmap.runner_tools.
  • THEN It exits 0 and prints no failure line for kubectl or kube-linter.

Existing Tool Considered

No alternatives check has run on this item. kubectl from Kubernetes SIG CLI and kube-linter from StackRox are open, maintained tools. Both already sit in the runner image through the devtools image. The item adds no tool and no image step. The only code is a guard test of about 20 lines. Its cost is about 2,000 tokens and less than 1 hour to write, keep and fix.

Key questions

  • Which entries does the runner catalog already hold for kubectl and kube-linter?: RUNNER_TOOLS holds kubectl with test:live and the check ("kubectl", "version", "--client"), and kube-linter with gate:static and the check ("kube-linter", "version"). NOT_IN_RUNNER names neither. [sources: src/devops_cli/roadmap/runner_tools.py]
  • Which ToolSource do the two entries take, and where does the version come from?: Both entries take ToolSource.DEVTOOLS. The runner image builds FROM the devtools image, and the Dockerfile pins that image by digest. The module holds no tool version. [sources: src/devops_cli/roadmap/runner_tools.py]
  • What should the guard test assert?: The guard test asserts that both names stay in RUNNER_TOOLS, that neither name enters NOT_IN_RUNNER, and that each entry keeps ToolSource.DEVTOOLS and its version check. (best practice) [sources: tests/roadmap/test_roadmap_runner_tools.py, src/devops_cli/roadmap/runner_tools.py]
    • Rejected: Only membership. It misses a silent change of source or check.
    • Chosen: Membership, source and check. It catches the catalog regression and keeps the devtools source and the version command.
    • Rejected: No new test. No test fails when an entry leaves the catalog today.
  • How does the runner keep the two clients read-only with no cluster token?: The pod holds no Kubernetes token, and the image holds no kubeconfig. Neither client has a credential. The change adds no shell filter, because the shell checks only the first word of a command and is no security boundary. (best practice) [sources: CONTEXT.md, docs/CLUSTER.md]
    • Chosen: No token, no kubeconfig. The runner pod has no Kubernetes credential, and a client-side render needs none.
    • Rejected: Service account token with a read-only Role. The pod would hold a token, and this item needs no cluster read.
    • Rejected: Shell filter of kubectl subcommands. The shell checks only the first word, so it cannot separate get from delete.
  • Should the live-cluster proof that neither client can change a resource stay in this item?: No. The proof needs a live cluster and a credential. The runner has no token, and the offline gate has no cluster. Defer the proof to a new issue. (best practice) [sources: CONTEXT.md, docs/CLUSTER.md, src/devops_cli/roadmap/runner_tools.py]
    • Rejected: Keep the live proof here. It needs a live cluster and a credential that the offline gate and the runner do not have.
    • Chosen: Defer to a new issue. The catalog guard test needs no cluster, so the rest of the item can reach Ready.
  • Does the kube-linter catalog work still need work here?: No. RUNNER_TOOLS holds kube-linter with gate:static and the check ("kube-linter", "version"). feat(roadmap): Add kube-linter to the runner tool catalog #5394 holds the earlier deferred catalog part. This item changes no kube-linter entry. [sources: src/devops_cli/roadmap/runner_tools.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6521

Moved to new items

#5394

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 5, 2026
  2. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    ContributorAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Useful for agent capability but blocked on a security decision and not blocking other work.
    • Value: Medium. Enables manifest inspection but is one of many tools in the broader catalog.
    • Effort: Medium. Requires a runner image change, a read-only policy, two tests, and a security decision.
    • Related: feat(roadmap): the implement agent can use the project's development tools #3041, which asks for a different change. Both extend the runner tool catalog for the implement agent; #3041 is the umbrella for all tools, this candidate is the kubectl and kube-linter slice.
  3. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    ContributorAuthor

    Refine cannot set this item to Ready at e9bf5a9 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.

    • Does the owner accept a Kubernetes client and a scanner in the runner image? (a person decides)

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: src/devops_cli/roadmap/runner_tools.py.

  4. changed the title [-]feat(roadmap): add read-only kubectl and kube-linter to the runner tool catalog[/-] [+]feat(roadmap): Add kubectl and kube-linter to runner tool catalog[/+] on Nov 6, 2026
  5. dan-petty commented on Nov 6, 2026

    @dan-petty
    Owner

    The job shortened the title of this item. The summary had 64 characters, and the limit is 60. The type and the scope stay.

    • Before: feat(roadmap): add read-only kubectl and kube-linter to the runner tool catalog
    • After: feat(roadmap): Add kubectl and kube-linter to runner tool catalog
    • Source of the summary: the background model
  6. added
    status/ready
    and removed
    status/new
    on Nov 13, 2026
  7. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    ContributorAuthor

    Status set to Ready at 4ef7c6f (see proposed design in issue body).

    Moved to new items: #5394.

  8. added
    owner/service
    and removed
    owner/service
    on Nov 15, 2026
  9. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    ContributorAuthor

    The stage job could not plan this item 3 times on the same body, and the limit is 3. The stage job returns the item to New and plans no change. These are the problems of the last plan, in sequence. The last problem stopped the plan:

    • The feasibility of the plan cites src/devops_cli/roadmap/implement/implement_shell_policy.py, and the staged file holds no such text there. Cite the text of the line in a code span at the staged commit, or cite a symbol as path:def name or path:class name, which stays true when the line moves. Group 2 (List kubectl in the runner tool catalog) has the test task tests/roadmap/test_roadmap_runner_tools.py::test_tool_names_holds_kubectl_and_not_in_runner_does_not, and it holds one word. A task holds a verb and an object, such as Add a test in tests/roadmap/test_feature.py for <behavior>. Write the task as a sentence. Group 3 (Admit only the client side of kubectl in the shell) has the test task tests/roadmap/implement/test_roadmap_implement_shell_policy.py::test_the_shell_refuses_a_kubectl_subcommand_that_changes_a_cluster, and it holds one word. A task holds a verb and an object, such as Add a test in tests/roadmap/test_feature.py for <behavior>. Write the task as a sentence. The Feasibility section states that Dockerfile:90: --tool promtool --target-dir /opt/devops-tools/bin && \ was read, but the run did not read it.
    • The Feasibility section states that Dockerfile:89:RUN DEVOPS_CLI_USER_DATA_ROOT=/opt/devops-tools /app/.venv/bin/devops install-tools \ was read, but the run did not read it.
    • A What Changes item names src/devops_cli/tools_lock/tools.lock, and no group lists it in changes or creates. List the path in the group that changes or creates it, or remove it from What Changes. The Feasibility section states that .trivyignore-mcp-server:5:CVE-2026-56851 (HIGH) in golang.org/x/text v0.40.0, vendored by pinned kubectl v1.37.2 was read, but the run did not read it.
    • The Feasibility section states that .trivyignore-mcp-server:5:in golang.org/x/text v0.40.0, vendored by pinned kubectl v1.37.2 was read, but the run did not read it.
    • The text of the requirement The runner image passes the image scan has 614 characters, and the most is 500. Move the details into a scenario, or split the requirement.

    Refine reads this comment when it looks at the item again. After a second return on the same body, only a reply or a body edit makes refine look at the item again.

  10. added
    status/new
    and removed
    status/ready
    owner/service
    on Nov 15, 2026
  11. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    ContributorAuthor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  12. added a commit that references this issue on Nov 17, 2026
  13. dan-petty commented on Nov 20, 2026

    @dan-petty
    Owner

    Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.

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

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  15. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

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/mediumpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions