envoyproxy / envoyproxy/gateway
We have noticed an instance of Incorrect Admission Validator in your repository.
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
**Describe the bug**
We observed that the Custom Resource Definition (CRD) does not sufficiently validate user-provided input for one or more label-related fields.
Specifically, the affected field accepts values that do not satisfy the expected label format because the CRD schema does not define an appropriate validation rule (e.g., a pattern constraint), and no admission validation logic rejects the invalid input (e.g., label: test-wec1, test-wec2). As a result, invalid label values can be successfully created and stored by the API server. These invalid values may later cause errors when the application or controller processes the affected fields, leading to reconciliation failures or unexpected runtime behavior.
Locations:
https://github.com/envoyproxy/gateway/blob/6916245861c10bb5ec3a2f1b3b667cf7d1c0a1bb/charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml#L2340
### Current Behavior
The resource containing an invalid label value is accepted by the API server and successfully created.
**Expected behaviour**
The invalid label value should be rejected during resource creation or update.
This validation can be enforced by:
defining an appropriate validation rule (e.g., a pattern constraint) in the CRD schema, or
implementing admission validation logic (such as a validating admission webhook or equivalent internal validation) to reject invalid values before the resource is persisted.
**Steps to reproduce the bug**
1. Install the CRD and the corresponding controller.
2. Create a CR containing an invalid value for the label-related field.
3. Apply the resource.
4. Verify that the resource is successfully created.
**Environment details**:
- Kubernetes version: v1.34.0
- Kubernetes distribution: local kind
- gateway version: 1.8.2
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml around line 2340 and identify the label-related field and its current schema. Reproduce the issue by applying a resource containing values such as test-wec1 or test-wec2. Done means invalid values are rejected during creation or update rather than persisted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- api, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100