summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:07:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:07:52 +0000
commitf0f453c916e279980df981c1e1dee0d167dc124e (patch)
treed09973c9f173820ade2dc814467d3e57df8a042d /Dockerfile
parentInitial commit. (diff)
downloadssh-audit-f0f453c916e279980df981c1e1dee0d167dc124e.tar.xz
ssh-audit-f0f453c916e279980df981c1e1dee0d167dc124e.zip
Adding upstream version 3.1.0.upstream/3.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..75decec
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+FROM python:3-slim
+
+WORKDIR /
+
+# Update the image to remediate any vulnerabilities.
+RUN apt clean && apt update && apt -y dist-upgrade && apt clean && rm -rf /var/lib/apt/lists/*
+
+# Remove suid & sgid bits from all files.
+RUN find / -xdev -perm /6000 -exec chmod ug-s {} \; 2> /dev/null || true
+
+# Copy the ssh-audit code.
+COPY ssh-audit.py .
+COPY src/ .
+
+# Allow listening on 2222/tcp for client auditing.
+EXPOSE 2222
+
+# Drop root privileges.
+USER nobody:nogroup
+
+ENTRYPOINT ["python3", "/ssh-audit.py"]