Skip to content

Add SBOM manufacturer during export - #6935

Open
Zuplyx wants to merge 3 commits into
DependencyTrack:mainfrom
Zuplyx:issue-3935-sbom-manufacturer
Open

Zuplyx wants to merge 3 commits into
DependencyTrack:mainfrom
Zuplyx:issue-3935-sbom-manufacturer

Conversation

@Zuplyx

@Zuplyx Zuplyx commented Aug 10, 2026 •

Copy link
Copy Markdown

Description

This adds support for the SBOM manufacturer field (author of the SBOM).
If an imported SBOM contains the manufacturer field, it is persisted.
Additionally a new instance setting can be used to provide a default manufacturer, which is used if the imported SBOMs do not contain a manufacturer.

Addressed Issue

fixes #3935
related to #6852

Additional Details

Note that the CycloneDX manufacturer field is only available from v1.6 onward, therefore the manufacturer is not included in the SBOM downloaded via the UI (hardcoded to v1.5).
If requested it would also be possible to enhance this feature with a per-project manufacturer setting, so projects could deviate from the instance default or override the imported SBOM's manufacturer.

Related PRs: DependencyTrack/frontend#1737 DependencyTrack/docs#215

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/

@owasp-dt-bot

owasp-dt-bot commented Aug 10, 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 Aug 10, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 33 complexity

Metric Results
Complexity 33

View in Codacy

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

Metric Results
Coverage variation ✅ +0.01% coverage variation (-1.00%)
Diff coverage ✅ 90.24% diff coverage (70.00%)

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (feba327) 46217 40694 88.05%
Head commit (4b973c3) 46258 (+41) 40734 (+40) 88.06% (+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 (#6935) 41 37 90.24%

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.

Comment on lines +874 to +887
/**
* Resolves the organization that manufactured the BOM document itself
* (CycloneDX {@code metadata.manufacturer}), as opposed to the manufacturer
* of the project/subject component described by the BOM.
* <p>
* A manufacturer captured from a previously imported BOM for this project
* takes precedence over the system-wide default configured in Admin > General.
*/
private static OrganizationalEntity resolveBomManufacturer(final Project project, final QueryManager qm) {
if (project != null && project.getMetadata() != null && project.getMetadata().getManufacturer() != null) {
return project.getMetadata().getManufacturer();
}
return manufacturerFromConfig(qm);
}

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.

Always falling back to a global default is not safe.

This assumes all projects in the portfolio are your own, which in many cases they aren't. For example if you consume BOMs from your vendors, or you monitor other OSS projects, and so on.

Even if all projects were strictly internal, you could still have multiple sub-organizations / departments with different logical business entities, also making a single global default impractical.

Regardless of the global default, import and export of manufacturers data is something we should support. So perhaps it's worth decoupling the two things.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

But does it really matter who owns the project? The manufacturer in question here is the manufacturer of the SBOM itself and not the project/component described by the SBOM. In my opinion a global default makes sense in this case, since whoever operates the DependencyTrack instance is de-facto the manufacturer of all SBOMs exported from it.

Alternatively, I could also make the SBOM manufacturer configurable at a project level, maybe in the Identiy tab. This way individual projects could overwrite the global default, without having to alter the SBOMs they import.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@nscuro Did you have time to consider my suggestions? How should I proceed with this PR?

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.

The manufacturer in question here is the manufacturer of the SBOM itself and not the project/component described by the SBOM.

Ah, yes you're totally right: https://cyclonedx.org/docs/1.7/json/#metadata_manufacturer

My bad for mixing that up.

In my opinion a global default makes sense in this case, since whoever operates the DependencyTrack instance is de-facto the manufacturer of all SBOMs exported from it.

Split on this. It's possible that a single operator provides a DT instance to multiple departments or business units. Presumably those (sub-) organizations would lead to different metadata.manufacturer values.

But this more granular option can likely be added later, given the global option introduced in this PR is optional. So I guess the proposed change makes sense as is.

Unfortunately the PR has accumulated some merge conflicts now. If you're still interested in getting this merged, please resolve them. Otherwise let me know if you want this closed instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I rebased onto current main. Most conflicts were due to the reformat, but there was a genuine conflict in createMetadata. I fixed it by using JDBI to read the global defaults.
I also fixed a bug in my JSONB mapping and added the manufacturer to R__clone_project.sql.

Persists manufacturer of imported SBOMs.
Adds setting for instance wide default for manufacturer.
Export uses either the saved manufacturer of the import or the instance wide default.

Signed-off-by: Patrick Schmitt <patrick_98@t-online.de>
Signed-off-by: Patrick Schmitt <patrick_98@t-online.de>
Declare the DataNucleus cast functions for the JSONB manufacturer column, since the JDO mapping otherwise binds a text parameter that Postgres rejects; add MANUFACTURER to the clone function, which copies PROJECT_METADATA by explicit column list and so dropped it; and restore the metadata.manufacturer import mapping.

Signed-off-by: Patrick Schmitt <patrick_98@t-online.de>
@Zuplyx
Zuplyx force-pushed the issue-3935-sbom-manufacturer branch from b924efc to 4b973c3 Compare November 6, 2026 18:08

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.

Populate Manufacturer field in downloaded SBOM's

3 participants