Skip to content

Export project tags in CycloneDX BOM metadata - #7937

Open
volodymyr-jdev wants to merge 1 commit into
DependencyTrack:mainfrom
volodymyr-jdev:issue-6566
Open

volodymyr-jdev wants to merge 1 commit into
DependencyTrack:mainfrom
volodymyr-jdev:issue-6566

Conversation

@volodymyr-jdev

Copy link
Copy Markdown
Contributor

Description

Include the project's tags in metadata.component.tags when exporting a BOM or VEX with spec version 1.6 or later. Tags are sorted by name. Exports for older spec versions are unchanged, as the field does not exist there.

Addressed Issue

Closes #6566

Additional Details

  • VEX export goes through the same createMetadata, so it also gets the tags with version=1.6.
  • Besides the new tests, I checked the exports manually on a local instance: JSON (inventory, withVulnerabilities, vdr), XML and VEX, for 1.5 and 1.6, with and without tags.

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 updated the migration changelog accordingly
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly
  • This PR is a substantial change (per the ADR criteria), and I have added an ADR under docs/adr/

Include the project's tags in metadata.component.tags when exporting
a BOM or VEX with spec version 1.6 or later. Tags are sorted by name.
Exports for older spec versions are unchanged, as the field does not
exist there.

Closes DependencyTrack#6566

Signed-off-by: Volodymyr Kucheriaviy <248452481+volodymyr-jdev@users.noreply.github.com>
@codacy-production

codacy-production Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.01% coverage variation

Metric Results
Coverage variation ✅ +0.01% 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 (78a11a1) 46476 40939 88.09%
Head commit (85072b4) 46482 (+6) 40949 (+10) 88.10% (+0.01%)

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 (#7937) 6 6 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export project tags in project inventory export

1 participant