Repository navigation
Description
Problem or Motivation
src/devops_cli/tools_lock/tools.lock holds 20 binaries with 80 url and sha256 pairs. .devcontainer/Dockerfile repeats the 40 Linux pairs, and a test needs them equal. Dockerfile and runner_tools.py pin gh 2.102.1 with 2 more pairs. No Renovate manager reads these pins, and no project command updates them: the tools.lock header lists manual steps.
Measured on 2026-11-11: 11 of 20 binaries are behind (golangci-lint 1.64.6 to 2.15.0 is a major; trivy 0.75.0 to 0.76.2; argocd 3.5.4 to 3.6.1), and gh is 2.102.1 to 2.103.3.
Renovate's github-release-attachments datasource updates a sha256 natively. But it finds the release by the exact tag and replaces only that string. It fits 11 of 20 binaries:
- 7 put the version without
vin the file name or use a tag prefix: trivy, pluto, tuicr, gitleaks, golangci-lint, promtool, kustomize. - 2 are not on GitHub: kubectl (dl.k8s.io) and helm (get.helm.sh).
Proposed Solution & Architectural Design
- Add one devops command. The proposal names it, for example
devops tools repin <tool> <version>. - The command sets the version and writes every platform url and sha256 of the tool again in
tools.lock,.devcontainer/Dockerfile,Dockerfileandrunner_tools.py. - It takes each sha256 from the release asset digest of the GitHub REST API. It compares it with the publisher's checksum file where one exists (the per-tool sources in the
tools.lockheader). kubectl usesdl.k8s.iokubectl.sha256, and helm uses theget.helm.sh.sha256sumfile. - A checksum mismatch stops the command with an error, and the command writes no file.
--dry-runmakes no request.- Add the Renovate regex managers to
.github/renovate.json: one on each[binary.<name>]version line with its source (github-releases;kubernetes/kubernetesfor kubectl,helm/helmfor helm), and one on the Dockerfile gh url pair. - Add
postUpgradeTasksthat runuv run --frozen devops tools repin {{{depName}}} {{{newVersion}}}withexecutionMode: "update"andinstallToolspython and uv. Add the binaries to the coupled groups of ci(deps): make Renovate cover every pin on a fixed schedule #4896 (trivy, argo, cloudflared, gh). - The global
allowedCommandsof feat(deps): track regular version updates with Renovate #4893 child 4 allows only this command as an anchored regex.
One mechanism for all 20 tools is simpler than the native datasource for 11 and a second path for 9.
Target Subsystem
SDLC, Git & PR Governance (dependency updates).
Existing Tool Considered
Rejected: github-release-attachments only (fits 11 of 20); aqua with aqua-renovate-config (MIT, but it replaces the lock format, which is the scope of #4363 and #4368).
Build cost (AGENTS.md rule 3): about 250 lines of code and 300 lines of tests with recorded release JSON; about 300k tokens to build; the upkeep moves with the pins when #4363 removes tools.lock; about 3 hours of agent time.
Acceptance Criteria
- Tests that fail on the base and pass on the branch, with recorded release JSON and checksum files:
- A repin of trivy changes the version, all 4
tools.lockurls, all 4 sha256, the 2 Dockerfile urls and sha256, and nothing else. - A checksum mismatch stops the command with an error and writes no file.
- kubectl and helm take the sha256 from the publisher file.
- A repin of trivy changes the version, all 4
- The existing tests that compare
tools.lockand the Dockerfile pass after a repin. - The Renovate config has a manager for each of the 20 binaries and gh, and
renovate-config-validator --strictexits 0.
Dependencies
#4896 (the shared preset and the coupled groups). Child 3 of #4893.
Source: #4893
Alternatives check of 2026-11-14: in-use.
The repository already uses this tool.
Tool: renovatebot/renovate (https://github.com/renovatebot/renovate), AGPL-3.0, last activity 2026-11-14, maintained.
Proposed design
Problem statement
Add one devops install-tools repin <tool> <version> command and the Renovate managers, so one version bump rewrites every platform url and sha256. The pins of 20 binaries live in src/devops_cli/tools_lock/tools.lock as 80 url and sha256 pairs, and .devcontainer/Dockerfile repeats the Linux pairs; Dockerfile and runner_tools.py pin gh. No Renovate manager reads these pins, and the tools.lock header lists manual steps only. The issue measured 11 of 20 binaries behind on 2026-11-11. The work waits on #4896 for the shared preset and coupled groups, and the global allowedCommands of #4893 child 4 must allow the command.
Acceptance criteria
Requirement: Repin rewrites every platform pair
A repin of one binary tool MUST write its new version and every platform url and sha256 in src/devops_cli/tools_lock/tools.lock, .devcontainer/Dockerfile, Dockerfile and runner_tools.py, and MUST change no other value.
Scenario: trivy repin
- WHEN A repin of trivy to a new version runs against recorded release JSON and publisher checksum files
- THEN The version, the four
tools.lockurl and sha256 values and the two.devcontainer/Dockerfileurl and sha256 values hold the new version, and every other line of the four files is unchanged
Requirement: gh repin rewrites both gh pins
A repin of gh MUST write its new version and the gh url and sha256 pair in Dockerfile and the gh url and sha256 pair in runner_tools.py, and MUST change no other value.
Scenario: gh repin
- WHEN A repin of gh to a new version runs against recorded release JSON and the publisher checksum file
- THEN The gh url and sha256 pair in
Dockerfileand the gh url and sha256 pair inrunner_tools.pyhold the new version, and every other line of those two files is unchanged
Requirement: Release digests agree with the publisher file
For each GitHub tool with a publisher checksum file, the command MUST compare the release asset digest with the publisher value and MUST write the digest only when the two values equal.
Scenario: digest and publisher agree
- WHEN A repin of trivy runs against recorded release JSON and the recorded publisher checksum file with equal values
- THEN The command exits 0 and writes the digest as each trivy sha256 in
tools.lockand.devcontainer/Dockerfile
Requirement: Checksum mismatch stops the repin
The command MUST stop with an error and write no file when the release asset digest differs from the value in the publisher checksum file.
Scenario: mismatch writes nothing
- WHEN The recorded release JSON digest differs from the recorded publisher checksum file for one tool
- THEN The command exits with a non-zero status, names the tool and the two digests, and each target file keeps its bytes
Requirement: Publisher file gives the kubectl and helm sha256
For kubectl and helm the command MUST take each sha256 from the publisher checksum file, because their releases carry no asset digest.
Scenario: non-GitHub publisher checksum
- WHEN A repin of kubectl and of helm runs against the recorded
dl.k8s.iokubectl.sha256file and the recordedget.helm.sh.sha256sumfile - THEN Each sha256 written to
tools.lockequals the value in the recorded publisher file for that archive
Requirement: Dry run makes no request
The command MUST send no HTTP request and write no file when it runs with the --dry-run flag.
Scenario: dry run
- WHEN The repin command runs with
--dry-runagainst a client that records each request - THEN The client records no request and each target file keeps its bytes
Requirement: The lock and the Dockerfile stay consistent after a repin
The lock and the Dockerfile MUST stay consistent after a repin, as the existing comparison in tests/invariants/test_devcontainer_config.py checks them.
Scenario: consistency after a repin
- WHEN A test builds a temporary
tools.lockand.devcontainer/Dockerfilefrom recorded fixtures, runs a trivy repin against recorded release JSON, and applies the comparison oftests/invariants/test_devcontainer_config.py - THEN The comparison passes
Requirement: One Renovate manager per pinned binary
The Renovate configuration SHALL hold one manager for each of the 20 binaries in tools.lock and one manager for gh, and SHALL pass renovate-config-validator --strict.
Scenario: strict manager validation
- WHEN
renovate-config-validator --strict .github/renovate.jsonruns after the 21 managers are added - THEN The command exits 0 and prints no warning about a manager
Requirement: The self-hosted Renovate configuration passes the k8s check
The self-hosted Renovate configuration SHALL hold the postUpgradeTasks entry that runs the repin command for the bumped package with executionMode: "update" and installTools python and uv, and the anchored allowedCommands entry that allows only the repin command, and SHALL pass the k8s check.
Scenario: k8s config check
- WHEN
uv run devops ci --check --only k8sruns on the changedk8s/devops/renovate/configmap.yaml - THEN The command exits 0 and reports no error for the Renovate ConfigMap
Existing Tool Considered
Renovate (https://github.com/renovatebot/renovate, AGPL-3.0, last activity 2026-11-14, maintained) has the verdict in-use in the alternatives check in the issue body. The check lists what Renovate covers and lacks. The plan keeps Renovate for version detection and uses postUpgradeTasks to run the repin command, which rewrites every platform url and sha256 in the four files, checks the release asset digest against the publisher checksum file, stops on a mismatch and sends no request under --dry-run. The plan builds that command itself: about 250 lines of code and 300 lines of tests with recorded release JSON, about 300k tokens to build and keep, and about 3 hours of agent time; the upkeep moves with the pins when #4363 removes tools.lock.
Key questions
- Which mechanism updates the download pins of all 20 binaries and gh?: One
devops install-tools repin <tool> <version>command updates every pin of one tool. Renovate calls it frompostUpgradeTasksafter a version bump, and Renovate regex managers find the new version. One code path serves all 20 binaries and gh. (best practice) [sources: src/devops_cli/tools_lock/tools.lock, .github/renovate.json, k8s/devops/renovate/configmap.yaml]- Chosen: One repin command for all 20 binaries and gh. One code path to build, test and keep; the 9 tools that the native datasource cannot handle need custom logic in either design.
- Rejected:
github-release-attachmentsfor 11 tools plus a second path for 9. Two mechanisms to keep; 7 tools drop thevor use a tag prefix. - Rejected: aqua or mise. They keep checksums only in their own lock formats and cannot rewrite these files; the lock format is the scope of chore(tools): remove devops install-tools and tools.lock #4363 and feat(devcontainer): use or build Dev Container Features for the tools #4368.
- Where does each sha256 come from, and how does the command check it?: For a GitHub tool, each sha256 comes from the release asset
digestof the GitHub REST API. The command checks it against the publisher checksum file where one exists. Thetools.lockheader names the exceptions: popeyechecksums.sha256,get.helm.sh<archive>.sha256sumanddl.k8s.iokubectl.sha256give the value alone; gh-dashchecksums.txtcomes from the same release as the digest; tuicr publishes no checksum file. A mismatch stops the command with an error and writes no file. (best practice) [sources: src/devops_cli/tools_lock/tools.lock]- Chosen: Release asset digest plus the publisher checksum file. Two independent sources where the publisher publishes a file, and the lock header already records this rule.
- Rejected: Publisher checksum file alone. tuicr and gh-dash publish no independent checksum file.
- Rejected: Release asset digest alone. No second source checks the answer of the API.
- How does the command build each platform url for the new version?: The command replaces the old version string and its
v-prefixed form inside each current url with the new version. The tag and the file name then keep their shape. The lock shows both forms: the trivy tagv0.76.2with the file nametrivy_0.76.2_Linux-64bit.tar.gz, and the kustomize tagkustomize/v5.8.3. (best practice) [sources: src/devops_cli/tools_lock/tools.lock]- Chosen: Substitute the version inside the current url. The lock holds the shape of each url, so no second table can drift from it.
- Rejected: A per-tool url template table in the code. It repeats the urls of the lock and drifts from them.
- Which Renovate file holds the managers, and which holds the
postUpgradeTasksandallowedCommands?: The regex managers go in the repository Renovate configuration.github/renovate.json. ThepostUpgradeTasksandallowedCommandsgo in the self-hosted global configurationk8s/devops/renovate/configmap.yaml, because Renovate runspostUpgradeTasksonly in a self-hosted run and the configmap already holds those keys. (best practice) [sources: k8s/devops/renovate/configmap.yaml, k8s/devops/renovate/cronjob.yaml, tests/invariants/test_k8s_renovate.py, tests/core/test_renovate_config.py]- Chosen: Managers in
.github/renovate.jsonandpostUpgradeTasksink8s/devops/renovate/configmap.yaml. The repository configuration holds the managers, andpostUpgradeTasksandallowedCommandsare self-hosted keys that the configmap already holds. - Rejected: Everything in
.github/renovate.json. A hosted run ignorespostUpgradeTasksandallowedCommands.
- Chosen: Managers in
- How does Renovate trigger the repin after a version bump?:
postUpgradeTaskswithexecutionMode: "update"runsuv run --frozen devops install-tools repin {{{depName}}} {{{newVersion}}}in the same branch as the version bump.installToolsnamespythonanduv. The globalallowedCommandsof feat(deps): track regular version updates with Renovate #4893 child 4 must allow the same command as an anchored regex. (best practice) [sources: k8s/devops/renovate/configmap.yaml]- Chosen:
postUpgradeTaskswithexecutionMode: "update". It runs in the update branch, so the rewritten pins and the version bump land in one pull request. - Rejected: A manual run of the repin command. It needs a person after each Renovate pull request.
- Rejected: A repository schedule that repins every tool. It cannot know the new version per tool, and it opens no per-tool pull request.
- Chosen:
- Which command group holds the repin subcommand, and what is its interface?: The subcommand is
devops install-tools repin <tool> <version>with a--dry-runflag. The existinginstall-toolscommand ownstools.lock, and no source in the context shows a top-leveltoolscommand group. (best practice) [sources: tests/commands/test_install_tools.py, src/devops_cli/tools_lock/tools.lock]- Chosen:
devops install-tools repin <tool> <version>. It reuses the command that already ownstools.lockand adds no new command group. - Rejected:
devops tools repin <tool> <version>. It adds a new top-level command group for one subcommand, and no source shows that group.
- Chosen:
- How does each Renovate manager find the new version of its tool?: One custom regex manager per binary anchors on the version line of
[binary.<name>]and takesdatasourceTemplate: github-releaseswith thepackageNameof the tool'ssourcefield. Kubectl useskubernetes/kubernetes, helm useshelm/helm, and kustomize usesextractVersionfor itskustomize/vtags. gh gets one regex manager on its Dockerfile url pair withpackageName: cli/cli. (best practice) [sources: src/devops_cli/tools_lock/tools.lock, .github/renovate.json]- Chosen: One regex manager per binary on the version line, with the datasource from the
sourcefield. Every binary holds its GitHub source, and kubectl and helm publish their releases underkubernetes/kubernetesandhelm/helm. - Rejected: The
github-release-attachmentsdatasource on the url lines. It fits 11 of 20 tools only, and it replaces only the one string that the exact tag matches.
- Chosen: One regex manager per binary on the version line, with the datasource from the
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 12, 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.(deps)scope of the title gives the scope.The pins drift, but the candidate states no security or outage risk that needs urgent work.It keeps 20 tool pins current with checked sha256 values and less manual work.The proposal estimates 250 lines of code, 300 lines of tests and 3 hours of agent time.Both touch the tools.lock and Dockerfile pins; #4363 removes them and the candidate adds a repin command for them.dan-petty commentedon Nov 12, 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.(deps)scope of the title gives the scope.It automates a manual update step for 20 tools but is not a security fix or a blocking defect.It reduces the risk of outdated or vulnerable tool binaries by enabling automated version and checksum updates.The body estimates about 250 lines of code, 300 lines of tests, and 3 hours of agent time.Both touch tools.lock and its pins, but the candidate adds a repin command to update them while #4363 removes the lock entirely.devops-cli-service commentedon Nov 14, 2026
Alternatives check: in-use
Reason: Renovate is already used by the project, and its
github-release-attachmentsdatasource plus regex managers cover version detection for all 20 binaries and native version+sha256 rewriting for 11 of them. No tool found rewrites every platform URL and sha256 intools.lock, the Dockerfiles andrunner_tools.pyor checks the digest against the publisher's checksum file; aqua and mise keep checksums only in their own lock formats.The repository already uses this tool.
Tool: renovatebot/renovate (https://github.com/renovatebot/renovate)
Covers:
github-release-attachmentsdatasource updates a binary's version and its sha256 from the GitHub release asset digest for the 11 binaries whose asset names match the taggithub-releases,kubernetes/kubernetesfor kubectl andhelm/helmfor helm detect new versions for all 20 binaries and ghpostUpgradeTaskswithexecutionMode: "update"run a project command after an upgrade, so Renovate can trigger the repin step.github/renovate.jsonLacks:
vor uses a tag prefix: trivy, pluto, tuicr, gitleaks, golangci-lint, promtool and kustomizetools.lock,.devcontainer/Dockerfile,Dockerfileandrunner_tools.py--dry-runTools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 16, 2026
Refine cannot set this item to Ready at ac493d9 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
.github/renovate.json.devops-cli-service commentedon Nov 16, 2026
Refine cannot set this item to Ready at 62a806b while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
k8s/devops/renovate/configmap.yaml.dan-petty commentedon Nov 19, 2026
Closed as not planned. Owner decision of 2026-11-19: the devtools image (dan-petty/devtools#1) pins its tools in
mise.tomlandmise.lock, and Renovate's built-in mise manager updates both (#6402 lets the self-hosted Renovate writemise.lock). A repin command of our own and regex managers into the Dockerfile andrunner_tools.pyare against the rule that devops-cli is not a package manager. #4361 and #4363 remove the downloads that this item would repin.