Skip to content

Commit e17a0ad

Browse files
authored
Merge pull request #385 from lukaszstolarczuk/small-docker-update
Use non-root user in dockers by default
2 parents 71d03a8 + 0e13acd commit e17a0ad

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.github/docker/ubuntu-20.04.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt
6161
ENV USER test_user
6262
ENV USERPASS pass
6363
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
64+
USER test_user

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt
6060
ENV USER test_user
6161
ENV USERPASS pass
6262
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
63+
USER test_user

.github/workflows/trivy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
format: 'sarif'
3939
output: 'trivy-results.sarif'
4040
exit-code: 1 # Fail if issue found
41-
# See .trivyignore file with suppressions
41+
# file with suppressions: .trivyignore (in root dir)
4242

4343
- name: Upload results
4444
uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0

.trivyignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Docs: https://aquasecurity.github.io/trivy/latest/docs/configuration/filtering/#trivyignore
22

33
# In docker files:
4-
# non-root user is always created within docker, but we switch it only in CI workflows;
5-
# not enforcing non-root user makes it easier for developers to use their own users in local container
6-
AVD-DS-0002
7-
8-
# In docker files:
9-
# HEALTHCHECK is not required for development, nor in CI (failed docker = failed CI)
4+
# HEALTHCHECK is not required for development, nor in CI (failed docker = failed CI).
5+
# We're not hosting any application with usage of the dockers.
106
AVD-DS-0026

0 commit comments

Comments
 (0)