Commit Graph

2 Commits

Author SHA1 Message Date
SEONGHYUN HONG
9f89960cf2 fix: match image digests with any algorithm, not only sha256 (#6167)
* fix: match image digests with any algorithm, not only sha256

IsImageMatched hard-coded '@sha256:' in its regex, while Split accepts any
digest algorithm. An image pinned with a non-sha256 digest (e.g.
nginx@sha512:...) was not matched, so the ImageTagTransformer silently left
it unchanged and the user's images: override was ignored. Generalize the
digest algorithm in the regex to match what Split accepts.

Signed-off-by: Seonghyun Hong <s3onghyun.hong@gmail.com>

* Address review: match OCI digest grammar and test spec example algorithms

Broaden the digest-algorithm match to the OCI grammar (algorithm components
separated by +._-), so multihash+base58 and other registered/unregistered
algorithms match, not just [a-zA-Z][a-zA-Z0-9]*. Add test cases using the
descriptor example algorithms: a full-length sha512 digest and
multihash+base58.

Signed-off-by: Seonghyun Hong <s3onghyun.hong@gmail.com>

---------

Signed-off-by: Seonghyun Hong <s3onghyun.hong@gmail.com>
2026-06-20 15:25:40 +05:30
Varsha Prasad Narsing
ca748faa3f [Refactor] Move image/ to internal
This PR is an effort towards reducing the public surface
of APIs. It move image/ to internal/image

Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
(cherry picked from commit 1f5890709fdc17de6f44f42b5138dd0f7e64bc74)
2023-08-09 13:40:07 -04:00