DefectDojo Security Management
Application security vulnerability management and orchestration platform.
Overview
DefectDojo is an enterprise-grade application security vulnerability management and orchestration platform that consolidates security testing tools and findings into a centralized dashboard. Originally developed by Rackspace and now maintained by the OWASP Foundation, DefectDojo ingests results from over 100 security scanners including SAST, DAST, SCA, and infrastructure tools, providing unified vulnerability tracking, risk assessment, and remediation workflows for development and security teams.
This stack combines DefectDojo's Django-based web application with a robust backend infrastructure designed for production workloads. PostgreSQL serves as the primary database for storing vulnerability findings, product metadata, and user configurations, while RabbitMQ handles message queuing for asynchronous tasks like scan imports and report generation. Celery workers process background jobs including parser execution, metric calculations, and notification delivery, with a separate beat scheduler managing recurring tasks like SLA monitoring and engagement status updates. NGINX provides reverse proxy capabilities with SSL termination and static file serving optimized for DefectDojo's web interface.
Security teams at organizations implementing DevSecOps practices will find this configuration particularly valuable for centralizing vulnerability management across multiple tools and teams. The architecture supports high-volume scan ingestion common in CI/CD pipelines while maintaining data integrity through PostgreSQL's ACID compliance and reliable task processing via RabbitMQ's persistent queues, making it suitable for enterprises requiring comprehensive security posture tracking and compliance reporting.
Key Features
- Multi-scanner integration supporting 100+ security tools including Bandit, SonarQube, OWASP ZAP, Nessus, and Burp Suite
- PostgreSQL-backed vulnerability deduplication using configurable hash algorithms across finding title, file path, and line number
- RabbitMQ-powered asynchronous scan processing enabling high-volume import queues without blocking the web interface
- Celery-distributed task execution for parser workflows, JIRA synchronization, and scheduled engagement reporting
- NGINX reverse proxy with custom DefectDojo optimizations for handling large scan file uploads and static asset delivery
- Built-in SLA tracking with Celery beat scheduler monitoring remediation timelines and generating compliance reports
- RESTful API with Django REST framework enabling CI/CD integration and custom automation workflows
- Role-based access control with product-level permissions supporting multi-tenant security program management
Common Use Cases
- 1Enterprise security teams consolidating SAST, DAST, and SCA findings from multiple CI/CD pipelines into unified dashboards
- 2DevSecOps organizations requiring automated vulnerability tracking with JIRA integration and developer notification workflows
- 3Compliance-driven environments needing centralized security metrics for SOC2, PCI-DSS, or regulatory audit reporting
- 4Security consulting firms managing vulnerability assessments across multiple client engagements with isolated product spaces
- 5Development teams implementing shift-left security practices with automated scan imports from Jenkins, GitLab CI, or GitHub Actions
- 6Penetration testing teams requiring structured finding management with custom severity ratings and remediation tracking
- 7Organizations migrating from spreadsheet-based vulnerability management to automated tracking with historical trending
Prerequisites
- Minimum 4GB RAM allocation with 2GB specifically for PostgreSQL data processing and DefectDojo application server
- Docker host with at least 20GB available storage for PostgreSQL data, RabbitMQ queues, and DefectDojo media uploads
- Network access to ports 8080 (HTTP) and 8443 (HTTPS) for DefectDojo web interface and API endpoints
- Understanding of security scanner output formats (JSON, XML, CSV) for proper parser configuration and finding import
- Basic knowledge of DefectDojo product hierarchy concepts including Organizations, Products, and Engagements for initial setup
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 postgres: 3 image: postgres:15-alpine4 environment: 5 - POSTGRES_USER=defectdojo6 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}7 - POSTGRES_DB=defectdojo8 volumes: 9 - postgres_data:/var/lib/postgresql/data10 networks: 11 - dojo_net1213 rabbitmq: 14 image: rabbitmq:3-management-alpine15 environment: 16 - RABBITMQ_DEFAULT_USER=defectdojo17 - RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}18 volumes: 19 - rabbitmq_data:/var/lib/rabbitmq20 networks: 21 - dojo_net2223 defectdojo: 24 image: defectdojo/defectdojo-django:latest25 environment: 26 - DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo27 - DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//28 - DD_SECRET_KEY=${DD_SECRET_KEY}29 - DD_CREDENTIAL_AES_256_KEY=${DD_AES_KEY}30 volumes: 31 - defectdojo_media:/app/media32 depends_on: 33 - postgres34 - rabbitmq35 networks: 36 - dojo_net3738 celeryworker: 39 image: defectdojo/defectdojo-django:latest40 command: celery -A dojo worker -l info41 environment: 42 - DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo43 - DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//44 - DD_SECRET_KEY=${DD_SECRET_KEY}45 depends_on: 46 - defectdojo47 networks: 48 - dojo_net4950 celerybeat: 51 image: defectdojo/defectdojo-django:latest52 command: celery -A dojo beat -l info53 environment: 54 - DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo55 - DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//56 - DD_SECRET_KEY=${DD_SECRET_KEY}57 depends_on: 58 - defectdojo59 networks: 60 - dojo_net6162 nginx: 63 image: defectdojo/defectdojo-nginx:latest64 ports: 65 - "8080:8080"66 - "8443:8443"67 depends_on: 68 - defectdojo69 networks: 70 - dojo_net7172volumes: 73 postgres_data: 74 rabbitmq_data: 75 defectdojo_media: 7677networks: 78 dojo_net: .env Template
.env
1# DefectDojo2POSTGRES_PASSWORD=secure_postgres_password3RABBITMQ_PASSWORD=secure_rabbitmq_password4DD_SECRET_KEY=your_secret_key_at_least_50_chars5DD_AES_KEY=your_32_char_aes_key_here_32ch67# DefectDojo at http://localhost:80808# Default: admin/admin (change immediately)Usage Notes
- 1DefectDojo at http://localhost:8080
- 2Default credentials: admin/admin
- 3Import SAST/DAST scan results
- 4Track vulnerability lifecycle
- 5CI/CD integration available
Individual Services(6 services)
Copy individual services to mix and match with your existing compose files.
postgres
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_USER=defectdojo
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=defectdojo
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- dojo_net
rabbitmq
rabbitmq:
image: rabbitmq:3-management-alpine
environment:
- RABBITMQ_DEFAULT_USER=defectdojo
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
volumes:
- rabbitmq_data:/var/lib/rabbitmq
networks:
- dojo_net
defectdojo
defectdojo:
image: defectdojo/defectdojo-django:latest
environment:
- DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo
- DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//
- DD_SECRET_KEY=${DD_SECRET_KEY}
- DD_CREDENTIAL_AES_256_KEY=${DD_AES_KEY}
volumes:
- defectdojo_media:/app/media
depends_on:
- postgres
- rabbitmq
networks:
- dojo_net
celeryworker
celeryworker:
image: defectdojo/defectdojo-django:latest
command: celery -A dojo worker -l info
environment:
- DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo
- DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//
- DD_SECRET_KEY=${DD_SECRET_KEY}
depends_on:
- defectdojo
networks:
- dojo_net
celerybeat
celerybeat:
image: defectdojo/defectdojo-django:latest
command: celery -A dojo beat -l info
environment:
- DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo
- DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//
- DD_SECRET_KEY=${DD_SECRET_KEY}
depends_on:
- defectdojo
networks:
- dojo_net
nginx
nginx:
image: defectdojo/defectdojo-nginx:latest
ports:
- "8080:8080"
- "8443:8443"
depends_on:
- defectdojo
networks:
- dojo_net
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 postgres:5 image: postgres:15-alpine6 environment:7 - POSTGRES_USER=defectdojo8 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}9 - POSTGRES_DB=defectdojo10 volumes:11 - postgres_data:/var/lib/postgresql/data12 networks:13 - dojo_net1415 rabbitmq:16 image: rabbitmq:3-management-alpine17 environment:18 - RABBITMQ_DEFAULT_USER=defectdojo19 - RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}20 volumes:21 - rabbitmq_data:/var/lib/rabbitmq22 networks:23 - dojo_net2425 defectdojo:26 image: defectdojo/defectdojo-django:latest27 environment:28 - DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo29 - DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//30 - DD_SECRET_KEY=${DD_SECRET_KEY}31 - DD_CREDENTIAL_AES_256_KEY=${DD_AES_KEY}32 volumes:33 - defectdojo_media:/app/media34 depends_on:35 - postgres36 - rabbitmq37 networks:38 - dojo_net3940 celeryworker:41 image: defectdojo/defectdojo-django:latest42 command: celery -A dojo worker -l info43 environment:44 - DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo45 - DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//46 - DD_SECRET_KEY=${DD_SECRET_KEY}47 depends_on:48 - defectdojo49 networks:50 - dojo_net5152 celerybeat:53 image: defectdojo/defectdojo-django:latest54 command: celery -A dojo beat -l info55 environment:56 - DD_DATABASE_URL=postgresql://defectdojo:${POSTGRES_PASSWORD}@postgres:5432/defectdojo57 - DD_CELERY_BROKER_URL=amqp://defectdojo:${RABBITMQ_PASSWORD}@rabbitmq:5672//58 - DD_SECRET_KEY=${DD_SECRET_KEY}59 depends_on:60 - defectdojo61 networks:62 - dojo_net6364 nginx:65 image: defectdojo/defectdojo-nginx:latest66 ports:67 - "8080:8080"68 - "8443:8443"69 depends_on:70 - defectdojo71 networks:72 - dojo_net7374volumes:75 postgres_data:76 rabbitmq_data:77 defectdojo_media:7879networks:80 dojo_net:81EOF8283# 2. Create the .env file84cat > .env << 'EOF'85# DefectDojo86POSTGRES_PASSWORD=secure_postgres_password87RABBITMQ_PASSWORD=secure_rabbitmq_password88DD_SECRET_KEY=your_secret_key_at_least_50_chars89DD_AES_KEY=your_32_char_aes_key_here_32ch9091# DefectDojo at http://localhost:808092# Default: admin/admin (change immediately)93EOF9495# 3. Start the services96docker compose up -d9798# 4. View logs99docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/defectdojo-security/run | bashTroubleshooting
- Celery workers stuck on large scan imports: Increase RabbitMQ memory limits and configure task-time-limit in celery settings to prevent worker timeout
- PostgreSQL connection errors during high scan volume: Tune max_connections and shared_buffers in PostgreSQL configuration, ensure connection pooling is enabled
- DefectDojo parser failures with 'Unable to process scan' errors: Verify scan file format matches expected parser input, check celery worker logs for specific parsing exceptions
- NGINX 413 'Request Entity Too Large' on scan uploads: Increase client_max_body_size in NGINX configuration and Django FILE_UPLOAD_MAX_MEMORY_SIZE setting
- RabbitMQ disk space warnings causing task failures: Configure RabbitMQ disk free limit and enable queue length limits to prevent unbounded growth during high import periods
- DefectDojo duplicate findings not being merged: Review deduplication configuration in System Settings, ensure hash_code algorithm matches your scanner output consistency
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
defectdojonginxpostgresqlrabbitmqcelery
Tags
#defectdojo#security#vulnerability#devsecops#scanning
Category
Security & NetworkingAd Space
Shortcuts: C CopyF FavoriteD Download