DependencyTrack / DependencyTrack/dependency-track

Policy Violation Audit flagging components with valid licenses

Open
#6,471 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

Hey,

We have a policy set to find components without a valid license:

Image

However, license expressions using the WITH keyword such as
"GPL-3.0-only WITH GCC-exception-3.1" continue to get picked up by this filter and reported

Image

Other license expressions using AND or OR do not suffer from this behaviour.

Happy to provide more info.

Thanks

### Steps to Reproduce

1. Create a policy with one condition: "License - is - unresolved"
2. Add a SBOM with a component that has the license expression: "GPL-3.0-only WITH GCC-exception-3.1"
3. Verify in the component that the expression is valid (green checkmark)
4. Check the Policy Violation Audit and notice that the component gets picked up as having no license:

Image

### Expected Behavior

Dependency-Track recognizes the license expression using WITH statements as valid licenses.

### Dependency-Track Version

4.x

### Browser

Mozilla Firefox

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

Open the contributing guide

Research direction

Start by tracing the Policy Violation Audit handling for the "License - is - unresolved" condition and compare it with the license validation path for AND and OR expressions. Reproduce the issue with an SBOM component using "GPL-3.0-only WITH GCC-exception-3.1". Done means the valid WITH expression is no longer reported as unresolved while genuinely invalid licenses still are.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.