DependencyTrack / DependencyTrack/dependency-track

SBOM metadata.component.version is ignored

Open
#4,813 1 comment 1 reaction 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.