Audit Logging

DefectDojo records an audit trail of changes to its data. Every tracked object automatically records create, update, and delete events, and relationship (many-to-many) tables record add and remove events.

How it works

Audit tracking is driven by database triggers registered per model. For each tracked object, three event types can fire:

Event typeWhen it firesAction
InsertEventA new record is createdCreate
UpdateEventA record changes โ€” only when a real field value actually changesUpdate
DeleteEventA record is deletedDelete

Many-to-many relationship tables (tags, reviewers, firewall IP ranges) track only add (InsertEvent) and remove (DeleteEvent) โ€” there is no “update” for a relationship row.

What is captured with every event

  • Who โ€” the acting user, taken from the request context.
  • When โ€” a timestamp.
  • Source IP โ€” the remote address, honoring X-Forwarded-For proxy chains.
  • Before/after snapshot โ€” the full field values of the record.
  • Context / label โ€” groups events originating from the same request. The label initial_backfill marks historical records imported when tracking was first enabled.

Events produced by background jobs are stitched back to the originating request’s context, so an action completed asynchronously is still attributed to the user who triggered it.

Core (Open Source) โ€” tracked actions

ObjectCreateUpdateDeleteNotes
Userโœ…โœ…โœ…password excluded from snapshots
Organizationโœ…โœ…โœ…
Assetโœ…โœ…โœ…
Engagementโœ…โœ…โœ…
Testโœ…โœ…โœ…
Findingโœ…โœ…โœ…
Finding Groupโœ…โœ…โœ…
Finding Templateโœ…โœ…โœ…
Risk Acceptanceโœ…โœ…โœ…
Endpointโœ…โœ…โœ…
Locationโœ…โœ…โœ…
URLโœ…โœ…โœ…
Notification Webhookโœ…โœ…โœ…header_name / header_value excluded (secrets)

Core โ€” relationship (add / remove) events

RelationshipAddRemove
Finding โ†’ Reviewersโœ…โœ…
Finding โ†’ Tagsโœ…โœ…
Finding โ†’ Inherited Tagsโœ…โœ…
Asset โ†’ Tagsโœ…โœ…
Engagement โ†’ Tagsโœ…โœ…
Engagement โ†’ Inherited Tagsโœ…โœ…
Test โ†’ Tagsโœ…โœ…
Test โ†’ Inherited Tagsโœ…โœ…
Endpoint โ†’ Tagsโœ…โœ…
Endpoint โ†’ Inherited Tagsโœ…โœ…
Finding Template โ†’ Tagsโœ…โœ…
App Analysis (Technology) โ†’ Tagsโœ…โœ…
Objects/Asset โ†’ Tagsโœ…โœ…

Pro โ€” tracked actions

ObjectCreateUpdateDeleteNotes
Enhanced Findingโœ…โœ…โœ…Pro companion to Finding
Enhanced Risk Acceptanceโœ…โœ…โœ…Pro companion to Risk Acceptance
Risk Acceptance Finding Recordโœ…โœ…โœ…Findings attached to a Risk Acceptance
Ruleโœ…โœ…โœ…Rules engine
Rule Actionโœ…โœ…โœ…
Rule Action Conditionโœ…โœ…โœ…
Rule Filter Entryโœ…โœ…โœ…
Rules Engine Operationโœ…โœ…โœ…
Rules Engine Operation Messageโœ…โœ…โœ…
Rules Engine 2.0 Ruleโœ…โœ…โœ…Node based rules
Rules Engine 2.0 Deliveryโœ…โœ…โœ…Entries in the Deliveries ledger
Scheduled Taskโœ…โœ…โœ…
Scheduled Task Runโœ…โœ…โœ…
Mitigation Policyโœ…โœ…โœ…
Work Assignmentโœ…โœ…โœ…Findings and Risk Acceptances assigned to a person
CMMC Assessmentโœ…โœ…โœ…
Tunable Settingโœ…โœ…โœ…System configuration changes
Custom Field Definitionโœ…โœ…โœ…The custom field itself
Custom Field Valueโœ…โœ…โœ…Values filled in on a record
Form Configurationโœ…โœ…โœ…Create and edit form settings
Feature Flag Stateโœ…โœ…โœ…Flag toggles + system pins
Feature Flag Definitionโœ…โœ…โœ…Metadata / registry sync
Cloud Firewallโœ…โœ…โœ…locked field excluded
Firewall IP Maskโœ…โœ…โœ…

Pro โ€” RBAC / permissions

ObjectCreateUpdateDelete
Groupโœ…โœ…โœ…
Roleโœ…โœ…โœ…
Role permissionsโœ…โœ…โœ…
Group Membershipโœ…โœ…โœ…
Global Roleโœ…โœ…โœ…
Asset Group Assignmentโœ…โœ…โœ…
Organization Group Assignmentโœ…โœ…โœ…
Asset Memberโœ…โœ…โœ…
Organization Memberโœ…โœ…โœ…

Pro โ€” relationship (add / remove) events

RelationshipAddRemove
Cloud Firewall โ†’ IP Rangesโœ…โœ…

Configuration & retention (On-Premise Controls)

SettingEnvironment variableDefaultEffect
Enable audit loggingDD_ENABLE_AUDITLOGTrueWhen False, all history triggers are disabled and no events are recorded
Retention periodDD_AUDITLOG_FLUSH_RETENTION_PERIOD-1 (never flush)Months of history to keep; older events are batch-deleted by the flush job
Flush batch sizeDD_AUDITLOG_FLUSH_BATCH_SIZE1000Rows deleted per batch during cleanup
Flush max batchesDD_AUDITLOG_FLUSH_MAX_BATCHES100Cap on the number of batches per flush run

Notes and limitations

  • Secrets are never captured. User passwords and notification-webhook header values are explicitly excluded from event snapshots.
  • Updates record only on a genuine change. A save that does not alter any field value produces no update event; auto-managed fields such as last_updated alone do not trigger one.
  • Authentication events are not captured here. data changes only. Login, logout, and failed-login activity are handled separately and are not part of this audit log.