API Scanner is an automated API security testing tool that scans REST and SOAP APIs for vulnerabilities using OpenAPI/Swagger specifications and WSDL files.
- Docker Engine 20.10+
- Docker Compose v2
- Python 3.6+ (for setup script)
- 8 GB RAM minimum (16 GB recommended)
- 20 GB disk space
- Clone this repository
git clone https://github.com/CSPF-Founder/api-scanner-docker.git
cd api-scanner-docker- Run setup
python3 setup.pyThe script will:
- Generate secure random passwords for all services
- Auto-detect your timezone
- Generate a self-signed TLS certificate (or use your own if already in
./certs/) - Write the
.envconfiguration file - Offer to start the Docker Compose stack
- Access the panel
Open https://localhost:4455 in your browser.
If using a self-signed certificate, your browser will show a security warning - proceed to accept it.
If you prefer to configure manually instead of using the setup script:
- Copy the example environment file:
cp .env.example .env-
Edit
.envand update:- All
change_me_*passwords with strong random values CSRF_KEYwith a random 32+ character stringZAP_API_KEYwith a random stringTRUSTED_ORIGINSwith your domain (e.g.,https://scanner.yourcompany.com)- Ensure passwords in
DATABASE_URIandMONGO_DATABASE_URImatch the individual password variables
- All
-
Start the stack:
docker compose up -d| Service | Image | Description |
|---|---|---|
| api-scanner | cysecurity/api-scanner:latest |
Web panel + scan engine in a single container |
| zap | ghcr.io/zaproxy/zaproxy:stable |
OWASP ZAP security scanner |
| mariadb | mariadb:10.11 |
User management and session storage |
| mongodb | mongo:4.4 |
Scan data, results, and reports |
All configuration is done through the .env file. See .env.example for all available options.
| Variable | Description |
|---|---|
MARIADB_PASSWORD |
MariaDB application user password |
MONGO_APP_PASSWORD |
MongoDB application user password |
CSRF_KEY |
CSRF protection key (32+ characters) |
ZAP_API_KEY |
ZAP API authentication key |
TRUSTED_ORIGINS |
Allowed HTTPS origins for the panel |
USE_TLS |
Enable HTTPS (default: true) |
TZ |
Timezone (default: UTC) |
All data is stored in Docker named volumes:
mariadb_data- User accounts, roles, sessionsmongodb_data- Scan records, results, reportsscanner_data- Work files, uploaded specs, generated reports
docker compose pull
docker compose up -ddocker compose downTo remove all data (destructive):
docker compose down -vCheck logs:
docker compose logs api-scanner
docker compose logs zapCheck service health:
docker compose psZAP not starting: Ensure at least 4 GB of free RAM. ZAP requires ~3 GB.
Panel not accessible: Verify TLS certificates are in ./certs/ and TRUSTED_ORIGINS matches your URL including the port (e.g., https://localhost:4455).
Database connection errors: Wait 30-60 seconds after first start for databases to initialize.
Full user manual: https://cspf-founder.github.io/api-scanner-docker/