alirezaaminzadeh/ThreatScanDashboard-MalwareScanHub
MalwareScanHub (ThreatScanDashboard)
A security dashboard for scanning files and URLs for malware and phishing threats. It combines a modern web UI with a REST API and is designed for Docker-based deployment. The scan engine uses configurable heuristics and is structured so you can plug in ML models (e.g. from Hugging Face) later.
Author
Features
- File scan — Upload files (e.g. executables, scripts, documents) for threat analysis.
- URL scan — Submit URLs for phishing and malware-style checks.
- Dashboard — View the latest result and a list of recent scans with risk scores.
- REST API — Endpoints for file and URL scanning, plus health and scan history; ready to add API key or JWT auth if needed.
- Docker — Single-command run; only the reverse proxy is exposed on port 80; backend is not exposed to the host.
Technologies, Tools & Libraries
Quick start
- Clone and enter the project
git clone <your-repo-url> malwarescanhub
cd malwarescanhub- Configure environment
cp .env.example .env
# Edit .env and set API_SECRET_KEY (and optionally other values).- Run with Docker Compose (Docker Desktop must be running on Windows)
docker compose up -d- Open the dashboard
- App: http://localhost
- API docs: http://localhost/api/docs
Project structure
.
├── backend/ # FastAPI app (scan API, business logic)
│ ├── app/
│ │ ├── main.py
│ │ ├── config.py
│ │ ├── api/routes.py
│ │ └── services/scan_service.py
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/ # React SPA (dashboard, upload, results)
│ ├── src/
│ ├── nginx.conf # Nginx config for production (serves SPA + proxies /api)
│ ├── Dockerfile
│ └── package.json
├── docker-compose.yml
├── .env.example
└── README.mdAPI overview
Configuration (CORS, upload limits, etc.) is driven by environment variables; see .env.example.
Security notes
- Only the frontend container (Nginx) exposes port 80 on the host; the backend is reachable only on the Docker network.
- Secrets and keys belong in
.env; never commit.env. - Upload size and other limits are configurable via
.env.
Note on the scan engine
The current implementation uses heuristic rules (e.g. file extension, URL patterns) to produce a risk score and status. This is intentional for a portable demo and makes it easy to replace or extend with an ML model (e.g. a Hugging Face Transformers model for malware or phishing) in ScanService without changing the API or UI.
Publishing on Hugging Face
This repo is set up to be pushed to a Hugging Face repository. Use the link and token you receive to add the remote and push. See [PUSH_TO_HF.md](PUSH_TO_HF.md) for step-by-step instructions.
License
MIT.
