Repository navigation
fix(metrics): stop clipping the Month/Year/Organization fields on the counts forms - #17125
Conversation
… counts forms pt_counts.html pinned `form.biweekly-metrics select` to `height: 27px` and removed its background image. That suited Bootstrap 3; the Tailwind form base now gives selects 8px vertical padding and a 24px line height, so the fixed height left ~9px for the text and the selected Month, Year and Organization / Asset Tag values were cut off, with no dropdown arrow. Drop the override so these selects use the same styling as every other select in the app. Authored by T. Walker - DefectDojo
|
This pull request contains a critical finding where a sensitive template file was modified by an unauthorized author.
🔴 Configured Sensitive Codepath Modified by Non-Allowed Author in
|
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/templates/dojo/pt_counts.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by 'skywalke34' (commit aec7779) who is not in the allowed authors list. |
We've notified @mtesauro.
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
left a comment
There was a problem hiding this comment.
Review: #17125 fix(metrics): stop clipping the Month/Year/Organization fields on the counts forms
Verdict: approve
Head SHA reviewed: aec7779
Profile: code change (CSS removal in one template + new unit test)
Base / milestone: dev, 3.6.0 (correct)
Gates
- ruff 0.16.10: all checks passed.
- CI: 40 of 40 pass.
New test vs base
unittests.test_counts_form_select_heighton the PR head: 2 tests OK.- With
pt_counts.htmlreverted toorigin/dev: both fail, matchingheight: 27px.
Break attempts
- Rendered height and arrow, base vs PR. Browser at 1440px on
/metrics/organization/counts?month=12&year=2026&product_type=2. Ondev, Month, Year and Organization are 27px tall (reproduces the bug). On the PR all three are 42px, show their selected text (December,2026,R&D + 100% #1), and have the SVG arrowbackground-image. No break. - Asset Tag Counts uses the same template and rule. Covered by the PR's test. The page renders 200 on the combined tree. No break.
- Scope of the removed rule.
form.biweekly-metrics selectwas defined only inpt_counts.html, and the remaininginputrule is untouched. The form has no other selects that relied on the 27px height. No break. - Integration tests.
tests/product_tag_metrics_test.pyfinds selects by tag name, not by size, so it is unaffected. No break. - Interaction with #17122 / #17124 in the same file: no conflict. 35 tests OK on the combined tree. No break.
Blocking
None.
Nice-to-haves
- The test greps the inline
<style>forform.biweekly-metrics select { ... height: ... }. It would not catch a fixed height reintroduced under a different selector. That is acceptable for a CSS regression guard.
Verified hands-on
Tests on the PR head and with the fix reverted. Browser measurements on dev vs the combined PR tree.
Statically only
Other consumers of the selector.
Could not reproduce
Nothing outstanding.
Description
On Organization Counts (
/metrics/organization/counts) and Asset Tag Counts (/metrics/asset/tag/counts), the period form's Month, Year and Organization / Asset Tag fields clip their own text. You can't read the selected values, and the fields have no dropdown arrow.pt_counts.htmlpinsform.biweekly-metrics selecttoheight: 27pxand setsbackground-image: none. That was fine under Bootstrap 3. The Tailwind form base now gives selects 8px top and bottom padding and a 24px line height (border-box), so a fixed 27px leaves about 9px for 24px-tall text. The rule only exists in this template.The fix removes the override, so these selects get the same styling as every other select in the app: 42px tall, with the dropdown arrow. The submit button stays vertically centered on the fields.
Test results
unittests/test_counts_form_select_height.py(2 tests): neither counts page's form CSS forces a fixed select height. Both fail on currentdev(they matchheight: 27px) and pass with this change.ruff check(0.16.10) passes.Documentation
None needed (bug fix).
Checklist
dev.devbranch.Generated with Claude Code under the direction of T. Walker (skywalke34) - DefectDojo