Skip to content

Fix BOM export failing for projects of type NONE#5148

Merged
nscuro merged 1 commit into
DependencyTrack:masterfrom
nscuro:issue-4988
Jul 27, 2025
Merged

Fix BOM export failing for projects of type NONE#5148
nscuro merged 1 commit into
DependencyTrack:masterfrom
nscuro:issue-4988

Conversation

@nscuro
Copy link
Copy Markdown
Member

@nscuro nscuro commented Jul 27, 2025

Description

Fixes BOM export failing for projects of type NONE.

Addressed Issue

Fixes #4988

Additional Details

N/A

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

@nscuro nscuro added this to the 4.14.0 milestone Jul 27, 2025
Copilot AI review requested due to automatic review settings July 27, 2025 15:59
@nscuro nscuro added defect Something isn't working backport/4.13.3 PRs to be backported to v4.13.3 labels Jul 27, 2025
@owasp-dt-bot
Copy link
Copy Markdown

owasp-dt-bot commented Jul 27, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

This comment was marked as outdated.

@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9e7332a) 24095 19491 80.89%
Head commit (c74db97) 24095 (+0) 19491 (+0) 80.89% (+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 (#5148) 3 3 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%

See your quality gate settings    Change summary preferences

@nscuro nscuro requested a review from Copilot July 27, 2025 17:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where BOM export was failing for projects with a classifier of type NONE. The fix ensures that projects with NONE classifier are properly handled during CycloneDX BOM generation.

  • Updated component and project type mapping to exclude NONE classifier from direct conversion
  • Changed default project type from LIBRARY to APPLICATION when classifier is null or NONE
  • Added proper null/NONE classifier checks to prevent conversion failures

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ModelConverter.java Fixed classifier handling to exclude NONE type and updated default project type mapping
BomResourceTest.java Updated test assertion to reflect new default project type from library to application

@nscuro nscuro merged commit f0ae475 into DependencyTrack:master Jul 27, 2025
10 checks passed
@nscuro nscuro deleted the issue-4988 branch July 27, 2025 17:22
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/4.13.3 PRs to be backported to v4.13.3 defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BOM Download fails to generate the file, without display an error

3 participants