@@ -338,7 +338,7 @@ def discover_pip_sbom_package(sbom_data: dict[str, typing.Any]) -> None:
338
338
"name" : "pip" ,
339
339
"versionInfo" : pip_version ,
340
340
"originator" : "Organization: Python Packaging Authority" ,
341
- "licenseConcluded" : "MIT " ,
341
+ "licenseConcluded" : "NOASSERTION " ,
342
342
"downloadLocation" : pip_download_url ,
343
343
"checksums" : [
344
344
{"algorithm" : "SHA256" , "checksumValue" : pip_checksum_sha256 }
@@ -383,9 +383,11 @@ def main() -> None:
383
383
discover_pip_sbom_package (sbom_data )
384
384
385
385
# 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 )
386
388
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 } " ,
389
391
)
390
392
391
393
# Make a bunch of assertions about the SBOM data to ensure it's consistent.
@@ -422,8 +424,8 @@ def main() -> None:
422
424
# License must be on the approved list for SPDX.
423
425
license_concluded = package ["licenseConcluded" ]
424
426
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' "
427
429
)
428
430
429
431
# We call 'sorted()' here a lot to avoid filesystem scan order issues.
0 commit comments