ci: seal promtool from Prometheus 2.50.1 over the current runner image, so infra's alert-rule tests run (noel/infra#2595) #36

Open
noel wants to merge 1 commit from claude/promtool-2501 into main
Owner

Part (1) of noel/infra#2595. infra's 11 alert-rule tests (tools/monitoring/tests/test-*-rules) look promtool up with command -v promtool. No runner image ships it, so none of them runs in CI. cw-ci wires them into infra's contract checks once this image is adopted.

What it adds: an additive leaf over v11 (act-node-docker@sha256:68de3cca…, the supplychain 47a53e3 image). It installs only promtool from the official Prometheus 2.50.1 release, the version the system-hz-eu-1 monitoring stack runs (quay.io/prometheus/prometheus:v2.50.1), at /usr/local/bin/promtool, with LICENSE and NOTICE under /usr/local/share/licenses/promtool-2.50.1/. The Prometheus server, prometheus.yml and the consoles from the archive aren't installed.

Inputs (promtool-inputs.json): one archive, prometheus-2.50.1.linux-amd64.tar.gz, sha256 936f3777…bd05b, as the release's sha256sums.txt lists it. That file's own sha256 (d31b01c6…34ac) is recorded. Prometheus publishes no keyless signature, so the checksum list is the trust anchor, and the README says so. The binary, LICENSE and NOTICE are pinned too.

Build: one RUN, --network=none, tmpfs /tmp, so one layer. It asserts the parent's Node.js, jq, Kyverno placement and supplychain selection are unchanged, and that no prometheus lands on PATH.

Installed verifier (16 commands, UID 1000, read-only root, no network or credentials):

  • promtool, LICENSE and NOTICE bytes;
  • that promtool is first on PATH, and its --version;
  • an offline promtool test rules that passes a matching alert test and fails a mismatched one;
  • Prometheus and Kyverno off PATH;
  • supplychain default and 47a53e3 selection, and node;
  • Codewire's runner assertion;
  • every inherited scanner, Kyverno, Node.js, provider and database byte.

Checked locally:

  • the archive matches sha256sums.txt;
  • the extracted binary reports promtool, version 2.50.1 (… revision 8c9b0285…) inside the v11 image;
  • the verifier's two rule fixtures exit 0 and 1 with that promtool;
  • the verifier compiles.

The image pipeline's build and installed verification run after merge, then promotion and the infra adoption, at the next quiet moment.

Part (1) of noel/infra#2595. infra's 11 alert-rule tests (`tools/monitoring/tests/test-*-rules`) look promtool up with `command -v promtool`. No runner image ships it, so none of them runs in CI. cw-ci wires them into infra's contract checks once this image is adopted. **What it adds:** an additive leaf over v11 (`act-node-docker@sha256:68de3cca…`, the supplychain 47a53e3 image). It installs only promtool from the official **Prometheus 2.50.1** release, the version the system-hz-eu-1 monitoring stack runs (`quay.io/prometheus/prometheus:v2.50.1`), at `/usr/local/bin/promtool`, with LICENSE and NOTICE under `/usr/local/share/licenses/promtool-2.50.1/`. The Prometheus server, `prometheus.yml` and the consoles from the archive aren't installed. **Inputs** (`promtool-inputs.json`): one archive, `prometheus-2.50.1.linux-amd64.tar.gz`, sha256 `936f3777…bd05b`, as the release's `sha256sums.txt` lists it. That file's own sha256 (`d31b01c6…34ac`) is recorded. Prometheus publishes no keyless signature, so the checksum list is the trust anchor, and the README says so. The binary, LICENSE and NOTICE are pinned too. **Build:** one `RUN`, `--network=none`, tmpfs `/tmp`, so one layer. It asserts the parent's Node.js, jq, Kyverno placement and supplychain selection are unchanged, and that no `prometheus` lands on PATH. **Installed verifier** (16 commands, UID 1000, read-only root, no network or credentials): - promtool, LICENSE and NOTICE bytes; - that promtool is first on PATH, and its `--version`; - an offline `promtool test rules` that passes a matching alert test and fails a mismatched one; - Prometheus and Kyverno off PATH; - supplychain default and 47a53e3 selection, and node; - Codewire's runner assertion; - every inherited scanner, Kyverno, Node.js, provider and database byte. **Checked locally:** - the archive matches `sha256sums.txt`; - the extracted binary reports `promtool, version 2.50.1 (… revision 8c9b0285…)` inside the v11 image; - the verifier's two rule fixtures exit 0 and 1 with that promtool; - the verifier compiles. The image pipeline's build and installed verification run after merge, then promotion and the infra adoption, at the next quiet moment.
ci: seal promtool from Prometheus 2.50.1 over the current runner image, so infra's alert-rule tests run (noel/infra#2595)
All checks were successful
Supply-chain scan / Supply-chain scan (pull_request_target) Successful in 17s
2974188064
infra's 11 tools/monitoring/tests/test-*-rules scripts look promtool up
with `command -v promtool`; no runner image shipped it, so none of them
ran in CI. This additive leaf over v11 (the supplychain 47a53e3 image)
installs only promtool from the official Prometheus 2.50.1 release, the
version the system-hz-eu-1 monitoring stack runs, at
/usr/local/bin/promtool, with its LICENSE and NOTICE.

One sealed input, the release archive, checked against the release's
sha256sums.txt (Prometheus publishes no keyless signature); the binary,
LICENSE and NOTICE are pinned too. One network-free layer. The installed
verifier runs an offline `promtool test rules` that passes a matching
alert test and fails a mismatched one, and pins every inherited byte.
All checks were successful
Supply-chain scan / Supply-chain scan (pull_request_target) Successful in 17s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'claude/promtool-2501:claude/promtool-2501'
git switch 'claude/promtool-2501'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'claude/promtool-2501'
git switch 'claude/promtool-2501'
git rebase 'main'
git switch 'main'
git merge --ff-only 'claude/promtool-2501'
git switch 'claude/promtool-2501'
git rebase 'main'
git switch 'main'
git merge --no-ff 'claude/promtool-2501'
git switch 'main'
git merge --squash 'claude/promtool-2501'
git switch 'main'
git merge --ff-only 'claude/promtool-2501'
git switch 'main'
git merge 'claude/promtool-2501'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
noel/act-node-docker!36
No description provided.