Skip to content

chore(ci): unify check-image-pins.py with platform via the org canonical copy (JDWLABS-451) - #210

Merged
jdwillmsen merged 1 commit into
mainfrom
chore/JDWLABS-451-unify-check-image-pins
Aug 29, 2026
Merged

chore(ci): unify check-image-pins.py with platform via the org canonical copy (JDWLABS-451)#210
jdwillmsen merged 1 commit into
mainfrom
chore/JDWLABS-451-unify-check-image-pins

Conversation

@jdwillmsen

Copy link
Copy Markdown
Member

Summary

Replaces this repo's fork of the image-pin checker with the org-canonical copy from jdwlabs/.github#48, byte-identical to platform's. Repo layout (Helm-merged values-<env>.yaml overlays + literal template lines) moves into tools/image-pin-check.yaml; the allowlist is migrated to the shared (path, ref) schema; the image-pin-check job gains a drift guard that cmps the script and test file against jdwlabs/.github at a pinned SHA.

Merge order: jdwlabs/.github#48 → this PR (and jdwlabs/platform's sibling PR, independent of this one). CANONICAL_REF in ci.yml currently points at the branch SHA e6ea75a8 of #48 so CI can pass now; after #48 merges (squash rewrites the SHA) re-pin it to the merged commit before merging this.

Divergence classification

Divergence Classification Resolution
Discovery: this repo Helm-merges charts/<chart>/values-<env>.yaml onto values.yaml and fails a chart with no overlay; platform globs every YAML under tenants/ + helm-charts/ repo-specific by design Config-selectable source kinds (helm-overlays, tree)
Allowlist key (path, repository, tag) here vs (path, ref) in platform accidental drift (same intent, two schemas) One schema, ref = full composed reference; 7 entries migrated here
Unquoted numeric tag: here coerced + reported malformed (message showed lossy 1.1); platform kept literal text but allowed it to be allowlisted accidental drift Union: literal text kept, still malformed / not allowlistable
Digest-only tag: "@sha256:…" rejected here only; platform read it as pinned accidental drift (platform false negative) Rejected in structured blocks everywhere; raw repo@sha256:… strings (which this repo wrongly flagged) are valid
Truncated digest / OCI tag grammar checks here only Everywhere
registry:/digest: fields, registry-only blocks, <name>Image/<name>Tag sibling keys, embedded ConfigMap manifests, multi-doc files, URL/path/template filtering platform only Everywhere (new coverage here)
Trailing # comment on template lines, .tpl scanning here only (platform missed both) Everywhere
Dedup of a reference repeated in one file platform only Everywhere
Full report with Digest-pinned: inventory and 0 issues line here only Everywhere

Test plan

  • python3 -m unittest discover -s tools -p 'test_*.py' — 143 tests OK (the vendored suite is the union of both repos' suites)
  • python3 tools/check-image-pins.py — 6 digest-pinned, 7 allowlisted, 0 unexplained, 0 malformed; exit 0 (same counts as before)
  • Drift guard simulated locally: both vendored files cmp clean against jdwlabs/.github@e6ea75a8
  • actionlint .github/workflows/ci.yml — only the two pre-existing shellcheck warnings on main
  • CI green on this PR
  • CANONICAL_REF re-pinned to the merged SHA of chore(ci): unify check-image-pins.py — add the canonical copy (JDWLABS-451) .github#48

Refs JDWLABS-451.

🤖 Generated with Claude Code

https://claude.ai/code/session_016XRddumw4ZNvFqHSd9KSf6

…guard

This repo's image-pin checker and platform's were forks that had diverged
into different programs, each catching defects the other missed. The
script is now the canonical copy from jdwlabs/.github, byte-identical in
both repos; this repo's chart layout (values-<env>.yaml overlays merged
onto values.yaml, plus literal template lines) is declared in
tools/image-pin-check.yaml instead of in the script.

Rules gained from the platform side: registry/digest fields and
registry-only image blocks, <name>Image/<name>Tag sibling keys, manifests
embedded in ConfigMap strings, multi-document files, and literal-text
preservation for unquoted numeric tags (still reported malformed). A raw
`repo@sha256:…` string with no tag is now accepted as pinned rather than
misreported as a digest-only tag.

The allowlist is keyed on (path, ref) where ref is the full composed
reference; the seven existing entries are migrated in place. CI compares
the vendored script and test file against jdwlabs/.github at a pinned
commit and fails on any difference.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XRddumw4ZNvFqHSd9KSf6
@jdwillmsen
jdwillmsen merged commit 164a902 into main Aug 29, 2026
11 checks passed
@jdwillmsen
jdwillmsen deleted the chore/JDWLABS-451-unify-check-image-pins branch August 29, 2026 21:48
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.

1 participant