🤖 Generated by the Agentic Engineer
Evidence
#2841 fixed the unverified KSail install in ci.yaml's validate job. Sweeping the class rather
than the instance found two more — and both sit on a more privileged path than the one fixed:
| Site |
Path it runs on |
.github/actions/deploy-prod/action.yml (~L47–52) |
the composite action both production deploy paths call (ci.yaml merge_group and cd.yaml) |
.github/workflows/dr-rebuild.yaml (~L156–161) |
disaster-recovery rebuild of the production cluster |
Both are the original three lines, unchanged:
curl -fsSL ".../ksail_${KSAIL_VERSION}_linux_amd64.tar.gz" -o /tmp/ksail.tar.gz
tar -xzf /tmp/ksail.tar.gz -C /tmp
sudo install /tmp/ksail /usr/local/bin/ksail
KSAIL_VERSION is pinned in four places (ci.yaml, validate-main.yaml, dr-rebuild.yaml,
deploy-prod/action.yml). Two now verify the download; two do not.
Affected audience and impact
Every production deploy and every DR rebuild. The installed binary is sudo installed and then
driven against the real production cluster holding deploy credentials — so this is the highest-value
of the four sites, and it is one of the two still unverified. A replaced release asset would execute
there.
Expected behaviour
Both sites verify the archive against the release's published ksail_${KSAIL_VERSION}_checksums.txt
before extracting, and fail closed when the verification cannot be performed — identical to the block
now in ci.yaml and validate-main.yaml.
Acceptance criteria
-
deploy-prod/action.yml verifies before tar -xzf.
-
dr-rebuild.yaml verifies before tar -xzf.
- A missing checksum entry fails the step with an actionable message (
grep exits 1 under
set -euo pipefail, so the lookup needs || true).
- A mismatch fails and names expected and actual digests.
- Verified three ways: real archive passes, tampered archive fails, missing entry fails closed.
Consider extracting rather than copy-pasting a fourth time
The same ~25-line block would then exist in four files that must also move together on every Renovate
bump. A setup-ksail composite action (the repo already uses .github/actions/deploy-prod/) would
carry the version pin and the verification once. That is a refactor, so it should not ride inside
the security fix — but it is the reason not to simply paste twice more.
Stated limit (same as #2841): archive and checksum list share an origin, so this detects a
corrupted, truncated or individually substituted asset, not a fully compromised release.
Size
Small — two run: blocks, or one composite action plus four call sites if extraction is chosen first.