Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ v35.1.0 (unreleased)
Requires the ``find_vulnerabilities`` pipeline to be executed beforehand.
https://github.com/aboutcode-org/scancode.io/pull/1702

- Enable ``--license-references`` scan option in the ``scan_single_package`` pipeline.
The ``license_references`` and ``license_rule_references`` attributes will now be
available in the scan results, including the details about detected licenses and
license rules used during the scan.
https://github.com/aboutcode-org/scancode.io/issues/1657

v35.0.0 (2025-06-23)
--------------------

Expand Down
1 change: 1 addition & 0 deletions scanpipe/pipelines/scan_single_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def steps(cls):
"info": True,
"license": True,
"license_text": True,
"license_references": True,
"package": True,
"url": True,
"classify": True,
Expand Down
155 changes: 155 additions & 0 deletions scanpipe/tests/data/manifests/openpdf-parent-1.3.11_scan_package.json

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions scanpipe/tests/data/scancode/is-npm-1.0.0_scan_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"--info": true,
"--license": true,
"--license-text": true,
"--license-references": true,
"--package": true,
"--url": true,
"--classify": true,
Expand Down Expand Up @@ -206,6 +207,105 @@
]
}
],
"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",
"is_builtin": true,
"is_exception": false,
"is_unknown": false,
"is_generic": false,
"spdx_license_key": "MIT",
"other_spdx_license_keys": [
"LicenseRef-MIT-Bootstrap",
"LicenseRef-MIT-Discord",
"LicenseRef-MIT-TC",
"LicenseRef-MIT-Diehl"
],
"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,
"ignorable_copyrights": [],
"ignorable_holders": [],
"ignorable_authors": [],
"ignorable_urls": [],
"ignorable_emails": [],
"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"
}
],
"license_rule_references": [
{
"license_expression": "mit",
"identifier": "mit_30.RULE",
"language": "en",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.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,
"referenced_filenames": [],
"ignorable_copyrights": [],
"ignorable_holders": [],
"ignorable_authors": [],
"ignorable_urls": [],
"ignorable_emails": [],
"text": "License: MIT"
},
{
"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_license_clue": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
"is_synthetic": true,
"length": 1,
"relevance": 100,
"minimum_coverage": 0,
"referenced_filenames": [],
"ignorable_copyrights": [],
"ignorable_holders": [],
"ignorable_authors": [],
"ignorable_urls": [],
"ignorable_emails": [],
"text": "MIT"
}
],
"files": [
{
"path": "codebase",
Expand Down
100 changes: 100 additions & 0 deletions scanpipe/tests/data/scancode/multiple-is-npm-1.0.0_scan_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"--info": true,
"--license": true,
"--license-text": true,
"--license-references": true,
"--package": true,
"--url": true,
"--classify": true,
Expand Down Expand Up @@ -309,6 +310,105 @@
]
}
],
"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",
"is_builtin": true,
"is_exception": false,
"is_unknown": false,
"is_generic": false,
"spdx_license_key": "MIT",
"other_spdx_license_keys": [
"LicenseRef-MIT-Bootstrap",
"LicenseRef-MIT-Discord",
"LicenseRef-MIT-TC",
"LicenseRef-MIT-Diehl"
],
"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,
"ignorable_copyrights": [],
"ignorable_holders": [],
"ignorable_authors": [],
"ignorable_urls": [],
"ignorable_emails": [],
"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"
}
],
"license_rule_references": [
{
"license_expression": "mit",
"identifier": "mit_30.RULE",
"language": "en",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.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,
"referenced_filenames": [],
"ignorable_copyrights": [],
"ignorable_holders": [],
"ignorable_authors": [],
"ignorable_urls": [],
"ignorable_emails": [],
"text": "License: MIT"
},
{
"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_license_clue": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
"is_synthetic": true,
"length": 1,
"relevance": 100,
"minimum_coverage": 0,
"referenced_filenames": [],
"ignorable_copyrights": [],
"ignorable_holders": [],
"ignorable_authors": [],
"ignorable_urls": [],
"ignorable_emails": [],
"text": "MIT"
}
],
"files": [
{
"path": "codebase",
Expand Down