DependencyTrack / DependencyTrack/dependency-track

Collection Project shows the vulnerabilities in the UI, but returns an empty list with the REST API

Open
#5,321 2 comments 0 reactions 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

I am using the Rest API call "/v1​/vulnerability​/project​/{uuid}" for a collection project with "aggregate direct children" collection logic.

Image

The project contains one child and the child has vulnerabilities, which can be confirmed with the above mentioned API call using the child uuid and also on the UI.

Image

But when I use that call for the collection project, I get an empty list.

### Steps to Reproduce

1. Open the swagger UI for the openapi.yaml
2. Try out the API call /v1​/vulnerability​/project​/{uuid} with the child uuid
3. Try out the API call /v1​/vulnerability​/project​/{uuid} with the collection Project uuid

### Expected Behavior

In the UI we are informed that "Metrics of collection project are calculated by aggregating numbers of all direct children", so the expected behavior would be that the API call returns a list, which is the aggregation of all the vulnerabilities from all its children.

### Dependency-Track Version

4.13.4

### Dependency-Track Distribution

Container Image

### Database Server

H2

### Database Server Version

_No response_

### Browser

Mozilla Firefox

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