DependencyTrack / DependencyTrack/dependency-track

Applied CPE cannot be removed

Open
#4,368 0 comments 1 reaction 0 assignees View on GitHub
defect in triage
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

When attempting to remove an applied CPE from a component, the system returns an error code 400 with the message "The CPE must conform to the CPE v2.2 or v2.3 specification defined by NIST". It seems that the empty CPE string is validated against the CPE specification.

### Steps to Reproduce

1. Open "Component Details" of a component
2. Apply a valid CPE string (e.g. cpe:2.3:a:gtest:gtest:1.14.0:*:*:*:*:*:*:*)
3. Click on "Update" button
4. Open "Component Details" of the component again
5. Remove the CPE string, leaving the field blank
6. Click on "Update" button

### Expected Behavior

The CPE string should be removable, similar to the PURL string. When the CPE field is left blank, the system should not validate it against the CPE specification.

### Dependency-Track Version

4.12.1

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

15.5

### 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.