Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
]
},
{
"description": "A base image update of the service image is a fix, so release-please releases it. Other updates stay chore and release nothing alone, except a chart update.",
"description": "An update of a base image of the root Dockerfile is a fix, so release-please releases it. The devtools image is the base of the runner image. The Python, uv and Node images are the bases of the Service and MCP server images. Other updates stay chore and release nothing alone, except a chart update.",
"matchManagers": ["dockerfile"],
"matchFileNames": ["Dockerfile"],
"commitMessagePrefix": "fix(deps):"
Expand All @@ -228,13 +228,13 @@
"groupName": "cloudflared"
},
{
"description": "The Dockerfile and the setup-uv version inputs. The uv image of the service image's Dockerfile is a fix by the base image rule, and a group takes the prefix of its first update, so the group sets the prefix itself.",
"description": "The uv image of the Dockerfile and the setup-uv version inputs. The builds of the Service and MCP server images use that image. The runner image gets uv from the devtools image. The uv image is a fix by the base image rule. A group takes the prefix of its first update, so the group sets the prefix itself.",
"matchPackageNames": ["astral-sh/uv", "ghcr.io/astral-sh/uv"],
"groupName": "uv",
"commitMessagePrefix": "fix(deps):"
},
{
"description": ".node-version and the node image. The node image of the service image's Dockerfile is a fix by the base image rule, and a group takes the prefix of its first update, so the group sets the prefix itself.",
"description": ".node-version and the node image. The node image of the Dockerfile is a fix by the base image rule. A group takes the prefix of its first update, so the group sets the prefix itself.",
"matchPackageNames": ["node"],
"groupName": "node",
"commitMessagePrefix": "fix(deps):"
Expand All @@ -261,14 +261,15 @@
"commitMessagePrefix": "fix(deps):"
},
{
"description": "The actionlint image of the Dockerfile and of the ci.yml step.",
"description": "The actionlint image of the ci.yml step. The runner image and the devcontainer get actionlint from the devtools image.",
"matchPackageNames": ["kjanat/actionlint", "docker.io/kjanat/actionlint"],
"groupName": "actionlint"
},
{
"description": "The devtools image of .devcontainer/Dockerfile and of each other Dockerfile or workflow that names it, for each manager: one pull request moves every reference.",
"description": "The devtools image of .devcontainer/Dockerfile, of the root Dockerfile and of each workflow that names it, for each manager: one pull request moves every reference. The runner image builds FROM the image, so the update is a fix. A group takes the prefix of its first update, so the group sets the prefix itself.",
"matchPackageNames": ["ghcr.io/dan-petty/devtools"],
"groupName": "devtools"
"groupName": "devtools",
"commitMessagePrefix": "fix(deps):"
},
{
"description": "The DCGM exporter chart and image: the exporter version of the image tag is the version of the chart. A group takes the prefix of its first update, so the group sets the fix prefix of a chart update.",
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
run: uv run devops install-tools --tool kube-linter --only-missing

# The pinned actionlint image validates the workflows, and the gate below skips its actionlint
# row, so actionlint runs once (#1119). The devcontainer gets actionlint from the devtools
# image. Renovate moves each of the two pins.
# row, so actionlint runs once (#1119). The devcontainer and the runner image get actionlint
# from the devtools image. Renovate moves the pin of this step.
- name: Run actionlint
uses: docker://docker.io/kjanat/actionlint:1.17.1@sha256:c0a63b3e5c974c2466ead39404b70e448176beaff8c5ec7af0b2e96191aea661

Expand Down Expand Up @@ -517,9 +517,8 @@ jobs:

# Builds, smoke-tests and scans the runner image of every pull request but the release pull
# request, without pushing it; release.yml publishes it when a release is created (#2667). It
# runs next to the Service image job, so it adds no time to that job. It builds the stages that
# it shares with that job, such as `builder`, again: it reads only the cache that the release
# writes on main.
# runs next to the Service image job, so it adds no time to that job. It shares only the `lock`
# stage with that job, and it reads only the cache that the release writes on main.
runner-image:
name: Runner Image
if: >-
Expand Down Expand Up @@ -586,9 +585,6 @@ jobs:
load: true
push: false
tags: devops-cli-runner:local
# The stage runs `apt-get upgrade`: never reuse it, or a cached layer keeps packages a
# security update has since fixed.
no-cache-filters: runner
# Reads the cache that the release writes on main, as the Service image job does.
cache-from: type=gha,scope=runner

Expand All @@ -599,10 +595,10 @@ jobs:
run: |
docker run --rm --entrypoint id "$IMAGE" -u
docker run --rm "$IMAGE" --version
# The build ran the check of every tool in RUNNER_TOOLS (src/devops_cli/roadmap/runner_tools.py), so a missing tool failed it. Here the check runs again on the loaded image, and the size of the image stays under its bound.
docker run --rm -e DEVOPS_CLI_USER_DATA_ROOT=/opt/devops-tools --entrypoint python "$IMAGE" -m devops_cli.roadmap.runner_tools
# The check runs the version command of every tool in RUNNER_TOOLS (src/devops_cli/roadmap/runner_tools.py) on the loaded image, so a missing tool fails it. The size of the image stays under its bound.
docker run --rm --entrypoint python "$IMAGE" -m devops_cli.roadmap.runner_tools
size=$(docker image inspect "$IMAGE" --format '{{.Size}}')
if [ "$size" -gt 3000000000 ]; then echo "The runner image is $size bytes, over the bound of 3000000000."; exit 1; fi
if [ "$size" -gt 7000000000 ]; then echo "The runner image is $size bytes, over the bound of 7000000000."; exit 1; fi
docker run --rm --read-only --tmpfs /tmp --tmpfs /home/devops:mode=1777 --cap-drop ALL --security-opt no-new-privileges --entrypoint python "$IMAGE" -c "import getpass, pathlib, subprocess; from devops_cli.config.settings import load_settings; from devops_cli.core.process import run_subprocess; from devops_cli.output.file_writer import write_text_file; write_text_file(load_settings().data.dir / 'probe.txt', 'ok'); repo = pathlib.Path.home() / 'probe'; subprocess.run(['git', 'init', '-q', str(repo)], check=True); assert run_subprocess(['git', 'status', '--porcelain'], cwd=repo).returncode == 0; assert getpass.getuser() == 'devops'"
if docker run --rm --entrypoint sh "$IMAGE" -c 'command -v gcc'; then exit 1; fi
# The job and its steps run `uv run` in a worktree: the checkout's .python-version names a patch release that the base image can lack.
Expand All @@ -615,6 +611,10 @@ jobs:
with:
image-ref: devops-cli-runner:local
category: trivy-image-runner
# Report only: the runner builds FROM the devtools image, and the findings of its tool
# binaries go to code scanning and stop no build (SECURITY.md, Dedicated Development
# Resources and Sandboxes). The Service and MCP server scans keep the gate.
exit-code: "0"

# Builds, smoke-tests and scans the MCP server image of every pull request but the release pull
# request, without pushing it (#3220).
Expand Down Expand Up @@ -695,8 +695,8 @@ jobs:
run: |
docker run --rm --entrypoint id "$IMAGE" -u
docker run --rm "$IMAGE" --version
docker run --rm -e DEVOPS_CLI_USER_DATA_ROOT=/opt/devops-tools --entrypoint devops "$IMAGE" install-tools --check --tool kubectl --target-dir /opt/devops-tools/bin
docker run --rm -e DEVOPS_CLI_USER_DATA_ROOT=/opt/devops-tools --entrypoint devops "$IMAGE" install-tools --check --tool helm --target-dir /opt/devops-tools/bin
docker run --rm --entrypoint kubectl "$IMAGE" version --client
docker run --rm --entrypoint helm "$IMAGE" version
size=$(docker image inspect "$IMAGE" --format '{{.Size}}')
if [ "$size" -gt 3000000000 ]; then echo "The mcp-server image is $size bytes, over the bound of 3000000000."; exit 1; fi

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,6 @@ jobs:
load: true
push: false
tags: devops-cli-runner:local
# The stage runs `apt-get upgrade`: never reuse it, or a cached layer keeps packages a
# security update has since fixed.
no-cache-filters: runner
cache-from: type=gha,scope=runner

- name: Run Runner Image Smoke Test
Expand All @@ -487,10 +484,10 @@ jobs:
run: |
docker run --rm --entrypoint id "$IMAGE" -u
docker run --rm "$IMAGE" --version
# The build ran the check of every tool in RUNNER_TOOLS (src/devops_cli/roadmap/runner_tools.py), so a missing tool failed it. Here the check runs again on the loaded image, and the size of the image stays under its bound.
docker run --rm -e DEVOPS_CLI_USER_DATA_ROOT=/opt/devops-tools --entrypoint python "$IMAGE" -m devops_cli.roadmap.runner_tools
# The check runs the version command of every tool in RUNNER_TOOLS (src/devops_cli/roadmap/runner_tools.py) on the loaded image, so a missing tool fails it. The size of the image stays under its bound.
docker run --rm --entrypoint python "$IMAGE" -m devops_cli.roadmap.runner_tools
size=$(docker image inspect "$IMAGE" --format '{{.Size}}')
if [ "$size" -gt 3000000000 ]; then echo "The runner image is $size bytes, over the bound of 3000000000."; exit 1; fi
if [ "$size" -gt 7000000000 ]; then echo "The runner image is $size bytes, over the bound of 7000000000."; exit 1; fi
docker run --rm --read-only --tmpfs /tmp --tmpfs /home/devops:mode=1777 --cap-drop ALL --security-opt no-new-privileges --entrypoint python "$IMAGE" -c "import getpass, pathlib, subprocess; from devops_cli.config.settings import load_settings; from devops_cli.core.process import run_subprocess; from devops_cli.output.file_writer import write_text_file; write_text_file(load_settings().data.dir / 'probe.txt', 'ok'); repo = pathlib.Path.home() / 'probe'; subprocess.run(['git', 'init', '-q', str(repo)], check=True); assert run_subprocess(['git', 'status', '--porcelain'], cwd=repo).returncode == 0; assert getpass.getuser() == 'devops'"
if docker run --rm --entrypoint sh "$IMAGE" -c 'command -v gcc'; then exit 1; fi
# The job and its steps run `uv run` in a worktree: the checkout's .python-version names a patch release that the base image can lack.
Expand All @@ -502,6 +499,10 @@ jobs:
with:
image-ref: devops-cli-runner:local
category: trivy-image-runner
# Report only: the runner builds FROM the devtools image, and the findings of its tool
# binaries go to code scanning and stop no build (SECURITY.md, Dedicated Development
# Resources and Sandboxes). The Service and MCP server scans keep the gate.
exit-code: "0"

# Pushed by digest only: the tags move to the digest once its provenance is attested, so
# a tag never names an unattested image and a failed attestation is retried by a re-run.
Expand All @@ -516,7 +517,6 @@ jobs:
outputs: type=image,name=${{ env.RUNNER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
labels: ${{ steps.meta.outputs.labels }}
sbom: true
no-cache-filters: runner
cache-from: type=gha,scope=runner
# The one write of the cache of this image, as in the Service image job (#4646).
cache-to: type=gha,scope=runner,mode=max
Expand Down Expand Up @@ -612,8 +612,8 @@ jobs:
run: |
docker run --rm --entrypoint id "$IMAGE" -u
docker run --rm "$IMAGE" --version
docker run --rm -e DEVOPS_CLI_USER_DATA_ROOT=/opt/devops-tools --entrypoint devops "$IMAGE" install-tools --check --tool kubectl --target-dir /opt/devops-tools/bin
docker run --rm -e DEVOPS_CLI_USER_DATA_ROOT=/opt/devops-tools --entrypoint devops "$IMAGE" install-tools --check --tool helm --target-dir /opt/devops-tools/bin
docker run --rm --entrypoint kubectl "$IMAGE" version --client
docker run --rm --entrypoint helm "$IMAGE" version
size=$(docker image inspect "$IMAGE" --format '{{.Size}}')
if [ "$size" -gt 3000000000 ]; then echo "The mcp-server image is $size bytes, over the bound of 3000000000."; exit 1; fi

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service-image-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
-v "$TOOLS_DIR:$TOOLS_DIR:ro" \
-w /workspace/project \
-e PYTHONPATH="/opt/service-test/boot" \
-e PATH="/app/.venv/bin:/opt/devops-tools/bin:$TOOLS_DIR/bin:/usr/local/bin:/usr/bin:/bin" \
-e PATH="/app/.venv/bin:$TOOLS_DIR/bin:/usr/local/bin:/usr/bin:/bin" \
--entrypoint /app/.venv/bin/python \
"$IMAGE" \
-c 'import pathlib, sys, devops_cli; os_rel = pathlib.Path("/etc/os-release").read_text(encoding="utf-8"); assert "VERSION_CODENAME=trixie" in os_rel, os_rel; assert (devops_cli.__file__ or "").startswith("/app/.venv/"), devops_cli.__file__; import pytest; raise SystemExit(pytest.main(["-o", "pythonpath=", "-q", "-rfEs", "--durations=10", "--no-cov", "--snapshot-warn-unused", *sys.argv[1:]]))' \
Expand Down
85 changes: 4 additions & 81 deletions .trivyignore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,107 +38,30 @@ misconfigurations:
# with No Fix). Each entry names one finding in one binary: `paths` is the Trivy target of the
# binary and `purls` is the package that Trivy reports, so the entry hides no other binary.
vulnerabilities:
- id: CVE-2026-116587
paths:
- opt/devops-tools/tools/tofu/1.13.9/tofu
purls:
- pkg:golang/github.com/go-jose/go-jose/v4@v4.1.4
statement: go-jose v4.1.4 in OpenTofu v1.13.9, the newest release; fixed in 4.1.6 (#5866)
expired_at: 2026-11-21
- id: CVE-2026-56864
paths:
- opt/devops-tools/tools/tofu/1.13.9/tofu
purls:
- pkg:golang/golang.org/x/mod@v0.39.0
statement: x/mod v0.39.0 in OpenTofu v1.13.9, the newest release; fixed in 0.40.0 (#5866)
expired_at: 2026-11-21
- id: CVE-2026-56865
paths:
- opt/devops-tools/tools/tofu/1.13.9/tofu
purls:
- pkg:golang/golang.org/x/mod@v0.39.0
statement: x/mod v0.39.0 in OpenTofu v1.13.9, the newest release; fixed in 0.40.0 (#5866)
expired_at: 2026-11-21
- id: CVE-2026-78669
paths:
- opt/devops-tools/tools/tofu/1.13.9/tofu
purls:
- pkg:golang/golang.org/x/net@v0.57.0
statement: x/net v0.57.0 in OpenTofu v1.13.9, the newest release; fixed in 0.60.0 (#5866)
expired_at: 2026-11-21
- id: CVE-2026-78661
paths:
- opt/devops-tools/tools/tofu/1.13.9/tofu
purls:
- pkg:golang/golang.org/x/net@v0.57.0
statement: x/net v0.57.0 in OpenTofu v1.13.9, the newest release; fixed in 0.62.0 (#5866)
expired_at: 2026-11-21
- id: CVE-2026-84445
paths:
- opt/devops-tools/tools/tofu/1.13.9/tofu
purls:
- pkg:golang/google.golang.org/grpc@v1.83.1
statement: grpc v1.83.1 in OpenTofu v1.13.9, the newest release; fixed in 1.83.2 (#5866)
expired_at: 2026-11-21
- id: CVE-2026-97054
paths:
- opt/devops-tools/tools/tofu/1.13.9/tofu
purls:
- pkg:golang/stdlib@v1.27.3
statement: Go stdlib v1.27.3 in OpenTofu v1.13.9, the newest release; fixed in Go 1.27.4 (#5866)
expired_at: 2026-11-22
- id: CVE-2026-78661
paths:
- opt/devops-tools/tools/promtool/3.16.0/promtool
purls:
- pkg:golang/golang.org/x/net@v0.61.0
statement: x/net v0.61.0 in promtool v3.16.0, the newest release; fixed in 0.62.0 (#6365)
expired_at: 2026-11-21
- id: CVE-2026-97054
paths:
- opt/devops-tools/tools/promtool/3.16.0/promtool
purls:
- pkg:golang/stdlib@v1.27.3
statement: Go stdlib v1.27.3 in promtool v3.16.0, the newest release; fixed in Go 1.27.4 (#6365)
expired_at: 2026-11-22
- id: CVE-2026-97054
paths:
- opt/devops-tools/tools/trivy/0.76.2/trivy
purls:
- pkg:golang/stdlib@v1.27.3
statement: Go stdlib v1.27.3 in Trivy v0.76.2, the newest release; fixed in Go 1.27.4 (#6366)
expired_at: 2026-11-22
- id: CVE-2026-97054
paths:
- usr/local/bin/actionlint
purls:
- pkg:golang/stdlib@v1.27.3
statement: Go stdlib v1.27.3 in actionlint 1.17.1, the newest release; fixed in Go 1.27.4 (#6367)
expired_at: 2026-11-22
- id: CVE-2026-56851
paths:
- opt/devops-tools/tools/kubectl/1.37.2/kubectl
- usr/local/bin/kubectl
purls:
- pkg:golang/golang.org/x/text@v0.40.0
statement: x/text v0.40.0 in kubectl v1.37.2, the newest release; fixed in 0.41.0 (#6084)
expired_at: 2026-11-22
- id: CVE-2026-78669
paths:
- opt/devops-tools/tools/kubectl/1.37.2/kubectl
- usr/local/bin/kubectl
purls:
- pkg:golang/golang.org/x/net@v0.57.0
statement: x/net v0.57.0 in kubectl v1.37.2, the newest release; fixed in 0.60.0 (#6084)
expired_at: 2026-11-21
- id: CVE-2026-78661
paths:
- opt/devops-tools/tools/kubectl/1.37.2/kubectl
- usr/local/bin/kubectl
purls:
- pkg:golang/golang.org/x/net@v0.57.0
statement: x/net v0.57.0 in kubectl v1.37.2, the newest release; fixed in 0.62.0 (#6084)
expired_at: 2026-11-21
- id: CVE-2026-97054
paths:
- opt/devops-tools/tools/kubectl/1.37.2/kubectl
- usr/local/bin/kubectl
purls:
- pkg:golang/stdlib@v1.26.10
statement: Go stdlib v1.26.10 in kubectl v1.37.2, the newest release; fixed in Go 1.26.11 (#6084)
Expand Down
Loading