-
Notifications
You must be signed in to change notification settings - Fork 25
fix: go back to using root user in Dockerfile #423
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| #checkov:skip=CKV_DOCKER_2 | ||
| #checkov:skip=CKV_DOCKER_3 | ||
| #trivy:ignore:AVD-DS-0002 | ||
| FROM python:3.13.7-slim@sha256:58c30f5bfaa718b5803a53393190b9c68bd517c44c6c94c1b6c8c172bcfad040 | ||
| LABEL org.opencontainers.image.source https://github.com/github/evergreen | ||
|
Check warning on line 5 in Dockerfile
|
||
|
|
||
| WORKDIR /action/workspace | ||
| COPY requirements.txt *.py /action/workspace/ | ||
|
|
@@ -9,13 +10,7 @@ | |
| RUN python3 -m pip install --no-cache-dir -r requirements.txt \ | ||
| && apt-get -y update \ | ||
| && apt-get -y install --no-install-recommends git=1:2.47.3-0+deb13u1 \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && addgroup --system appuser \ | ||
| && adduser --system --ingroup appuser --home /action/workspace --disabled-login appuser \ | ||
| && chown -R appuser:appuser /action/workspace | ||
|
|
||
| # Run the action as a non-root user | ||
| USER appuser | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
||
|
|
||
| # Add a simple healthcheck to satisfy container scanners | ||
| HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trivy ignore directive lacks a comment explaining why this security warning is being suppressed. Consider adding a comment like
# Required: Running as root needed for GitHub Actions output permissions