Closes #93.
Why
A release attached binaries, packages and SHA256SUMS, but not the component
list they were built from. Someone matching an advisory against a downloaded
binary had to check out the tag and rebuild the module graph by hand.
What changed
.vole/workflows/release.yamlgains ansbomstep between the package build and the checksums. It runscyclonedx-gomodpinned at v1.9.0, the waynfpmandgovulncheckare pinned, so a local run and a release run name the same components. It reads the module graph, so it needs neither a compiled binary nor either cross compiler.- The build clock is removed from the file.
cyclonedx-gomodstampsmetadata.timestampfrom the wall clock, which would make every build of one tag differ. The step rewrites it fromSOURCE_DATE_EPOCH, the tag’s commit time, and then greps for the result: a substitution that matched nothing fails the job instead of shipping the clock. - Checksums are now their own step, after the SBOM, so
SHA256SUMScovers it:dist/vole-<version>.sbom.cdx.json. - The SBOM is a release artifact (
release: true), so it appears on the release page beside the packages. docs/releases.mdgains A bill of materials for each release: what it covers, how to regenerate it, and the two limits below.
Verification
vole workflow run releasein the pinned image, against a throwaway local tag: all steps pass, the SBOM lands at 22 components, the checksum file names it, and the run endsok: 1 job(s). The tag was deleted afterwards.- Same tag, SBOM step run twice: byte-identical, timestamp pinned to the commit time, no serial number.
go list -depsfor./cmd/voleundergoarch=amd64andgoarch=arm64hashes to the same module set, which is what justifies one file for both architectures.vole workflow run verify: all steps green, 0 reachable vulnerabilities.
What it does not cover
Two limits are written into the docs rather than papered over:
- The system SQLite library is not a Go module. The SBOM names
github.com/mattn/go-sqlite3, the binding, not thelibsqlite3-0version underneath.dpkg -s voleandrpm -q --requires voleanswer that for the installed system. Putting the library in the BOM needs a second component merged in —python3in the release image plus a post-processor, orcyclonedx-cli mergeas another pinned tool. Left out deliberately; see the comment on #93. - Licences are CycloneDX evidence, not assertions. The detector reports what it finds (10 MIT, 5 BSD-3-Clause, 2 Apache-2.0, 4 BSD-Source-Code) without claiming it is correct. #95 can build its allowlist on that output instead of adding another scanner.