feat(provenance): emit deterministic SPDX and CycloneDX SBOMs
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
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:
1 parent
2970fbe25c
commit
55ea305528
13 files changed
+403
-8
No files matched your search
@@ -20,6 +20,7 @@ Pinned VoidLibrary revision: `3e254055e081a104f08df68dde39711bc7813518` (merged
|
||||
| `VL-011b` | Optional SQLite3 FetchContent (`Void::Sqlite`) | Implemented (`VOID_FETCH_SQLITE3`) | Opportunistic when system `SQLite3` is installed (`VOID_FETCH_SQLITE3=OFF` to keep offline configures fast); journaled atomic CAS store retained |
|
||||
| `VL-012` | Naming consistency observation | Noted | VBS strictly uses `Void::Build`, `PascalCase` types/enums/paths, `snake_case` functions/methods |
|
||||
| `VL-013` | Shorthand SemVer ranges (`^1.0`, `~1.2`, `>=1.2 <2`) in `Void::Semver::parse_range` | Implemented | **Adopted** (`src/Package/Solver.cpp` delegates directly to `Void::Semver::parse_range`) |
|
||||
| `VL-014` | Ed25519 sign/verify primitive (`Void::Crypto`) for package/binary provenance | Not implemented upstream ([Void/Library#36](https://git.faumaray.com/Void/Library/issues/36)) | Pending: D3 signature verification waits on this primitive; VBS emits SPDX/CycloneDX SBOM provenance now |
|
||||
|
||||
---
|
||||
|
||||
@@ -41,3 +42,4 @@ Pinned VoidLibrary revision: `3e254055e081a104f08df68dde39711bc7813518` (merged
|
||||
|
||||
- **`VL-004` / `VL-005` (`Void::Net`)**: `Void::Net` in VoidLibrary still requires external `Boost` + `OpenSSL` (`src/Net/module.cmake`), which are absent in minimal `dev cpp-gcc`. VBS keeps its zero-dependency POSIX loopback `HttpServer` (`registry/service/HttpServer.cpp`) and `RegistryClient` (`src/Package/RegistryClient.cpp`) until a Boost-free/minimal-dependency transport is desired or available in the base toolchain.
|
||||
- **`VL-011b` (`Void::Sqlite`)**: `cmake/VoidDependency.cmake` disables network fetches during CMake configure (`VOID_FETCH_SQLITE3=OFF`) and opportunistically enables `Void::Sqlite` when system `SQLite3` is installed; `src/State/StateStore.cpp` continues providing crash-safe atomic-replace CAS persistence in minimal shells.
|
||||
- **`VL-014` (Ed25519)**: `Void::Crypto` currently exposes only hashing (SHA-256/BLAKE2b). D3 SBOM emission is implemented in `src/Provenance/Sbom.cpp`, but package/binary signature verification is not faked with a weaker scheme: it waits for the upstream Ed25519 primitive requested in [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36).
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Updated: 2026-12-03
|
||||
Branch: main
|
||||
Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B1–B3) + Track E1 + `vbs ide` & `build.cpp` CompDB integration + Track D1/D2 + Track E2 (Docker GCC 16) complete
|
||||
Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B1–B3) + Track E1 + `vbs ide` & `build.cpp` CompDB integration + Track D1/D2 + Track E2 + Track D3 SBOM (Docker GCC 16) complete
|
||||
|
||||
## Completed delivery waves
|
||||
|
||||
@@ -64,9 +64,15 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
|
||||
- Cross-member linking resolves `workspace_dependency("lib").target("core")` to the member's native path provider through `VBS_WORKSPACE_MEMBER_<name>`; `--member <pkg>` and `--changed-since <ref>` select affected members. Member builds do not steal the project-root `compile_commands.json` alias, and path-dependency snapshots exclude generated editor metadata.
|
||||
- **Docker verification**: `FullV1Tests.workspace_members_shared_build_and_member_selection` builds a 3-member workspace (shared library + app + test) with a unified root lockfile, runs the app, selects a single member, and selects by changed file; all 8 CTest suites pass.
|
||||
|
||||
- **Wave 13 (Track D3 SBOM Provenance)**:
|
||||
- Added `include/Void/Build/Provenance/Sbom.hpp` + `src/Provenance/Sbom.cpp` with deterministic SPDX 2.3 and CycloneDX 1.5 JSON generation from lockfile packages and `BuildGraph` target outputs (content-derived namespace/serial and epoch timestamp).
|
||||
- Wired `vbs build|test --sbom FILE --sbom-format spdx|cyclonedx` in `src/Main.cpp`, writing per-profile files when multiple profiles are selected.
|
||||
- Ed25519 package/binary signing remains blocked on an upstream `Void::Crypto` primitive, filed as [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36) and tracked as `VL-014`.
|
||||
- **Docker verification**: `FullV1Tests.sbom_spdx_and_cyclonedx_are_deterministic_and_valid_json` plus a CLI `--sbom` assertion in the workspace test; full CTest suite passes.
|
||||
|
||||
## Remaining future scope
|
||||
|
||||
- **Post-v1 Expansion Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Live `conan` CLI verification (Track B3), Track C (macOS/Windows ports + dual-profile cross-compilation), Track D1/D2 acceptance scenarios (suites pass; cache-hit/benchmark pending), Track D3 (SBOM/signatures), Track E3 (`vbs daemon` local socket server + external editor plugins), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
|
||||
- **Post-v1 Expansion Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Live `conan` CLI verification (Track B3), Track C (macOS/Windows ports + dual-profile cross-compilation), Track D3 signing (SBOM done; upstream Ed25519 pending), Track E3 (`vbs daemon` local socket server + external editor plugins), and Track E4 (`Void::Net`/`Void::Sqlite` alignment) remain planned scope.
|
||||
|
||||
## Environment notes & upstream boundaries
|
||||
|
||||
|
||||
@@ -19,4 +19,5 @@ Base HEAD: `fe0d1a6`
|
||||
| Wave 10 (Track B [B1–B3] + First-Class `vbs ide` Integration) | Native C driver (`CStandard`) & mixed C/C++ CMake/Meson translation (`PerFileOption`); bounded `build.ninja` `CUSTOM_COMMAND` translation (`CustomAction`); foreign CMake `CXX_MODULES` `fileSets` & cross-target `module_bmis` + Clang `default_include_dirs`; `build.cpp` SDK CompDB indexing + `vbs ide generate\|query` | COMPLETE & VERIFIED | `include/Void/Build.hpp`, `Driver.{hpp,cpp}`, `ModuleScanner.{hpp,cpp}`, `Graph.{hpp,cpp}`, `CompDb.{hpp,cpp}`, `Provider.cpp`, `Translator.{hpp,cpp}`, `Watcher.cpp`, `Main.cpp`, `tests/{FullV1Tests.cpp,CliContracts.cmake}`, docs |
|
||||
| Wave 11 (Track D1–D2) | Shared HTTP CAS action cache (`/api/v1/cas/{blobs,actions}`, bearer auth, digest verification, portable action keys, `--remote-cache`) + parallel snapshot revalidation hashing | COMPLETE & VERIFIED (Docker GCC 16.0.1, pinned VoidLibrary, 8/8 CTest suites; D1 cross-build-dir 100% cache hit; D2 5,001-file warm no-op 374 ms) | `include/Void/Build/State/RemoteCache.hpp`, `src/State/RemoteCache.cpp`, `StateStore.{hpp,cpp}`, `Scheduler.cpp`, `Snapshot.cpp`, `registry/service/RegistryService.cpp`, `src/Main.cpp`, `tests/RegistryTests.cpp`, docs |
|
||||
| Wave 12 (Track E2 Workspaces) | `workspace.cpp` member declaration/evaluation, shared root `vbs.lock` + `build/.vbs` CAS, `workspace_dependency()` cross-member native linking, `--member` and `--changed-since` selection | COMPLETE & VERIFIED (Docker GCC 16.0.1, 8/8 CTest suites; 3-member fixture with unified lockfile) | `include/Void/Build.hpp`, `src/Build.cpp`, `Config/Frontend.{hpp,cpp}`, `src/Main.cpp`, `src/Package/Fetch.cpp`, `tests/FullV1Tests.cpp`, docs |
|
||||
| Future (Plan 20 Slice 3 / Tracks C–D, E3 daemon, E4, live `conan`) | Live `conan` CLI verification; macOS/Windows/cross-compile; SBOM/signatures; `vbs daemon`, `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
|
||||
| Wave 13 (Track D3 SBOM) | Deterministic SPDX 2.3 / CycloneDX 1.5 SBOM from `vbs.lock` packages + `BuildGraph` outputs; `vbs build\|test --sbom FILE --sbom-format spdx\|cyclonedx`; Ed25519 signing blocked upstream | SBOM COMPLETE & VERIFIED (Docker GCC 16, 8/8 CTest suites); signing pending [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36) | `include/Void/Build/Provenance/Sbom.hpp`, `src/Provenance/Sbom.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs |
|
||||
| Future (Plan 20 Slice 3 / Tracks C, D3 signing, E3 daemon, E4, live `conan`) | Live `conan` CLI verification; macOS/Windows/cross-compile; signed provenance; `vbs daemon`, `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
|
||||
@@ -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).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 21 — Post-v1 Expansion Roadmap
|
||||
|
||||
Status: Active execution guide (Plans **01–19**, **Plan 20 Slices 1–2C**, **Track A [A1–A3]**, **Track B [B1–B3, except live `conan` CLI container]**, **Track E1**, and **Track E3 IDE config/query tooling** are implemented and verified; **Track D1/D2** are implemented and verified in Docker GCC 16 (D1 cross-build-directory 100% cache hit; D2 5,001-file warm no-op 374 ms); **Track E2 (`workspace.cpp`)** is implemented and verified in Docker GCC 16; **Track C**, **Track D3**, **Track E3 (`vbs daemon`)**, **Track E4**, and live `conan` CLI verification remain planned; see [STATE](../agent-workflow/STATE.md) and [VERIFICATION](../agent-workflow/VERIFICATION.md)).
|
||||
Status: Active execution guide (Plans **01–19**, **Plan 20 Slices 1–2C**, **Track A [A1–A3]**, **Track B [B1–B3, except live `conan` CLI container]**, **Track E1**, and **Track E3 IDE config/query tooling** are implemented and verified; **Track D1/D2** are implemented and verified in Docker GCC 16 (D1 cross-build-directory 100% cache hit; D2 5,001-file warm no-op 374 ms); **Track E2 (`workspace.cpp`)** is implemented and verified in Docker GCC 16; **Track D3** SBOM emission is implemented (Ed25519 signing pending [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36)); **Track C**, **Track E3 (`vbs daemon`)**, **Track E4**, and live `conan` CLI verification remain planned; see [STATE](../agent-workflow/STATE.md) and [VERIFICATION](../agent-workflow/VERIFICATION.md)).
|
||||
|
||||
This roadmap defines five orthogonal expansion tracks for taking VoidBuildSystem from a verified self-hosting Linux C++26 build system into a multi-platform, distributed, daily-driver ecosystem. Each track preserves core architectural invariants: ordinary C++ descriptions, hermetic content-verified snapshots, isolated profiles, immutable CAS publication, and explicit diagnostics over silent approximation.
|
||||
|
||||
@@ -61,7 +61,7 @@ flowchart LR
|
||||
| --- | --- | --- |
|
||||
| **D1 — Shared HTTP Content-Addressed Action Cache (CAS)** *(verified: cross-build-directory 100% cache hit)* | Push/pull action records and output blobs (`PUT/GET /api/v1/cas/blobs/{sha256}`, `/api/v1/cas/actions/{action_key}`) against `vbs-registry` or any compatible HTTP CAS server with bearer auth and digest verification on every read. Action keys are normalized to be build-directory independent; `vbs build/test --remote-cache URL [--remote-cache-token-env VAR]` (or `VBS_REMOTE_CACHE` / `VBS_REMOTE_CACHE_TOKEN`). | Cold CI build populates remote CAS; second clean machine achieves 100% cache hit with verified SHA-256 outputs. |
|
||||
| **D2 — Fast Hashing & Parallel Snapshot Pipeline** *(verified: 5,001-file warm no-op 374 ms)* | Adopt `Void::Crypto` BLAKE2b / hardware-accelerated SHA-256 (when available) + parallel snapshot hashing across `Void::Concurrency::ThreadPool` + optional `Void::Sqlite` indexed state store for >10k-file monorepos. Snapshot capture revalidation now hashes on a bounded thread pool for trees of 32+ files. | Sub-second warm no-op on 5,000-file synthetic benchmark fixture (`vbs_benchmarks`). |
|
||||
| **D3 — Supply-Chain Provenance & Signed Packages** | Emit SPDX/CycloneDX SBOM JSON from `vbs.lock` + `BuildGraph`; optional Ed25519 package & binary signature verification in `vbs publish` and `vbs build --locked`. | Tampered archive or signature fails closed before extraction. |
|
||||
| **D3 — Supply-Chain Provenance & Signed Packages** *(SBOM implemented; signing pending upstream)* | Emit SPDX/CycloneDX SBOM JSON from `vbs.lock` + `BuildGraph` (`vbs build/test --sbom FILE --sbom-format spdx|cyclonedx`, `src/Provenance/Sbom.cpp`); optional Ed25519 package & binary signature verification in `vbs publish` and `vbs build --locked` waits on [Void/Library#36](https://git.faumaray.com/Void/Library/issues/36). | SBOM is deterministic and valid JSON; tampered archive or signature fails closed before extraction (signing gate pending). |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user