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

feat(license): improve license normalization #7131

Merged
merged 28 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
44b0164
(feat)Improve license normalization
pbaumard Jul 9, 2024
5adc524
Fix indenting
pbaumard Jul 9, 2024
6b52af5
Fix format and test
pbaumard Jul 10, 2024
4dc5070
mapping back to private and other suffixes ignore from SPDX
pbaumard Jul 11, 2024
60d29b0
Do not change unmapped license name
pbaumard Jul 12, 2024
ab62262
Additional mappings from oss-review-toolkit and space normalization
pbaumard Jul 12, 2024
d0101fc
Fix double space
pbaumard Jul 12, 2024
cd7d779
Add back GPL WITH AUTOCONF EXCEPTION
pbaumard Jul 12, 2024
aa7ee3c
Normalize CycloneDX licenses and fix tests
pbaumard Jul 15, 2024
c21e723
Add MPL mappings
pbaumard Jul 16, 2024
3055e10
Update golden test files
pbaumard Jul 16, 2024
6c168f0
Normalize suffixes using existing expression package
pbaumard Jul 16, 2024
6ec91a5
Fix copyright_test
pbaumard Jul 16, 2024
0f4c8cb
Add ValidateDocument in SPDX test
pbaumard Jul 17, 2024
907683d
Fix linter
pbaumard Jul 17, 2024
5074f24
Revert since only Name and Version are checked
pbaumard Jul 24, 2024
8e6f9d3
Revert cycloneDX normalization
pbaumard Jul 24, 2024
b8bb817
More tests
pbaumard Jul 24, 2024
56093d9
Comments
pbaumard Jul 24, 2024
85b8781
Fix golden
pbaumard Jul 24, 2024
39f796e
test(integration): update golden files
DmitriyLewen Jul 25, 2024
5f7cf6d
Fix apk license parsing and use version regexp for license normalization
pbaumard Jul 26, 2024
aff6ebd
Check map in test; make map directly & move TestLaxSplitLicense to no…
pbaumard Aug 1, 2024
0134266
Add field names in test
pbaumard Sep 2, 2024
b85b781
Merge branch 'aquasecurity:main' into feature/better-license-normalize
pbaumard Sep 3, 2024
8663dcd
Golden test update
pbaumard Sep 3, 2024
932e937
Merge remote-tracking branch 'origin/main' into feature/better-licens…
pbaumard Sep 10, 2024
f3f7c39
test: add a file for private functions
knqyf263 Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration/testdata/alpine-39-high-critical.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"PkgName": "musl-utils",
"PkgIdentifier": {
"PURL": "pkg:apk/alpine/musl-utils@1.1.20-r4?arch=x86_64\u0026distro=3.9.4",
"UID": "8c341199f4077fc8"
"UID": "a35dd6cab4aabdf1"
},
"InstalledVersion": "1.1.20-r4",
"FixedVersion": "1.1.20-r5",
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/alpine-39.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"PkgName": "musl-utils",
"PkgIdentifier": {
"PURL": "pkg:apk/alpine/musl-utils@1.1.20-r4?arch=x86_64\u0026distro=3.9.4",
"UID": "8c341199f4077fc8"
"UID": "a35dd6cab4aabdf1"
},
"InstalledVersion": "1.1.20-r4",
"FixedVersion": "1.1.20-r5",
Expand Down
2 changes: 1 addition & 1 deletion integration/testdata/alpine-distroless.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"PkgName": "git",
"PkgIdentifier": {
"PURL": "pkg:apk/alpine/git@2.35.1-r2?arch=x86_64\u0026distro=3.16",
"UID": "d44ac4666246b919"
"UID": "2999d822f6cae40c"
},
"InstalledVersion": "2.35.1-r2",
"FixedVersion": "2.35.2-r0",
Expand Down
Loading