Skip to content

Amith2410/docker-vuln-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔍 Docker Vulnerability & Port Scanner (Trivy + Nmap)

A lightweight, container-powered CLI that:

  • Scans container images for CVEs, misconfigurations, and secrets using Trivy (via Docker).
  • Scans IPs/hosts for open ports & services using Nmap (via Docker).
  • Saves detailed reports under ./reports/ and shows a quick summary in the terminal.

🚀 Built and tested on Windows 11 + WSL (Ubuntu) with Docker Desktop.
⚠️ No admin mode required. Use responsibly — only scan systems you own or have explicit permission for.


image

Image Scan Screenshot 2025-08-17 190747

IP Scan Screenshot 2025-08-17 190754

How It Works

  • Runs Trivy inside a Docker container for vulnerability & misconfiguration scanning.
  • Runs Nmap inside a Docker container for network scanning.
  • Automatically saves results into timestamped report files.
  • Designed to work on WSL/Linux environments with Docker installed.

🚀 Features

  • 🔍 Docker Image Scanning – Detect vulnerabilities, misconfigurations, and secrets in container images using Trivy.
  • 🌐 Host/IP Scanning – Run service discovery and port scanning using Nmap.
  • 📂 Auto-Reports – Saves full scan results into a reports/ folder with timestamped filenames.
  • Portable & Lightweight – Runs entirely inside Docker, no heavy dependencies on your host.
  • 🐧 WSL Compatible – Built and tested inside Windows Subsystem for Linux for a smooth Linux-like workflow on Windows.

🛠️ Tech Stack

  • Languages: Python 3
  • Containerization: Docker, WSL
  • Security Tools:
    • Trivy – Vulnerability & misconfiguration scanning
    • Nmap – Network mapper and service discovery
  • Version Control: Git + GitHub

📊 Demo

Scan a Docker image

$ ./scanner.py image nginx:latest
[RUN] docker run --rm aquasec/trivy:latest image --scanners vuln,misconfig,secret --format json --quiet nginx:latest
=== Vulnerability Summary ===
CRITICAL: 2
HIGH: 5
MEDIUM: 12
LOW: 8
UNKNOWN: 0
Full report saved to: reports/trivy-nginx_latest-20250817-194500.json
---
Scan a Host/IP

$ ./scanner.py ip scanme.nmap.org
[RUN] docker run --rm instrumentisto/nmap -sV -T4 scanme.nmap.org
=== Nmap Summary ===
22/tcp  open  ssh
80/tcp  open  http
443/tcp open  https
Full report saved to: reports/nmap-scanme.nmap.org-20250817-200130.txt

---

## 📦 Quick Start

1. Start **Docker Desktop**.  
2. In **WSL (Ubuntu)**, run:
```bash
git clone <your-repo-url>.git docker-vuln-scanner
cd docker-vuln-scanner
./scanner.py image nginx:latest
./scanner.py ip scanme.nmap.org

About

Security log & vulnerability scanner built with Docker, Trivy, and Nmap — detects risks in images and networks.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages