mirror of
				https://github.com/jtesta/ssh-audit.git
				synced 2025-11-04 03:02:15 +01:00 
			
		
		
		
	Result: ``` REPOSITORY TAG IMAGE ID CREATED SIZE ssh-audit after 03e247aee0cc About a minute ago 131MB ssh-audit before 609962ceafb1 About a minute ago 150MB ```
		
			
				
	
	
		
			22 lines
		
	
	
		
			497 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			497 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM python:3-slim
 | 
						|
 | 
						|
WORKDIR /
 | 
						|
 | 
						|
# Update the image to remediate any vulnerabilities.
 | 
						|
RUN apt update && apt -y upgrade && apt -y dist-upgrade && 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"]
 |