fix: point SBOM generation at build/ not the zip - #23
Merged
Merged
Conversation
anchore/sbom-action treats its `path` input as a directory (it prepends `dir:` internally when invoking syft). Pointing it at `dist/github-token-broker.zip` failed because syft tried to scan the zip as if it were a directory and errored out. Scan `build/` instead — it contains just the `bootstrap` Go binary, which is exactly what we want the SBOM to describe. Syft resolves Go module dependencies directly from the binary's embedded build info. The subject of the SBOM attestation remains the zip (`dist/github-token-broker.zip`), which is correct — the attestation ties the SBOM predicate to the distributable artifact's digest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
anchore/sbom-action treats its `path` input as a directory (prepending `dir:` when invoking syft). Pointing at the zip produced `ERROR could not determine source` during the first release.yml run.
Fix: scan `build/` instead. That directory contains just the `bootstrap` Go binary, which is what the SBOM should describe. Syft resolves Go module deps directly from the binary's embedded build info.
The SBOM attestation's subject remains the zip (`dist/github-token-broker.zip`), correctly tying the SBOM predicate to the distributable artifact's digest.
Test plan
🤖 Generated with Claude Code