-
-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put /v1/bom
overwrite fields like classifier
in an existing Project
#4352
Comments
/v1/bom
overwrite fields like classifier
/v1/bom
overwrite fields like classifier
in an existing Project
We encounter the same behaviour (Version 4.12.1). |
DT does not currently track which properties were manually modified, so it can't differentiate between a value having changed legitimately as a project's BOM evolves, or due to a manual change having been performed before. A cheap solution could be to just keep track of the names of fields that were modified manually (i.e. via a new array column). |
When you say "manually," do you mean the system or me deciding whether a project is categorized as this or that? 🤔 With the new implementation, the code respects the SBOM and overrides certain fields in the project's configuration. However, I could argue that if you create your own project and then upload the SBOM to it, I would implicitly expect the project's values to remain the same. 😊 On the other hand, if you choose to use the SBOM upload with the auto project creation feature, I wouldn’t expect anything beyond defaults or values from other sources. 🚀 |
I agree with @ybelMekk. |
With "manual" I meant any change that is not done implicitly via BOM upload. If you set the classifier upon project creation, that field should be marked as "locked" or "overwritten" or whatever, such that processing a BOM upload won't overwrite it. |
@nscuro agree 😌 |
Current Behavior
In DependencyTrack version 4.12.x and above, after initially creating a project and then updating it with an SBOM, the Project
classifier
set toAPPLICATION
in this case gets overwritten toCONTAINER
. I’m wondering if this behavior is expected and possibly an undocumented change, as earlier versions of DependencyTrack didn’t overwrite the classifier in this way.I also tried excluding the SBOM upload request and instead used the bomRef in the project creation step, but this didn’t produce/upload sbom with the same behavior as
v1/bom
.Additionally, the SBOM processing neither completes successfully nor returns an error when
bomRef
is set.Steps to Reproduce
The returned project resource shows that the classifier has changed from APPLICATION to CONTAINER.
Expected Behavior
Expected the project resource to remain in the same state as before the SBOM upload to the existing project.
Dependency-Track Version
4.12.1
Dependency-Track Distribution
Container Image
Database Server
PostgreSQL
Database Server Version
15
Browser
Google Chrome
Checklist
The text was updated successfully, but these errors were encountered: