When every scanner reports into its own console, the same vulnerability is counted five times, nobody owns the queue and remediation deadlines exist only in a policy document. DefectDojo is an open source OWASP flagship project that collects findings from many security tools into one model, deduplicates them and tracks each one against a service level agreement. This guide shows how to structure DefectDojo, import scanner results from pipelines, choose a deduplication algorithm, configure SLAs and risk acceptance, and run the platform itself securely, including its API tokens. It is written for vulnerability management and DevSecOps teams; for the programme around the tool (scope, prioritisation, SLA policy), read the Vulnerability Management Guide first.
This is an independent guide from NHI Mgmt Group, based on DefectDojo's public documentation as of November 2026. It is not sponsored or reviewed by DefectDojo. Product features change, so confirm settings against DefectDojo's current documentation.
Key takeaways
- Model before you import. Access control applies at Organization and Asset level and deduplication works within an Asset by default, so the hierarchy you choose decides who sees what and what counts as a duplicate.
- Reimport is the pipeline default. The reimport endpoint updates one Test per scan stream, closing findings that disappear and reopening ones that return, instead of creating a new pile of duplicates on every build.
- Pick the deduplication algorithm per parser. Open source offers Unique ID From Tool, Hash Code, Unique ID From Tool or Hash Code, and Legacy; the right choice depends on whether the scanner emits stable identifiers.
- SLAs count from first detection. Each Asset has an SLA configuration in days per severity, and reimporting does not restart the clock; risk acceptance expiry and reactivation rules decide when it does.
- The platform is a target. DefectDojo holds a map of every weakness you know about. Replace default keys, scope API tokens to service users with only the Assets they need, set token expiry and keep the instance off the public internet.
What DefectDojo does
OWASP describes DefectDojo as an open source application vulnerability management tool built for DevOps and continuous security integration. It ingests reports from more than 200 security tools, groups related findings, tracks unique vulnerabilities across builds, releases, endpoints and repositories, and applies SLA and mitigation templates. It is written in Python and Django and released under the BSD 3-Clause licence.
- Inputs: scanner report files through the UI, the REST API (
/api/v2/import-scan/and/api/v2/reimport-scan/) or the official GitHub Action; formats include SARIF. See the SARIF guide. - Processing: parsing per tool, deduplication, SLA calculation, risk acceptance and false positive handling.
- Outputs: findings queues, notifications on SLA breach, reports, metrics and ticketing integration (a Jira connector is documented).
- Availability: DefectDojo is published as an open source edition and a commercial DefectDojo Pro edition from DefectDojo, Inc. This guide follows the open source documentation; where the documentation marks a feature as Pro, it is labelled here.
For how a central findings platform fits alongside posture tooling, see ASPM vs Unified Vulnerability Management.
Data model: products, engagements, tests and findings
Current documentation calls the top two levels Organizations and Assets. Earlier releases called them Product Types and Products, and the API v2 still uses those names (product_type, product), so you will see both.
| Object (UI name / API name) | What it represents | Why it matters |
|---|---|---|
| Organization / product_type | A grouping of Assets, for example by business domain, team or lifecycle stage | Access granted here cascades to every Asset underneath |
| Asset / product | A project, program or application under test, holding its full testing history and an SLA configuration | Assets are walled off from each other; deduplication applies within one Asset by default |
| Engagement | A testing effort on an Asset, either Interactive (planned, dated) or CI/CD (open ended, fed by pipelines) | Can narrow deduplication to itself; no separate access control |
| Test | The results of one testing activity, such as one imported scan or one reimport stream | Reimport compares the incoming report with this Test |
| Finding | One flaw reported by a Test, with severity, status and SLA | The unit you triage, deduplicate, accept or close |
| Endpoint | A host, URL or location a Finding affects | Can be part of deduplication matching, depending on the algorithm |
Design rules that save rework:
- Asset per access boundary: create separate Assets where different teams need different permissions, or where versions or platforms use different components. The docs note that variations can otherwise be handled at Engagement level, but Engagements carry no access control.
- Organization per owning group: if you find yourself adding the same person to many Assets, put them on the Organization instead.
- One CI/CD Engagement per branch stream: the official GitHub Action creates an Engagement per branch and scopes deduplication on non-default branches to that Engagement, so a pull request scan never closes or reopens findings on the default branch.
Importing scanner results and deduplication
CI import pattern
- Create a dedicated user for the pipeline and give it access only to the Assets it imports into (see Securing the deployment below).
- Generate that user's API v2 key and store it in the CI platform's secret store; the GitHub Action documentation uses a repository secret named
DEFECTDOJO_API_TOKEN. - Run the scanner and write its report to a file, then call
/api/v2/reimport-scan/(or the action) withscan_typeset to the format name as DefectDojo lists it, and the Asset, Engagement and Test names. - Decide on auto create context: the docs note that the API can create unintended objects when auto create context is used, so create Assets and Organizations deliberately and let the pipeline only fill Tests.
- Keep
close_old_findingsat its reimport default of true for full scans, so findings missing from the new report are mitigated; turn it off for partial scans, which would otherwise close findings they simply did not look at. - Set
scan_datewhen the scan ran earlier than the import, so finding dates and SLA clocks are accurate. - Use the action's severity gate (
fail-on) or check the import response to fail the build on active critical findings.
Use /reimport-scan/ for continuous pipelines and /import-scan/ only where each run must be preserved as its own Test. For identity controls on the pipeline itself, see the CI/CD Pipeline Identity Security Guide.
Deduplication options
Deduplication marks a later Finding as a duplicate of the earliest-created matching Finding, which stays the original. Duplicates are set inactive so the team works one Finding, and the original is never demoted to a duplicate of a newer one. In open source the algorithm is chosen per parser with DEDUPLICATION_ALGORITHM_PER_PARSER, and the hash fields with HASHCODE_FIELDS_PER_SCANNER.
| Algorithm (setting value) | How it matches | Use when |
|---|---|---|
Unique ID From Tool (unique_id_from_tool) | The scanner's own identifier; endpoints are ignored | The tool emits stable IDs that survive rescans |
Hash Code (hash_code) | A hash of configured fields per scanner, plus fields in HASH_CODE_FIELDS_ALWAYS (default service) | No stable ID; you can choose fields that do not change between runs |
Unique ID From Tool or Hash Code (unique_id_from_tool_or_hash_code) | Either the tool ID or the hash matches; endpoints must also match | IDs are present for some findings but not all |
Legacy (legacy) | Several attributes including endpoints; static findings must contain the original's endpoints, dynamic findings must match strictly | Fallback when a parser has no other configuration |
- Reimport matching is separate: reimport compares hash codes within the Test and discards matches before they are created, then the remaining findings still go through same-tool deduplication. If the reimport hash includes an unstable field such as line number, a moved finding is closed and recreated.
- Service changes the hash: because
serviceis always hashed by default, two otherwise identical findings with different service values will not deduplicate. Set service consistently in pipelines. - Endpoints: where hash fields exclude endpoints,
DEDUPE_ALGO_ENDPOINT_FIELDScan require a match on attributes such as host and port, or be an empty list to ignore endpoints. - Scope: by default within an Asset, optionally narrowed to one Engagement. Matching across Assets (Dedupe Pools and the global algorithms) is documented as Pro.
- Pruning: Delete Deduplicate Findings with Maximum Duplicates in System Settings keeps only that many duplicates, deleting the oldest; the original is never deleted. Applying it starts deletion immediately, so test on a copy first.
- Alternative: False Positive History marks incoming findings as false positives when a matching finding was triaged that way; it is mutually exclusive with deduplication and documented as experimental.
For cross-tool correlation concepts, see the Vulnerability Deduplication and Correlation Guide.
SLAs, risk acceptance and reporting
Each Asset carries an SLA configuration: days to remediate per severity, counted from the day the Finding was created. A Finding not closed in time is labelled in breach, the overdue days are tracked as a negative number, and closed findings record whether they were mitigated within SLA. SLA violations can trigger notifications to users assigned to the Asset. New Assets take the Default SLA Configuration.
- Set days from policy: map your remediation policy to the severity values; each value is a whole number from 0 to 36500, and unchecking Enforce Finding Days for a level excludes it from SLA calculation. Policy guidance is in the Remediation SLAs and Vulnerability Exceptions Guide.
- Know what restarts the clock: reimporting does not; Restart SLA on Finding Reactivation does if enabled, as does a risk acceptance set to restart the SLA on expiry.
- Changing SLAs recalculates: selecting a new SLA configuration for an Asset recalculates all its findings, and the SLA cannot be changed again while that runs.
- Availability: SLAs based on Finding Risk rather than severity, and SLA dashboards, are documented as Pro features.
Risk acceptance in open source is tied to an Engagement and can only contain findings from that Engagement.
| Type | What it records | Use for |
|---|---|---|
| Simple Risk Acceptance | Status change to Risk Accepted on the finding | Low impact decisions where your policy does not require formal records |
| Full Risk Acceptance | Name, owner, recommendation and decision, proof, the accepting user, expiration date, whether findings reactivate and whether the SLA restarts on expiry | Formal exceptions that must be reviewed and expire |
Risk accepted findings stay queryable and auditable but leave metrics. Always set an expiry: when no date is given the default from System Settings applies, and through the API a missing expiration_date uses Risk Acceptance Form Default Days (180 when the setting is empty, no expiry when it is 0). For an exception template, see the Vulnerability Risk Acceptance and Exception Template.
Metrics to report monthly:
- Percentage of findings mitigated within SLA, per severity and per Organization.
- Open findings in SLA breach and their median days overdue.
- Duplicate ratio per tool (duplicates divided by originals); a rising ratio signals a pipeline or hierarchy problem.
- Active risk acceptances, how many have no expiry, and how many expire in the next 30 days.
- Pipelines importing successfully versus expected, so coverage gaps are visible.
Securing the DefectDojo deployment
DefectDojo concentrates sensitive information: unremediated vulnerabilities, affected hosts and URLs, and often secrets that scanners found. Treat it as a high value system.
Platform hardening
- Set your own keys: the evaluation
docker-compose.ymlsupplies example fallback values forDD_SECRET_KEYandDD_CREDENTIAL_AES_256_KEY, and the file states it is not intended for production without customisation. Generate unique values, store them in a secrets manager or Kubernetes Secret (the Helm chart supportsextraSecrets), and never commit them. - Admin account: the initializer prints the initial admin password to its log; change it, then restrict who can read container logs. The first account on a fresh installation is a superuser.
- Configuration discipline: override settings through environment variables or
local_settings.py, not by editingsettings.dist.py, and with Docker Compose set them for theuwsgi,celerybeatandceleryworkerservices. - Network exposure: serve over TLS behind your reverse proxy, restrict the UI and API to corporate networks or a private endpoint, and back up the database with the same protection as production data.
- Image and chart sources: the docs note that default images and the Helm chart are pulled through registries run by DefectDojo, Inc. that log requests;
DD_IMAGE_REGISTRY=docker.ioor the GitHub hosted chart repository are documented alternatives. - Updates: apply security releases promptly and watch the project's security releases and GitHub security advisories.
Where identity fits: users, access and API tokens
Open source DefectDojo 3.0 uses an Authorized Users model: each Asset and Organization lists who can see it, Organization access cascades to its Assets, and there are no roles or groups. Superuser and staff accounts bypass the lists and are the only ones that can edit them. Pro uses a role based model instead.
- Minimise staff and superusers: they see everything. Review the list quarterly and keep day to day work on non-staff accounts.
- Service user per pipeline: create a non-staff user per pipeline or team, authorised only on its Assets. The API key acts as that user, so a leaked key exposes only those Assets.
- Treat keys as secrets: keys are sent as
Authorization: Token <key>. Store them in the CI secret store, mask them in logs and never pass them on the command line of shared runners. See the Secrets Management Guide. - Expiry and revocation: a superuser can set
token_expiryper user through/api/v2/user_contact_infos/{id}/, and revoke a compromised key by value withPOST /api/v2/api-tokens/revoke/. Owners regenerate with/api/v2/users/{id}/reset_api_token/. - Single sign-on: if users authenticate through SSO, the docs note that API tokens could bypass that design; set
DD_API_TOKENS_ENABLED=False, or disable only theapi/v2/api-token-auth/endpoint withDD_API_TOKEN_AUTH_ENDPOINT_ENABLED=False, where pipelines do not need them. - Audit: object history is recorded for Assets, Engagements, Tests, Findings, Endpoints and Risk Acceptances; use it to investigate status changes and unexpected closures.
Common failure patterns
- Import instead of reimport in CI: every build creates a new Test and a wave of duplicates, metrics inflate and teams stop trusting the queue.
- Unstable hash fields: including line numbers or timestamps in reimport hashes closes and recreates findings on every code change, which also resets the apparent age of real issues.
- Partial scans closing findings: a scoped scan with
close_old_findingsleft on mitigates findings it never tested. - Risk acceptances without expiry: exceptions accumulate silently and leave metrics, so the SLA report looks healthy while exposure grows.
- One superuser key for every pipeline: a single leaked key exposes every Asset and can create or change data across the instance.
- Hierarchy built for reporting, not access: putting several teams' applications in one Asset means everyone sees everything and duplicates cross team boundaries.
Practitioner checklist
- Design Organizations and Assets around access boundaries before the first import.
- Use
/reimport-scan/with one Test per scan stream and stable Test titles. - Choose a deduplication algorithm per parser and review hash fields for unstable values.
- Set SLA days from your remediation policy and enable SLA breach notifications.
- Require Full Risk Acceptances with an owner and expiry for anything above low severity.
- Replace
DD_SECRET_KEY,DD_CREDENTIAL_AES_256_KEYand the initial admin password before go live. - Issue one non-staff service user and API key per pipeline, authorised only on its Assets, with token expiry set.
- Keep the instance on a private network behind TLS and apply security releases promptly.
- Report SLA compliance, breach backlog, duplicate ratio and exception age every month.
Framework mapping
| Framework | Reference | How DefectDojo supports it |
|---|---|---|
| NIST CSF 2.0 | ID.RA-01 | Vulnerabilities identified, validated and recorded in one place |
| NIST CSF 2.0 | ID.RA-06 | Risk responses (fix, accept, false positive) tracked and communicated |
| NIST SP 800-53 Rev. 5 | RA-5, SI-2 | Vulnerability monitoring results consolidated; flaw remediation tracked against deadlines |
| NIST SP 800-53 Rev. 5 | PM-4, RA-7 | Plan of action and milestones and risk response through SLAs and risk acceptances |
| CIS Controls v8.1 | Control 7 | Continuous vulnerability management. See the CIS Control 7 Continuous Vulnerability Management Guide |
Standards and references
- OWASP: DefectDojo project
- DefectDojo: Asset Hierarchy overview
- DefectDojo: About Deduplication
- DefectDojo: Reimport
- DefectDojo: SLA Configuration
- DefectDojo: Risk Acceptances
- DefectDojo: API v2
- DefectDojo: Open-Source Permissions
Related NHI Mgmt Group resources: Vulnerability Management Guide · Risk-Based Vulnerability Management Guide · Remediation SLAs and Vulnerability Exceptions Guide · Vulnerability Deduplication and Correlation Guide