DependencyTrack / DependencyTrack/dependency-track

Unable to update a component with direct dependencies data using REST API

Open
#3,065 0 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

While trying to update a components directDependencies and children, the request returns 200 OK message. However the data is not updated in the database
![image](https://github.com/DependencyTrack/dependency-track/assets/100369838/429e9d22-d838-4d07-a7c3-03d5efcac334)
Below is the result of component data using /v1/component/identity API
`[
{
"name": "Workload Manager for ClearPath MCP",
"project": {
"name": "MCP",
"version": "21",
"classifier": "APPLICATION",
"uuid": "f70a07dc-6803-4029-b152-f656dc2f2856",
"tags": [
{
"name": "mcp"
}
],
"lastInheritedRiskScore": 0.0,
"active": true
},
"lastInheritedRiskScore": 0.0,
"uuid": "45567dad-84d4-47ff-a842-3d19a38db816",
"metrics": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0,
"unassigned": 0,
"vulnerabilities": 0,
"suppressed": 0,
"findingsTotal": 0,
"findingsAudited": 0,
"findingsUnaudited": 0,
"inheritedRiskScore": 0.0,
"policyViolationsFail": 0,
"policyViolationsWarn": 0,
"policyViolationsInfo": 0,
"policyViolationsTotal": 0,
"policyViolationsAudited": 0,
"policyViolationsUnaudited": 0,
"policyViolationsSecurityTotal": 0,
"policyViolationsSecurityAudited": 0,
"policyViolationsSecurityUnaudited": 0,
"policyViolationsLicenseTotal": 0,
"policyViolationsLicenseAudited": 0,
"policyViolationsLicenseUnaudited": 0,
"policyViolationsOperationalTotal": 0,
"policyViolationsOperationalAudited": 0,
"policyViolationsOperationalUnaudited": 0,
"firstOccurrence": 1695889553700,
"lastOccurrence": 1695954353526
},
"usedBy": 0,
"expandDependencyGraph": false,
"isInternal": false
}
]`

### Steps to Reproduce

1. Update a components children or direct dependencies data using the REST API {{baseUrl}}/v1/component
2. Verify the data using the API }/v1/component/identity?name=

### Expected Behavior

Childern and direct dependencies need to be updated with the data passed via request body

### Dependency-Track Version

4.8.2

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

_No response_

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