Skip to content

Keep SBOM files for layers whose name contains a period - #1766

Merged
jabrown85 merged 1 commit into
buildpacks:mainfrom
arpitjain099:fix/sbom-dotted-layer-name
Nov 20, 2026
Merged

jabrown85 merged 1 commit into
buildpacks:mainfrom
arpitjain099:fix/sbom-dotted-layer-name

Conversation

@arpitjain099

Copy link
Copy Markdown
Contributor

Summary

eachLayer keeps periods in a layer name and ValidateLayerName allows them, but processSBOMFiles rebuilds that name with strings.SplitN(file, ".", 2)[0], which stops at the first period. For a layer called jdk-21.0.2 the bpLayers lookup misses, the bare continue drops jdk-21.0.2.sbom.cdx.json with no error and no log line, and the image exports without that layer's SBOM. Using the final .sbom. instead leaves launch and build resolving as before.

Release notes

SBOM files for layers whose names contain a period are no longer silently dropped.

Context

The new spec returns BOMFiles: nil on main; TestBuild goes from 49 passed and 1 failed to 50 and 0, with go vet and gofmt clean. That function's logger parameter is unused, so a warning there is an easy follow-up.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
arpitjain099 requested a review from a team as a code owner November 20, 2026 12:38
@jabrown85
jabrown85 merged commit 0bc27c7 into buildpacks:main Nov 20, 2026
6 checks passed
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.

2 participants