Repository navigation
Define the portable sbom contract, without a generator - #10
Merged
Merged
Conversation
An SBOM is the clearest case of a check whose contract is portable while its implementation cannot be, so this template defines the contract and ships no generator: a `sbom` target in the `ci` chain, output under the gitignored artifacts directory, published by the CI stubs beside the test and coverage reports. Nothing portable can produce the document itself. An SBOM's substance is the *resolved* dependency graph, which only exists inside an ecosystem's resolver — NuGet's project.assets.json, a package-lock.json, a populated virtualenv. A repo-level tool either shells out to those resolvers or parses manifests and guesses, and guessing gets transitive and conditionally-referenced packages wrong. Standardising one generator here would also force its toolchain onto every project made from this template, which is what the Requirements list exists to avoid. This repository gets no `sbom` target of its own on purpose: it ships no artifact. Its only dependencies are pre-commit and the rev-pinned hook repos, so an SBOM of it would inventory a developer toolchain nobody deploys. Also records two decisions that are easy to get wrong: generate from the build output rather than the source tree, and treat a per-pull-request SBOM (a drift detector) as a different artifact from a release SBOM (which wants attaching and attesting).
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.
Documentation only. Adds a
sbomconvention under Extendingmake cifor yourproject, and deliberately ships no generator.
The split
sbomtarget, in thecichain, after whatever buildsWhy no generator here
An SBOM's substance is the resolved dependency graph, and that graph only exists
inside an ecosystem's resolver — NuGet's
project.assets.json, apackage-lock.json,a populated virtualenv. Anything repo-level either shells out to those resolvers
anyway or parses manifests and guesses, and guessing gets transitive and
conditionally-referenced packages wrong.
There is also a concrete objection specific to this template: the obvious generator is
a .NET tool, and standardising on it would drag the .NET SDK into the Requirements list
for every non-.NET project created from here.
And this repository ships no artifact. Its only dependencies are
pre-commitand therev-pinned hook repos — a developer toolchain nobody deploys — so an SBOM of it would
inventory something that is never shipped. Documenting the seam is the useful thing;
filling it is not.
Also recorded
drift detector, the second describes a released artifact and wants attaching and
attesting.
dotnet-templateimplements this contract for .NET (SPDX 2.2 via Microsoft'ssbom-tool) and is linked as a worked example.