Skip to content

Commit 3c24bec

Browse files
security: add non-root user to Dockerfile and triage Semgrep findings
1 parent dafd7a0 commit 3c24bec

2 files changed

Lines changed: 395 additions & 0 deletions

File tree

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ COPY --from=frontend-builder /app/web/dist /app/web/dist
3535
# Expose port
3636
EXPOSE 8000
3737

38+
# Create non-root user for security
39+
RUN adduser --disabled-password --gecos '' appuser && \
40+
chown -R appuser:appuser /app
41+
42+
# Switch to non-root user
43+
USER appuser
44+
3845
# Environment variables
3946
ENV PYTHONPATH=/app
4047
ENV QPYTH_BACKEND=automatic

0 commit comments

Comments
 (0)