-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(spdx): use the hasExtractedLicensingInfos
field for licenses that are not listed in the SPDX
#8077
Open
DmitriyLewen
wants to merge
18
commits into
aquasecurity:main
Choose a base branch
from
DmitriyLewen:fix/use-other-licenses-in-spdx
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix(spdx): use the hasExtractedLicensingInfos
field for licenses that are not listed in the SPDX
#8077
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6272fdd
feat: add spdx licenses and exceptions + validation
DmitriyLewen eb30b49
feat: use otherLicense for non-spdx licenses
DmitriyLewen b1081e2
test: add/update unit tests
DmitriyLewen 420c15e
refactor: remove duplicates of otherLicenses
DmitriyLewen b6c1d28
refactor: always fill ExtractedText and LicenseName fields
DmitriyLewen 1bac2ca
fix: tests
DmitriyLewen f851f9b
add comment
DmitriyLewen 041ab21
feat: add `LicenseComment` field
DmitriyLewen 659f992
refactor: ExtractedText field for license with name
DmitriyLewen c25d840
refactor: use exception list from spdx.org site
DmitriyLewen 20275c3
test: update tests
DmitriyLewen c89c4e3
refactor: use `exceptions.json` file
DmitriyLewen 784db9e
feat(mage): add command to create exceptions.json file
DmitriyLewen ffb5067
feat(licensing): add exceptions.json file
DmitriyLewen 9f0f7bf
fix(mage): fix typo
DmitriyLewen c5563f5
ci: add spdx-cron
DmitriyLewen 0d13108
ci: add aqua-installer
DmitriyLewen a2ebc32
fix: linter error
DmitriyLewen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment may deserve to be a separate suggestion, but in reading the code I would recommend building the license and exception IDs from the JSON files maintained by the SPDX legal team. The license list is updated every 3 months with new IDs and maintaining these in code can be a challenge to keep up and maintain. What I do in the code I maintain is attempt to access the current JSON files on the website https://spdx.org/licenses/licenses.json and https://spdx.org/licenses/exceptions.json. If I can not access the website or if the user specified not to use the online version, I'll use a cached version of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are cases when users run multiple times.
Downloading these files for each run is not good.
But we can save
licenses.json
andexceptions.json
files in the cache dir and use them.The files contain
releaseDate
field, so we can update this file only whenreleaseDate + 3 months
has expired.How strictly is this rule followed?
Anyway let's move this discussion into another issue/pr.
I found that https://spdx.org/licenses/exceptions.json and https://github.com/spdx/license-list-data/blob/592c2dcb8497c6fe829eea604045f77d3bce770b/json/exceptions.json are different (see
harbour-exception
).Which file would be more correct to use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very strictly. There is, however, a license list version field which is reliably incremented on release.
The lists at https://spdx.org/licenses - these will always be the latest released version. The github repo master will have the latest in development version which may not be stable. The github repo is tagged with release versions, so if you go to the tag for the latest release in github, it will match what is on the website.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, update exception list in 659f992