DependencyTrack / DependencyTrack/dependency-track
Policy Violations are not recalculated when changing license
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
I have the following policy set:
When I update the license of a component from Unresolved to a specific one in the UI, the policy violation is still there.
Only a reupload of the BOM triggers a new policy evaluation, it seems.
### Steps to Reproduce
1. Configure a policy for Unresolved licenses, either with conditions similar to the screenshot or with a simple Policy with `License is unresolved` condition
2. Upload a BOM with unresolved licenses -> at least 1 Policy Violation
3. Change the license of a component without a license to Apache-2.0
4. Check the policy violations -> still the same number of violations
### Expected Behavior
In v4, policy violations were refreshed on every component update in the UI, not just on the BOM upload.
### Dependency-Track Version
5.x
### Browser
Google Chrome
### Checklist
- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/main/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
Research direction
Start by tracing the UI component-license update path and compare it with the BOM-upload policy-evaluation path. Reproduce the unresolved-to-Apache-2.0 transition, then verify that the policy-violation count refreshes after the component update without reuploading the BOM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100