Repository navigation
feat: build and publish the devtools image from debian sid - #3
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
|
All checks pass on head aa9d707. The PR stays a draft for the owner review. The push, verify and publish jobs run only on main, so their times come from the first run after the merge. Review findings, round 2 (head aa9d707)CI run 44553543853. The branch is on the current
Trivy gives the same counts as on bf87b87: 645 Go binary findings, 306 HIGH or CRITICAL with a fix, and 6 MEDIUM Python findings. The run has no annotation.
To check after the merge: the time of the push job and the verify job, and the code scanning result of the next pull request. Weaver (head bf87b87)dan-petty/devops-cli#6423 removes a copied weaver version from devops-cli, so this image now has weaver, the CLI of the OpenTelemetry semantic conventions. The mise registry and the aqua registry have no entry for
The tool test now runs 64 commands. No other entry of ProofHead f37c5ce, CI run 44538273914. Each platform builds natively on its GitHub-hosted runner (
The run has no warning annotation. The metadata-action warnings and the osv-scanner Trivy on the two platforms: The Trivy cache: a pull request restores the cache that main saved. Main has no run yet, so this run shows Review findings
argocd goes to 3.6.2 (released on 2026-11-18). The new lock checksums of the two platforms agree with Other checks:
Gates
|
One image, ghcr.io/dan-petty/devtools, FROM debian:sid, with the tools of the devops-cli devcontainer, its runner and Job images, its tools.lock and its devcontainer features. Each tool has one source: - apt, floating with sid, for each tool that sid has at a current version. Podman takes the place of Docker. - mise.toml and mise.lock (sha256 of each linux-x64 asset) for the other binary tools. `mise install --locked` installs them, and the build copies each command as a real file to /usr/local/bin. - the uv image for uv, and hashed uv locks in python/ for semgrep and pre-commit, each in its own virtual environment. - npm/package.json and its lockfile for the Node tools, installed with `npm ci --ignore-scripts`. The versions start at the pins of devops-cli, so that the first image holds the same tools. The image has no login user and is for linux/amd64 only. The Image workflow builds the image, runs each tool once with no network, copies gh into python:3.14-slim-trixie, scans the lock files with osv-scanner and the image with Trivy (SARIF, a summary with the detected OS and the finding counts, and a HIGH/CRITICAL gate). On main it pushes the image by digest with SBOM and provenance, attests the build provenance and tags the digest. A daily run rebuilds with --pull --no-cache. Renovate updates every version with built-in managers only. python/osv-scanner.toml ignores 6 semgrep advisories that no semgrep release fixes, until 2026-11-22 (#2).
With no network, semgrep --version waits 98 s for the timeout of its version check, and SEMGREP_ENABLE_VERSION_CHECK=0 does not stop it. The --disable-version-check flag does. The tool test now takes 5 s.
Each platform builds natively on a GitHub-hosted runner of its own architecture: ubuntu-24.04 and ubuntu-24.04-arm, with no emulation. Each platform job builds the image, runs test/tools.sh with no network, the copy probe, osv-scanner and Trivy. Each Trivy SARIF has the category of its platform. On main, each platform job pushes its image by digest with SBOM and provenance. Then the publish job makes one manifest list with docker buildx imagetools create, tags it and attests its build provenance. mise.lock holds the URL and checksum of each tool for linux-x64 and linux-arm64. The Dockerfile has no code for one platform: npm rebuild runs the install script of Claude Code, which allowScripts approves, and the script links the native binary of the build platform. A tool with no build for the platform fails the build: mise install --locked, UV_NO_BUILD for the Python wheels, and claude --version for the Claude Code binary. Update 8 tools to their newest release: golangci-lint 2.15.0, vale 3.27.0, gh-dash 4.26.3, pluto 5.24.5, osv-scanner 2.7.1, tflint 0.66.0, cloudflared 2026.11.1 and tuicr 0.29.0.
A paragraph of the README had 8 sentences. ASD-STE100 permits at most 6.
The owner decision of 2026-11-19 in #1 makes the Trivy scan of the image report-only. The Go binaries of upstream tools at their newest release hold HIGH and CRITICAL findings that no change here can fix. The gate stays on the lock files: osv-scanner fails the job on a finding in the npm and Python locks. The test job builds with the docker driver of the default builder. The image goes into the image store of Docker with no export, so the job does not compress and send a tarball of the 4.6 GB image. The test job restores the Trivy databases from a daily cache, and only main saves it. The test job cannot write packages. On main, a push job of its own builds each platform again, pushes it by digest with SBOM and provenance, and runs the tool test on the pushed digest. test/tools.Dockerfile runs test/tools.sh with no network. Each command of test/tools.sh has a timeout of 60 s, shorter than the step timeout. osv-scanner.toml uses effectiveUntil in place of the deprecated ignoreUntil. The test job has no metadata step, so it writes no warning about tags. argocd goes to 3.6.2, its newest release.
devops-cli needs weaver, the CLI of the OpenTelemetry semantic conventions, in this image (devops-cli #6423). The mise registry and the aqua registry have no entry for open-telemetry/weaver, so mise.toml uses the github backend, as for the other tools with no short name. mise lock wrote the URL and the sha256 of the gnu archive of each platform. The checksums agree with sha256.sum of the v0.28.0 release, and mise verified the GitHub artifact attestation of each archive (provenance = "github-attestations"). No other lock entry changed. The copy loop of the Dockerfile copies weaver to /usr/local/bin, and test/tools.sh runs weaver --version through its timeout wrapper.
- Each step of the Image workflow has a timeout that is shorter than its job. - test/tools.sh checks containers-storage, and names each missing command. - On main, a verify job runs the tool test, the copy probe and the report-only Trivy scan on the pushed digest of each platform. The SARIF goes to the category trivy-pushed-<arch>. test/trivy.sh holds the scan of the two jobs. - The publish job tags the manifest list with the date, attests it, and then moves latest to it. The step stops if latest gets a different digest. - DEVTOOLS has the default scratch in the test Dockerfiles. Renovate skips scratch, and the build fails when DEVTOOLS is not set. - The image has mise, from the pinned mise image. The tool test runs mise --version.
bf87b87 to
aa9d707
Compare
One image,
ghcr.io/dan-petty/devtools, FROMdebian:sid, for linux/amd64 and linux/arm64. It holds the tools of the devops-cli devcontainer, runner and Job images,tools.lockand devcontainer features. It has no login user.Each tool has one source:
mise.tomlandmise.lock: the URL and sha256 of each asset for linux-x64 and linux-arm64,mise install --locked, real files in/usr/local/bin.npm ci --ignore-scripts.The versions start at the devops-cli pins. 9 tools are at their newest release: golangci-lint 2.15.0, vale 3.27.0, gh-dash 4.26.3, pluto 5.24.5, osv-scanner 2.7.1, tflint 0.66.0, cloudflared 2026.11.1, tuicr 0.29.0 and argocd 3.6.2. The image also has OpenTelemetry Weaver 0.28.0, its newest release, because dan-petty/devops-cli#6423 removes the weaver version that devops-cli copied.
The Dockerfile has no code for one platform.
npm rebuildruns one install script, that of Claude Code, whichallowScriptsapproves. The script links the native binary of the build platform. A tool with no build for a platform fails the build:mise install --locked,UV_NO_BUILD=1andclaude --version. The README names each tool with no arm64 build. On 2026-11-19 there is none.The Image workflow has a test job for each platform, on a GitHub-hosted runner of that architecture (
ubuntu-24.04,ubuntu-24.04-arm), with no emulation. Its token cannot write packages. It builds the image with the docker driver, so Docker gets the image with no tarball.test/tools.Dockerfileruns each tool once with no network, and each command has a timeout of 60 s. The job copiesghintopython:3.14-slim-trixieand runs osv-scanner on the lock files.osv-scanner is the gate: a finding in the npm or Python locks fails the job. The Trivy scan of the image is report-only (owner decision of 2026-11-19 in #1). It writes SARIF in the category of the platform, and the job summary names the OS and the finding counts. The Trivy databases come from a daily cache that only main saves.
On main, a push job for each platform builds the image again with the docker-container driver, and pushes it by digest with SBOM and provenance. Then a verify job for each platform runs the tool test, the copy probe and the report-only Trivy scan on the pushed digest (SARIF category
trivy-pushed-<arch>). The publish job makes one manifest list withdocker buildx imagetools createand the date tag, attests its build provenance, and then moveslatestto it. Only the push and publish jobs can write packages. A daily run rebuilds the two platforms with--pull --no-cache. Renovate uses built-in managers only.Closes #1