chainguard-dev / chainguard-dev/dfc
USER improvements to prevent root users when possible
Open
Nobody has claimed this yet.
priority
- Dominant language
- Go
- Stars
- 103
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
The following improvements could help prevent having USER root in an image:
- Embedding base images' "nonroot" user(s) and possibly use a default such as "nonroot", then simply asserting
USER <nonroot>at the end of a final stage post conversion - Detecting the creation/use of existing users in the original Dockerfile and preserve them, especially after finished running
apk add ...commands which require the addition ofUSER root
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the Dockerfile conversion logic for FROM, RUN, and USER directives, then determine how nonroot users from base images and users created in the source Dockerfile should be preserved. Done means converted images avoid USER root where possible without breaking apk commands or existing user behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, devops, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100