Skip to content

Spdx sanitize ids#9

Draft
Enkas1 wants to merge 4 commits intoWind-River:mainfrom
Enkas1:spdx-sanitize-ids
Draft

Spdx sanitize ids#9
Enkas1 wants to merge 4 commits intoWind-River:mainfrom
Enkas1:spdx-sanitize-ids

Conversation

@Enkas1
Copy link

@Enkas1 Enkas1 commented Aug 8, 2025

Depends on #8

This change introduces sanitization of SPDX IDs to ensure they conform to the SPDX 2.2 specification by replacing invalid characters.

Added sanitize_spdx_id() function in lib/oe_sbom/sbom.py. This function strips out any characters not in [a-zA-Z0-9.-].

Updated SPDX ID generation in create-spdx-2.2.bbclass to wrap the following in sanitize_spdx_id():

  • get_package_spdxid(...)
  • get_packaged_file_spdxid(...)

Enkas1 and others added 4 commits August 8, 2025 11:49
Change from : to _ 
-            pkg_name = d.getVar("PKG:%s" % package) or package
+           pkg_name = d.getVar("PKG_%s" % package) or package
@Enkas1 Enkas1 mentioned this pull request Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant