Skip to content

Commit f665260

Browse files
authored
fix: go back to using root user in Dockerfile (#378)
We have to do this because we have no active way to change permissions to $GITHUB_OUTPUT to a specific user when running the container Add trivy ignore to top of Dockerfile to pass linting Signed-off-by: jmeridth <[email protected]>
1 parent 7d56fc5 commit f665260

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#checkov:skip=CKV_DOCKER_2
2+
#checkov:skip=CKV_DOCKER_3
3+
#trivy:ignore:AVD-DS-0002
14
FROM python:3.13.7-slim@sha256:58c30f5bfaa718b5803a53393190b9c68bd517c44c6c94c1b6c8c172bcfad040
25
LABEL com.github.actions.name="stale-repos" \
36
com.github.actions.description="Find stale repositories in a GitHub organization." \
@@ -16,13 +19,7 @@ COPY requirements.txt *.py /action/workspace/
1619
RUN python3 -m pip install --no-cache-dir -r requirements.txt \
1720
&& apt-get -y update \
1821
&& apt-get -y install --no-install-recommends git=1:2.47.3-0+deb13u1 \
19-
&& rm -rf /var/lib/apt/lists/* \
20-
&& addgroup --system appuser \
21-
&& adduser --system --ingroup appuser --home /action/workspace --disabled-login appuser \
22-
&& chown -R appuser:appuser /action/workspace
23-
24-
# Run the action as a non-root user
25-
USER appuser
22+
&& rm -rf /var/lib/apt/lists/*
2623

2724
# Add a simple healthcheck to satisfy container scanners
2825
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \

0 commit comments

Comments
 (0)