Skip to content

Commit 4bf4187

Browse files
authored
gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (#115038)
1 parent 13eb521 commit 4bf4187

File tree

2 files changed

+37
-35
lines changed

2 files changed

+37
-35
lines changed

Misc/sbom.spdx.json

+30-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/build/generate_sbom.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def discover_pip_sbom_package(sbom_data: dict[str, typing.Any]) -> None:
338338
"name": "pip",
339339
"versionInfo": pip_version,
340340
"originator": "Organization: Python Packaging Authority",
341-
"licenseConcluded": "MIT",
341+
"licenseConcluded": "NOASSERTION",
342342
"downloadLocation": pip_download_url,
343343
"checksums": [
344344
{"algorithm": "SHA256", "checksumValue": pip_checksum_sha256}
@@ -383,9 +383,11 @@ def main() -> None:
383383
discover_pip_sbom_package(sbom_data)
384384

385385
# Ensure all packages in this tool are represented also in the SBOM file.
386+
actual_names = {package["name"] for package in sbom_data["packages"]}
387+
expected_names = set(PACKAGE_TO_FILES)
386388
error_if(
387-
{package["name"] for package in sbom_data["packages"]} != set(PACKAGE_TO_FILES),
388-
"Packages defined in SBOM tool don't match those defined in SBOM file.",
389+
actual_names != expected_names,
390+
f"Packages defined in SBOM tool don't match those defined in SBOM file: {actual_names}, {expected_names}",
389391
)
390392

391393
# Make a bunch of assertions about the SBOM data to ensure it's consistent.
@@ -422,8 +424,8 @@ def main() -> None:
422424
# License must be on the approved list for SPDX.
423425
license_concluded = package["licenseConcluded"]
424426
error_if(
425-
license_concluded not in ALLOWED_LICENSE_EXPRESSIONS,
426-
f"License identifier '{license_concluded}' not in SBOM tool allowlist"
427+
license_concluded != "NOASSERTION",
428+
f"License identifier must be 'NOASSERTION'"
427429
)
428430

429431
# We call 'sorted()' here a lot to avoid filesystem scan order issues.

0 commit comments

Comments
 (0)