Skip to content

Add exact_title filter to findings API#14597

Merged
mtesauro merged 1 commit intoDefectDojo:devfrom
brammie15:findings-exact-title
Mar 27, 2026
Merged

Add exact_title filter to findings API#14597
mtesauro merged 1 commit intoDefectDojo:devfrom
brammie15:findings-exact-title

Conversation

@brammie15
Copy link
Copy Markdown
Contributor

Description

This PR adds a new optional query parameter exact_title to the /api/v2/findings endpoint to allow exact title matching.

Existing behavior remains unchanged:

  • title filter continues to use loose substring matching (icontains)
    New behavior:
  • exact_title filter performs an exact match on Finding.title (case-insensitive, iexact)

Example:
GET /api/v2/findings?exact_title=TLS%20Certificate%20Expired

Test results

Ideally you extend the test suite in tests/ and dojo/unittests to cover the changed in this PR.
Alternatively, describe what you have and haven't tested.

Manual testing using local DefectDojo docker-compose environment:

  • Verified GET /api/v2/findings?exact_title= returns only the finding(s) with that exact title
  • Verified GET /api/v2/findings?title= still returns substring matches (unchanged)

Documentation

OpenAPI should include it via django-filter introspection; verified in swagger UI locally

Checklist

This checklist is for your information.

  • Make sure to rebase your PR against the very latest dev.
  • Features/Changes should be submitted against the dev.
  • [] Bugfixes should be submitted against the bugfix 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.

@dryrunsecurity
Copy link
Copy Markdown

DryRun Security

This pull request modifies a sensitive file path (dojo/filters.py) flagged by the configured codepaths scanner as a sensitive edit; reviewers should verify the change or update .dryrunsecurity.yaml to allow this author/path.

🔴 Configured Codepaths Edit in dojo/filters.py (drs_be90788e)
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.

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.

@valentijnscholten valentijnscholten added this to the 2.57.0 milestone Mar 26, 2026
@Maffooch Maffooch requested review from Jino-T and blakeaowens March 26, 2026 20:25
@mtesauro mtesauro merged commit 0a72930 into DefectDojo:dev Mar 27, 2026
283 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants