Fix bulk risk acceptance for active findings#14292
Merged
Maffooch merged 1 commit intoFeb 14, 2026
Merged
Conversation
Allow simple risk acceptance of active findings via bulk edit menu, matching the behavior of individual finding risk acceptance. Previously, bulk risk acceptance incorrectly rejected active findings with a warning message, even though individual risk acceptance worked fine. This was inconsistent with DefectDojo Pro and the individual risk acceptance feature. Changes: - Remove the check that prevented active findings from being risk accepted in bulk operations - Update test to verify active findings can now be risk accepted - Remove obsolete warning message about active findings - Simplify return value of _bulk_update_risk_acceptance helper The simple_risk_accept helper already handles setting finding.active to False when accepting risk, so there's no need for an additional check in the bulk update flow.
Maffooch
approved these changes
Feb 13, 2026
paulOsinski
approved these changes
Feb 13, 2026
Jino-T
approved these changes
Feb 13, 2026
Maffooch
pushed a commit
to Maffooch/django-DefectDojo
that referenced
this pull request
Feb 16, 2026
…ctDojo#14292) Allow simple risk acceptance of active findings via bulk edit menu, matching the behavior of individual finding risk acceptance. Previously, bulk risk acceptance incorrectly rejected active findings with a warning message, even though individual risk acceptance worked fine. This was inconsistent with DefectDojo Pro and the individual risk acceptance feature. Changes: - Remove the check that prevented active findings from being risk accepted in bulk operations - Update test to verify active findings can now be risk accepted - Remove obsolete warning message about active findings - Simplify return value of _bulk_update_risk_acceptance helper The simple_risk_accept helper already handles setting finding.active to False when accepting risk, so there's no need for an additional check in the bulk update flow.
Maffooch
pushed a commit
that referenced
this pull request
Feb 16, 2026
Allow simple risk acceptance of active findings via bulk edit menu, matching the behavior of individual finding risk acceptance. Previously, bulk risk acceptance incorrectly rejected active findings with a warning message, even though individual risk acceptance worked fine. This was inconsistent with DefectDojo Pro and the individual risk acceptance feature. Changes: - Remove the check that prevented active findings from being risk accepted in bulk operations - Update test to verify active findings can now be risk accepted - Remove obsolete warning message about active findings - Simplify return value of _bulk_update_risk_acceptance helper The simple_risk_accept helper already handles setting finding.active to False when accepting risk, so there's no need for an additional check in the bulk update flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #14281
This PR fixes a bug where active findings could not be risk accepted via the bulk edit menu, even though individual risk acceptance worked fine and simple risk acceptance was enabled on the product. This now matches the Pro UI.
Changes
test_bulk_edit_active_finding_can_accept_riskto verify that active findings can now be risk accepted successfully in bulktest_bulk_edit_shows_multiple_warning_messagesto verify no warning appears when risk accepting active findings_bulk_update_risk_acceptancehelper function to return only the count of skipped findingsRoot Cause
The bulk update function incorrectly checked
if finding.active:and skipped risk acceptance for active findings, showing a warning message. However:simple_risk_acceptview) has NO such restrictionsimple_risk_accepthelper function automatically setsfinding.active = Falsewhen accepting riskThis was an inconsistency between bulk and individual operations that had no technical justification.
Behavior Change
Before: Bulk risk acceptance of active findings failed with error message "Active findings cannot be risk accepted"
After: Bulk risk acceptance of active findings works correctly, matching individual behavior. The finding becomes inactive (risk_accepted=True, active=False) after risk acceptance.