Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to set unresolved license for license policy #2214

Conversation

rbt-mm
Copy link
Contributor

@rbt-mm rbt-mm commented Nov 30, 2022

Description

If you want to set up a license policy where the license is blank or null, it is currently only possible by creating a license policy which includes every single license. This is tedious to set up and needs to be maintained if new licenses are added.

To simplify setting up this license policy, it is now possible to choose unresolved as the value for a policy condition. This condition then checks, if a component does not have a license.

Addressed Issue

#1518

Additional Details

image

Frontend PR

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

Copy link
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @rbt-mm!

I'm unsure about the undefinedLicense part. Given this policy condition is about resolved licenses (as in, resolved SPDX license), "undefined" may be a bit misleading. Components can have unresolved licenses as well.

Perhaps using unresolved instead of undefinedLicenses would make this more clear?

@rbt-mm
Copy link
Contributor Author

rbt-mm commented Dec 6, 2022

Yeah, I agree that it would be more clear if it was named unresolved instead of undefinedLicense.

I will change the names in the backend and frontend.

@rbt-mm rbt-mm changed the title Enable to set undefined license for license policy Enable to set unresolved license for license policy Dec 6, 2022
@rbt-mm rbt-mm requested a review from nscuro December 6, 2022 09:46
@nscuro
Copy link
Member

nscuro commented Dec 6, 2022

@rbt-mm Please rebase with master for the build to work again. The failure cause was fixed in #2241.

@rbt-mm rbt-mm force-pushed the master-set-license-policy-condition-to-null branch from 40364f0 to d111f5b Compare December 6, 2022 12:33
@nscuro nscuro merged commit e9dcba0 into DependencyTrack:master Dec 6, 2022
mulder999 pushed a commit to mulder999/dependency-track that referenced this pull request Dec 23, 2022
…2214)

* Enable to set undefined license for license policy

Signed-off-by: RBickert <[email protected]>

* Change `undefinedLicense` to `unresolved`

Signed-off-by: RBickert <[email protected]>

Signed-off-by: RBickert <[email protected]>

Closes DependencyTrack#1518

Signed-off-by: mulder999 <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants