continuous-delivery-scripts 4.4.2__tar.gz → 4.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {continuous_delivery_scripts-4.4.2/continuous_delivery_scripts.egg-info → continuous_delivery_scripts-4.4.4}/PKG-INFO +4 -4
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/README.md +2 -2
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/_version.py +3 -3
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/check_licence_compliance.py +6 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/generate_news.py +2 -7
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/GOLAND.MD +8 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/PYTHON.MD +4 -2
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/basic.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/ci.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/docker.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/golang.py +44 -14
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/noop.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/python.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/report_third_party_ip.py +14 -3
- continuous_delivery_scripts-4.4.4/continuous_delivery_scripts/spdx_report/spdx_dependency.py +63 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/spdx_document.py +78 -56
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/spdx_file.py +16 -16
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/spdx_helpers.py +23 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/spdx_package.py +26 -37
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/spdx_project.py +3 -2
- continuous_delivery_scripts-4.4.4/continuous_delivery_scripts/utils/changelog.py +108 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/configuration.py +3 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/language_specifics_base.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/package_helpers.py +6 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4/continuous_delivery_scripts.egg-info}/PKG-INFO +4 -4
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts.egg-info/SOURCES.txt +4 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts.egg-info/requires.txt +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/pyproject.toml +4 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/setup.py +1 -2
- continuous_delivery_scripts-4.4.4/spdx-tmp/GitPython.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/Jinja2.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/Mako.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/Markdown.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/MarkupSafe.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/PyYAML.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/Pygments.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/SecretStorage.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/beartype.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/boolean.py.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/boto3.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/botocore.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/bracex.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/certifi.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/cffi.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/charset-normalizer.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/click.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/continuous-delivery-scripts.spdx +741 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/cryptography.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/detect-secrets.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/docutils.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/gibberish-detector.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/gitdb.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/id.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/idna.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/jaraco.classes.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/jaraco.context.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/jaraco.functools.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/jeepney.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/jellyfish.spdx +29 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/jmespath.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/keyring.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/license-expression.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/licenseheaders.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/markdown-it-py.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/mdurl.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/more-itertools.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/nh3.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/packaging.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/pdoc3.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/ply.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/pyautoversion.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/pycparser.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/pyparsing.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/python-dateutil.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/python-dotenv.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/rdflib.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/readme_renderer.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/regex.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/requests-toolbelt.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/requests.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/rfc3986.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/rich.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/s3transfer.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/semantic-version.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/semver.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/setuptools.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/six.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/smmap.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/spdx-tools.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/toml.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/towncrier.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/twine.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/uritools.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/urllib3.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/wcmatch.spdx +30 -0
- continuous_delivery_scripts-4.4.4/spdx-tmp/xmltodict.spdx +30 -0
- continuous_delivery_scripts-4.4.2/continuous_delivery_scripts/spdx_report/spdx_dependency.py +0 -46
- continuous_delivery_scripts-4.4.2/spdx-tmp/GitPython.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Jinja2.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Mako.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Markdown.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/MarkupSafe.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/PyYAML.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Pygments.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/SecretStorage.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/boolean.py.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/boto3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/botocore.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/bracex.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/certifi.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/cffi.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/charset-normalizer.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/click.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/continuous-delivery-scripts.spdx +0 -914
- continuous_delivery_scripts-4.4.2/spdx-tmp/cryptography.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/detect-secrets.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/docutils.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/gibberish-detector.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/gitdb.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/id.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/idna.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jaraco.classes.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jaraco.context.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jaraco.functools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jeepney.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jellyfish.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jmespath.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/keyring.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/license-expression.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/licenseheaders.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/markdown-it-py.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/mdurl.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/more-itertools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/nh3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/packaging.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pdoc3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/ply.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pyautoversion.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pycparser.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pyparsing.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/python-dateutil.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/python-dotenv.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/rdflib.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/readme_renderer.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/regex.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/requests-toolbelt.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/requests.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/rfc3986.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/rich.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/s3transfer.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/semver.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/setuptools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/six.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/smmap.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/spdx-tools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/toml.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/towncrier.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/twine.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/urllib3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/wcmatch.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/xmltodict.spdx +0 -50
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/LICENSE +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/MANIFEST.in +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/assert_news.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/create_news_file.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/detect_secrets.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/generate_docs.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/get_config.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/get_version.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/language_specifics.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/license_files.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/BASIC.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/CI.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/GITHUB_ACTIONS.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/NOOP.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/plugins/github_actions.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/data/licence_assessment.toml +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/licence_assessment.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/scancode_licence_db.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/spdx_summary.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.csv.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.html.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.txt.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/tag_and_release.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/update_secrets_registry.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/aws_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/definitions.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/filesystem_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/git_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/hash_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/logging.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/news_file.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/noop/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/noop/package_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/python/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/python/package_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/python/python_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/string_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/third_party_licences.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts/utils/versioning.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts.egg-info/dependency_links.txt +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts.egg-info/entry_points.txt +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/continuous_delivery_scripts.egg-info/top_level.txt +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: continuous-delivery-scripts
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.4
|
|
4
4
|
Summary: Git-based CI/CD tools for releases, changelogs, SPDX SBOMs and licence reporting
|
|
5
5
|
Home-page: https://github.com/ARMmbed/continuous-delivery-scripts
|
|
6
6
|
Author: Arm
|
|
@@ -38,7 +38,7 @@ Requires-Dist: boto3
|
|
|
38
38
|
Requires-Dist: detect-secrets[gibberish]==1.5.0
|
|
39
39
|
Requires-Dist: packaging
|
|
40
40
|
Requires-Dist: licenseheaders<0.8.9
|
|
41
|
-
Requires-Dist: spdx-tools==0.
|
|
41
|
+
Requires-Dist: spdx-tools==0.8.5
|
|
42
42
|
Requires-Dist: license-expression
|
|
43
43
|
Requires-Dist: wcmatch
|
|
44
44
|
Requires-Dist: jellyfish
|
|
@@ -246,8 +246,8 @@ same commands whichever CI system the team chooses.
|
|
|
246
246
|
| [`cd-get-config`](./guides/reading-project-configuration.md) | Prints a project configuration value. | Either `--key` (`-k`) or `--config-variable` (`-c`) | Developer or CI |
|
|
247
247
|
| [`cd-tag-and-release`](./guides/automating-releases.md) | Runs the release flow, including documentation, licensing summaries, Git tagging, packaging and publication through the selected [language plugin](./continuous_delivery_scripts/plugins). | Required `--release-type` (`-t`); optional `--current-branch` (`-b`) | CI release flow |
|
|
248
248
|
| [`cd-generate-docs`](./guides/generating-code-documentation.md) | Generates code documentation in the configured output directory (or one specified on the command line). | `--output_directory` | Developer preview or CI |
|
|
249
|
-
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode` | CI audit; developer review also possible |
|
|
250
|
-
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode` | CI gate or developer review |
|
|
249
|
+
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode`, `--skip-dependency-download` | CI audit; developer review also possible |
|
|
250
|
+
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode`, `--skip-dependency-download` | CI gate or developer review |
|
|
251
251
|
| [`cd-license-files`](./guides/licence-header-management.md) | Adds or updates source-file licence and copyright headers when the language plugin supports them. | `--verbose` (`-v`) | Developer or CI |
|
|
252
252
|
| [`cd-record-secrets`](./guides/recording-secrets.md) | Records accepted findings in the project's [detect-secrets](https://github.com/Yelp/detect-secrets) registry. | `--registry-file` (`-r`); defaults to the configured registry | Developer (registry maintenance) |
|
|
253
253
|
| [`cd-detect-secrets`](./guides/checking-for-secrets.md) | Checks Git-tracked files against that registry and fails if new secrets are found. | `--registry-file` (`-r`); defaults to the configured registry | CI; developer checks also possible |
|
|
@@ -185,8 +185,8 @@ same commands whichever CI system the team chooses.
|
|
|
185
185
|
| [`cd-get-config`](./guides/reading-project-configuration.md) | Prints a project configuration value. | Either `--key` (`-k`) or `--config-variable` (`-c`) | Developer or CI |
|
|
186
186
|
| [`cd-tag-and-release`](./guides/automating-releases.md) | Runs the release flow, including documentation, licensing summaries, Git tagging, packaging and publication through the selected [language plugin](./continuous_delivery_scripts/plugins). | Required `--release-type` (`-t`); optional `--current-branch` (`-b`) | CI release flow |
|
|
187
187
|
| [`cd-generate-docs`](./guides/generating-code-documentation.md) | Generates code documentation in the configured output directory (or one specified on the command line). | `--output_directory` | Developer preview or CI |
|
|
188
|
-
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode` | CI audit; developer review also possible |
|
|
189
|
-
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode` | CI gate or developer review |
|
|
188
|
+
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode`, `--skip-dependency-download` | CI audit; developer review also possible |
|
|
189
|
+
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode`, `--skip-dependency-download` | CI gate or developer review |
|
|
190
190
|
| [`cd-license-files`](./guides/licence-header-management.md) | Adds or updates source-file licence and copyright headers when the language plugin supports them. | `--verbose` (`-v`) | Developer or CI |
|
|
191
191
|
| [`cd-record-secrets`](./guides/recording-secrets.md) | Records accepted findings in the project's [detect-secrets](https://github.com/Yelp/detect-secrets) registry. | `--registry-file` (`-r`); defaults to the configured registry | Developer (registry maintenance) |
|
|
192
192
|
| [`cd-detect-secrets`](./guides/checking-for-secrets.md) | Checks Git-tracked files against that registry and fails if new secrets are found. | `--registry-file` (`-r`); defaults to the configured registry | CI; developer checks also possible |
|
|
@@ -11,8 +11,8 @@ References
|
|
|
11
11
|
This file is autogenerated, do not modify by hand.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
__version__ = "4.4.
|
|
15
|
-
COMMIT = "
|
|
14
|
+
__version__ = "4.4.4"
|
|
15
|
+
COMMIT = "8d459948553cb512aa904df3e9f81c6eacc18cb7"
|
|
16
16
|
MAJOR = 4
|
|
17
17
|
MINOR = 4
|
|
18
|
-
PATCH =
|
|
18
|
+
PATCH = 4
|
|
@@ -90,6 +90,11 @@ def main() -> int:
|
|
|
90
90
|
action="store_true",
|
|
91
91
|
help="Consult ScanCode LicenseDB for unclassified licences or missing assessment rules.",
|
|
92
92
|
)
|
|
93
|
+
parser.add_argument(
|
|
94
|
+
"--skip-dependency-download",
|
|
95
|
+
action="store_true",
|
|
96
|
+
help="Skip automatic dependency downloads before licence checks and SPDX dependency analysis.",
|
|
97
|
+
)
|
|
93
98
|
parser.add_argument("-v", "--verbose", action="count", default=0, help="Increase logging verbosity.")
|
|
94
99
|
args = parser.parse_args()
|
|
95
100
|
set_log_level(args.verbose)
|
|
@@ -98,7 +103,7 @@ def main() -> int:
|
|
|
98
103
|
plugin = get_language_specifics()
|
|
99
104
|
if not plugin.can_get_project_metadata():
|
|
100
105
|
raise ValueError("The selected language plugin cannot provide metadata for licence compliance checks.")
|
|
101
|
-
project = plugin.get_current_spdx_project()
|
|
106
|
+
project = plugin.get_current_spdx_project(skip_dependency_download=args.skip_dependency_download)
|
|
102
107
|
if project is None:
|
|
103
108
|
raise ValueError("The selected language plugin did not return a project for licence compliance checks.")
|
|
104
109
|
if args.lookup_scancode:
|
|
@@ -8,14 +8,11 @@ import sys
|
|
|
8
8
|
|
|
9
9
|
import argparse
|
|
10
10
|
import logging
|
|
11
|
-
import os
|
|
12
|
-
import subprocess
|
|
13
11
|
from continuous_delivery_scripts.utils.versioning import calculate_version, determine_version_string
|
|
14
12
|
from typing import Optional, Tuple, Dict
|
|
15
13
|
|
|
16
|
-
from continuous_delivery_scripts.utils.
|
|
14
|
+
from continuous_delivery_scripts.utils.changelog import generate_changelog
|
|
17
15
|
from continuous_delivery_scripts.utils.definitions import CommitType
|
|
18
|
-
from continuous_delivery_scripts.utils.filesystem_helpers import cd
|
|
19
16
|
from continuous_delivery_scripts.utils.logging import log_exception, set_log_level
|
|
20
17
|
|
|
21
18
|
logger = logging.getLogger(__name__)
|
|
@@ -48,9 +45,7 @@ def _generate_changelog(version: Optional[str], use_news_files: bool) -> None:
|
|
|
48
45
|
"""
|
|
49
46
|
if use_news_files:
|
|
50
47
|
logger.info(":: Generating a new changelog")
|
|
51
|
-
|
|
52
|
-
with cd(os.path.dirname(project_config_path)):
|
|
53
|
-
subprocess.check_call(["towncrier", "build", "--yes", "--name", "", "--version", str(version)])
|
|
48
|
+
generate_changelog(version)
|
|
54
49
|
|
|
55
50
|
|
|
56
51
|
def main() -> None:
|
|
@@ -20,6 +20,13 @@ usable `go-licenses` binary on `PATH` before installing
|
|
|
20
20
|
must be available; an installed binary can also be located under `GOBIN` or
|
|
21
21
|
the first `GOPATH` entry's `bin` directory.
|
|
22
22
|
|
|
23
|
+
For licence and SPDX analysis, the plugin also runs `go mod download all` for
|
|
24
|
+
each detected Go module by default so callers do not need a separate dependency
|
|
25
|
+
prefetch step. If your environment already downloads dependencies and you want
|
|
26
|
+
to skip that work, use `--skip-dependency-download` on
|
|
27
|
+
`cd-check-licence-compliance` or `cd-generate-spdx`, or set
|
|
28
|
+
`SKIP_DEPENDENCY_DOWNLOAD_FOR_LICENSING = true` in configuration.
|
|
29
|
+
|
|
23
30
|
Set `PROGRAMMING_LANGUAGE = "golang"`, `PROJECT_NAME`, `PROJECT_ROOT` and
|
|
24
31
|
`SOURCE_DIR` in `[ProjectConfig]`. Put a `go.mod` under the source or project
|
|
25
32
|
root; `go.work` modules and nested Go modules are also considered. Supply
|
|
@@ -27,7 +34,7 @@ root; `go.work` modules and nested Go modules are also considered. Supply
|
|
|
27
34
|
and `[spdx]` namespace fields as explained in the
|
|
28
35
|
[SPDX configuration guide](../../DEVELOPMENT.md#spdx-document-identity).
|
|
29
36
|
|
|
30
|
-
With the project
|
|
37
|
+
With the project available, run:
|
|
31
38
|
|
|
32
39
|
```bash
|
|
33
40
|
mkdir -p licensing
|
|
@@ -17,8 +17,10 @@ The plugin uses [pdoc](https://pdoc3.github.io/pdoc/) to generate the code refer
|
|
|
17
17
|
|
|
18
18
|
The Python plugin reads metadata from the **installed** project distribution and
|
|
19
19
|
walks its `Requires-Dist` entries to find installed, transitive dependencies.
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Install the dependencies you intend to audit, then run the audit in that
|
|
21
|
+
environment; the plugin does not install packages itself. This is deliberate:
|
|
22
|
+
Python projects can define dependencies in many different ways, so CDS cannot
|
|
23
|
+
reliably infer and reproduce the intended audit environment automatically.
|
|
22
24
|
|
|
23
25
|
> **Warning — platform limitation:** The audit only sees dependencies installed
|
|
24
26
|
> for the current platform and Python version. It does **not** inspect
|
|
@@ -51,6 +51,6 @@ class Basic(BaseLanguage):
|
|
|
51
51
|
"""States whether project metadata can be retrieved."""
|
|
52
52
|
return False
|
|
53
53
|
|
|
54
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
54
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
55
55
|
"""Basic."""
|
|
56
56
|
return None
|
|
@@ -61,7 +61,7 @@ class CI(BaseLanguage):
|
|
|
61
61
|
"""States whether project metadata can be retrieved."""
|
|
62
62
|
return False
|
|
63
63
|
|
|
64
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
64
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
65
65
|
"""Gets current SPDX description."""
|
|
66
66
|
# TODO
|
|
67
67
|
return None
|
|
@@ -53,7 +53,7 @@ class Docker(BaseLanguage):
|
|
|
53
53
|
"""States whether project metadata can be retrieved."""
|
|
54
54
|
return False
|
|
55
55
|
|
|
56
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
56
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
57
57
|
"""Gets current SPDX description."""
|
|
58
58
|
# TODO
|
|
59
59
|
return None
|
|
@@ -44,16 +44,18 @@ ROOT_DIR = Path(str(configuration.get_value(ConfigurationVariable.PROJECT_ROOT))
|
|
|
44
44
|
ENVVAR_GORELEASER_GIT_TOKEN = "GITHUB_TOKEN"
|
|
45
45
|
ENVVAR_GORELEASER_CUSTOMISED_TAG = "GORELEASER_CURRENT_TAG"
|
|
46
46
|
ENVVAR_GO_MOD = "GO111MODULE"
|
|
47
|
+
ENVVAR_GO_WORK = "GOWORK"
|
|
47
48
|
GO_MOD_ON_VALUE = "on"
|
|
49
|
+
GO_WORK_OFF_VALUE = "off"
|
|
48
50
|
# go-licenses report --template receives Name, Version, LicenseURL and LicenseName for each library.
|
|
49
51
|
# https://github.com/google/go-licenses/blob/master/README.md#reports-with-custom-templates
|
|
50
52
|
GO_LICENSES_TEMPLATE = "{{range .}}{{.Name}}\t{{.Version}}\t{{.LicenseURL}}\t{{.LicenseName}}\n{{end}}"
|
|
51
53
|
LICENCE_FILE_PREFIXES = ("LICENSE", "LICENCE", "COPYING")
|
|
52
54
|
|
|
53
55
|
|
|
54
|
-
def _generate_doc2go_command_list(output_directory: Path, module: str) -> List[str]:
|
|
56
|
+
def _generate_doc2go_command_list(executable: str, output_directory: Path, module: str) -> List[str]:
|
|
55
57
|
return [
|
|
56
|
-
|
|
58
|
+
executable,
|
|
57
59
|
"-out",
|
|
58
60
|
str(output_directory),
|
|
59
61
|
f"{module}",
|
|
@@ -131,10 +133,35 @@ def _go_licence_module_directories() -> List[Path]:
|
|
|
131
133
|
|
|
132
134
|
def _go_module_name(module_dir: Path, env: MutableMapping[str, str]) -> str:
|
|
133
135
|
"""Read the import path declared by a Go module."""
|
|
134
|
-
|
|
136
|
+
# `go list -m -json` emits one JSON document per main module when a go.work
|
|
137
|
+
# workspace is active. Disable workspace mode here so CDS always reads the
|
|
138
|
+
# module declared by `module_dir` rather than the whole workspace.
|
|
139
|
+
module_env = dict(env)
|
|
140
|
+
module_env[ENVVAR_GO_WORK] = GO_WORK_OFF_VALUE
|
|
141
|
+
module = json.loads(check_output(["go", "list", "-m", "-json"], cwd=module_dir, env=module_env, encoding="utf8"))
|
|
135
142
|
return str(module["Path"])
|
|
136
143
|
|
|
137
144
|
|
|
145
|
+
def _download_go_module_dependencies(module_directories: List[Path], env: MutableMapping[str, str]) -> None:
|
|
146
|
+
"""Download Go dependencies for each detected module.
|
|
147
|
+
|
|
148
|
+
`go-licenses` expects the module graph to be available locally. Fetching the
|
|
149
|
+
dependencies here means callers do not need a separate CI step before
|
|
150
|
+
running `cd-check-licence-compliance` or `cd-generate-spdx`.
|
|
151
|
+
"""
|
|
152
|
+
for module_directory in module_directories:
|
|
153
|
+
logger.info("Downloading Go module dependencies in [%s].", module_directory)
|
|
154
|
+
check_call(["go", "mod", "download", "all"], cwd=module_directory, env=env)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def _should_download_go_module_dependencies() -> bool:
|
|
158
|
+
"""Return whether Go module dependencies should be prefetched automatically."""
|
|
159
|
+
configured = configuration.get_value_or_default(ConfigurationVariable.SKIP_DEPENDENCY_DOWNLOAD_FOR_LICENSING, False)
|
|
160
|
+
if isinstance(configured, str):
|
|
161
|
+
configured = configured.strip().lower() in ("true", "1", "yes", "on")
|
|
162
|
+
return not bool(configured)
|
|
163
|
+
|
|
164
|
+
|
|
138
165
|
def _parse_go_licences(output: str) -> List[PackageMetadata]:
|
|
139
166
|
"""Translate go-licenses template output into shared package metadata."""
|
|
140
167
|
packages = []
|
|
@@ -226,15 +253,20 @@ def _stage_root_licence_files_for_modules(module_directories: List[Path]) -> Ite
|
|
|
226
253
|
class GoProjectMetadataFetcher(ProjectMetadataFetcher):
|
|
227
254
|
"""Retrieve Go dependency licences for the shared SPDX and compliance report."""
|
|
228
255
|
|
|
229
|
-
def __init__(self) -> None:
|
|
256
|
+
def __init__(self, skip_dependency_download: bool = False) -> None:
|
|
230
257
|
"""Initialise with the configured project name."""
|
|
231
258
|
super().__init__(str(configuration.get_value(ConfigurationVariable.PROJECT_NAME)))
|
|
259
|
+
self._skip_dependency_download = skip_dependency_download
|
|
232
260
|
|
|
233
261
|
def fetch_project_metadata(self) -> ProjectMetadata:
|
|
234
262
|
"""Collect module dependencies using go-licenses without replacing shared policy checks."""
|
|
235
263
|
module_directories = _go_licence_module_directories()
|
|
236
264
|
env = os.environ.copy()
|
|
237
265
|
env[ENVVAR_GO_MOD] = GO_MOD_ON_VALUE
|
|
266
|
+
if not self._skip_dependency_download and _should_download_go_module_dependencies():
|
|
267
|
+
_download_go_module_dependencies(module_directories, env)
|
|
268
|
+
else:
|
|
269
|
+
logger.info("Skipping Go module dependency downloads before licence analysis by configuration.")
|
|
238
270
|
executable = _ensure_go_tool_installed(
|
|
239
271
|
tool_name="go-licenses",
|
|
240
272
|
version_command=["go-licenses", "report", "--help"],
|
|
@@ -301,7 +333,7 @@ def _call_doc2go(output_directory: Path, module: str) -> None:
|
|
|
301
333
|
"""Call doc2go for generating the docs."""
|
|
302
334
|
env = os.environ
|
|
303
335
|
env[ENVVAR_GO_MOD] = GO_MOD_ON_VALUE
|
|
304
|
-
_ensure_go_tool_installed(
|
|
336
|
+
executable = _ensure_go_tool_installed(
|
|
305
337
|
tool_name="doc2go",
|
|
306
338
|
version_command=["doc2go", "-version"],
|
|
307
339
|
install_command=_install_doc2go_command_list(),
|
|
@@ -309,13 +341,11 @@ def _call_doc2go(output_directory: Path, module: str) -> None:
|
|
|
309
341
|
)
|
|
310
342
|
logger.info("Creating Code documentation.")
|
|
311
343
|
logger.info("Running doc2go over [%s] in [%s].", module, SRC_DIR)
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
# )
|
|
318
|
-
logger.warning("Currently not running doc2go")
|
|
344
|
+
check_call(
|
|
345
|
+
_generate_doc2go_command_list(executable, output_directory, module),
|
|
346
|
+
cwd=str(SRC_DIR),
|
|
347
|
+
env=env,
|
|
348
|
+
)
|
|
319
349
|
|
|
320
350
|
|
|
321
351
|
def _call_goreleaser_check(version: str) -> None:
|
|
@@ -464,9 +494,9 @@ class Go(BaseLanguage):
|
|
|
464
494
|
(r"^\.github[\\/]workflows[\\/].*"),
|
|
465
495
|
]
|
|
466
496
|
|
|
467
|
-
def get_current_spdx_project(self) -> Optional[SpdxProject]:
|
|
497
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional[SpdxProject]:
|
|
468
498
|
"""Gets current SPDX description."""
|
|
469
|
-
return SpdxProject(GoProjectMetadataFetcher())
|
|
499
|
+
return SpdxProject(GoProjectMetadataFetcher(skip_dependency_download=skip_dependency_download))
|
|
470
500
|
|
|
471
501
|
def should_clean_before_packaging(self) -> bool:
|
|
472
502
|
"""States whether the repository must be cleaned before packaging happens."""
|
|
@@ -53,7 +53,7 @@ class NoOp(BaseLanguage):
|
|
|
53
53
|
"""States whether project metadata can be retrieved."""
|
|
54
54
|
return False
|
|
55
55
|
|
|
56
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
56
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
57
57
|
"""No Op."""
|
|
58
58
|
return None
|
|
59
59
|
|
|
@@ -198,6 +198,6 @@ class Python(BaseLanguage):
|
|
|
198
198
|
# FIXME Comment out SPDX package as no longer working
|
|
199
199
|
return False
|
|
200
200
|
|
|
201
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
201
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
202
202
|
"""Gets the current SPDX description."""
|
|
203
203
|
return _get_current_spdx_project()
|
|
@@ -36,9 +36,11 @@ def generate_spdx_project_reports(project: "SpdxProject", output_directory: Path
|
|
|
36
36
|
return project
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
def generate_spdx_reports(
|
|
39
|
+
def generate_spdx_reports(
|
|
40
|
+
output_directory: Path, lookup_scancode: bool = False, skip_dependency_download: bool = False
|
|
41
|
+
) -> Optional["SpdxProject"]:
|
|
40
42
|
"""Generates all the SPDX reports for the current project."""
|
|
41
|
-
project = get_language_specifics().get_current_spdx_project()
|
|
43
|
+
project = get_language_specifics().get_current_spdx_project(skip_dependency_download=skip_dependency_download)
|
|
42
44
|
if not project:
|
|
43
45
|
return None
|
|
44
46
|
if lookup_scancode:
|
|
@@ -66,6 +68,11 @@ def main() -> int:
|
|
|
66
68
|
action="store_true",
|
|
67
69
|
help="Consult ScanCode LicenseDB for unclassified licences or missing assessment rules.",
|
|
68
70
|
)
|
|
71
|
+
parser.add_argument(
|
|
72
|
+
"--skip-dependency-download",
|
|
73
|
+
action="store_true",
|
|
74
|
+
help="Skip automatic dependency downloads before licence checks and SPDX dependency analysis.",
|
|
75
|
+
)
|
|
69
76
|
|
|
70
77
|
parser.add_argument(
|
|
71
78
|
"-v",
|
|
@@ -79,7 +86,11 @@ def main() -> int:
|
|
|
79
86
|
|
|
80
87
|
try:
|
|
81
88
|
if get_language_specifics().can_get_project_metadata():
|
|
82
|
-
project = generate_spdx_reports(
|
|
89
|
+
project = generate_spdx_reports(
|
|
90
|
+
args.output_dir,
|
|
91
|
+
lookup_scancode=args.lookup_scancode,
|
|
92
|
+
skip_dependency_download=args.skip_dependency_download,
|
|
93
|
+
)
|
|
83
94
|
if project:
|
|
84
95
|
project.check_licence_compliance()
|
|
85
96
|
if args.lookup_scancode:
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
#
|
|
5
|
+
"""Definition of dependency SPDX Document."""
|
|
6
|
+
|
|
7
|
+
import re
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
9
|
+
|
|
10
|
+
from continuous_delivery_scripts.utils.hash_helpers import generate_uuid_based_on_str
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from spdx_tools.spdx.model.external_document_ref import ExternalDocumentRef
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class DependencySpdxDocumentRef:
|
|
17
|
+
"""SPDX external document describing dependency.
|
|
18
|
+
|
|
19
|
+
Keep each third-party dependency in a separate SPDX file and link its
|
|
20
|
+
package to the project through an external document reference.
|
|
21
|
+
See https://spdx.org/spdx-specification-21-web-version#h.h430e9ypa0j9
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
def __init__(self, name: str, namespace: str, checksum: str, package_id: str) -> None:
|
|
25
|
+
"""Constructor."""
|
|
26
|
+
self._document_name = name
|
|
27
|
+
self._document_namespace = namespace
|
|
28
|
+
self._document_checksum = checksum
|
|
29
|
+
self._package_id = package_id
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def document_ref_id(self) -> str:
|
|
33
|
+
"""Return a stable SPDX-safe external document identifier."""
|
|
34
|
+
safe_name = (
|
|
35
|
+
self._document_name
|
|
36
|
+
if re.fullmatch(r"[A-Za-z0-9.-]+", self._document_name)
|
|
37
|
+
else str(generate_uuid_based_on_str(self._document_name))
|
|
38
|
+
)
|
|
39
|
+
return f"DocumentRef-{safe_name}"
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def package_spdx_id(self) -> str:
|
|
43
|
+
"""Return the referenced package identifier in the external document."""
|
|
44
|
+
return f"{self.document_ref_id}:SPDXRef-{self._package_id}"
|
|
45
|
+
|
|
46
|
+
def generate_external_reference(self) -> "ExternalDocumentRef":
|
|
47
|
+
"""Generates the external SPDX reference.
|
|
48
|
+
|
|
49
|
+
e.g.
|
|
50
|
+
ExternalDocumentRef:DocumentRef-spdx-tool-1.2
|
|
51
|
+
http://spdx.org/spdxdocs/spdx-tools- v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301
|
|
52
|
+
SHA1: d6a770ba38583e d4bb4525bd96e50461655d2759
|
|
53
|
+
Returns:
|
|
54
|
+
corresponding reference
|
|
55
|
+
"""
|
|
56
|
+
from spdx_tools.spdx.model.checksum import Checksum, ChecksumAlgorithm
|
|
57
|
+
from spdx_tools.spdx.model.external_document_ref import ExternalDocumentRef
|
|
58
|
+
|
|
59
|
+
return ExternalDocumentRef(
|
|
60
|
+
document_ref_id=self.document_ref_id,
|
|
61
|
+
document_uri=self._document_namespace,
|
|
62
|
+
checksum=Checksum(ChecksumAlgorithm.SHA1, self._document_checksum),
|
|
63
|
+
)
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"""Definition of an SPDX Document."""
|
|
6
6
|
|
|
7
7
|
from pathlib import Path
|
|
8
|
+
from datetime import datetime, timezone
|
|
8
9
|
from typing import TYPE_CHECKING, List, Optional
|
|
9
10
|
from urllib.parse import urlsplit
|
|
10
11
|
|
|
@@ -12,7 +13,6 @@ from continuous_delivery_scripts.spdx_report.spdx_dependency import (
|
|
|
12
13
|
DependencySpdxDocumentRef,
|
|
13
14
|
)
|
|
14
15
|
from continuous_delivery_scripts.spdx_report.spdx_helpers import (
|
|
15
|
-
determine_spdx_value,
|
|
16
16
|
get_project_namespace,
|
|
17
17
|
)
|
|
18
18
|
from continuous_delivery_scripts.spdx_report.spdx_package import (
|
|
@@ -28,9 +28,10 @@ from continuous_delivery_scripts.utils.package_helpers import PackageMetadata
|
|
|
28
28
|
from continuous_delivery_scripts.utils.third_party_licences import LICENSE_REF_PROPRIETARY
|
|
29
29
|
|
|
30
30
|
if TYPE_CHECKING:
|
|
31
|
-
from spdx.document import Document
|
|
31
|
+
from spdx_tools.spdx.model.document import Document
|
|
32
32
|
|
|
33
33
|
TOOL_NAME = "mbed-spdx-generator"
|
|
34
|
+
SPDX_VERSION = "SPDX-2.3"
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
class SpdxDocument:
|
|
@@ -42,7 +43,7 @@ class SpdxDocument:
|
|
|
42
43
|
def __init__(
|
|
43
44
|
self,
|
|
44
45
|
package_metadata: PackageMetadata,
|
|
45
|
-
other_document_refs: List[DependencySpdxDocumentRef] =
|
|
46
|
+
other_document_refs: Optional[List[DependencySpdxDocumentRef]] = None,
|
|
46
47
|
is_dependency: bool = False,
|
|
47
48
|
document_namespace: Optional[str] = None,
|
|
48
49
|
):
|
|
@@ -53,7 +54,7 @@ class SpdxDocument:
|
|
|
53
54
|
self._project_source = self._project_root.joinpath(configuration.get_value(ConfigurationVariable.SOURCE_DIR))
|
|
54
55
|
self._package_metadata: PackageMetadata = package_metadata
|
|
55
56
|
self._is_dependency: bool = is_dependency
|
|
56
|
-
self._other_document_references: List[DependencySpdxDocumentRef] = other_document_refs
|
|
57
|
+
self._other_document_references: List[DependencySpdxDocumentRef] = other_document_refs or []
|
|
57
58
|
self._document_namespace = document_namespace
|
|
58
59
|
self._spdx_package: Optional[SpdxPackage] = None
|
|
59
60
|
|
|
@@ -215,11 +216,11 @@ class SpdxDocument:
|
|
|
215
216
|
"""Generates the SPDX document.
|
|
216
217
|
|
|
217
218
|
Example of SPDX document section.
|
|
218
|
-
SPDXVersion: SPDX-2.
|
|
219
|
+
SPDXVersion: SPDX-2.3
|
|
219
220
|
DataLicense: CC0-1.0
|
|
220
221
|
SPDXID: SPDXRef-DOCUMENT
|
|
221
222
|
DocumentName: mbed-targets
|
|
222
|
-
DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.
|
|
223
|
+
DocumentNamespace: http://spdx.org/spdxdocs/spdx-v2.3-3c4714e6-a7b1-4574-abb8-861149cbc590
|
|
223
224
|
Creator: Person: Anonymous ()
|
|
224
225
|
Creator: Organization: Anonymous ()
|
|
225
226
|
Creator: Tool: reuse-0.8.0
|
|
@@ -231,57 +232,61 @@ class SpdxDocument:
|
|
|
231
232
|
Returns:
|
|
232
233
|
the corresponding document
|
|
233
234
|
"""
|
|
234
|
-
from spdx.
|
|
235
|
-
from spdx.
|
|
236
|
-
from spdx.
|
|
237
|
-
from spdx.
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
doc.name = determine_spdx_value(self.document_name)
|
|
242
|
-
doc.namespace = determine_spdx_value(self.document_namespace)
|
|
243
|
-
doc.spdx_id = "SPDXRef-DOCUMENT"
|
|
244
|
-
doc.comment = determine_spdx_value(
|
|
245
|
-
"This document was created automatically using available project and dependency information."
|
|
246
|
-
)
|
|
247
|
-
doc.data_license = License.from_identifier("CC0-1.0")
|
|
248
|
-
doc.creation_info.add_creator(Person(self.author, self.author_email))
|
|
235
|
+
from spdx_tools.spdx.model.actor import Actor, ActorType
|
|
236
|
+
from spdx_tools.spdx.model.annotation import Annotation, AnnotationType
|
|
237
|
+
from spdx_tools.spdx.model.document import CreationInfo, Document
|
|
238
|
+
from spdx_tools.spdx.model.extracted_licensing_info import ExtractedLicensingInfo
|
|
239
|
+
from spdx_tools.spdx.model.relationship import Relationship, RelationshipType
|
|
240
|
+
|
|
241
|
+
creators = [Actor(ActorType.PERSON, self.author, self.author_email or None)]
|
|
249
242
|
if not self._is_dependency:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
243
|
+
creators.append(Actor(ActorType.ORGANIZATION, self.organisation, self.organisation_email or None))
|
|
244
|
+
creators.append(Actor(ActorType.TOOL, self.tool_name))
|
|
245
|
+
created = datetime.now(timezone.utc)
|
|
246
|
+
creation_info = CreationInfo(
|
|
247
|
+
spdx_version=SPDX_VERSION,
|
|
248
|
+
spdx_id="SPDXRef-DOCUMENT",
|
|
249
|
+
name=self.document_name,
|
|
250
|
+
document_namespace=self.document_namespace,
|
|
251
|
+
creators=creators,
|
|
252
|
+
created=created,
|
|
253
|
+
document_comment=(
|
|
254
|
+
"This document was created automatically using available project and dependency information."
|
|
255
|
+
),
|
|
256
|
+
external_document_refs=[ref.generate_external_reference() for ref in self.external_refs],
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
spdx_package = self.generate_spdx_package()
|
|
260
|
+
package = spdx_package.generate_spdx_package()
|
|
261
|
+
files = [file.generate_spdx_file() for file in spdx_package.get_spdx_files() or []]
|
|
262
|
+
relationships = [Relationship("SPDXRef-DOCUMENT", RelationshipType.DESCRIBES, package.spdx_id)]
|
|
263
|
+
relationships.extend(Relationship(package.spdx_id, RelationshipType.CONTAINS, file.spdx_id) for file in files)
|
|
264
|
+
relationships.extend(
|
|
265
|
+
Relationship(package.spdx_id, RelationshipType.DEPENDS_ON, ref.package_spdx_id)
|
|
266
|
+
for ref in self.external_refs
|
|
267
|
+
)
|
|
268
|
+
annotations = []
|
|
253
269
|
if not self._is_dependency:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
270
|
+
annotations.append(
|
|
271
|
+
Annotation(
|
|
272
|
+
spdx_id="SPDXRef-DOCUMENT",
|
|
273
|
+
annotation_type=AnnotationType.REVIEW,
|
|
274
|
+
annotator=Actor(ActorType.PERSON, self.reviewer, self.reviewer_email or None),
|
|
275
|
+
annotation_date=created,
|
|
276
|
+
annotation_comment="Reviewed by the configured project reviewer.",
|
|
258
277
|
)
|
|
259
278
|
)
|
|
260
|
-
|
|
261
|
-
doc.add_review(review)
|
|
262
|
-
|
|
263
|
-
# FIXME with current tooling and specification, only one package can
|
|
264
|
-
# be described in a file and hence, all dependencies are described
|
|
265
|
-
# in separate files. Find out what to do with dependencies when new
|
|
266
|
-
# tools are released as it is not entirely clear in the specification
|
|
267
|
-
spdx_package = self.generate_spdx_package()
|
|
268
|
-
doc.package = spdx_package.generate_spdx_package()
|
|
279
|
+
extracted_licensing_info = []
|
|
269
280
|
if LICENSE_REF_PROPRIETARY in spdx_package.main_licence or LICENSE_REF_PROPRIETARY in spdx_package.licence:
|
|
270
|
-
|
|
271
|
-
proprietary_licence.full_name = "Proprietary licence"
|
|
272
|
-
proprietary_licence.text = "Proprietary licence terms are not included in this SPDX document."
|
|
273
|
-
proprietary_licence.comment = (
|
|
274
|
-
"This is a locally defined licence reference, not an SPDX License List identifier. "
|
|
275
|
-
"See https://spdx.github.io/spdx-spec/v2.3/other-licensing-information-detected/ "
|
|
276
|
-
"for the LicenseRef format; consult the rights holder for the licence terms."
|
|
277
|
-
)
|
|
281
|
+
licence_urls = []
|
|
278
282
|
if LICENSE_REF_PROPRIETARY in spdx_package.main_licence:
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
for url in sorted(
|
|
284
|
+
{
|
|
285
|
+
evidence.get("path", "")
|
|
286
|
+
for evidence in self._package_metadata.licence_evidence
|
|
287
|
+
if evidence.get("kind") == "licence"
|
|
288
|
+
}
|
|
289
|
+
):
|
|
285
290
|
try:
|
|
286
291
|
parsed_url = urlsplit(url)
|
|
287
292
|
except ValueError:
|
|
@@ -291,9 +296,26 @@ class SpdxDocument:
|
|
|
291
296
|
and parsed_url.netloc
|
|
292
297
|
and not any(c.isspace() for c in url)
|
|
293
298
|
):
|
|
294
|
-
|
|
295
|
-
|
|
299
|
+
licence_urls.append(url)
|
|
300
|
+
extracted_licensing_info.append(
|
|
301
|
+
ExtractedLicensingInfo(
|
|
302
|
+
license_id=LICENSE_REF_PROPRIETARY,
|
|
303
|
+
extracted_text="Proprietary licence terms are not included in this SPDX document.",
|
|
304
|
+
license_name="Proprietary licence",
|
|
305
|
+
cross_references=licence_urls,
|
|
306
|
+
comment=(
|
|
307
|
+
"This is a locally defined licence reference, not an SPDX License List identifier. "
|
|
308
|
+
"See https://spdx.github.io/spdx-spec/v2.3/other-licensing-information-detected/ "
|
|
309
|
+
"for the LicenseRef format; consult the rights holder for the licence terms."
|
|
310
|
+
),
|
|
311
|
+
)
|
|
312
|
+
)
|
|
296
313
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
314
|
+
return Document(
|
|
315
|
+
creation_info=creation_info,
|
|
316
|
+
packages=[package],
|
|
317
|
+
files=files,
|
|
318
|
+
relationships=relationships,
|
|
319
|
+
annotations=annotations,
|
|
320
|
+
extracted_licensing_info=extracted_licensing_info,
|
|
321
|
+
)
|