Skip to content

fix(findings): count bulk-selected findings when merging - #16374

Merged
Maffooch merged 1 commit into
DefectDojo:devfrom
k0nnect:fix-merge-bulk-select
Oct 17, 2026
Merged

Maffooch merged 1 commit into
DefectDojo:devfrom
k0nnect:fix-merge-bulk-select

Conversation

@k0nnect

@k0nnect k0nnect commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Description

fixes #16151. the merge button said "select at least two findings" after picking findings with select all or select by severity

  • the merge check read checkbox_count, which only updates on single checkbox clicks. select all and select by severity tick the boxes directly and never update it, so it stays at 0
  • unticking a box also drops the count twice (the change handler recounts, then decrements again), so tick 3 / untick 1 leaves 2 ticked but a count of 1
  • count input[type=checkbox].select_one:checked when merge is clicked instead, the same set the bulk form submits. same one-line change in the findings list and the test view

Test results

tested locally on the nightly-dev images with a 47-finding bandit import, clicking merge after each way of selecting:

selection before after
select by severity: medium (25 ticked) "select at least two" alert merge page, 25 findings sent
select all (25 ticked) "select at least two" alert merge page, 25 findings sent
tick 3, untick 1 (2 ticked) "select at least two" alert merge page, 2 findings sent
tick 2 merge page, 2 sent merge page, 2 sent
tick 1 alert alert

same results on the product findings list and the test view. no unit test added since the change is template js only

Documentation

no docs change needed

Checklist

  • Make sure to rebase your PR against the very latest dev.
  • Submit all PRs, features and bug fixes alike, against the dev branch.
  • Give a meaningful name to your PR, as it may end up being used in the release notes.
  • Your code is Ruff compliant (see ruff.toml).
  • Your code is python 3.13 compliant.
  • If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
  • Model changes must include the necessary migrations in the dojo/db_migrations folder.
  • Add applicable tests to the unit tests.
  • Add the proper label to categorize your PR.

the merge button read checkbox_count, which select all and select by
severity never update, and which drops one too many when a box is
unticked. count the checked findings when merge is clicked instead.

fixes DefectDojo#16151
@dryrunsecurity

Copy link
Copy Markdown

DryRun Security

This pull request modifies two sensitive HTML template files in the dojo/templates directory, which were changed by an author not on the allowed list. These changes are flagged as low-severity issues but are not blocking.

Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/templates/dojo/findings_list_snippet.html (drs_4badcecc)
Vulnerability Configured Sensitive Codepath Modified by Non-Allowed Author
Description File 'dojo/templates/dojo/findings_list_snippet.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by 'k0nnect' (commit 63e6b2d) who is not in the allowed authors list.
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/templates/dojo/view_test.html (drs_927bddc5)
Vulnerability Configured Sensitive Codepath Modified by Non-Allowed Author
Description File 'dojo/templates/dojo/view_test.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by 'k0nnect' (commit 63e6b2d) who is not in the allowed authors list.

Comment to provide feedback on these findings.

Report false positive: @dryrunsecurity fp [FINDING ID] [FEEDBACK]
Report low-impact: @dryrunsecurity nit [FINDING ID] [FEEDBACK]

Example: @dryrunsecurity fp drs_90eda195 This code is not user-facing

All finding details can be found in the DryRun Security Dashboard.

@Maffooch
Maffooch added this pull request to the merge queue Oct 17, 2026
@Maffooch Maffooch added this to the 3.4.200 milestone Oct 17, 2026
Merged via the queue into DefectDojo:dev with commit e3d2afd Oct 17, 2026
71 of 73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants