fix: use numeric UID/GID 8888 for curl_user and curl_group#117
Open
codersofthedark wants to merge 1 commit intocurl:mainfrom
Open
fix: use numeric UID/GID 8888 for curl_user and curl_group#117codersofthedark wants to merge 1 commit intocurl:mainfrom
codersofthedark wants to merge 1 commit intocurl:mainfrom
Conversation
Using a symbolic username in the USER directive can fail in minimal or distroless environments where /etc/passwd is absent. Pinning to a fixed numeric id (8888) ensures consistent, predictable identity across all image variants and satisfies Kubernetes runAsNonRoot enforcement without requiring a username lookup at runtime. Closes curl#25
Member
|
apologies for the belated response on this - LGTM - please rebase and we will get it merged in. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #25
What
Pin
curl_groupGID andcurl_userUID to8888increate_base_image.sh, and switchcreate_appliance_image.shfrom--user curl_userto--user 8888.Why
Using a symbolic username in the
USERdirective can fail in minimal or distroless environments where/etc/passwdis not present — the runtime cannot resolve the name to a UID and the container may fail to start.Pinning to a fixed numeric id (
8888):runAsNonRoot: trueenforcement, which checks that the effective UID is non-zero (numeric lookup, not name-based)USERas a numeric idThe UID/GID
8888is in the unprivileged range, avoids conflicts with typical system UIDs, and is consistent with common container hardening practices.