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

Add unprivileged port validation #7034

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add unprivileged port validation #7034

wants to merge 6 commits into from

Conversation

pdabelf5
Copy link
Collaborator

@pdabelf5 pdabelf5 commented Dec 20, 2024

Proposed changes

  • Add ValidateUnprivilegedPort() to validation package
  • Switch to int input to ValidatePort()
  • remove port validation function from flags.go

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@pdabelf5 pdabelf5 requested a review from a team as a code owner December 20, 2024 10:03
@github-actions github-actions bot added the go Pull requests that update Go code label Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 52.38095% with 10 lines in your changes missing coverage. Please review.

Project coverage is 52.76%. Comparing base (becafe7) to head (3d6356f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/nginx-ingress/flags.go 0.00% 4 Missing ⚠️
internal/validation/validation.go 75.00% 2 Missing and 1 partial ⚠️
pkg/apis/dos/validation/dos.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7034      +/-   ##
==========================================
+ Coverage   52.73%   52.76%   +0.03%     
==========================================
  Files          89       89              
  Lines       20824    20831       +7     
==========================================
+ Hits        10981    10992      +11     
+ Misses       9389     9382       -7     
- Partials      454      457       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
Status: Todo ☑
Development

Successfully merging this pull request may close these issues.

3 participants