Repository navigation
Description
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
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
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 -qruns. - THEN It exits 0, and the guard test finds
kubectlandkube-linterintool_names()and neither name inNOT_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
kubectlandkube-linterentries ofRUNNER_TOOLS. - THEN
kubectlhassourceToolSource.DEVTOOLSandcheck("kubectl", "version", "--client");kube-linterhassourceToolSource.DEVTOOLSandcheck("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
kubectlorkube-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
kubectlandkube-linter?:RUNNER_TOOLSholdskubectlwithtest:liveand the check("kubectl", "version", "--client"), andkube-linterwithgate:staticand the check("kube-linter", "version").NOT_IN_RUNNERnames neither. [sources: src/devops_cli/roadmap/runner_tools.py] - Which
ToolSourcedo the two entries take, and where does the version come from?: Both entries takeToolSource.DEVTOOLS. The runner image builds FROM the devtools image, and theDockerfilepins 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 entersNOT_IN_RUNNER, and that each entry keepsToolSource.DEVTOOLSand 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
sourceorcheck. - 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.
- Rejected: Only membership. It misses a silent change of
- 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
getfromdelete.
- 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-lintercatalog work still need work here?: No.RUNNER_TOOLSholdskube-linterwithgate:staticand 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 nokube-linterentry. [sources: src/devops_cli/roadmap/runner_tools.py]
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 5, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.Useful for agent capability but blocked on a security decision and not blocking other work.Enables manifest inspection but is one of many tools in the broader catalog.Requires a runner image change, a read-only policy, two tests, and a security decision.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.devops-cli-service commentedon Nov 6, 2026
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.
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.feat(roadmap): list the local devops commands in the shell catalog (#…
[-]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[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 64 characters, and the limit is 60. The type and the scope stay.
feat(roadmap): add read-only kubectl and kube-linter to the runner tool catalogfeat(roadmap): Add kubectl and kube-linter to runner tool catalogdevops-cli-service commentedon Nov 13, 2026
Status set to Ready at 4ef7c6f (see proposed design in issue body).
Moved to new items: #5394.
devops-cli-service commentedon Nov 15, 2026
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:
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 aspath:def nameorpath:class name, which stays true when the line moves. Group 2 (List kubectl in the runner tool catalog) has the test tasktests/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 asAdd 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 tasktests/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 asAdd a test in tests/roadmap/test_feature.py for <behavior>. Write the task as a sentence. The Feasibility section states thatDockerfile:90: --tool promtool --target-dir /opt/devops-tools/bin && \was read, but the run did not read it.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.src/devops_cli/tools_lock/tools.lock, and no group lists it inchangesorcreates. 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.2was read, but the run did not read it..trivyignore-mcp-server:5:in golang.org/x/text v0.40.0, vendored by pinned kubectl v1.37.2was read, but the run did not read it.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.
devops-cli-service commentedon Nov 15, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
docs(openspec): plan #3827 Run review scanners in the runner pod (#6105)
dan-petty commentedon Nov 20, 2026
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.
devops-cli-service commentedon Nov 20, 2026
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.
devops-cli-service commentedon Nov 25, 2026
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.