Skip to content

fix(search): update Simple Search help for asset labels - #17142

Open
sanketpatel32 wants to merge 2 commits into
DefectDojo:devfrom
sanketpatel32:devin/1796213426-simple-search-asset-copy
Open

sanketpatel32 wants to merge 2 commits into
DefectDojo:devfrom
sanketpatel32:devin/1796213426-simple-search-asset-copy

Conversation

@sanketpatel32

@sanketpatel32 sanketpatel32 commented Dec 2, 2026 •

Copy link
Copy Markdown

Fixes #17128

Description

The Simple Search help popover still described results as products, while the rest of the UI is moving to the Asset naming. This change:

  • Uses labels.ASSET_PLURAL_LABEL in the popover prose instead of hard-coded product wording.
  • Keeps product:, product-tag, and product-tags unchanged because they are query syntax parsed by dojo/search/views.py.
  • Documents both the singular and plural tag operators (test-tag/test-tags, engagement-tag/engagement-tags, product-tag/product-tags).
  • Fixes the typos in the same block: to to perform, finegrained, and the invalid </br> tag.
  • Fixes the misspelled Application Technolgies tab label.
  • Adds the new popover message to all 28 catalogs. English keeps an empty msgstr; the other translations are machine-produced, so native-speaker review is welcome.

This is complementary to #17127, which covers the result labels on the same page rather than the help-popover prose.

Test results

  • Added unittests/test_simple_search_help_popover.py (3 tests). The rendering assertions failed on current dev before the fix and pass with it:
    • The rendered popover uses the asset plural label while retaining the product:/product-tag query operators.
    • The typo fixes are rendered.
    • Every catalog contains a non-fuzzy translation of the exact extracted popover message, with both placeholders preserved.
  • Existing simple-search suites pass after rebasing on the latest dev: test_simple_search_asset_labels, test_simple_search_tab_panes, test_simple_search_scoping, test_simple_search_bad_input, and test_watson_search_disabled (12 tests OK).
  • ruff check --config ruff.toml and ruff format --check pass for the new test module with Ruff 0.16.10.
  • msgfmt --check passes for all 28 catalogs.
  • Confirmed with Django's template extraction machinery that the catalog msgid exactly matches the blocktrans trimmed message extracted from the template.

Documentation

None needed; this is a UI copy bug fix.

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.

This change was implemented and validated with AI assistance (Devin), under the direction of Sanket Patel.

@dryrunsecurity

dryrunsecurity Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

DryRun Security

This pull request contains a critical finding where a sensitive template file was modified by an author not on the allowed list.

🔴 Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/templates/dojo/simple_search.html (drs_8c265e14)
Vulnerability Configured Sensitive Codepath Modified by Non-Allowed Author
Description File 'dojo/templates/dojo/simple_search.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by 'sanketpatel32' (commit c00b313) 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.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

1 similar comment
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1796213426-simple-search-asset-copy branch from 054150a to 820cf72 Compare December 3, 2026 23:28
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@sanketpatel32

Copy link
Copy Markdown
Author

Conflicts with dev are resolved in 820cf72. Relevant unit tests, Ruff, and msgfmt catalog validation all pass. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant