A Dockerized Vulnerability Scanner web application with a React frontend, Flask backend, and PostgreSQL database, fully orchestrated with Terraform. The app allows scanning an IP or domain using Nmap and displays results in a hacker-style UI.
- Scan IPs or domain names using Nmap.
- Display results in a readable terminal-like UI.
- Highlight open ports and services.
- Dockerized architecture for frontend, backend, and database.
- Terraform-managed infrastructure for easy deployment.
- CORS enabled for API communication.
- Persistent PostgreSQL data with Docker volume.
- Frontend: React, CSS
- Backend: Flask, Python
- Database: PostgreSQL
- Containerization: Docker
- Infrastructure: Terraform
- Docker & Docker Compose installed
- Terraform installed
- Nmap installed on the host machine (required for scanning)
- Git (to clone repository)
- Clone the repository:
git clone https://github.com/your-username/vulnscan-infra.git
cd vulnscan-infra- Set up Terraform variables in
terraform.tfvars:
db_user = "your_db_user"
db_password = "your_db_password"
db_name = "vulnscan_db"- Stop any running containers (optional but recommended):
docker stop vulnscan-frontend vulnscan-backend vulnscan-db
docker rm vulnscan-frontend vulnscan-backend vulnscan-db
docker network rm vulnscan-net- Apply Terraform configuration to start all containers:
terraform init
terraform apply -var-file="terraform.tfvars"- Frontend container runs on
http://localhost:3000 - Backend API runs on
http://localhost:5000
-
Open your browser and navigate to:
http://localhost:3000 -
Enter an IP address or domain in the input box.
-
Click Run Scan.
-
View the scan results in a hacker-style terminal UI.
vulnscan-infra/
├── backend/ # Flask backend (app.py)
├── frontend/ # React frontend
├── main.tf # Terraform resources for containers and network
├── providers.tf # Terraform provider configuration
├── variables.tf # Terraform variables
├── terraform.tfvars# Terraform variable values
├── outputs.tf # Terraform outputs
└── versions.tf # Terraform required versions
- Better UI with hacker-style themes (implemented)
- Colored port/service highlights
- Responsive design
- Easy-to-read scan output without JSON formatting
- To stop containers:
docker stop vulnscan-frontend vulnscan-backend vulnscan-db- To start everything again:
terraform apply -var-file="terraform.tfvars"- Fork the repository and make your changes.
- Submit a pull request with detailed description of changes.
- Make sure Docker images build correctly before submitting PR.