From bacb847b20b5d09e58b65c05d4f7b2c485d5dd35 Mon Sep 17 00:00:00 2001 From: Omkar Phansopkar Date: Tue, 6 Feb 2024 00:05:13 +0530 Subject: [PATCH 1/3] Updated parser to support new license detection format Signed-off-by: Omkar Phansopkar --- package-lock.json | 281 ++++-- package.json | 12 +- .../MatchLicenseExpression.tsx | 2 +- .../LicenseEntity/LicenseMatchesTable.tsx | 28 +- src/contexts/dbContext.tsx | 3 +- src/renderer.ts | 2 +- src/services/importedJsonTypes.ts | 25 +- src/services/models/todo.ts | 2 +- src/services/workbenchDB.ts | 136 ++- tests/test-scans/licenses/expectedLicenses.ts | 335 ++++++- tests/test-scans/licenses/withLicenses.json | 828 +++++------------- .../licenses/withLicenses_legacy.json | 786 +++++++++++++++++ 12 files changed, 1708 insertions(+), 732 deletions(-) create mode 100644 tests/test-scans/licenses/withLicenses_legacy.json diff --git a/package-lock.json b/package-lock.json index 71e436f4..059f85f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,11 +44,11 @@ "react-router-dom": "^6.18.0", "react-scroll": "^1.9.0", "react-select": "^5.7.7", - "react-toastify": "^9.1.3", + "react-toastify": "^10.0.4", "react-tooltip": "^5.22.0", "scroll-into-view-if-needed": "^3.1.0", - "sequelize": "^6.34.0", - "sqlite3": "^5.1.6", + "sequelize": "^6.35.2", + "sqlite3": "^5.1.7", "url-loader": "^4.1.1" }, "devDependencies": { @@ -72,7 +72,7 @@ "@typescript-eslint/parser": "^6.9.1", "@vercel/webpack-asset-relocator-loader": "^1.7.3", "css-loader": "^6.8.1", - "electron": "^28.1.0", + "electron": "^28.2.0", "electron-builder": "^24.9.1", "eslint": "^8.53.0", "eslint-plugin-css-import-order": "^1.1.0", @@ -82,9 +82,9 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "node-loader": "^2.0.0", - "style-loader": "^3.3.3", + "style-loader": "^3.3.4", "ts-jest": "^29.1.1", - "ts-loader": "^9.5.0", + "ts-loader": "^9.5.1", "typescript": "~5.2.2" } }, @@ -5467,9 +5467,9 @@ "dev": true }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", "dev": true }, "node_modules/@types/http-proxy": { @@ -7157,11 +7157,18 @@ "node": ">=8" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -7347,7 +7354,6 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, "funding": [ { "type": "github", @@ -7861,9 +7867,9 @@ } }, "node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", "engines": { "node": ">=6" } @@ -8852,7 +8858,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, "dependencies": { "mimic-response": "^3.1.0" }, @@ -8867,7 +8872,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, "engines": { "node": ">=10" }, @@ -8889,6 +8893,14 @@ } } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -9323,9 +9335,9 @@ } }, "node_modules/electron": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-28.1.0.tgz", - "integrity": "sha512-82Y7o4PSWPn1o/aVwYPsgmBw6Gyf2lVHpaBu3Ef8LrLWXxytg7ZRZr/RtDqEMOzQp3+mcuy3huH84MyjdmP50Q==", + "version": "28.2.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-28.2.0.tgz", + "integrity": "sha512-22SylXQQ9IHtwLw4D+Z4Si7OUpeDtpHfJVTjy3yv53iLg5zJKKPOCWT4ZwgYGHQZ0eldyBrYBHF/P9FPd2CcVQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -9525,7 +9537,6 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, "dependencies": { "once": "^1.4.0" } @@ -10137,6 +10148,14 @@ "node": ">= 0.8.0" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, "node_modules/expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", @@ -10438,6 +10457,11 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -10593,9 +10617,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -10760,6 +10784,11 @@ "node": ">= 0.6" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -10989,6 +11018,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -11667,7 +11701,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -11775,8 +11808,7 @@ "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/internal-slot": { "version": "1.0.6", @@ -13239,9 +13271,9 @@ } }, "node_modules/keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "dependencies": { "json-buffer": "3.0.1" @@ -13852,7 +13884,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -13966,6 +13997,11 @@ "node": ">=10" } }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "node_modules/mock-aws-s3": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/mock-aws-s3/-/mock-aws-s3-4.0.2.tgz", @@ -14068,6 +14104,11 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -14121,7 +14162,6 @@ "version": "3.51.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz", "integrity": "sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==", - "dev": true, "dependencies": { "semver": "^7.3.5" }, @@ -15057,6 +15097,31 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -15207,7 +15272,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -15341,6 +15405,20 @@ "node": ">= 0.8" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, "node_modules/rc-motion": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.6.3.tgz", @@ -15420,6 +15498,14 @@ "react-dom": "*" } }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/rcedit": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-3.0.1.tgz", @@ -15640,11 +15726,11 @@ } }, "node_modules/react-toastify": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-9.1.3.tgz", - "integrity": "sha512-fPfb8ghtn/XMxw3LkxQBk3IyagNpF/LIKjOBflbexr2AWxAH1MJgvnESwEwBn9liLFXgTKWgBSdZpw9m4OTHTg==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.4.tgz", + "integrity": "sha512-etR3RgueY8pe88SA67wLm8rJmL1h+CLqUGHuAoNsseW35oTGJEri6eBTyaXnFKNQ80v/eO10hBYLgz036XRGgA==", "dependencies": { - "clsx": "^1.1.1" + "clsx": "^2.1.0" }, "peerDependencies": { "react": ">=16", @@ -16478,9 +16564,9 @@ "dev": true }, "node_modules/sequelize": { - "version": "6.34.0", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.34.0.tgz", - "integrity": "sha512-B3eYLG4nUnsIcPO8k6UH6bqSf5Hi3HHCEtcwfiKsp2J0iG3tv9v8lpHFz6Qd8g5QnWxAl9R5rCCXG8fRWo902Q==", + "version": "6.35.2", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.35.2.tgz", + "integrity": "sha512-EdzLaw2kK4/aOnWQ7ed/qh3B6/g+1DvmeXr66RwbcqSm/+QRS9X0LDI5INBibsy4eNJHWIRPo3+QK0zL+IPBHg==", "funding": [ { "type": "opencollective", @@ -16777,6 +16863,49 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -16973,13 +17102,14 @@ "optional": true }, "node_modules/sqlite3": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.6.tgz", - "integrity": "sha512-olYkWoKFVNSSSQNvxVUfjiVbz3YtBwTJj+mfV5zpHmqW3sELx2Cf4QCdirMelhM5Zh+KDVaKgQHqCxrqiWHybw==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.7.tgz", + "integrity": "sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==", "hasInstallScript": true, "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^4.2.0", + "bindings": "^1.5.0", + "node-addon-api": "^7.0.0", + "prebuild-install": "^7.1.1", "tar": "^6.1.11" }, "optionalDependencies": { @@ -17127,9 +17257,12 @@ } }, "node_modules/sqlite3/node_modules/node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==" + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", + "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", + "engines": { + "node": "^16 || ^18 || >= 20" + } }, "node_modules/sqlite3/node_modules/node-gyp": { "version": "8.4.1", @@ -17459,9 +17592,9 @@ } }, "node_modules/style-loader": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.3.tgz", - "integrity": "sha512-53BiGLXAcll9maCYtZi2RCQZKa8NQQai5C4horqKyRmHj9H7QmcUyucrH+4KW/gBQbXM2AsB0axoEcFZPlfPcw==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.4.tgz", + "integrity": "sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==", "dev": true, "engines": { "node": ">= 12.13.0" @@ -17701,6 +17834,37 @@ "node": ">=10" } }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/tar-fs/node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tar-stream": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", @@ -18013,9 +18177,9 @@ } }, "node_modules/ts-loader": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.0.tgz", - "integrity": "sha512-LLlB/pkB4q9mW2yLdFMnK3dEHbrBjeZTYguaaIfusyojBgAGf5kF+O6KcWqiGzWqHk0LBsoolrp4VftEURhybg==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", + "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", "dev": true, "dependencies": { "chalk": "^4.1.0", @@ -18132,6 +18296,17 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index e2cb0b88..3aeb7325 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@typescript-eslint/parser": "^6.9.1", "@vercel/webpack-asset-relocator-loader": "^1.7.3", "css-loader": "^6.8.1", - "electron": "^28.1.0", + "electron": "^28.2.0", "electron-builder": "^24.9.1", "eslint": "^8.53.0", "eslint-plugin-css-import-order": "^1.1.0", @@ -60,9 +60,9 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "node-loader": "^2.0.0", - "style-loader": "^3.3.3", + "style-loader": "^3.3.4", "ts-jest": "^29.1.1", - "ts-loader": "^9.5.0", + "ts-loader": "^9.5.1", "typescript": "~5.2.2" }, "dependencies": { @@ -100,11 +100,11 @@ "react-router-dom": "^6.18.0", "react-scroll": "^1.9.0", "react-select": "^5.7.7", - "react-toastify": "^9.1.3", + "react-toastify": "^10.0.4", "react-tooltip": "^5.22.0", "scroll-into-view-if-needed": "^3.1.0", - "sequelize": "^6.34.0", - "sqlite3": "^5.1.6", + "sequelize": "^6.35.2", + "sqlite3": "^5.1.7", "url-loader": "^4.1.1" }, "overrides": { diff --git a/src/components/LicenseEntity/LicenseMatchCells/MatchLicenseExpression.tsx b/src/components/LicenseEntity/LicenseMatchCells/MatchLicenseExpression.tsx index 273fddd4..8b89a759 100644 --- a/src/components/LicenseEntity/LicenseMatchCells/MatchLicenseExpression.tsx +++ b/src/components/LicenseEntity/LicenseMatchCells/MatchLicenseExpression.tsx @@ -48,7 +48,7 @@ const MatchLicenseExpressionRenderer = ( ]) ); newParsedComponents = parseTokensFromExpression( - matchInfo.match.license_expression_spdx + matchInfo.match.spdx_license_expression ).map((token) => { const tokenInfo = licenseExpressionSpdxKeysMap.get(token); if (tokenInfo) { diff --git a/src/components/LicenseEntity/LicenseMatchesTable.tsx b/src/components/LicenseEntity/LicenseMatchesTable.tsx index 0f71e7bb..d2f91169 100644 --- a/src/components/LicenseEntity/LicenseMatchesTable.tsx +++ b/src/components/LicenseEntity/LicenseMatchesTable.tsx @@ -1,16 +1,17 @@ import React from "react"; +import { Button, OverlayTrigger, Popover, Table } from "react-bootstrap"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"; import { LicenseClueMatch, LicenseDetectionMatch, } from "../../services/importedJsonTypes"; -import { Button, OverlayTrigger, Popover, Table } from "react-bootstrap"; import MatchedTextRenderer from "./LicenseMatchCells/MatchedText"; import MatchLicenseExpressionRenderer from "./LicenseMatchCells/MatchLicenseExpression"; import { MatchedTextProvider } from "./MatchedTextContext"; import MatchRuleDetails from "./MatchRuleDetails"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"; import CoreLink from "../CoreLink/CoreLink"; +import { useWorkbenchDB } from "../../contexts/dbContext"; interface LicenseMatchProps { showLIcenseText?: boolean; @@ -18,6 +19,7 @@ interface LicenseMatchProps { } const LicenseMatchesTable = (props: LicenseMatchProps) => { const { matches, showLIcenseText } = props; + const { goToFileInTableView } = useWorkbenchDB(); return ( @@ -40,7 +42,7 @@ const LicenseMatchesTable = (props: LicenseMatchProps) => { /> - {match.license_expression_spdx && ( + {match.spdx_license_expression && ( License Expression SPDX @@ -53,6 +55,18 @@ const LicenseMatchesTable = (props: LicenseMatchProps) => { )} + {match.from_file && ( + + Matched file + + goToFileInTableView(match.from_file)} + > + {match.from_file} + + + + )} {showLIcenseText && ( Matched Text @@ -66,6 +80,12 @@ const LicenseMatchesTable = (props: LicenseMatchProps) => { )} + + Start Line + {match.start_line} + End Line + {match.end_line} + Matched length {match.matched_length} diff --git a/src/contexts/dbContext.tsx b/src/contexts/dbContext.tsx index 093b5a60..32838865 100644 --- a/src/contexts/dbContext.tsx +++ b/src/contexts/dbContext.tsx @@ -386,10 +386,11 @@ The SQLite file is invalid. Try re-importing the ScanCode JSON file and creating } function removeIpcListeners() { + ipcRenderer.removeAllListeners(NAVIGATION_CHANNEL); ipcRenderer.removeAllListeners(IMPORT_REPLY_CHANNEL.JSON); ipcRenderer.removeAllListeners(IMPORT_REPLY_CHANNEL.SQLITE); ipcRenderer.removeAllListeners(SAVE_REPLY_CHANNEL.SQLITE); - ipcRenderer.removeAllListeners(NAVIGATION_CHANNEL); + ipcRenderer.removeAllListeners(UTIL_CHANNEL.CLOSE_FILE); } useEffect(() => { diff --git a/src/renderer.ts b/src/renderer.ts index 01ca879e..32be1275 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -34,7 +34,7 @@ import { GENERAL_ACTIONS } from "./constants/IpcConnection"; import "./styles/index.css"; import "./styles/colors.css"; -// Setup general actions +// Setup general action event listeners ipcRenderer.on(GENERAL_ACTIONS.ZOOM_IN, () => { webFrame.setZoomLevel(webFrame.getZoomLevel() + 0.5); }); diff --git a/src/services/importedJsonTypes.ts b/src/services/importedJsonTypes.ts index 2317c565..938b0db6 100644 --- a/src/services/importedJsonTypes.ts +++ b/src/services/importedJsonTypes.ts @@ -1,4 +1,6 @@ import { LicenseDetectionAttributes } from "./models/licenseDetections"; +import { LicenseReferenceAttributes } from "./models/licenseReference"; +import { LicenseRuleReferenceAttributes } from "./models/licenseRuleReference"; export interface LicenseExpressionKey { key: string; @@ -18,7 +20,8 @@ export interface LicenseMatch { match_coverage: number; matcher: string; license_expression: string; - license_expression_spdx?: string; + spdx_license_expression?: string; + from_file?: string; rule_identifier: string; rule_relevance: number; rule_url: string; @@ -27,6 +30,9 @@ export interface LicenseMatch { path?: string; license_expression_keys?: LicenseExpressionKey[]; license_expression_spdx_keys?: LicenseExpressionSpdxKey[]; + + // Legacy output version fields + license_expression_spdx?: string; } export type LicenseDetectionMatch = LicenseMatch; export type LicenseClueMatch = LicenseMatch; @@ -64,10 +70,14 @@ export interface TopLevelLicenseDetection { detection_count: number; detection_log?: string[] | null; file_regions?: LicenseFileRegion[]; - matches?: LicenseDetectionMatch[]; + reference_matches?: LicenseDetectionMatch[]; + + // Parser-added fields + matches?: LicenseDetectionMatch[]; // Also part of legacy output // Legacy output version fields count?: number; + sample_matches?: LicenseDetectionMatch[]; } export interface ResourceLicenseDetection { license_expression: string; @@ -91,6 +101,17 @@ export interface RawTopLevelTodo { detection: LicenseDetectionAttributes; } +export interface RawTopLevelData { + headers: unknown[]; + packages: unknown[]; + dependencies: unknown[]; + license_detections: unknown[]; + license_references: LicenseReferenceAttributes[]; + license_rule_references: LicenseRuleReferenceAttributes[]; + license_policy: LicensePolicy[]; + todo: RawTopLevelTodo[]; +} + export interface Resource { id?: number; path: string; diff --git a/src/services/models/todo.ts b/src/services/models/todo.ts index c28a98b5..f88a6e77 100644 --- a/src/services/models/todo.ts +++ b/src/services/models/todo.ts @@ -18,7 +18,7 @@ import { Sequelize, DataTypes, Model } from "sequelize"; import { jsonDataType } from "./databaseUtils"; export interface TodoAttributes { - id: number; + id?: number; detection_id: string; issues: Record; } diff --git a/src/services/workbenchDB.ts b/src/services/workbenchDB.ts index 4e28e361..b8d2bf2c 100644 --- a/src/services/workbenchDB.ts +++ b/src/services/workbenchDB.ts @@ -44,6 +44,7 @@ import { LicenseClue, LicenseExpressionKey, LicenseExpressionSpdxKey, + RawTopLevelData, RawTopLevelTodo, Resource, ResourceLicenseDetection, @@ -344,7 +345,7 @@ export class WorkbenchDB { stream .pipe(JSONStream.parse("files.*")) // files field is piped to 'data' & rest to 'header' (Includes other top level fields) - .on("header", (rawTopLevelData: any) => { + .on("header", (rawTopLevelData: RawTopLevelData) => { TopLevelData = this._parseTopLevelFields( jsonFilePath, rawTopLevelData @@ -509,7 +510,7 @@ export class WorkbenchDB { // Helper function for parsing Toplevel data _parseTopLevelFields( jsonFilePath: string, - rawTopLevelData: any + rawTopLevelData: RawTopLevelData ): TopLevelDataFormat { const header = rawTopLevelData.headers ? rawTopLevelData.headers[0] || {} @@ -535,9 +536,47 @@ export class WorkbenchDB { } ); const dependencies = rawTopLevelData.dependencies || []; + + const license_references: LicenseReferenceAttributes[] = + rawTopLevelData.license_references || []; + const license_references_mapping = new Map( + license_references.map((ref) => [ref.key, ref]) + ); + const license_references_mapping_spdx = new Map( + license_references.map((ref) => [ref.spdx_license_key, ref]) + ); + const license_rule_references: LicenseRuleReferenceAttributes[] = + rawTopLevelData.license_rule_references || []; + const license_detections: TopLevelLicenseDetection[] = ( rawTopLevelData.license_detections || [] ).map((detection: TopLevelLicenseDetection) => { + const parsedMatches = ( + detection.reference_matches || + detection.sample_matches || + detection.matches || + [] + ).map((match) => { + const spdx_license_expression = + match.spdx_license_expression || + match.license_expression_spdx || + null; + delete match.license_expression_spdx; // Remove legacy output field (if exists) + const { license_expression_keys, license_expression_spdx_keys } = + this._getLicenseExpressionKeys( + match.license_expression, + spdx_license_expression, + license_references_mapping, + license_references_mapping_spdx + ); + return { + ...match, + license_expression_spdx_keys: license_expression_spdx_keys, + license_expression_keys: license_expression_keys, + spdx_license_expression, + }; + }); + // Handle duplicated match_data present at top level in prev toolkit versions // upto v32.0.0rc2 return { @@ -547,21 +586,12 @@ export class WorkbenchDB { detection.detection_count !== undefined ? detection.detection_count : detection.count || 0, + matches: parsedMatches, }; }); const license_detections_map = new Map( license_detections.map((detection) => [detection.identifier, detection]) ); - const license_references: LicenseReferenceAttributes[] = - rawTopLevelData.license_references || []; - const license_references_mapping = new Map( - license_references.map((ref) => [ref.key, ref]) - ); - const license_references_mapping_spdx = new Map( - license_references.map((ref) => [ref.spdx_license_key, ref]) - ); - const license_rule_references: LicenseRuleReferenceAttributes[] = - rawTopLevelData.license_rule_references || []; // @TODO - ToDo in scans have a field review_comments, which is ideally an issue // It will be changed in the schema in future @@ -590,6 +620,7 @@ export class WorkbenchDB { }; } + // eslint-disable-next-line @typescript-eslint/no-explicit-any _parseHeader(jsonFilePath: string, workbenchVersion: string, header: any) { const input = header.options?.input || []; delete header.options?.input; @@ -729,9 +760,13 @@ export class WorkbenchDB { from_package, }); + // Legacy support // Ensure that matches is collected only once for each unique License detection // Ignore match encountered in other files as it would be the same repeated match - if (!targetLicenseDetection.matches && detection.matches.length) { + if ( + targetLicenseDetection.matches.length == 0 && + detection.matches.length > 0 + ) { targetLicenseDetection.matches = []; const detectionLicenseExpressionComponents = parseSubExpressions( detection.license_expression @@ -766,43 +801,50 @@ export class WorkbenchDB { const { license_references_map, license_references_spdx_map } = TopLevelData; - // SPDX not available in matches, so find corresponding spdx license expression - match.license_expression_spdx = - detectionSpdxLicenseExpressionComponents[ - detectionLicenseExpressionComponents.findIndex( - (exp) => exp === match.license_expression - ) - ]; - - // Cases when, - // match.license_expression = license_detection.license_expression & - // match.license_expression_spdx = license_detection.license_expression_spdx - if (match.license_expression === detection.license_expression) { - match.license_expression_spdx = - file_license_expressions_spdx_components[ - file_license_expressions_components.findIndex( - (val) => val === detection.license_expression + // Construct SPDX license expression using available license expression if not already available + if ( + !match.spdx_license_expression || + match.spdx_license_expression.length === 0 + ) { + match.spdx_license_expression = + detectionSpdxLicenseExpressionComponents[ + detectionLicenseExpressionComponents.findIndex( + (exp) => exp === match.license_expression ) ]; - } - // Unknown reference - if (match.license_expression == UNKNOWN_EXPRESSION) { - match.license_expression_spdx = UNKNOWN_EXPRESSION_SPDX; - } - // When SPDX expression is not available, - // construct it using keys in license expression - if (!match.license_expression_spdx) { - match.license_expression_spdx = this._resolveSpdxLicenseExpression( - match.license_expression, - license_references_map - ); + // Cases when, + // match.license_expression = license_detection.license_expression & + // match.license_expression_spdx = license_detection.license_expression_spdx + if (match.license_expression === detection.license_expression) { + match.spdx_license_expression = + file_license_expressions_spdx_components[ + file_license_expressions_components.findIndex( + (val) => val === detection.license_expression + ) + ]; + } + + // Unknown reference + if (match.license_expression == UNKNOWN_EXPRESSION) { + match.spdx_license_expression = UNKNOWN_EXPRESSION_SPDX; + } + + // When SPDX expression is not available, + // construct it using keys in license expression + if (!match.spdx_license_expression) { + match.spdx_license_expression = + this._resolveSpdxLicenseExpression( + match.license_expression, + license_references_map + ); + } } const { license_expression_keys, license_expression_spdx_keys } = this._getLicenseExpressionKeys( match.license_expression, - match.license_expression_spdx, + match.spdx_license_expression, license_references_map, license_references_spdx_map ); @@ -814,12 +856,13 @@ export class WorkbenchDB { }); } - delete detection.matches; // Not required further, hence removing to reduce sqlite size + delete detection.matches; // Not required further, hence removing to reduce sqlite DB size }; (file?.license_detections || []).forEach((detection, idx) => addLicenseDetection(detection, idx) ); + // @TODO - We need pkg.identifier instead of PURL here !! file?.package_data?.forEach((pkg) => pkg.license_detections?.forEach((detection, idx) => @@ -864,7 +907,7 @@ export class WorkbenchDB { matcher: license_clue.matcher, license_expression: license_clue.license_expression, license_expression_keys, - license_expression_spdx: license_clue.license_expression_spdx, + spdx_license_expression: license_clue.license_expression_spdx, license_expression_spdx_keys, rule_identifier: license_clue.rule_identifier, rule_relevance: license_clue.rule_relevance, @@ -1053,9 +1096,10 @@ export class WorkbenchDB { return this._getLicensePolicy(file); } - const fileAttr = (file as any)[attribute] || []; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const fileAttr: any[] = (file as any)[attribute] || []; - return fileAttr.map((value: any) => { + return fileAttr.map((value) => { if (attribute === "license_expressions") { return { license_expression: value, diff --git a/tests/test-scans/licenses/expectedLicenses.ts b/tests/test-scans/licenses/expectedLicenses.ts index cb075758..e7e945b4 100644 --- a/tests/test-scans/licenses/expectedLicenses.ts +++ b/tests/test-scans/licenses/expectedLicenses.ts @@ -17,7 +17,7 @@ export const LicenseSamples: { expectedLicenseRuleReferences: LicenseRuleReferenceAttributes[]; }[] = [ { - jsonFileName: "withLicenses.json", + jsonFileName: "withLicenses_legacy.json", expectedLicenseClues: [ { matches: [ @@ -29,7 +29,7 @@ export const LicenseSamples: { match_coverage: 52, matcher: "3-seq", license_expression: "apache-2.0 OR gpl-2.0", - license_expression_spdx: "Apache-2.0 OR GPL-2.0-only", + spdx_license_expression: "Apache-2.0 OR GPL-2.0-only", license_expression_keys: [ { key: "apache-2.0", @@ -96,7 +96,7 @@ export const LicenseSamples: { rule_relevance: 100, rule_url: "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", - license_expression_spdx: "Apache-2.0", + spdx_license_expression: "Apache-2.0", license_expression_keys: [ { key: "apache-2.0", @@ -126,7 +126,7 @@ export const LicenseSamples: { rule_relevance: 100, rule_url: "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_173.RULE", - license_expression_spdx: "GPL-3.0-only", + spdx_license_expression: "GPL-3.0-only", license_expression_keys: [ { key: "gpl-3.0", @@ -175,7 +175,7 @@ export const LicenseSamples: { rule_url: "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", matched_text: "MIT", - license_expression_spdx: "MIT", + spdx_license_expression: "MIT", license_expression_keys: [ { key: "mit", @@ -205,7 +205,7 @@ export const LicenseSamples: { rule_relevance: 100, rule_url: null, matched_text: "licenses.nuget.org/MIT", - license_expression_spdx: "MIT", + spdx_license_expression: "MIT", license_expression_keys: [ { key: "mit", @@ -254,7 +254,7 @@ export const LicenseSamples: { rule_relevance: 100, rule_url: null, matched_text: "MIT", - license_expression_spdx: "MIT", + spdx_license_expression: "MIT", license_expression_keys: [ { key: "mit", @@ -305,7 +305,7 @@ export const LicenseSamples: { "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", matched_text: "license {'LegalCopyright': 'Copyright © AngleSharp, 2013-2019', 'LegalTrademarks': '', 'License': None}", - license_expression_spdx: "LicenseRef-scancode-unknown", + spdx_license_expression: "LicenseRef-scancode-unknown", license_expression_keys: [ { key: "unknown", @@ -364,7 +364,7 @@ export const LicenseSamples: { rule_url: "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_48.RULE", matched_text: "Apache License, Version 2.0", - license_expression_spdx: "Apache-2.0", + spdx_license_expression: "Apache-2.0", license_expression_keys: [ { key: "apache-2.0", @@ -414,7 +414,7 @@ export const LicenseSamples: { rule_url: "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_20.RULE", matched_text: "http://www.apache.org/licenses/LICENSE-2.0.html", - license_expression_spdx: "Apache-2.0", + spdx_license_expression: "Apache-2.0", license_expression_keys: [ { key: "apache-2.0", @@ -803,7 +803,7 @@ export const LicenseSamples: { match_coverage: 52, matcher: "3-seq", license_expression: "apache-2.0 OR gpl-2.0", - license_expression_spdx: "Apache-2.0 OR GPL-2.0-only", + spdx_license_expression: "Apache-2.0 OR GPL-2.0-only", license_expression_keys: [ { key: "apache-2.0", @@ -862,4 +862,317 @@ export const LicenseSamples: { }, ], }, + { + jsonFileName: "withLicenses.json", + expectedLicenseClues: [], + expectedLicenseDetections: [ + { + detection_log: [], + matches: [ + { + license_expression: "apache-2.0", + from_file: "manifests_for_licenses/activemq-camel-pom.xml", + start_line: 3, + end_line: 16, + matcher: "2-aho", + score: 100, + matched_length: 119, + match_coverage: 100, + rule_relevance: 100, + rule_identifier: "apache-2.0_2.RULE", + rule_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + license_expression_spdx_keys: [ + { + key: "Apache-2.0", + spdx_url: "https://spdx.org/licenses/Apache-2.0", + }, + ], + license_expression_keys: [ + { + key: "apache-2.0", + licensedb_url: + "https://scancode-licensedb.aboutcode.org/apache-2.0", + scancode_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", + }, + ], + spdx_license_expression: "Apache-2.0", + }, + ], + file_regions: [ + { + path: "manifests_for_licenses/activemq-camel-pom.xml", + start_line: 3, + end_line: 16, + from_package: null, + }, + ], + id: 1, + identifier: "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de", + license_expression: "apache-2.0", + detection_count: 1, + reviewed: false, + count: null, + }, + { + detection_log: [], + matches: [ + { + license_expression: "gpl-2.0-plus", + from_file: "manifests_for_licenses/copyright", + start_line: 4, + end_line: 4, + matcher: "2-aho", + score: 100, + matched_length: 2, + match_coverage: 100, + rule_relevance: 100, + rule_identifier: "gpl-2.0-plus_374.RULE", + rule_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_374.RULE", + license_expression_spdx_keys: [ + { + key: "GPL-2.0-or-later", + spdx_url: "https://spdx.org/licenses/GPL-2.0-or-later", + }, + ], + license_expression_keys: [ + { + key: "gpl-2.0-plus", + licensedb_url: + "https://scancode-licensedb.aboutcode.org/gpl-2.0-plus", + scancode_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0-plus.LICENSE", + }, + ], + spdx_license_expression: "GPL-2.0-or-later", + }, + { + license_expression: "gpl-2.0-plus", + from_file: "manifests_for_licenses/copyright", + start_line: 6, + end_line: 22, + matcher: "2-aho", + score: 100, + matched_length: 141, + match_coverage: 100, + rule_relevance: 100, + rule_identifier: "gpl-2.0-plus_736.RULE", + rule_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_736.RULE", + license_expression_spdx_keys: [ + { + key: "GPL-2.0-or-later", + spdx_url: "https://spdx.org/licenses/GPL-2.0-or-later", + }, + ], + license_expression_keys: [ + { + key: "gpl-2.0-plus", + licensedb_url: + "https://scancode-licensedb.aboutcode.org/gpl-2.0-plus", + scancode_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0-plus.LICENSE", + }, + ], + spdx_license_expression: "GPL-2.0-or-later", + }, + ], + file_regions: [ + { + path: "manifests_for_licenses/copyright", + start_line: 4, + end_line: 22, + from_package: null, + }, + ], + id: 2, + identifier: "gpl_2_0_plus-74a334f0-c991-de85-1854-94aa27b9207b", + license_expression: "gpl-2.0-plus", + detection_count: 1, + reviewed: false, + count: null, + }, + ], + expectedLicenseExpressions: [ + { + license_keys: ["apache-2.0"], + license_keys_spdx: ["Apache-2.0"], + id: 1, + fileId: 1, + license_expression: "apache-2.0", + license_expression_spdx: "Apache-2.0", + }, + { + license_keys: ["gpl-2.0-plus"], + license_keys_spdx: ["GPL-2.0-or-later"], + id: 2, + fileId: 2, + license_expression: "gpl-2.0-plus", + license_expression_spdx: "GPL-2.0-or-later", + }, + ], + expectedLicensePolicies: [], + expectedLicenseReferences: [ + { + other_spdx_license_keys: ["LicenseRef-Apache", "LicenseRef-Apache-2.0"], + id: 1, + key: "apache-2.0", + language: "en", + short_name: "Apache 2.0", + name: "Apache License 2.0", + category: "Permissive", + owner: "Apache Software Foundation", + homepage_url: "http://www.apache.org/licenses/", + is_builtin: true, + is_exception: false, + is_unknown: false, + is_generic: false, + spdx_license_key: "Apache-2.0", + osi_license_key: "Apache-2.0", + osi_url: "http://opensource.org/licenses/apache2.0.php", + text: "Apache License Version 2.0", + scancode_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", + licensedb_url: "https://scancode-licensedb.aboutcode.org/apache-2.0", + spdx_url: "https://spdx.org/licenses/Apache-2.0", + }, + { + other_spdx_license_keys: ["GPL-2.0+", "GPL 2.0+"], + id: 2, + key: "gpl-2.0-plus", + language: "en", + short_name: "GPL 2.0 or later", + name: "GNU General Public License 2.0 or later", + category: "Copyleft", + owner: "Free Software Foundation (FSF)", + homepage_url: + "http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + is_builtin: true, + is_exception: false, + is_unknown: false, + is_generic: false, + spdx_license_key: "GPL-2.0-or-later", + osi_license_key: null, + osi_url: null, + text: "Terms of the GNU General Public License as published by the Free Software Foundation", + scancode_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0-plus.LICENSE", + licensedb_url: "https://scancode-licensedb.aboutcode.org/gpl-2.0-plus", + spdx_url: "https://spdx.org/licenses/GPL-2.0-or-later", + }, + ], + expectedLicenseRuleReferences: [ + { + referenced_filenames: ["NOTICE"], + id: 1, + license_expression: "apache-2.0", + identifier: "apache-2.0_2.RULE", + language: "en", + rule_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", + is_license_text: false, + is_license_notice: true, + is_license_reference: false, + is_license_tag: false, + is_license_intro: false, + is_license_clue: false, + is_continuous: false, + is_builtin: true, + is_from_license: false, + is_synthetic: false, + length: 119, + relevance: 100, + minimum_coverage: 80, + text: "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.", + }, + { + referenced_filenames: [], + id: 2, + license_expression: "gpl-2.0-plus", + identifier: "gpl-2.0-plus_374.RULE", + language: "en", + rule_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_374.RULE", + is_license_text: false, + is_license_notice: false, + is_license_reference: false, + is_license_tag: true, + is_license_intro: false, + is_license_clue: false, + is_continuous: false, + is_builtin: true, + is_from_license: false, + is_synthetic: false, + length: 2, + relevance: 100, + minimum_coverage: 100, + text: "License: GPLv2+", + }, + { + referenced_filenames: ["/usr/share/common-licenses/GPL-2"], + id: 3, + license_expression: "gpl-2.0-plus", + identifier: "gpl-2.0-plus_736.RULE", + language: "en", + rule_url: + "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_736.RULE", + is_license_text: false, + is_license_notice: true, + is_license_reference: false, + is_license_tag: false, + is_license_intro: false, + is_license_clue: false, + is_continuous: false, + is_builtin: true, + is_from_license: false, + is_synthetic: false, + length: 141, + relevance: 100, + minimum_coverage: 0, + text: "This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.\n\nSee /usr/share/common-licenses/GPL-2, or\n for the terms of the latest version\nof the GNU General Public License.", + }, + ], + expectedFlatFiles: [ + { + license_clues: [], + license_policy: [], + license_detections: [], + detected_license_expression: null, + detected_license_expression_spdx: null, + percentage_of_license_text: null, + }, + { + license_clues: [], + license_policy: [], + license_detections: [ + { + license_expression: "apache-2.0", + license_expression_spdx: "Apache-2.0", + detection_log: [], + identifier: "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de", + }, + ], + detected_license_expression: "apache-2.0", + detected_license_expression_spdx: "Apache-2.0", + percentage_of_license_text: 22.37, + }, + { + license_clues: [], + license_policy: [], + license_detections: [ + { + license_expression: "gpl-2.0-plus", + license_expression_spdx: "GPL-2.0-or-later", + detection_log: [], + identifier: "gpl_2_0_plus-74a334f0-c991-de85-1854-94aa27b9207b", + }, + ], + detected_license_expression: "gpl-2.0-plus", + detected_license_expression_spdx: "GPL-2.0-or-later", + percentage_of_license_text: 87.2, + }, + ], + }, ]; diff --git a/tests/test-scans/licenses/withLicenses.json b/tests/test-scans/licenses/withLicenses.json index 3ffce517..7be031bc 100644 --- a/tests/test-scans/licenses/withLicenses.json +++ b/tests/test-scans/licenses/withLicenses.json @@ -1,102 +1,67 @@ { "license_detections": [ { - "identifier": "apache_2_0_and_gpl_3_0-494ca0ae-1282-09a2-139f-a52c04fde6dc", - "license_expression": "apache-2.0 AND gpl-3.0", - "detection_count": 1 - }, - { - "identifier": "mit-b941df29-6c4b-fe7e-752f-a5fc7f9a28b5", - "license_expression": "mit", - "detection_count": 1, - "detection_log": [] - }, - { - "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", - "license_expression": "mit", - "detection_count": 1, - "detection_log": [] - }, - { - "identifier": "unknown-73f5f4e3-0fd7-c629-d3b0-a8bf52447aff", - "license_expression": "unknown", - "detection_count": 4, - "detection_log": [] - }, - { - "identifier": "apache_2_0-428c1364-ecb5-f806-7a2e-77d10737a7ce", + "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de", "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "reference_matches": [ + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "manifests_for_licenses/activemq-camel-pom.xml", + "start_line": 3, + "end_line": 16, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 119, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE" + } + ] }, { - "identifier": "apache_2_0-9a5226a4-0901-7d18-06ae-49c1887ecbd7", - "license_expression": "apache-2.0", + "identifier": "gpl_2_0_plus-74a334f0-c991-de85-1854-94aa27b9207b", + "license_expression": "gpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-or-later", "detection_count": 1, - "detection_log": [] + "detection_log": [], + "reference_matches": [ + { + "license_expression": "gpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-or-later", + "from_file": "manifests_for_licenses/copyright", + "start_line": 4, + "end_line": 4, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0-plus_374.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_374.RULE" + }, + { + "license_expression": "gpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-or-later", + "from_file": "manifests_for_licenses/copyright", + "start_line": 6, + "end_line": 22, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 141, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0-plus_736.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_736.RULE" + } + ] } ], "license_references": [ - { - "key": "mit", - "language": "en", - "short_name": "MIT License", - "name": "MIT License", - "category": "Permissive", - "owner": "MIT", - "homepage_url": "http://opensource.org/licenses/mit-license.php", - "notes": "Per SPDX.org, this license is OSI certified.", - "is_builtin": true, - "is_exception": false, - "is_unknown": false, - "is_generic": false, - "spdx_license_key": "MIT", - "other_spdx_license_keys": [], - "osi_license_key": null, - "text_urls": ["http://opensource.org/licenses/mit-license.php"], - "osi_url": "http://www.opensource.org/licenses/MIT", - "faq_url": "https://ieeexplore.ieee.org/document/9263265", - "other_urls": [ - "https://opensource.com/article/18/3/patent-grant-mit-license", - "https://opensource.com/article/19/4/history-mit-license", - "https://opensource.org/licenses/MIT" - ], - "key_aliases": [], - "minimum_coverage": 0, - "standard_notice": null, - "text": "Permission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", - "licensedb_url": "https://scancode-licensedb.aboutcode.org/mit", - "spdx_url": "https://spdx.org/licenses/MIT" - }, - { - "key": "unknown", - "language": "en", - "short_name": "unknown", - "name": "Unknown license detected but not recognized", - "category": "Unstated License", - "owner": "Unspecified", - "homepage_url": null, - "notes": "This applies to the case where there is text referring to a license, but it is not possible to determine exactly which license.", - "is_builtin": true, - "is_exception": false, - "is_unknown": true, - "is_generic": false, - "spdx_license_key": "LicenseRef-scancode-unknown", - "other_spdx_license_keys": [], - "osi_license_key": null, - "text_urls": [], - "osi_url": null, - "faq_url": null, - "other_urls": [], - "key_aliases": [], - "minimum_coverage": 0, - "standard_notice": null, - "text": "", - "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown.LICENSE", - "licensedb_url": "https://scancode-licensedb.aboutcode.org/unknown", - "spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown.LICENSE" - }, { "key": "apache-2.0", "language": "en", @@ -111,9 +76,14 @@ "is_unknown": false, "is_generic": false, "spdx_license_key": "Apache-2.0", - "other_spdx_license_keys": ["LicenseRef-Apache", "LicenseRef-Apache-2.0"], + "other_spdx_license_keys": [ + "LicenseRef-Apache", + "LicenseRef-Apache-2.0" + ], "osi_license_key": "Apache-2.0", - "text_urls": ["http://www.apache.org/licenses/LICENSE-2.0"], + "text_urls": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], "osi_url": "http://opensource.org/licenses/apache2.0.php", "faq_url": "http://www.apache.org/foundation/licence-FAQ.html", "other_urls": [ @@ -132,45 +102,42 @@ "http://www.apache.org/licenses/LICENSE-2.0" ], "ignorable_emails": [], - "text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n \n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n \n 1. Definitions.\n \n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n \n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n \n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n \n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n \n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n \n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n \n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n \n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n \n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n \n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n \n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n \n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n \n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n \n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n \n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n \n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n \n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n \n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n \n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n \n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n \n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n \n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n \n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n \n END OF TERMS AND CONDITIONS\n \n APPENDIX: How to apply the Apache License to your work.\n \n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n \n Copyright [yyyy] [name of copyright owner]\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", + "text": "Apache License Version 2.0", "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", "licensedb_url": "https://scancode-licensedb.aboutcode.org/apache-2.0", "spdx_url": "https://spdx.org/licenses/Apache-2.0" }, { - "key": "gpl-2.0", + "key": "gpl-2.0-plus", "language": "en", - "short_name": "GPL 2.0", - "name": "GNU General Public License 2.0", + "short_name": "GPL 2.0 or later", + "name": "GNU General Public License 2.0 or later", "category": "Copyleft", "owner": "Free Software Foundation (FSF)", - "homepage_url": "http://www.gnu.org/licenses/gpl-2.0.html", - "notes": "This is the last version of the GPL text as published by the FSF. This variation was published around about the time of the FSF released the GPL 3 in July 2007. See http://web.archive.org/web/20070716031727/http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt It is found live here https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt and here https://www.gnu.org/licenses/old-licenses/gpl-2.0.html It refers to the Franklin Street address and to the GNU Lesser General Public License everywhere both in the text and HTML formats. There are many other variations of the GPL 2.0 text that were published over the years by the FSF and the gnu.org website. You can find the detailed history of this text at https://github.com/pombredanne/gpl-history and each variant is available as a license detection rule. Per SPDX.org, this license was released June 1991 This license is OSI certified.", + "homepage_url": "http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "notes": "Per SPDX.org, this license was released June 1991 This license is OSI\ncertified.\n", "is_builtin": true, "is_exception": false, "is_unknown": false, "is_generic": false, - "spdx_license_key": "GPL-2.0-only", - "other_spdx_license_keys": ["GPL-2.0", "GPL 2.0", "LicenseRef-GPL-2.0"], - "osi_license_key": "GPL-2.0", + "spdx_license_key": "GPL-2.0-or-later", + "other_spdx_license_keys": [ + "GPL-2.0+", + "GPL 2.0+" + ], + "osi_license_key": null, "text_urls": [ - "http://www.gnu.org/licenses/gpl-2.0.txt", - "http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt" + "http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html" ], - "osi_url": "http://opensource.org/licenses/gpl-license.php", - "faq_url": "http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html", + "osi_url": null, + "faq_url": null, "other_urls": [ - "http://creativecommons.org/choose/cc-gpl", - "http://creativecommons.org/images/public/cc-GPL-a.png", - "http://creativecommons.org/licenses/GPL/2.0/", - "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt", - "http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", "http://www.opensource.org/licenses/GPL-2.0", "https://opensource.org/licenses/GPL-2.0", "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html" ], "key_aliases": [], - "minimum_coverage": 0, + "minimum_coverage": 99, "standard_notice": null, "ignorable_copyrights": [ "Copyright (c) 1989, 1991 Free Software Foundation, Inc.", @@ -183,119 +150,62 @@ "ignorable_authors": [], "ignorable_urls": [], "ignorable_emails": [], - "text": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n \n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n \n Preamble\n \n The licenses for most software are designed to take away your\nfreedom to share and change it. By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users. This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it. (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.) You can apply it to\nyour programs, too.\n \n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n \n To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n \n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have. You must make sure that they, too, receive or can get the\nsource code. And you must show them these terms so they know their\nrights.\n \n We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n \n Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware. If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n \n Finally, any free program is threatened constantly by software\npatents. We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary. To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n \n The precise terms and conditions for copying, distribution and\nmodification follow.\n \n GNU GENERAL PUBLIC LICENSE\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n \n 0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License. The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage. (Hereinafter, translation is included without limitation in\nthe term \"modification\".) Each licensee is addressed as \"you\".\n \nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope. The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n \n 1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n \nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n \n 2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n \n a) You must cause the modified files to carry prominent notices\n stating that you changed the files and the date of any change.\n \n b) You must cause any work that you distribute or publish, that in\n whole or in part contains or is derived from the Program or any\n part thereof, to be licensed as a whole at no charge to all third\n parties under the terms of this License.\n \n c) If the modified program normally reads commands interactively\n when run, you must cause it, when started running for such\n interactive use in the most ordinary way, to print or display an\n announcement including an appropriate copyright notice and a\n notice that there is no warranty (or else, saying that you provide\n a warranty) and that users may redistribute the program under\n these conditions, and telling the user how to view a copy of this\n License. (Exception: if the Program itself is interactive but\n does not normally print such an announcement, your work based on\n the Program is not required to print an announcement.)\n \nThese requirements apply to the modified work as a whole. If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works. But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n \nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n \nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n \n 3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n \n a) Accompany it with the complete corresponding machine-readable\n source code, which must be distributed under the terms of Sections\n 1 and 2 above on a medium customarily used for software interchange; or,\n \n b) Accompany it with a written offer, valid for at least three\n years, to give any third party, for a charge no more than your\n cost of physically performing source distribution, a complete\n machine-readable copy of the corresponding source code, to be\n distributed under the terms of Sections 1 and 2 above on a medium\n customarily used for software interchange; or,\n \n c) Accompany it with the information you received as to the offer\n to distribute corresponding source code. (This alternative is\n allowed only for noncommercial distribution and only if you\n received the program in object code or executable form with such\n an offer, in accord with Subsection b above.)\n \nThe source code for a work means the preferred form of the work for\nmaking modifications to it. For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable. However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n \nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n \n 4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License. Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n \n 5. You are not required to accept this License, since you have not\nsigned it. However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works. These actions are\nprohibited by law if you do not accept this License. Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n \n 6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions. You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n \n 7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all. For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n \nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n \nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices. Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n \nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n \n 8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded. In such case, this License incorporates\nthe limitation as if written in the body of this License.\n \n 9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n \nEach version is given a distinguishing version number. If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation. If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n \n 10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission. For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this. Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n \n NO WARRANTY\n \n 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n \n 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n \n END OF TERMS AND CONDITIONS\n \n How to Apply These Terms to Your New Programs\n \n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n \n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n \n \n Copyright (C) \n \n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n \n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n \n You should have received a copy of the GNU General Public License along\n with this program; if not, write to the Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n \nAlso add information on how to contact you by electronic and paper mail.\n \nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n \n Gnomovision version 69, Copyright (C) year name of author\n Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n \nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n \nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary. Here is a sample; alter the names:\n \n Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n `Gnomovision' (which makes passes at compilers) written by James Hacker.\n \n , 1 April 1989\n Ty Coon, President of Vice\n \nThis General Public License does not permit incorporating your program into\nproprietary programs. If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.", - "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0.LICENSE", - "licensedb_url": "https://scancode-licensedb.aboutcode.org/gpl-2.0", - "spdx_url": "https://spdx.org/licenses/GPL-2.0-only" + "text": "Terms of the GNU General Public License as published by the Free Software Foundation", + "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0-plus.LICENSE", + "licensedb_url": "https://scancode-licensedb.aboutcode.org/gpl-2.0-plus", + "spdx_url": "https://spdx.org/licenses/GPL-2.0-or-later" } ], "license_rule_references": [ - { - "license_expression": "mit", - "identifier": "mit_14.RULE", - "language": "en", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", - "is_license_text": false, - "is_license_notice": false, - "is_license_reference": true, - "is_license_tag": false, - "is_license_intro": false, - "is_continuous": false, - "is_builtin": true, - "is_from_license": false, - "is_synthetic": false, - "length": 2, - "relevance": 100, - "minimum_coverage": 100, - "referenced_filenames": [], - "notes": null, - "text": "MIT license" - }, - { - "license_expression": "mit", - "identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", - "language": "en", - "rule_url": null, - "is_license_text": false, - "is_license_notice": false, - "is_license_reference": false, - "is_license_tag": true, - "is_license_intro": false, - "is_continuous": false, - "is_builtin": true, - "is_from_license": false, - "is_synthetic": true, - "length": 1, - "relevance": 100, - "minimum_coverage": 0, - "referenced_filenames": [], - "notes": null, - "text": "MIT" - }, - { - "license_expression": "mit", - "identifier": "spdx-license-identifier-mit-9bb4edb114765888fe17c4abc738531d3a8554cc", - "language": "en", - "rule_url": null, - "is_license_text": false, - "is_license_notice": false, - "is_license_reference": false, - "is_license_tag": true, - "is_license_intro": false, - "is_continuous": false, - "is_builtin": true, - "is_from_license": false, - "is_synthetic": true, - "length": 5, - "relevance": 100, - "minimum_coverage": 0, - "referenced_filenames": [], - "notes": null, - "text": "licenses.nuget.org/MIT" - }, { "license_expression": "apache-2.0", - "identifier": "apache-2.0_20.RULE", + "identifier": "apache-2.0_2.RULE", "language": "en", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_20.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE", "is_license_text": false, - "is_license_notice": false, - "is_license_reference": true, + "is_license_notice": true, + "is_license_reference": false, "is_license_tag": false, "is_license_intro": false, + "is_license_clue": false, "is_continuous": false, "is_builtin": true, "is_from_license": false, "is_synthetic": false, - "length": 9, + "length": 119, "relevance": 100, - "minimum_coverage": 100, - "referenced_filenames": [], + "minimum_coverage": 80, + "referenced_filenames": [ + "NOTICE" + ], "notes": null, "ignorable_copyrights": [], "ignorable_holders": [], "ignorable_authors": [], - "ignorable_urls": ["http://www.apache.org/licenses/LICENSE-2.0.html"], + "ignorable_urls": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], "ignorable_emails": [], - "text": "http://www.apache.org/licenses/LICENSE-2.0.html" + "text": "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements." }, { - "license_expression": "apache-2.0", - "identifier": "apache-2.0_48.RULE", + "license_expression": "gpl-2.0-plus", + "identifier": "gpl-2.0-plus_374.RULE", "language": "en", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_48.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_374.RULE", "is_license_text": false, "is_license_notice": false, - "is_license_reference": true, - "is_license_tag": false, + "is_license_reference": false, + "is_license_tag": true, "is_license_intro": false, + "is_license_clue": false, "is_continuous": false, "is_builtin": true, "is_from_license": false, "is_synthetic": false, - "length": 5, + "length": 2, "relevance": 100, - "minimum_coverage": 80, + "minimum_coverage": 100, "referenced_filenames": [], "notes": null, "ignorable_copyrights": [], @@ -303,484 +213,190 @@ "ignorable_authors": [], "ignorable_urls": [], "ignorable_emails": [], - "text": "Apache License, Version 2.0" + "text": "License: GPLv2+" }, { - "license_expression": "apache-2.0 OR gpl-2.0", - "identifier": "apache-2.0_or_gpl-2.0_24.RULE", + "license_expression": "gpl-2.0-plus", + "identifier": "gpl-2.0-plus_736.RULE", "language": "en", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_gpl-2.0_24.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_736.RULE", "is_license_text": false, - "is_license_notice": false, + "is_license_notice": true, "is_license_reference": false, - "is_license_tag": true, + "is_license_tag": false, "is_license_intro": false, + "is_license_clue": false, "is_continuous": false, "is_builtin": true, "is_from_license": false, "is_synthetic": false, - "length": 25, + "length": 141, "relevance": 100, - "minimum_coverage": 50, - "referenced_filenames": [], + "minimum_coverage": 0, + "referenced_filenames": [ + "/usr/share/common-licenses/GPL-2" + ], "notes": null, "ignorable_copyrights": [], "ignorable_holders": [], "ignorable_authors": [], "ignorable_urls": [ - "http://www.apache.org/licenses/LICENSE-2.0", - "https://www.gnu.org/licenses/gpl-2.0.html" + "http://www.gnu.org/copyleft/gpl.txt" ], "ignorable_emails": [], - "text": "\"licenses\": [\n {\n \"type\": \"Apache License\",\n \"url\": \"http://www.apache.org/licenses/LICENSE-2.0\"\n }, {\n \"type\": \"GPL\",\n \"url\": \"https://www.gnu.org/licenses/gpl-2.0.html\"\n }\n ]," + "text": "This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.\n\nSee /usr/share/common-licenses/GPL-2, or\n for the terms of the latest version\nof the GNU General Public License." } ], "files": [ { - "path": "anglesharp.css.0.16.4", + "path": "manifests_for_licenses", "type": "directory", - "name": "anglesharp.css.0.16.4", - "base_name": "anglesharp.css.0.16.4", - "package_data": [], - "is_legal": false, - "is_key_file": false, + "name": "manifests_for_licenses", + "base_name": "manifests_for_licenses", + "extension": "", + "size": 0, + "date": null, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, "detected_license_expression": null, "detected_license_expression_spdx": null, "license_detections": [], "license_clues": [], - "percentage_of_license_text": 0 + "percentage_of_license_text": 0, + "files_count": 3, + "dirs_count": 0, + "size_count": 12130, + "scan_errors": [] }, { - "path": "anglesharp.css.0.16.4/file_with_multiple_licenses.txt", + "path": "manifests_for_licenses/activemq-camel-pom.xml", "type": "file", - "name": "file_with_multiple_licenses.txt", - "base_name": "file_with_multiple_licenses", - "detected_license_expression": "apache-2.0 AND gpl-3.0", - "detected_license_expression_spdx": "Apache-2.0 AND GPL-3.0-only", + "name": "activemq-camel-pom.xml", + "base_name": "activemq-camel-pom", + "extension": ".xml", + "size": 4953, + "date": "2022-08-07", + "sha1": "05d2cd2435c9a0813a481edca702a794715797e2", + "md5": "af0028d07f5305bd5092c7a34d49c912", + "sha256": "5664e82819c97d8cecf107eb78b562be8db7ad889c91a4f8af3fcf7fa7eb6c59", + "mime_type": "text/xml", + "file_type": "XML 1.0 document, ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "detected_license_expression": "apache-2.0", + "detected_license_expression_spdx": "Apache-2.0", "license_detections": [ { - "license_expression": "apache-2.0 AND gpl-3.0", + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", "matches": [ { - "score": 100.0, - "start_line": 1, - "end_line": 1, - "matched_length": 4, - "match_coverage": 100.0, - "matcher": "2-aho", "license_expression": "apache-2.0", - "rule_identifier": "apache-2.0_65.RULE", - "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE" - }, - { - "score": 100.0, + "spdx_license_expression": "Apache-2.0", + "from_file": "manifests_for_licenses/activemq-camel-pom.xml", "start_line": 3, - "end_line": 3, - "matched_length": 4, - "match_coverage": 100.0, + "end_line": 16, "matcher": "2-aho", - "license_expression": "gpl-3.0", - "rule_identifier": "gpl-3.0_173.RULE", + "score": 100.0, + "matched_length": 119, + "match_coverage": 100.0, "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_173.RULE" + "rule_identifier": "apache-2.0_2.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_2.RULE" } ], - "identifier": "apache_2_0_and_gpl_3_0-494ca0ae-1282-09a2-139f-a52c04fde6dc" - } - ], - "license_clues": [], - "percentage_of_license_text": 100.0, - "license_policy": [ - { - "license_key": "apache-2.0", - "label": "Approved License", - "color_code": "#008000", - "icon": "icon-ok-circle" - }, - { - "license_key": "gpl-3.0", - "label": "Restricted License", - "color_code": "#FFcc33", - "icon": "icon-warning-sign" - } - ] - }, - { - "path": "anglesharp.css.0.16.4/AngleSharp.Css.dll", - "type": "file", - "name": "AngleSharp.Css.dll", - "base_name": "AngleSharp.Css", - "package_data": [ - { - "type": "winexe", - "namespace": null, - "name": "AngleSharp.Css", - "version": "0.16.4+a754c9adb1d678341e9f489674a8ad7a7199eae8", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "AngleSharp.Css\nExtends the CSSOM from the core AngleSharp library.", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "AngleSharp.Css", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "matches": [ - { - "score": 77.78, - "start_line": 1, - "end_line": 1, - "matched_length": 7, - "match_coverage": 100.0, - "matcher": "5-undetected", - "license_expression": "unknown", - "rule_identifier": "package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", - "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", - "matched_text": "license {'LegalCopyright': 'Copyright \u00a9 AngleSharp, 2013-2019', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-73f5f4e3-0fd7-c629-d3b0-a8bf52447aff" - } - ], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: Copyright \u00a9 AngleSharp, 2013-2019\nLegalTrademarks:\nLicense:\n", - "notice_text": null, - "api_data_url": null, - "datasource_id": "windows_executable", - "purl": "pkg:winexe/AngleSharp.Css@0.16.4%2Ba754c9adb1d678341e9f489674a8ad7a7199eae8" + "detection_log": [], + "identifier": "apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de" } ], - "detected_license_expression": null, - "detected_license_expression_spdx": null, - "license_detections": [], "license_clues": [], - "percentage_of_license_text": 0 + "percentage_of_license_text": 22.37, + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] }, { - "path": "anglesharp.css.0.16.4/AngleSharp.Css.nuspec", + "path": "manifests_for_licenses/copyright", "type": "file", - "name": "AngleSharp.Css.nuspec", - "base_name": "AngleSharp.Css", - "package_data": [ - { - "type": "nuget", - "namespace": null, - "name": "AngleSharp.Css", - "version": "0.16.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Extends the CSSOM from the core AngleSharp library.", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "AngleSharp", - "email": null, - "url": null - }, - { - "type": null, - "role": "owner", - "name": "Florian Rappl", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "https://anglesharp.github.io/", - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "declared_license_expression": "mit", - "declared_license_expression_spdx": "MIT", - "license_detections": [ - { - "license_expression": "mit", - "matches": [ - { - "score": 100.0, - "start_line": 1, - "end_line": 1, - "matched_length": 1, - "match_coverage": 100.0, - "matcher": "1-spdx-id", - "license_expression": "mit", - "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", - "rule_relevance": 100, - "rule_url": null, - "matched_text": "MIT" - } - ], - "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" - } - ], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": "'@type': expression\n'#text': MIT\n", - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:nuget/AngleSharp", - "extracted_requirement": "0.16.1", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": "https://www.nuget.org/packages/AngleSharp.Css/0.16.4", - "repository_download_url": "https://www.nuget.org/api/v2/package/AngleSharp.Css/0.16.4", - "api_data_url": "https://api.nuget.org/v3/registration3/anglesharp.css/0.16.4.json", - "datasource_id": "nuget_nupsec", - "purl": "pkg:nuget/AngleSharp.Css@0.16.4" - } - ], - "for_packages": [ - "pkg:nuget/AngleSharp.Css@0.16.4?uuid=7b933cd3-ffbf-429b-8dad-2a7bfca55116" - ], - "detected_license_expression": "mit", - "detected_license_expression_spdx": "MIT", + "name": "copyright", + "base_name": "copyright", + "extension": "", + "size": 1029, + "date": "2022-08-07", + "sha1": "a78f979f237619213f2a0dc4279020c775d2ac38", + "md5": "03b8f702638c8cc94bdb704496444513", + "sha256": "307e96c4b7e8170b422d86cfb04d9ae4a404e6d46755448331cdedb23cf1c3b0", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "detected_license_expression": "gpl-2.0-plus", + "detected_license_expression_spdx": "GPL-2.0-or-later", "license_detections": [ { - "license_expression": "mit", + "license_expression": "gpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { + "license_expression": "gpl-2.0-plus", + "spdx_license_expression": "GPL-2.0-or-later", + "from_file": "manifests_for_licenses/copyright", + "start_line": 4, + "end_line": 4, + "matcher": "2-aho", "score": 100.0, - "start_line": 9, - "end_line": 9, "matched_length": 2, "match_coverage": 100.0, - "matcher": "2-aho", - "license_expression": "mit", - "rule_identifier": "mit_14.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", - "matched_text": "MIT" + "rule_identifier": "gpl-2.0-plus_374.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_374.RULE" }, { + "license_expression": "gpl-2.0-plus", + "spdx_license_expression": "GPL-2.0-or-later", + "from_file": "manifests_for_licenses/copyright", + "start_line": 6, + "end_line": 22, + "matcher": "2-aho", "score": 100.0, - "start_line": 10, - "end_line": 10, - "matched_length": 5, + "matched_length": 141, "match_coverage": 100.0, - "matcher": "1-spdx-id", - "license_expression": "mit", - "rule_identifier": "spdx-license-identifier-mit-c02399fc3bda518cf5890c9587642a2525fce16b", "rule_relevance": 100, - "rule_url": null, - "matched_text": "licenses.nuget.org/MIT" + "rule_identifier": "gpl-2.0-plus_736.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_736.RULE" } ], "detection_log": [], - "identifier": "mit-b941df29-6c4b-fe7e-752f-a5fc7f9a28b5" + "identifier": "gpl_2_0_plus-74a334f0-c991-de85-1854-94aa27b9207b" } ], "license_clues": [], - "percentage_of_license_text": 6.36 - }, - { - "path": "anglesharp.css.0.16.4/AngleSharpLib.Css.dll", - "type": "file", - "name": "AngleSharp.Css.dll", - "base_name": "AngleSharp.Css", - "package_data": [ - { - "type": "winexe", - "namespace": null, - "name": "AngleSharp.Css", - "version": "0.16.4+a754c9adb1d678341e9f489674a8ad7a7199eae8", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "AngleSharp.Css\nExtends the CSSOM from the core AngleSharp library.", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "AngleSharp.Css", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "declared_license_expression": "unknown", - "declared_license_expression_spdx": "LicenseRef-scancode-unknown", - "license_detections": [ - { - "license_expression": "unknown", - "matches": [ - { - "score": 77.78, - "start_line": 1, - "end_line": 1, - "matched_length": 7, - "match_coverage": 100.0, - "matcher": "5-undetected", - "license_expression": "unknown", - "rule_identifier": "package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", - "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", - "matched_text": "license {'LegalCopyright': 'Copyright \u00a9 AngleSharp, 2013-2019', 'LegalTrademarks': '', 'License': None}" - } - ], - "identifier": "unknown-73f5f4e3-0fd7-c629-d3b0-a8bf52447aff" - } - ], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": "LegalCopyright: Copyright \u00a9 AngleSharp, 2013-2019\nLegalTrademarks:\nLicense:\n", - "datasource_id": "windows_executable", - "purl": "pkg:winexe/AngleSharp.Css@0.16.4%2Ba754c9adb1d678341e9f489674a8ad7a7199eae8" - } - ], - "detected_license_expression": null, - "detected_license_expression_spdx": null, - "license_detections": [], - "license_clues": [], - "percentage_of_license_text": 0 - }, - { - "path": "rx-lite/package.json", - "type": "file", - "name": "package.json", - "base_name": "package", - "package_data": [ - { - "type": "npm", - "namespace": null, - "name": "rx-lite", - "version": "4.0.8", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": "Lightweight library for composing asynchronous and event-based operations in JavaScript", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Cloud Programmability Team", - "email": null, - "url": "https://github.com/Reactive-Extensions/RxJS/blob/master/authors.txt" - } - ], - "keywords": ["React", "Reactive", "Events", "Rx", "RxJS"], - "homepage_url": "https://github.com/Reactive-Extensions/RxJS", - "download_url": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "bug_tracking_url": "https://github.com/Reactive-Extensions/RxJS/issues", - "code_view_url": null, - "vcs_url": "git+https://github.com/Reactive-Extensions/RxJS.git", - "copyright": null, - "holder": null, - "declared_license_expression": "apache-2.0", - "declared_license_expression_spdx": "Apache-2.0", - "license_detections": [ - { - "license_expression": "apache-2.0", - "matches": [ - { - "score": 100.0, - "start_line": 1, - "end_line": 1, - "matched_length": 5, - "match_coverage": 100.0, - "matcher": "1-hash", - "license_expression": "apache-2.0", - "rule_identifier": "apache-2.0_48.RULE", - "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_48.RULE", - "matched_text": "Apache License, Version 2.0" - } - ], - "identifier": "apache_2_0-428c1364-ecb5-f806-7a2e-77d10737a7ce" - }, - { - "license_expression": "apache-2.0", - "matches": [ - { - "score": 100.0, - "start_line": 1, - "end_line": 1, - "matched_length": 9, - "match_coverage": 100.0, - "matcher": "1-hash", - "license_expression": "apache-2.0", - "rule_identifier": "apache-2.0_20.RULE", - "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_20.RULE", - "matched_text": "http://www.apache.org/licenses/LICENSE-2.0.html" - } - ], - "identifier": "apache_2_0-9a5226a4-0901-7d18-06ae-49c1887ecbd7" - } - ], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": "[{'type': 'Apache License, Version 2.0', 'url': 'http://www.apache.org/licenses/LICENSE-2.0.html'}]", - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": "https://www.npmjs.com/package/rx-lite", - "repository_download_url": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "api_data_url": "https://registry.npmjs.org/rx-lite/4.0.8", - "datasource_id": "npm_package_json", - "purl": "pkg:npm/rx-lite@4.0.8" - } - ], - "for_packages": [ - "pkg:npm/rx-lite@4.0.8?uuid=6f60b15c-59ec-4caf-8ee7-94d9ab72d135" - ], - "detected_license_expression": null, - "detected_license_expression_spdx": null, - "license_detections": [], - "license_clues": [ - { - "score": 52.0, - "start_line": 56, - "end_line": 59, - "matched_length": 13, - "match_coverage": 52.0, - "matcher": "3-seq", - "license_expression": "apache-2.0 OR gpl-2.0", - "rule_identifier": "apache-2.0_or_gpl-2.0_24.RULE", - "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_gpl-2.0_24.RULE" - } - ], - "percentage_of_license_text": 6.37 + "percentage_of_license_text": 87.2, + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] } ] -} +} \ No newline at end of file diff --git a/tests/test-scans/licenses/withLicenses_legacy.json b/tests/test-scans/licenses/withLicenses_legacy.json new file mode 100644 index 00000000..3ffce517 --- /dev/null +++ b/tests/test-scans/licenses/withLicenses_legacy.json @@ -0,0 +1,786 @@ +{ + "license_detections": [ + { + "identifier": "apache_2_0_and_gpl_3_0-494ca0ae-1282-09a2-139f-a52c04fde6dc", + "license_expression": "apache-2.0 AND gpl-3.0", + "detection_count": 1 + }, + { + "identifier": "mit-b941df29-6c4b-fe7e-752f-a5fc7f9a28b5", + "license_expression": "mit", + "detection_count": 1, + "detection_log": [] + }, + { + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", + "license_expression": "mit", + "detection_count": 1, + "detection_log": [] + }, + { + "identifier": "unknown-73f5f4e3-0fd7-c629-d3b0-a8bf52447aff", + "license_expression": "unknown", + "detection_count": 4, + "detection_log": [] + }, + { + "identifier": "apache_2_0-428c1364-ecb5-f806-7a2e-77d10737a7ce", + "license_expression": "apache-2.0", + "detection_count": 1, + "detection_log": [] + }, + { + "identifier": "apache_2_0-9a5226a4-0901-7d18-06ae-49c1887ecbd7", + "license_expression": "apache-2.0", + "detection_count": 1, + "detection_log": [] + } + ], + "license_references": [ + { + "key": "mit", + "language": "en", + "short_name": "MIT License", + "name": "MIT License", + "category": "Permissive", + "owner": "MIT", + "homepage_url": "http://opensource.org/licenses/mit-license.php", + "notes": "Per SPDX.org, this license is OSI certified.", + "is_builtin": true, + "is_exception": false, + "is_unknown": false, + "is_generic": false, + "spdx_license_key": "MIT", + "other_spdx_license_keys": [], + "osi_license_key": null, + "text_urls": ["http://opensource.org/licenses/mit-license.php"], + "osi_url": "http://www.opensource.org/licenses/MIT", + "faq_url": "https://ieeexplore.ieee.org/document/9263265", + "other_urls": [ + "https://opensource.com/article/18/3/patent-grant-mit-license", + "https://opensource.com/article/19/4/history-mit-license", + "https://opensource.org/licenses/MIT" + ], + "key_aliases": [], + "minimum_coverage": 0, + "standard_notice": null, + "text": "Permission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", + "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "licensedb_url": "https://scancode-licensedb.aboutcode.org/mit", + "spdx_url": "https://spdx.org/licenses/MIT" + }, + { + "key": "unknown", + "language": "en", + "short_name": "unknown", + "name": "Unknown license detected but not recognized", + "category": "Unstated License", + "owner": "Unspecified", + "homepage_url": null, + "notes": "This applies to the case where there is text referring to a license, but it is not possible to determine exactly which license.", + "is_builtin": true, + "is_exception": false, + "is_unknown": true, + "is_generic": false, + "spdx_license_key": "LicenseRef-scancode-unknown", + "other_spdx_license_keys": [], + "osi_license_key": null, + "text_urls": [], + "osi_url": null, + "faq_url": null, + "other_urls": [], + "key_aliases": [], + "minimum_coverage": 0, + "standard_notice": null, + "text": "", + "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown.LICENSE", + "licensedb_url": "https://scancode-licensedb.aboutcode.org/unknown", + "spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown.LICENSE" + }, + { + "key": "apache-2.0", + "language": "en", + "short_name": "Apache 2.0", + "name": "Apache License 2.0", + "category": "Permissive", + "owner": "Apache Software Foundation", + "homepage_url": "http://www.apache.org/licenses/", + "notes": "Per SPDX.org, this version was released January 2004 This license is OSI\ncertified\n", + "is_builtin": true, + "is_exception": false, + "is_unknown": false, + "is_generic": false, + "spdx_license_key": "Apache-2.0", + "other_spdx_license_keys": ["LicenseRef-Apache", "LicenseRef-Apache-2.0"], + "osi_license_key": "Apache-2.0", + "text_urls": ["http://www.apache.org/licenses/LICENSE-2.0"], + "osi_url": "http://opensource.org/licenses/apache2.0.php", + "faq_url": "http://www.apache.org/foundation/licence-FAQ.html", + "other_urls": [ + "http://www.opensource.org/licenses/Apache-2.0", + "https://opensource.org/licenses/Apache-2.0", + "https://www.apache.org/licenses/LICENSE-2.0" + ], + "key_aliases": [], + "minimum_coverage": 0, + "standard_notice": null, + "ignorable_copyrights": [], + "ignorable_holders": [], + "ignorable_authors": [], + "ignorable_urls": [ + "http://www.apache.org/licenses/", + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "ignorable_emails": [], + "text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n \n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n \n 1. Definitions.\n \n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n \n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n \n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n \n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n \n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n \n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n \n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n \n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n \n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n \n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n \n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n \n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n \n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n \n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n \n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n \n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n \n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n \n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n \n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n \n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n \n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n \n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n \n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n \n END OF TERMS AND CONDITIONS\n \n APPENDIX: How to apply the Apache License to your work.\n \n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n \n Copyright [yyyy] [name of copyright owner]\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", + "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", + "licensedb_url": "https://scancode-licensedb.aboutcode.org/apache-2.0", + "spdx_url": "https://spdx.org/licenses/Apache-2.0" + }, + { + "key": "gpl-2.0", + "language": "en", + "short_name": "GPL 2.0", + "name": "GNU General Public License 2.0", + "category": "Copyleft", + "owner": "Free Software Foundation (FSF)", + "homepage_url": "http://www.gnu.org/licenses/gpl-2.0.html", + "notes": "This is the last version of the GPL text as published by the FSF. This variation was published around about the time of the FSF released the GPL 3 in July 2007. See http://web.archive.org/web/20070716031727/http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt It is found live here https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt and here https://www.gnu.org/licenses/old-licenses/gpl-2.0.html It refers to the Franklin Street address and to the GNU Lesser General Public License everywhere both in the text and HTML formats. There are many other variations of the GPL 2.0 text that were published over the years by the FSF and the gnu.org website. You can find the detailed history of this text at https://github.com/pombredanne/gpl-history and each variant is available as a license detection rule. Per SPDX.org, this license was released June 1991 This license is OSI certified.", + "is_builtin": true, + "is_exception": false, + "is_unknown": false, + "is_generic": false, + "spdx_license_key": "GPL-2.0-only", + "other_spdx_license_keys": ["GPL-2.0", "GPL 2.0", "LicenseRef-GPL-2.0"], + "osi_license_key": "GPL-2.0", + "text_urls": [ + "http://www.gnu.org/licenses/gpl-2.0.txt", + "http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt" + ], + "osi_url": "http://opensource.org/licenses/gpl-license.php", + "faq_url": "http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html", + "other_urls": [ + "http://creativecommons.org/choose/cc-gpl", + "http://creativecommons.org/images/public/cc-GPL-a.png", + "http://creativecommons.org/licenses/GPL/2.0/", + "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt", + "http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html", + "http://www.opensource.org/licenses/GPL-2.0", + "https://opensource.org/licenses/GPL-2.0", + "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html" + ], + "key_aliases": [], + "minimum_coverage": 0, + "standard_notice": null, + "ignorable_copyrights": [ + "Copyright (c) 1989, 1991 Free Software Foundation, Inc.", + "copyrighted by the Free Software Foundation" + ], + "ignorable_holders": [ + "Free Software Foundation, Inc.", + "the Free Software Foundation" + ], + "ignorable_authors": [], + "ignorable_urls": [], + "ignorable_emails": [], + "text": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n \n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n \n Preamble\n \n The licenses for most software are designed to take away your\nfreedom to share and change it. By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users. This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it. (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.) You can apply it to\nyour programs, too.\n \n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n \n To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n \n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have. You must make sure that they, too, receive or can get the\nsource code. And you must show them these terms so they know their\nrights.\n \n We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n \n Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware. If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n \n Finally, any free program is threatened constantly by software\npatents. We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary. To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n \n The precise terms and conditions for copying, distribution and\nmodification follow.\n \n GNU GENERAL PUBLIC LICENSE\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n \n 0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License. The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage. (Hereinafter, translation is included without limitation in\nthe term \"modification\".) Each licensee is addressed as \"you\".\n \nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope. The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n \n 1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n \nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n \n 2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n \n a) You must cause the modified files to carry prominent notices\n stating that you changed the files and the date of any change.\n \n b) You must cause any work that you distribute or publish, that in\n whole or in part contains or is derived from the Program or any\n part thereof, to be licensed as a whole at no charge to all third\n parties under the terms of this License.\n \n c) If the modified program normally reads commands interactively\n when run, you must cause it, when started running for such\n interactive use in the most ordinary way, to print or display an\n announcement including an appropriate copyright notice and a\n notice that there is no warranty (or else, saying that you provide\n a warranty) and that users may redistribute the program under\n these conditions, and telling the user how to view a copy of this\n License. (Exception: if the Program itself is interactive but\n does not normally print such an announcement, your work based on\n the Program is not required to print an announcement.)\n \nThese requirements apply to the modified work as a whole. If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works. But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n \nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n \nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n \n 3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n \n a) Accompany it with the complete corresponding machine-readable\n source code, which must be distributed under the terms of Sections\n 1 and 2 above on a medium customarily used for software interchange; or,\n \n b) Accompany it with a written offer, valid for at least three\n years, to give any third party, for a charge no more than your\n cost of physically performing source distribution, a complete\n machine-readable copy of the corresponding source code, to be\n distributed under the terms of Sections 1 and 2 above on a medium\n customarily used for software interchange; or,\n \n c) Accompany it with the information you received as to the offer\n to distribute corresponding source code. (This alternative is\n allowed only for noncommercial distribution and only if you\n received the program in object code or executable form with such\n an offer, in accord with Subsection b above.)\n \nThe source code for a work means the preferred form of the work for\nmaking modifications to it. For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable. However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n \nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n \n 4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License. Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n \n 5. You are not required to accept this License, since you have not\nsigned it. However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works. These actions are\nprohibited by law if you do not accept this License. Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n \n 6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions. You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n \n 7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all. For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n \nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n \nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices. Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n \nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n \n 8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded. In such case, this License incorporates\nthe limitation as if written in the body of this License.\n \n 9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n \nEach version is given a distinguishing version number. If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation. If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n \n 10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission. For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this. Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n \n NO WARRANTY\n \n 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n \n 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n \n END OF TERMS AND CONDITIONS\n \n How to Apply These Terms to Your New Programs\n \n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n \n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n \n \n Copyright (C) \n \n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n \n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n \n You should have received a copy of the GNU General Public License along\n with this program; if not, write to the Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n \nAlso add information on how to contact you by electronic and paper mail.\n \nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n \n Gnomovision version 69, Copyright (C) year name of author\n Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n \nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n \nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary. Here is a sample; alter the names:\n \n Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n `Gnomovision' (which makes passes at compilers) written by James Hacker.\n \n , 1 April 1989\n Ty Coon, President of Vice\n \nThis General Public License does not permit incorporating your program into\nproprietary programs. If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.", + "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0.LICENSE", + "licensedb_url": "https://scancode-licensedb.aboutcode.org/gpl-2.0", + "spdx_url": "https://spdx.org/licenses/GPL-2.0-only" + } + ], + "license_rule_references": [ + { + "license_expression": "mit", + "identifier": "mit_14.RULE", + "language": "en", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "is_license_text": false, + "is_license_notice": false, + "is_license_reference": true, + "is_license_tag": false, + "is_license_intro": false, + "is_continuous": false, + "is_builtin": true, + "is_from_license": false, + "is_synthetic": false, + "length": 2, + "relevance": 100, + "minimum_coverage": 100, + "referenced_filenames": [], + "notes": null, + "text": "MIT license" + }, + { + "license_expression": "mit", + "identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "language": "en", + "rule_url": null, + "is_license_text": false, + "is_license_notice": false, + "is_license_reference": false, + "is_license_tag": true, + "is_license_intro": false, + "is_continuous": false, + "is_builtin": true, + "is_from_license": false, + "is_synthetic": true, + "length": 1, + "relevance": 100, + "minimum_coverage": 0, + "referenced_filenames": [], + "notes": null, + "text": "MIT" + }, + { + "license_expression": "mit", + "identifier": "spdx-license-identifier-mit-9bb4edb114765888fe17c4abc738531d3a8554cc", + "language": "en", + "rule_url": null, + "is_license_text": false, + "is_license_notice": false, + "is_license_reference": false, + "is_license_tag": true, + "is_license_intro": false, + "is_continuous": false, + "is_builtin": true, + "is_from_license": false, + "is_synthetic": true, + "length": 5, + "relevance": 100, + "minimum_coverage": 0, + "referenced_filenames": [], + "notes": null, + "text": "licenses.nuget.org/MIT" + }, + { + "license_expression": "apache-2.0", + "identifier": "apache-2.0_20.RULE", + "language": "en", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_20.RULE", + "is_license_text": false, + "is_license_notice": false, + "is_license_reference": true, + "is_license_tag": false, + "is_license_intro": false, + "is_continuous": false, + "is_builtin": true, + "is_from_license": false, + "is_synthetic": false, + "length": 9, + "relevance": 100, + "minimum_coverage": 100, + "referenced_filenames": [], + "notes": null, + "ignorable_copyrights": [], + "ignorable_holders": [], + "ignorable_authors": [], + "ignorable_urls": ["http://www.apache.org/licenses/LICENSE-2.0.html"], + "ignorable_emails": [], + "text": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + { + "license_expression": "apache-2.0", + "identifier": "apache-2.0_48.RULE", + "language": "en", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_48.RULE", + "is_license_text": false, + "is_license_notice": false, + "is_license_reference": true, + "is_license_tag": false, + "is_license_intro": false, + "is_continuous": false, + "is_builtin": true, + "is_from_license": false, + "is_synthetic": false, + "length": 5, + "relevance": 100, + "minimum_coverage": 80, + "referenced_filenames": [], + "notes": null, + "ignorable_copyrights": [], + "ignorable_holders": [], + "ignorable_authors": [], + "ignorable_urls": [], + "ignorable_emails": [], + "text": "Apache License, Version 2.0" + }, + { + "license_expression": "apache-2.0 OR gpl-2.0", + "identifier": "apache-2.0_or_gpl-2.0_24.RULE", + "language": "en", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_gpl-2.0_24.RULE", + "is_license_text": false, + "is_license_notice": false, + "is_license_reference": false, + "is_license_tag": true, + "is_license_intro": false, + "is_continuous": false, + "is_builtin": true, + "is_from_license": false, + "is_synthetic": false, + "length": 25, + "relevance": 100, + "minimum_coverage": 50, + "referenced_filenames": [], + "notes": null, + "ignorable_copyrights": [], + "ignorable_holders": [], + "ignorable_authors": [], + "ignorable_urls": [ + "http://www.apache.org/licenses/LICENSE-2.0", + "https://www.gnu.org/licenses/gpl-2.0.html" + ], + "ignorable_emails": [], + "text": "\"licenses\": [\n {\n \"type\": \"Apache License\",\n \"url\": \"http://www.apache.org/licenses/LICENSE-2.0\"\n }, {\n \"type\": \"GPL\",\n \"url\": \"https://www.gnu.org/licenses/gpl-2.0.html\"\n }\n ]," + } + ], + "files": [ + { + "path": "anglesharp.css.0.16.4", + "type": "directory", + "name": "anglesharp.css.0.16.4", + "base_name": "anglesharp.css.0.16.4", + "package_data": [], + "is_legal": false, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0 + }, + { + "path": "anglesharp.css.0.16.4/file_with_multiple_licenses.txt", + "type": "file", + "name": "file_with_multiple_licenses.txt", + "base_name": "file_with_multiple_licenses", + "detected_license_expression": "apache-2.0 AND gpl-3.0", + "detected_license_expression_spdx": "Apache-2.0 AND GPL-3.0-only", + "license_detections": [ + { + "license_expression": "apache-2.0 AND gpl-3.0", + "matches": [ + { + "score": 100.0, + "start_line": 1, + "end_line": 1, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_65.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE" + }, + { + "score": 100.0, + "start_line": 3, + "end_line": 3, + "matched_length": 4, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "gpl-3.0", + "rule_identifier": "gpl-3.0_173.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_173.RULE" + } + ], + "identifier": "apache_2_0_and_gpl_3_0-494ca0ae-1282-09a2-139f-a52c04fde6dc" + } + ], + "license_clues": [], + "percentage_of_license_text": 100.0, + "license_policy": [ + { + "license_key": "apache-2.0", + "label": "Approved License", + "color_code": "#008000", + "icon": "icon-ok-circle" + }, + { + "license_key": "gpl-3.0", + "label": "Restricted License", + "color_code": "#FFcc33", + "icon": "icon-warning-sign" + } + ] + }, + { + "path": "anglesharp.css.0.16.4/AngleSharp.Css.dll", + "type": "file", + "name": "AngleSharp.Css.dll", + "base_name": "AngleSharp.Css", + "package_data": [ + { + "type": "winexe", + "namespace": null, + "name": "AngleSharp.Css", + "version": "0.16.4+a754c9adb1d678341e9f489674a8ad7a7199eae8", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "AngleSharp.Css\nExtends the CSSOM from the core AngleSharp library.", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "AngleSharp.Css", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "declared_license_expression": "unknown", + "declared_license_expression_spdx": "LicenseRef-scancode-unknown", + "license_detections": [ + { + "license_expression": "unknown", + "matches": [ + { + "score": 77.78, + "start_line": 1, + "end_line": 1, + "matched_length": 7, + "match_coverage": 100.0, + "matcher": "5-undetected", + "license_expression": "unknown", + "rule_identifier": "package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", + "matched_text": "license {'LegalCopyright': 'Copyright \u00a9 AngleSharp, 2013-2019', 'LegalTrademarks': '', 'License': None}" + } + ], + "identifier": "unknown-73f5f4e3-0fd7-c629-d3b0-a8bf52447aff" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "LegalCopyright: Copyright \u00a9 AngleSharp, 2013-2019\nLegalTrademarks:\nLicense:\n", + "notice_text": null, + "api_data_url": null, + "datasource_id": "windows_executable", + "purl": "pkg:winexe/AngleSharp.Css@0.16.4%2Ba754c9adb1d678341e9f489674a8ad7a7199eae8" + } + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0 + }, + { + "path": "anglesharp.css.0.16.4/AngleSharp.Css.nuspec", + "type": "file", + "name": "AngleSharp.Css.nuspec", + "base_name": "AngleSharp.Css", + "package_data": [ + { + "type": "nuget", + "namespace": null, + "name": "AngleSharp.Css", + "version": "0.16.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Extends the CSSOM from the core AngleSharp library.", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "AngleSharp", + "email": null, + "url": null + }, + { + "type": null, + "role": "owner", + "name": "Florian Rappl", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "https://anglesharp.github.io/", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "matches": [ + { + "score": 100.0, + "start_line": 1, + "end_line": 1, + "matched_length": 1, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "'@type': expression\n'#text': MIT\n", + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:nuget/AngleSharp", + "extracted_requirement": "0.16.1", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://www.nuget.org/packages/AngleSharp.Css/0.16.4", + "repository_download_url": "https://www.nuget.org/api/v2/package/AngleSharp.Css/0.16.4", + "api_data_url": "https://api.nuget.org/v3/registration3/anglesharp.css/0.16.4.json", + "datasource_id": "nuget_nupsec", + "purl": "pkg:nuget/AngleSharp.Css@0.16.4" + } + ], + "for_packages": [ + "pkg:nuget/AngleSharp.Css@0.16.4?uuid=7b933cd3-ffbf-429b-8dad-2a7bfca55116" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "matches": [ + { + "score": 100.0, + "start_line": 9, + "end_line": 9, + "matched_length": 2, + "match_coverage": 100.0, + "matcher": "2-aho", + "license_expression": "mit", + "rule_identifier": "mit_14.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_14.RULE", + "matched_text": "MIT" + }, + { + "score": 100.0, + "start_line": 10, + "end_line": 10, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-spdx-id", + "license_expression": "mit", + "rule_identifier": "spdx-license-identifier-mit-c02399fc3bda518cf5890c9587642a2525fce16b", + "rule_relevance": 100, + "rule_url": null, + "matched_text": "licenses.nuget.org/MIT" + } + ], + "detection_log": [], + "identifier": "mit-b941df29-6c4b-fe7e-752f-a5fc7f9a28b5" + } + ], + "license_clues": [], + "percentage_of_license_text": 6.36 + }, + { + "path": "anglesharp.css.0.16.4/AngleSharpLib.Css.dll", + "type": "file", + "name": "AngleSharp.Css.dll", + "base_name": "AngleSharp.Css", + "package_data": [ + { + "type": "winexe", + "namespace": null, + "name": "AngleSharp.Css", + "version": "0.16.4+a754c9adb1d678341e9f489674a8ad7a7199eae8", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "AngleSharp.Css\nExtends the CSSOM from the core AngleSharp library.", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "AngleSharp.Css", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "declared_license_expression": "unknown", + "declared_license_expression_spdx": "LicenseRef-scancode-unknown", + "license_detections": [ + { + "license_expression": "unknown", + "matches": [ + { + "score": 77.78, + "start_line": 1, + "end_line": 1, + "matched_length": 7, + "match_coverage": 100.0, + "matcher": "5-undetected", + "license_expression": "unknown", + "rule_identifier": "package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/package-manifest-unknown-16117ed57856733eaaf6d91ea575b186a9dab3df", + "matched_text": "license {'LegalCopyright': 'Copyright \u00a9 AngleSharp, 2013-2019', 'LegalTrademarks': '', 'License': None}" + } + ], + "identifier": "unknown-73f5f4e3-0fd7-c629-d3b0-a8bf52447aff" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "LegalCopyright: Copyright \u00a9 AngleSharp, 2013-2019\nLegalTrademarks:\nLicense:\n", + "datasource_id": "windows_executable", + "purl": "pkg:winexe/AngleSharp.Css@0.16.4%2Ba754c9adb1d678341e9f489674a8ad7a7199eae8" + } + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0 + }, + { + "path": "rx-lite/package.json", + "type": "file", + "name": "package.json", + "base_name": "package", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": "rx-lite", + "version": "4.0.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Lightweight library for composing asynchronous and event-based operations in JavaScript", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Cloud Programmability Team", + "email": null, + "url": "https://github.com/Reactive-Extensions/RxJS/blob/master/authors.txt" + } + ], + "keywords": ["React", "Reactive", "Events", "Rx", "RxJS"], + "homepage_url": "https://github.com/Reactive-Extensions/RxJS", + "download_url": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "bug_tracking_url": "https://github.com/Reactive-Extensions/RxJS/issues", + "code_view_url": null, + "vcs_url": "git+https://github.com/Reactive-Extensions/RxJS.git", + "copyright": null, + "holder": null, + "declared_license_expression": "apache-2.0", + "declared_license_expression_spdx": "Apache-2.0", + "license_detections": [ + { + "license_expression": "apache-2.0", + "matches": [ + { + "score": 100.0, + "start_line": 1, + "end_line": 1, + "matched_length": 5, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_48.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_48.RULE", + "matched_text": "Apache License, Version 2.0" + } + ], + "identifier": "apache_2_0-428c1364-ecb5-f806-7a2e-77d10737a7ce" + }, + { + "license_expression": "apache-2.0", + "matches": [ + { + "score": 100.0, + "start_line": 1, + "end_line": 1, + "matched_length": 9, + "match_coverage": 100.0, + "matcher": "1-hash", + "license_expression": "apache-2.0", + "rule_identifier": "apache-2.0_20.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_20.RULE", + "matched_text": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], + "identifier": "apache_2_0-9a5226a4-0901-7d18-06ae-49c1887ecbd7" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "[{'type': 'Apache License, Version 2.0', 'url': 'http://www.apache.org/licenses/LICENSE-2.0.html'}]", + "notice_text": null, + "source_packages": [], + "file_references": [], + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://www.npmjs.com/package/rx-lite", + "repository_download_url": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "api_data_url": "https://registry.npmjs.org/rx-lite/4.0.8", + "datasource_id": "npm_package_json", + "purl": "pkg:npm/rx-lite@4.0.8" + } + ], + "for_packages": [ + "pkg:npm/rx-lite@4.0.8?uuid=6f60b15c-59ec-4caf-8ee7-94d9ab72d135" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [ + { + "score": 52.0, + "start_line": 56, + "end_line": 59, + "matched_length": 13, + "match_coverage": 52.0, + "matcher": "3-seq", + "license_expression": "apache-2.0 OR gpl-2.0", + "rule_identifier": "apache-2.0_or_gpl-2.0_24.RULE", + "rule_relevance": 100, + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_gpl-2.0_24.RULE" + } + ], + "percentage_of_license_text": 6.37 + } + ] +} From 95c11b2ac95ad5b71781f9e0c6670bf603b200f0 Mon Sep 17 00:00:00 2001 From: Omkar Phansopkar Date: Wed, 14 Feb 2024 23:18:28 +0530 Subject: [PATCH 2/3] Modified matches table entry Signed-off-by: Omkar Phansopkar --- src/components/LicenseEntity/LicenseMatchesTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LicenseEntity/LicenseMatchesTable.tsx b/src/components/LicenseEntity/LicenseMatchesTable.tsx index d2f91169..70ad51ca 100644 --- a/src/components/LicenseEntity/LicenseMatchesTable.tsx +++ b/src/components/LicenseEntity/LicenseMatchesTable.tsx @@ -57,7 +57,7 @@ const LicenseMatchesTable = (props: LicenseMatchProps) => { )} {match.from_file && ( - Matched file + From file goToFileInTableView(match.from_file)} From 8399edca721524f0b24d05e9a204ae357928faae Mon Sep 17 00:00:00 2001 From: Omkar Phansopkar Date: Wed, 14 Feb 2024 23:43:34 +0530 Subject: [PATCH 3/3] Fixed optional id in todo Signed-off-by: Omkar Phansopkar --- src/services/models/todo.ts | 2 +- src/services/workbenchDB.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/models/todo.ts b/src/services/models/todo.ts index f88a6e77..c28a98b5 100644 --- a/src/services/models/todo.ts +++ b/src/services/models/todo.ts @@ -18,7 +18,7 @@ import { Sequelize, DataTypes, Model } from "sequelize"; import { jsonDataType } from "./databaseUtils"; export interface TodoAttributes { - id?: number; + id: number; detection_id: string; issues: Record; } diff --git a/src/services/workbenchDB.ts b/src/services/workbenchDB.ts index b8d2bf2c..c2acbed3 100644 --- a/src/services/workbenchDB.ts +++ b/src/services/workbenchDB.ts @@ -596,8 +596,9 @@ export class WorkbenchDB { // @TODO - ToDo in scans have a field review_comments, which is ideally an issue // It will be changed in the schema in future const todo: TodoAttributes[] = (rawTopLevelData.todo || []).map( - (todo: RawTopLevelTodo) => { + (todo: RawTopLevelTodo, idx) => { return { + id: idx + 1, detection_id: todo.detection_id, issues: todo.review_comments, };