Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: validate policy names are rfc 1123 #3335

Merged
merged 1 commit into from Jul 27, 2023

Conversation

josedonizetti
Copy link
Collaborator

@josedonizetti josedonizetti commented Jul 25, 2023

1. Explain what the PR does

Fix #3333

Policy names must be k8s compatible, which means defined as RFC 1123.
So the name must:

contain no more than 63 characters
contain only lowercase alphanumeric characters, '-' or '.'
start with an alphanumeric character
end with an alphanumeric character

https://kubernetes.io/docs/concepts/overview/working-with-objects/names/

2. Explain how to test it

3. Other comments

@josedonizetti josedonizetti marked this pull request as ready for review July 25, 2023 14:07
@geyslan
Copy link
Member

geyslan commented Jul 26, 2023

@josedonizetti is this ready for review?

@josedonizetti
Copy link
Collaborator Author

@geyslan yes

Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geyslan geyslan changed the title fix: valiate policy names are rfc 1123 fix: validate policy names are rfc 1123 Jul 27, 2023
@geyslan geyslan merged commit 933301c into aquasecurity:main Jul 27, 2023
27 checks passed
geyslan pushed a commit to geyslan/tracee that referenced this pull request Jul 27, 2023
geyslan added a commit that referenced this pull request Jul 27, 2023
commit: 933301c (main), cherry-pick

Co-authored-by: Jose Donizetti <jdbjunior@gmail.com>
@josedonizetti josedonizetti deleted the policy-names-rfc1123 branch July 27, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

policy: validate names to a max size, and whitespaces
2 participants