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

set user group and user id for the default SecurityContext #4313

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

zhaohuabing
Copy link
Member

@zhaohuabing zhaohuabing commented Sep 23, 2024

This PR sets the user group and user id for the default SecurityContext to harden EG deployment. This is recommended by some security frameworks and usually checked by security scanning tools.

Reference: https://hub.armosec.io/docs/c-0013
Related: #3940

@zhaohuabing zhaohuabing requested a review from a team as a code owner September 23, 2024 07:20
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.76%. Comparing base (7a9556a) to head (cb02506).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4313      +/-   ##
==========================================
- Coverage   65.82%   65.76%   -0.07%     
==========================================
  Files         197      197              
  Lines       23763    23767       +4     
==========================================
- Hits        15642    15630      -12     
- Misses       7006     7018      +12     
- Partials     1115     1119       +4     

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

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
@zhaohuabing zhaohuabing force-pushed the securityContext-userid branch from d69b677 to 0b03d44 Compare September 23, 2024 07:31
@arkodg
Copy link
Contributor

arkodg commented Sep 23, 2024

isnt this already baked into the image / distroless ?

@zhaohuabing
Copy link
Member Author

zhaohuabing commented Sep 24, 2024

isnt this already baked into the image / distroless ?

Yes. This PR just explicitly sets the userID and GroupID in the container's SecurityContext. This is recommended by some security frameworks and is checked by security scanning tools, eg, https://hub.armosec.io/docs/c-0013

Copy link
Member

@Xunzhuo Xunzhuo left a comment

Choose a reason for hiding this comment

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

lgtm

@Xunzhuo Xunzhuo merged commit bd966b8 into envoyproxy:main Sep 24, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants