ch-jwt-verify image publication: refuse tag re-push and build from an exported HEAD tree (parity with ch-oauth-ldap, #25) · Issue #26 · Altinity/altinity-oauth-helper · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ch-jwt-verify image publication: refuse tag re-push and build from an exported HEAD tree (parity with ch-oauth-ldap, #25) #26
PR #25 (issue #19 phase 4) review found that the image publication paths never check whether the target tag already exists before pushing, and that a rebuild of the same commit is not byte-reproducible (floating base image tag, unpinned apk add ca-certificates, toolchain drift). PR #25 fixes this for the newch-oauth-ldap path only (refuse to re-push an existing ldap-<sha> tag in scripts/build-ch-oauth-ldap-image.sh and .github/workflows/build-ch-oauth-ldap.yml, build from a git archive HEAD export instead of the live working tree, honest README wording).
The pre-existing ch-jwt-verify path has the same properties and was deliberately left untouched by #25 to keep that PR scoped:
scripts/build-image.sh: unconditional per-arch docker push, docker manifest rm … || true + recreate + push at the same tag, compiles the live working tree (tag derived from HEAD), pulls alpine:latest (more floating than alpine:3.24).
.github/workflows/build-ch-jwt-verify.yml: unconditional push: true and docker buildx imagetools create at <sha> tag; a workflow_dispatch re-run at an unchanged HEAD republishes the same tag with a possibly different manifest.
Proposed change
Mirror the ch-oauth-ldap fixes on the sidecar path:
Refuse publication when the final or any per-arch tag already exists (docker manifest inspect in the script, docker buildx imagetools inspect step in the workflow), no force knob — republish requires a new commit or a different tag prefix.
Build from git archive HEAD exported into the script's own temp dir, never from the working tree; keep git status --porcelain --untracked-files=all --ignored=matching only as a fast-fail convenience.
Pin the base image to a minor tag (or digest) instead of alpine:latest.
Reword helm/ch-jwt-verify/README.md / root README.md if they imply tag immutability (they currently make no explicit claim — verify before editing).
Activity
Merge pull request #59 from Altinity/fix/26-immutable-jwt-publication