feat(provenance): emit deterministic SPDX and CycloneDX SBOMs
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s

- New Provenance::Sbom module generating SPDX 2.3 / CycloneDX 1.5 from lockfile packages + BuildGraph outputs
- Wire vbs build|test --sbom FILE --sbom-format spdx|cyclonedx
- Register the module in CMake, build.cpp and the self-host recipe
- Ed25519 signing requested upstream as Void/Library#36 (VL-014)
- Verified in Docker GCC 16: 8/8 CTest suites; deterministic JSON unit test + CLI SBOM assertion
This commit is contained in:
faumaray committed 2026-12-03 13:20:31 +03:00
1 parent 2970fbe25c
commit 55ea305528
13 files changed
+403 -8

No files matched your search

+18
View File
@@ -173,6 +173,24 @@ declared by a root `workspace.cpp`:
Full suite after the change: **8 / 8 CTest suites passed** in 800.22 s (`vbs_v1_tests`
170.33 s, `vbs_registry_tests` 36.82 s, `vbs_selfhost_tests` 568.05 s).
## Track D3 SBOM Provenance in Docker (2026-12-03)
`src/Provenance/Sbom.cpp` emits deterministic SPDX 2.3 and CycloneDX 1.5 JSON from lockfile
packages plus `BuildGraph` target outputs, wired as
`vbs build|test --sbom FILE --sbom-format spdx|cyclonedx`. The document namespace/serial is
derived from the input content and the timestamp from the reproducibility epoch, so identical
inputs are byte-equal.
- `FullV1Tests.sbom_spdx_and_cyclonedx_are_deterministic_and_valid_json`: both formats parse as
strict JSON, contain the package/file entries, and repeated generation is byte-identical.
- The workspace CLI test runs `vbs build --member app --sbom app.cdx.json --sbom-format cyclonedx`
and verifies the emitted file contains CycloneDX.
- Full suite: **8 / 8 CTest suites passed** in 471.56 s.
Ed25519 package/binary signing is **not** implemented: `Void::Crypto` has no Ed25519 primitive.
It is requested upstream as [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36)
(`VL-014`) rather than faked with a weaker scheme.
## Limits and Unrun Checks
1. **HTTPS git fetch**: the host shell is proxy-restricted, but the Docker container could clone `https://git.faumaray.com/Void/VoidLibrary.git`; the pinned commit `3e254055e081a104f08df68dde39711bc7813518` was fetched directly for the verification above. A separate configure against the local `/home/faumaray/Projects/Library` checkout via `VBS_VOID_SOURCE_DIR` also succeeded (development-only override, checkout unmodified).