DependencyTrack / DependencyTrack/dependency-track

Duplicate Project Name and Version when Cloning and Uploading BOM File

Open
#4,411 1 comment 0 reactions 0 assignees View on GitHub
defect help wanted p2 size/M
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

We have observed a race condition that leads to duplicate project names and versions in Dependency-Track when triggering a project clone and immediately uploading the BOM file to the project clone without waiting for the clone to complete.

Note: The issue was not observed in Dependency-Track version 4.11

### Steps to Reproduce

1. Trigger a project clone using the API "api/v1/project/clone" without awaiting the completion
2. Immediately upload the BOM file with the "auto-create" parameter to the project clone using the API "api/v1/bom", specifying the same project name and version.
3. Observe the projects in Dependency-Track and verify that a duplicate project name and version is created.

### Expected Behavior

A single project with a unique name and version should exist in Dependency-Track.
The BOM upload should fail or the system should wait until the clone process is complete before uploading the BOM file in Dependency-Track

### Dependency-Track Version

4.12.1

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

15.8

### Browser

Google Chrome

### 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 defect was already reported

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.