Files
kustomize/api/krusty
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
..
2023-06-14 18:32:12 +00:00
2022-04-04 14:24:04 -04:00
2019-11-28 07:23:37 -08:00
2020-09-28 11:01:01 -07:00
2022-04-04 14:24:04 -04:00
2024-09-09 13:26:53 +03:00
2022-04-04 14:24:04 -04:00
2021-03-20 07:05:56 -07:00