Details
Fix
Swap the parameter names in hostname_regex.go to match the interface contract:
// BEFORE (buggy)
func (h *hostnameRegexHandler) OnUpdate(
_ client.Client,
_ client.Reader,
old *capsulev1beta2.Tenant,
tnt *capsulev1beta2.Tenant,
...
// AFTER (fixed)
func (h *hostnameRegexHandler) OnUpdate(
_ client.Client,
_ client.Reader,
tnt *capsulev1beta2.Tenant,
old *capsulev1beta2.Tenant,
...
Impact
A Cluster Admin (or a compromised admin account) can — intentionally or via a typo — set a malformed AllowedHostnames.Regex on any Tenant. The webhook silently accepts the update. All users in the affected tenant are subsequently unable to create or update any Ingress resource until an admin manually corrects the Tenant spec. This constitutes a targeted Denial of Service against the tenant's ingress layer.