From f0f453c916e279980df981c1e1dee0d167dc124e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 19:07:52 +0200 Subject: Adding upstream version 3.1.0. Signed-off-by: Daniel Baumann --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') 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"] -- cgit v1.2.3