fix(resource-type): require letter-start for namespace/name in _NAMESPACED_RE #3290

Merged
freemo merged 1 commits from fix/resource-type-namespaced-re-digit-start into master 2026-04-05 21:12:25 +00:00

1 Commits

Author SHA1 Message Date
freemo c1dca80bf2 fix(resource-type): require letter-start for namespace/name in _NAMESPACED_RE
CI / lint (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 47s
CI / quality (pull_request) Successful in 35s
CI / security (pull_request) Successful in 1m3s
CI / build (pull_request) Successful in 18s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 6m41s
CI / e2e_tests (pull_request) Successful in 18m1s
CI / integration_tests (pull_request) Successful in 22m59s
CI / docker (pull_request) Successful in 1m22s
CI / coverage (pull_request) Successful in 11m29s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 58m55s
Update _NAMESPACED_RE in resource_type.py and _resource_type_validation.py
to require both namespace and name components to start with a letter, consistent
with _BUILTIN_NAME_RE and the spec requirement that names start with a letter.

Previously, _NAMESPACED_RE used [a-zA-Z0-9] as the first character class,
allowing digit-starting names like '123abc/my-type'. Now uses [a-zA-Z] to
enforce letter-start for both components.

Also adds Behave scenarios covering rejection of digit-starting custom resource
type names and valid letter-starting names.

ISSUES CLOSED: #2983
2026-04-05 09:03:32 +00:00