Provenance Signing
This skill creates a portable provenance package for a completed Spotlight case. It does not replace Spotlight verification. It makes the case artifacts tamper-evident and gives Noosphere C2PA a clear signing contract.
Use it after the Investigation gate readiness criteria pass and before the final HTML review/report artifact is delivered.
What Gets Signed
Spotlight signs the investigation package, not isolated web fetches:
summary.mddata/findings.jsondata/fact-check.jsondata/source-expressions.json, for activated casesdata/evidence-bundle.jsondata/investigation-log.jsonreview.html, when present- finalized report artifacts, when present
Legacy cases keep the generated manifest at:
{CASE_DIR}/data/provenance-manifest.json
For an activated findings contract (schema_version: "1.1"), that path is a
derived current pointer. The immutable manifest bytes are stored at:
{CASE_DIR}/data/provenance-manifests/PM-<revision-hash>.json
Each revision records its input-set hash and parent revision/input-set hashes. Claim entries include the exact source-expression IDs, expression/finding/link fingerprints, relation, anchor hash, and original artifact hash used by the fact-check at that revision. This proves integrity and traceability, not that the passage semantically entails the finding.
Credentials Boundary
Signing needs a Noosphere API key with the sign scope, sent as the X-API-Key
header from NOOSPHERE_PROVENANCE_API_KEY. The signing credential itself is
configured on the Noosphere side and never reaches the case directory.
Model this distinction explicitly:
requires_api_key: truerequires_signing_credential: truecredential_id: optional identifier passed to the signer
Never store private keys, certificates, API keys, bearer tokens, or signing secrets in the case directory.
Build Only
For a local unsigned package:
textexecute-shell("scripts/spotlight-python scripts/build-provenance-manifest.py {CASE_DIR}")
For a legacy case this writes the existing unsigned 1.0 manifest. For an activated case it creates one immutable unsigned revision and advances the current pointer. Repeating the command with unchanged inputs reuses the same revision.
Before delivering or signing an existing manifest, check that findings, fact-check, source expressions, review, and report inputs have not changed:
textexecute-shell("scripts/spotlight-python scripts/build-provenance-manifest.py {CASE_DIR} --check-current")
The command exits non-zero and marks an activated pointer stale on any input
or revision-byte mismatch. Rebuild to create a child revision; never edit a
revision file in place.
Optional Noosphere Signing
If a Noosphere C2PA signer endpoint is available:
textexecute-shell("scripts/spotlight-python scripts/build-provenance-manifest.py {CASE_DIR} --sign-endpoint \"$NOOSPHERE_C2PA_URL\" --credential-id \"$NOOSPHERE_C2PA_CREDENTIAL_ID\" --artifact review.html")
The signing request carries this body. NOOSPHERE_PROVENANCE_API_KEY is sent
as X-API-Key only to https://platform.noosphere.tech; with the key set, a
custom endpoint is refused rather than handed the key. The key is read from the
environment only, never from a command-line flag. In sensitive mode the helper
does not contact the signer and writes the unsigned manifest.
json{ "profile": "spotlight", "artifact_path": "review.html", "provenance_manifest": {}, "credential_id": "optional signer credential id" }
The response follows the Noosphere provenance contract 1.x
(https://platform.noosphere.tech/openapi.yaml): it returns the signed
record_b64, its content_hash, the C2PA sidecar as c2pa_manifest_b64, and
echoes profile and input_set_hash unchanged.
The helper checks every response before keeping it: contract_version is 1.x,
status is signed, profile and input_set_hash match what was sent,
content_hash matches the decoded record_b64 bytes, record_b64 decodes to
record, every artifact, claim and source sent appears unchanged in the
signed record, the sidecar is valid base64, and certificate_chain.grade is
production. It never follows a redirect and refuses responses over 32 MB.
A response that fails any check, or an HTTP error (401 key rejected, 403
missing sign scope, 413, 422, 429 with its retry delay, 503 no production
chain), records signing_failed with the reason.
A response that passes is then verified locally: c2patool checks the C2PA
sidecar over the record bytes against the pinned C2PA trust list
(integrations/noosphere-c2pa/c2pa-trust-list.pem). Only a Trusted result
marks the package signed. Otherwise, including when c2patool is not
installed, the receipt is kept with receipt_status: received_unverified, the
package stays unsigned, and signing.verification records why.
For activated cases receipts are immutable and content-addressed under:
{CASE_DIR}/data/provenance-signing-receipts/
The current pointer records the applicable receipt. A repeated signing command
for a revision that already has a receipt does not call the signer again.
Legacy cases retain data/provenance-signing-receipt.json for compatibility.
Report Language
In summaries and HTML reports, describe the result carefully:
- Correct, once a package is
signed: "The investigation package and verification trail were signed and can be checked for later tampering." - Correct, with
receipt_status: received_unverified: "A signing receipt was received from Noosphere; it has not been verified locally." - Incorrect: "C2PA proves the investigation is true."
Truth still depends on Spotlight evidence, independent fact-checking, and editorial review.
Failure Handling
If signing fails, keep the unsigned immutable revision and continue the review
flow. Activated cases append a deduplicated failure record under
data/provenance-signing-attempts/; retrying never overwrites a revision,
receipt, or earlier attempt. Report:
- endpoint attempted,
- whether a credential id was provided,
- exact error string from the current pointer,
- that the case remains editorially reviewable but unsigned.
If a signing retry succeeds, the pointer advances to the immutable receipt and prior failed-attempt records remain historical evidence. If case inputs change after signing, the signed revision and receipt remain untouched; the current pointer becomes stale until a new child revision is built.


