Files
cozystack/pkg/registry
Mattia Eleuteri 9767340062 fix(securitygroups): reject port ranges and malformed FQDNs on the SecurityGroup path
A port such as "80-90" fell through to the named-port check and was
refused because it "must contain at least one letter", which says
nothing about the actual limit: a SecurityGroup port carries one port,
and Cilium's endPort is not exposed.

FQDN selectors were only checked for being non-empty. A malformed
matchName or matchPattern passed validation and was then refused by the
CiliumNetworkPolicy CRD on the backing write, so the tenant got a schema
error about an object they never wrote. Apply the CRD's own rules
instead: its two patterns, its 255-character limit, and its oneOf
between matchName and matchPattern.

Fixes #5130

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit a125b98cd7)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:43 +00:00
..