Repository navigation
Fix multiselect filter fields not being initialized as Select2 - #16306
Merged
Merged
Conversation
The Select2 initialization in filter_js_snippet.html only targeted '.similar-filters select[multiple]', a class that exists solely on the similar-findings panel of the finding view. Every other filter panel (findings list, products, engagements, metrics, ...) rendered its multiselect filters as native <select multiple> elements, and the fixed height set by '.dojo-filter-set .form-control' clipped them to a single visible option row. - Initialize Select2 on all '.dojo-filter-set select[multiple]' fields, skipping tagulous widgets (which initialize themselves) and fields that are already initialized (the snippet can be included more than once on a page). - Guard on $.fn.select2, since Select2 is only loaded through the tagulous form media and is absent on filter pages without tag fields. - Let native multiselects grow (height: auto) so pages without Select2 still show a usable list instead of a single clipped row. Fixes DefectDojo#16110 Co-authored-by: Cursor <cursoragent@cursor.com>
|
This pull request modifies several sensitive codepaths, including templates, authentication, and database migrations, using authors who are not on the allowed list. These changes are flagged as low severity and are not blocking.
Configured Sensitive Codepath Modified by Non-Allowed Author in
|
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/templates/dojo/filter_js_snippet.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by '' (commit 7ece1a4) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/apps.py (drs_8a88b1f8)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/apps.py' matches configured sensitive codepath pattern 'dojo/apps.py' and was modified by 'raedbrahem' (commit a21f226) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/authorization/api_permissions.py (drs_78a4b617)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/authorization/api_permissions.py' matches configured sensitive codepath pattern 'dojo/authorization/*.py' and was modified by 'raedbrahem' (commit a21f226) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/user/authentication.py (drs_fd5b83d1)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/user/authentication.py' matches configured sensitive codepath pattern 'dojo/user/*.py' and was modified by 'raedbrahem' (commit a21f226) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/db_migrations/0299_finding_test_numsev_index.py (drs_96ae656e)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/db_migrations/0299_finding_test_numsev_index.py' matches configured sensitive codepath pattern 'dojo/db_migrations/*.py' and was modified by 'raedbrahem' (commit 2130ec1) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/finding/models.py (drs_2ed4cf0a)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/finding/models.py' matches configured sensitive codepath pattern 'dojo/finding/*.py' and was modified by 'raedbrahem' (commit 2130ec1) 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.
blakeaowens
approved these changes
Oct 17, 2026
Maffooch
approved these changes
Oct 17, 2026
devGregA
approved these changes
Oct 17, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 17, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 17, 2026
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.
Description
Fixes #16110.
On the Findings list (and every other page using
filter_snippet.html), multiselect filter fields such as "Locations Status", "Severity" or "Test Type" rendered as native, unstyled<select multiple>elements clipped to a single visible option row, instead of Select2 widgets.Root cause: the Select2 initialization in
dojo/templates/dojo/filter_js_snippet.htmlonly targets.similar-filters select[multiple], and.similar-filtersexists solely on the similar-findings panel inview_finding.html. All other filter panels never had their multiselects initialized. The one-row clipping comes from.dojo-filter-set .form-control { height: 2.125rem }winning over theselect[multiple]rule, which only setsmin-height/max-height. (The htmx hypothesis in the issue is not the cause: the filter panel is rendered server-side, not swapped in by htmx.)The design-system CSS for
.dojo-filter-set .select2-containerand the clear-filters logic forselect.select2-hidden-accessiblealready exist indojo.css/filter_snippet.html, so Select2 was clearly intended here; this PR just wires it up.Changes:
filter_js_snippet.html: initialize Select2 on.dojo-filter-set select[multiple](keeping.similar-filters), skipping tagulous widgets (they initialize themselves) and already-initialized fields (the snippet can be included more than once on a page). Guarded on$.fn.select2, because Select2 is only loaded through the tagulous form media and is absent on filter pages without tag fields (e.g./endpoint,/user).dojo.css:height: autoon.dojo-filter-set select[multiple]so that, on pages where Select2 is not available, the native control shows its options instead of a single clipped row.Test results
Verified on the
devdocker compose stack with a headless Chrome script:/finding, all 12 non-tag multiselect filters (id_location_status,id_severity,id_test__test_type, ...) had noselect2-hidden-accessibleclass and were 34px tall. After: all 12 are Select2 widgets with search and dropdown, "Locations Status" shows Active / Mitigated / False Positive / Risk Accepted / Out Of Scope./finding,/finding/open,/product,/engagement,/metrics,/endpoint,/user,/test_type,/tool_type: no JS errors; on pages with Select2 every multiselect has exactly one.select2-container(no double init); on pages without Select2 the native multiselect now renders at ~80px with its options visible.select.select2-hidden-accessiblehandling).No Python changes, so no unit tests added; happy to add a Selenium check in
tests/if maintainers would like one.Documentation
No documentation changes needed (UI bug fix).