chainguard-dev / chainguard-dev/dfc

USER improvements to prevent root users when possible

Open
#62 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. 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
  2. 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 of USER root

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.