Files
kustomize/api/internal
Arpit Jain d32ba3f38c fix: do not panic on an invalid image name regexp
IsImageMatched interpolates the image name from kustomization images[].name
straight into a regexp and discarded the compile error. When the name is not
a valid regexp (for example "["), regexp.Compile returns a nil *Regexp and
the following MatchString call dereferences it, so kustomize build crashes with
a SIGSEGV.

Capture the compile error and return false when it is set. A name that can't
compile matches no image, which leaves the resource untouched (the same result
you get for any name that doesn't match). Adds a unit test for the invalid name
and a krusty end-to-end case that builds without panicking.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
2026-07-11 05:50:05 +09:00
..
2025-08-17 13:05:12 -07:00
2020-12-04 12:29:39 -08:00