Skip to content

docs: document DD_EDITABLE_MITIGATED_DATA and hide ignored close-finding fields#15259

Open
Maffooch wants to merge 1 commit into
bugfixfrom
editable-mitigated-data-docs
Open

docs: document DD_EDITABLE_MITIGATED_DATA and hide ignored close-finding fields#15259
Maffooch wants to merge 1 commit into
bugfixfrom
editable-mitigated-data-docs

Conversation

@Maffooch

@Maffooch Maffooch commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Shortcut: sc-13692

Summary

Audits and documents the DD_EDITABLE_MITIGATED_DATA setting, and fixes the misleading Close Finding UI that motivated the audit.

The setting gates editing of a finding's mitigated date / mitigated by through a single helper, can_edit_mitigated_data() (dojo/finding/helper.py), which requires both the flag enabled and a superuser. It is off by default because backdating a mitigation can distort SLA-compliance metrics.

Changes

  • Docs: new "Editing the Mitigated Date and Mitigated By" section in editing_findings.md — default-off behavior, superuser gate, SLA-backdating trade-off, audit trail, restart requirement, and a Cloud/Pro contact-support note.
  • Docs: expanded the inline comment above DD_EDITABLE_MITIGATED_DATA in settings.dist.py.
  • Fix: CloseFindingForm now removes the mitigated/mitigated_by fields when the setting is disabled (mirroring FindingForm). Previously the Close Finding dialog still rendered a Mitigated date input whose value was silently ignored — the root of the customer complaint.
  • Test: new CloseFindingViewMitigatedDataDisabledTest asserting the fields are hidden and that a backdated mitigated value is ignored (finding closes with the current date).

Testing

Ran the affected tests in an isolated unit-test stack:

Ran 4 tests in 0.992s
OK

(CloseFindingViewMitigatedDataDisabledTest plus the existing CloseFindingViewInstanceTest.)

🤖 Generated with Claude Code

…ing fields

Audit and document the DD_EDITABLE_MITIGATED_DATA setting, which gates editing
of a finding's mitigated date / mitigated by. Editing requires both the flag
enabled and a superuser (via can_edit_mitigated_data), and is off by default
because backdating a mitigation can distort SLA-compliance metrics.

- Add an "Editing the Mitigated Date and Mitigated By" section to the Editing
  Findings docs covering the default-off behavior, the superuser requirement,
  the SLA-backdating trade-off, the audit trail, the restart requirement, and a
  Cloud/Pro contact-support note.
- Expand the settings.dist.py comment to note the superuser gate, UI+API scope,
  SLA rationale, and restart requirement.
- Hide the mitigated / mitigated_by fields on CloseFindingForm when the setting
  is disabled, mirroring FindingForm, so users are no longer shown a Mitigated
  date input whose value is silently ignored on close.
- Add a default-off test covering the hidden fields and that a backdated
  mitigated value is ignored (finding closes with the current date).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Maffooch Maffooch requested a review from blakeaowens as a code owner July 15, 2026 18:30
@github-actions github-actions Bot added settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR docs unittests labels Jul 15, 2026
@Maffooch Maffooch added this to the 3.1.200 milestone Jul 15, 2026
@Maffooch Maffooch requested review from Jino-T and paulOsinski July 15, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR unittests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants