
Automated API security testing tool that scans REST and SOAP APIs for vulnerabilities using OpenAPI/Swagger specs and WSDL files. Deploys a full stack with OWASP ZAP, MariaDB, and MongoDB
API Scanner is an automated API security testing tool that scans REST and SOAP APIs for vulnerabilities using OpenAPI/Swagger specifications and WSDL files.
git clone https://github.com/CSPF-Founder/api-scanner-docker.git
cd api-scanner-docker
python3 setup.py
The script will:
./certs/).env configuration fileOpen 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:
cp .env.example .env
Edit .env and update:
change_me_* passwords with strong random valuesCSRF_KEY with a random 32+ character stringZAP_API_KEY with a random stringTRUSTED_ORIGINS with your domain (e.g., https://scanner.yourcompany.com)DATABASE_URI and MONGO_DATABASE_URI match the individual password variablesStart the stack:
docker compose up -d
All configuration is done through the .env file. See .env.example for all available options.
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 reportsdocker compose pull
docker compose up -d
docker compose down
To remove all data (destructive):
docker compose down -v
Check logs:
docker compose logs api-scanner
docker compose logs zap
Check service health:
docker compose ps
ZAP 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/
| 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 |
| 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) |