2.7 KiB
2.7 KiB
Graph Revision ID (Merkle root over SBOM + edges + policies + tool versions)
Module
Attestor
Status
VERIFIED
Description
Content-addressed graph revision IDs and Merkle root computation are implemented via the GraphRoot library with dedicated attestor, models, and SHA-256-based Merkle root computation.
Implementation Details
- Merkle Root Computer:
src/Attestor/__Libraries/StellaOps.Attestor.GraphRoot/Sha256MerkleRootComputer.cs-- computes SHA-256 Merkle roots over sorted leaf hashes (SBOM components, edges, policies, tool versions). ImplementsIMerkleRootComputer.cs. - Graph Root Attestor:
GraphRootAttestor.cs-- creates DSSE-signed in-toto attestations of computed Merkle roots. ImplementsIGraphRootAttestor.cs. - Graph Root Predicate:
Models/GraphRootPredicate.cs-- in-toto predicate containing the Merkle root hash, graph type, leaf count, and computation timestamp. - Attestation Request:
Models/GraphRootAttestationRequest.cs-- request model specifying which graph type and leaves to include. - Attestation Result:
Models/GraphRootResults.cs-- result containing the signed attestation envelope and Merkle root. - Graph Type:
GraphType.cs-- enum: ResolvedExecutionGraph, ReachabilityGraph, DependencyGraph, ProofSpine, EvidenceGraph. - Options:
GraphRootAttestorOptions.cs-- configuration for signing key, predicate type URI. - DI Registration:
GraphRootServiceCollectionExtensions.cs-- registers graph root services. - Content-Addressed IDs:
__Libraries/StellaOps.Attestor.ProofChain/Identifiers/ContentAddressedIdGenerator.Graph.cs-- generates graph-scoped content-addressed IDs. - Tests:
__Tests/StellaOps.Attestor.GraphRoot.Tests/
E2E Test Plan
- Compute a Merkle root via
Sha256MerkleRootComputerover a set of SBOM component hashes and verify the root is deterministic (same inputs = same root) - Change one leaf hash and verify the Merkle root changes
- Create a
GraphRootAttestationRequestfor aReachabilityGraphand verifyGraphRootAttestorproduces a signed DSSE envelope with the correct predicate type - Verify
GraphRootPredicatecontains the expected Merkle root, leaf count, and graph type - Compute roots for two different
GraphTypevalues with the same leaves and verify the roots differ (graph type is included in hashing) - Recompute a Merkle root from the same inputs and verify it matches the attested value (offline verification)
- Verify the DSSE envelope signature via the verification pipeline
Verification
| Check | Result |
|---|---|
| Tier 0 - Source Verification | PASS |
| Tier 1 - Build + Code Review | PASS |
| Tier 2 - Behavioral Verification | PASS |
| Verified Date | 2026-02-13 |
| Run ID | run-001 |