Skip to content

Forward group_by parameter to DefectDojo, v5 version#6416

Merged
nscuro merged 4 commits into
DependencyTrack:mainfrom
webdevred:send-groupby-to-defect-dojo-main
Jun 18, 2026
Merged

Forward group_by parameter to DefectDojo, v5 version#6416
nscuro merged 4 commits into
DependencyTrack:mainfrom
webdevred:send-groupby-to-defect-dojo-main

Conversation

@webdevred

@webdevred webdevred commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

DefectDojo's import-scan and reimport-scan endpoints accept a group_by parameter that clusters findings into Finding Groups on import, but Dependency-Track never forwarded it. Operators who rely on Finding Groups for triage had to set group_by outside of DT or give it up entirely.

This adds a per-project property defectdojo.groupBy that, when set, is sent as group_by in the multipart form body for both import and reimport requests. When not set, behavior is unchanged.

This is the v5 companion to #6130, which makes the same change for 4.14.x. Adapted for the MultipartBodyPublisher-based DefectDojoClient in the apiserver module.
dtrack-groupby
defectdojo-groupby

Addressed Issue

Related to #6061. v5 companion to #6130 (same change targeting 4.14.x).

Additional Details

The implementation follows the same pattern as defectdojo.testTitle: a per-project ProjectProperty is read in DefectDojoUploader and forwarded as a form field via MultipartBodyPublisher.addFormField. No new abstraction was introduced.

The dead .build() fix included in the v4 PR does not apply here. The v5 DefectDojoClient uses MultipartBodyPublisher rather than Apache HttpClient's MultipartEntityBuilder, so there is no equivalent dead call to remove.

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@owasp-dt-bot

owasp-dt-bot commented Jun 15, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production

codacy-production Bot commented Jun 15, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage 100.00% diff coverage · 0.00% coverage variation

Metric Results
Coverage variation 0.00% coverage variation (-1.00%)
Diff coverage 100.00% diff coverage (70.00%)

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (fb8940e) 42089 36519 86.77%
Head commit (99255b6) 42098 (+9) 36526 (+7) 86.76% (0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6416) 10 10 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@webdevred webdevred changed the title Forward group_by parameter to DefectDojo Forward group_by parameter to DefectDojo, v5 version Jun 15, 2026
…erty

Signed-off-by: webdevred <148627186+webdevred@users.noreply.github.com>
When set, forwards the value as group_by in the DefectDojo import-scan
and reimport-scan multipart form requests, allowing findings to be
grouped into Finding Groups on import.

When not set, behavior is unchanged (backwards compatible).

Closes DependencyTrack#6061

Signed-off-by: webdevred <148627186+webdevred@users.noreply.github.com>
…y, adapt group_by tests to v5 API

Signed-off-by: webdevred <148627186+webdevred@users.noreply.github.com>
@webdevred webdevred force-pushed the send-groupby-to-defect-dojo-main branch from 691019f to a9ce4fc Compare June 15, 2026 18:40
@nscuro nscuro added enhancement New feature or request integration/defectdojo Related to the Defect Dojo integration labels Jun 16, 2026
@nscuro nscuro added this to the 5.1 milestone Jun 16, 2026
Signed-off-by: webdevred <148627186+webdevred@users.noreply.github.com>

@nscuro nscuro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nscuro nscuro merged commit 28f1098 into DependencyTrack:main Jun 18, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request integration/defectdojo Related to the Defect Dojo integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants