DependencyTrack / DependencyTrack/dependency-track
SBOM metadata.component.version is ignored
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
I have to specify the version as form param when uploading SBOM:
```
curl -X "POST" "http://localhost:8081/api/v1/bom" \
-H 'Content-Type: multipart/form-data' \
-H "X-Api-Key: REDACTED" \
-F "autoCreate=true" \
-F "projectName=example" \
-F "projectVersion=1-SNAPSHOT" \
-F "bom=@target/bom.xml"
```
Otherwise the version on D-T is blank
### Proposed Behavior
I can upload the SBOM like this and version will be the same as specified by `metadata.component.version`
```
curl -X "POST" "http://localhost:8081/api/v1/bom" \
-H 'Content-Type: multipart/form-data' \
-H "X-Api-Key: REDACTED" \
-F "autoCreate=true" \
-F "projectName=example" \
-F "bom=@target/bom.xml"
```
### Checklist
- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this enhancement was already requested
Contributor guide
Assessment
This issue has not been assessed yet.