Skip to content

fix(sec): pin argocd-server container image by digest - #81

Closed
castrojo wants to merge 5 commits into
mainfrom
sec/pin-argocd-image-digest
Closed

castrojo wants to merge 5 commits into
mainfrom
sec/pin-argocd-image-digest

Conversation

@castrojo

@castrojo castrojo commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Security Hardening

Pin quay.io/argoproj/argocd:v2.12.3 to digest sha256:68894064bc381c19ea951029510aa614bd26bf46c2ec65ea445c7d8d095a9417 in files/k0s/manifests/argocd/install.yaml to prevent mutable tag drift and ensure supply-chain integrity for control-plane GitOps deployments.

This partially addresses #74 by digest-pinning the argocd-server image. #74 remains open for the Argo CD version upgrade, argocd-server --insecure, and the other mutable images called out there.

Verification

  • pytest tests/unit (Passed)
  • python3 .github/scripts/docs-checks.py (Passed)
  • just validate (Passed)

Pin quay.io/argoproj/argocd:v2.12.3 to sha256:68894064bc381c19ea951029510aa614bd26bf46c2ec65ea445c7d8d095a9417
to guarantee image immutability and supply-chain integrity for control-plane
GitOps manifests.

Partially addresses #74.

Assisted-by: Gemini 3.8 Flash via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Digest verified against live quay.io — approving

$ curl -H "Accept: application/vnd.oci.image.index.v1+json" \
       https://quay.io/v2/argoproj/argocd/manifests/v2.12.3
docker-content-digest: sha256:68894064bc381c19ea951029510aa614bd26bf46c2ec65ea445c7d8d095a9417

Byte-identical to the diff. The tag is preserved alongside the digest (v2.12.3@sha256:…), which is the right form — the digest is what's enforced, the tag stays for human legibility, and they can't silently disagree because the registry rejects the pull if they do.

One line, build and unit both green, and it closes a mutable tag in a manifest that runs with cluster privileges.


Generated by Claude Code

@hivecommons-hive

Copy link
Copy Markdown
Contributor

installer-test / Install and boot in QEMU is failing here for a repository-wide reason, not because of this PR's diff.

Baseline triage: the same check is red on main (run 34920225526), and the Build DDI artifacts workflow has failed on main repeatedly since 2026-09-14 while Unit tests, Docs checks and Build Kernel & ZFS stayed green.

Tracked as one incident in #175. No action needed on this branch — deferring rather than retrying until the baseline is green.

— hive: agent=scanner backend=copilot model=claude-opus-5 copilot=1.0.78

@castrojo

Copy link
Copy Markdown
Contributor Author

Author note from the PR-triage sweep — I cannot review my own PR, so recording the state explicitly.

Outstanding: one independent approval. This has one live approval from @hanthor on the current head ec799b4. Under the two-reviewer policy it needs exactly one more, and it cannot be mine. That is the only review-side blocker.

CI: build and unit pass. The single red check is installer-test / Install and boot in QEMU, which fails on main itself at tip 5ebfeae (run 34920225526) — the installed system drops to emergency mode with "Dependency failed for /var" before the console readiness poll even matters. That failure is upstream of this PR and unrelated to a one-line image digest pin.

Two open PRs address that repo-wide breakage: #173 fixes the /var mount deadlock, and #181 fixes the readiness gate, which is separately unreachable because the kiosk proxy binds guest loopback while the QEMU port forward lands on the guest's DHCP address, and the probe spoke plain HTTP to a TLS listener. Neither is merged, so installer-test cannot currently go green on any PR in this repo.

I deliberately did not touch this branch. Any push would dismiss @hanthor's approval — I have now confirmed that empirically, having watched dismiss_stale_reviews_on_push dismiss my own approval on #155 after a fix landed there. Since I have nothing to fix here, leaving it untouched preserves the +1.

Reviewer note if it helps: the change pins argocd-server by digest instead of a mutable tag, matching the existing nginx@sha256:... pattern already used in the sibling kiosk-proxy manifest, so it is consistent with how this repo already handles image pinning. Separately, #178 is in flight against the same argocd manifest directory adding redis, repo-server, application-controller and RBAC — it does not touch this file, so the two should not conflict.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intent-alignment

Partial fix, body overclaims. The PR says it "Addresses finding in #74", but the diff (files/k0s/manifests/argocd/install.yaml:44) only covers a slice of recommendation 1 of that issue. #74's primary asks were: (1) upgrade Argo CD off the EOL v2.12.3 line (known unpatched CVEs) and pin by digest, (2) address argocd-server --insecure (still present at install.yaml:45), (3) digest-pin the kubestellar/postgres images. This change pins the digest of the same EOL image — cementing the known-vulnerable version — and touches none of the rest. As a standalone hardening step it's fine and the digest is genuine (verified sha256:6889...9417 == quay.io v2.12.3 manifest digest), but #74 should not be considered addressed; please reword to "partially addresses" and keep #74 open, or extend the PR.

No findings from: security, style, docs-currency.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78

@castrojo

Copy link
Copy Markdown
Contributor Author

Addressed the intent-alignment finding in the PR body: it now says this only partially addresses #74 by digest-pinning the argocd-server image, and explicitly leaves the Argo CD upgrade, --insecure, and other mutable images as remaining #74 work.

@castrojo

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #210.

`files/k0s/manifests/argocd/install.yaml` is deleted. #210 moves to Argo CD Core, which has no `argocd-server` component at all — so the `--insecure` API server exposure in #74 has no surface left. The one Argo image that remains (`files/cluster/seed/15-gitd/deployment.yaml`) is pinned by digest: `quay.io/argoproj/argocd@sha256:dd3f47d5…`.

Right instinct, and the mutable-tag rule carries forward.

@castrojo castrojo closed this Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants