Skip to content

0.8.1 — proof packs bind through erased payloads

Latest

Choose a tag to compare

@Therealdk8890 Therealdk8890 released this 29 Jul 00:23
7350486

A bug fix, and one that anyone integrating an external trace almost certainly hit.

Proof packs now bind artifacts recorded through AnyTraceableEvent

AnyTraceableEvent carries its domain payload as a JSON string under rawJSON, so an event recorded through it encodes as:

{"priorityValue": …, "rawJSON": "{…}", "typeIdentifier": …}

The binding search walks parsed objects, so a role/sha256 pair living inside that string was unreachable, and every artifact in such a trace failed with artifactNotBound. DProvenanceKit's own erasure type silently defeated DProvenanceKit's own proof packs.

This is not an edge case. Any consumer that ingests an external trace — rather than recording typed events directly — hit it: a perfectly well-formed, correctly signed trace could never produce a usable pack. The verifier now unwraps exactly this shape before searching.

The restriction is the security boundary

Unwrapping is deliberately limited to AnyTraceableEvent's exact three-key shape, not "any string that parses as JSON." An application that echoes user-controlled text into its trace must never thereby sign a role/digest pair it did not intend to vouch for.

The change only ever reaches bytes already covered by the signature, and it does not weaken v2 role binding — relabelling an artifact after signing, or substituting its bytes, still fails. It makes strictly more packs verify and none fewer, so a pack that verified before still verifies.

Covered by ProofPackErasedPayloadTests, including a test asserting that a string which merely parses as JSON does not become binding material.


Install: .package(url: "https://github.com/Therealdk8890/DProvenanceKit", from: "0.8.1")

Public beta — APIs may continue to evolve before 1.0. Full detail in CHANGELOG.md.