MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / attest_report

Function attest_report

atomic-cli/src/commands/triage/output.rs:286–290  ·  view source on GitHub ↗

Sign the report into an attested, frozen JSON artifact. Serializes the report to a JSON object, resolves the person's signing identity + keypair (the same path `provenance show --sign` uses), and attaches an Ed25519 Data Integrity proof via the shared `eddsa-jcs-2022` signer. The returned value is the report Value plus `attributedTo`, `contentHash`, and `proof` — verifiable with [`atomic_canonica

(report: &TriageReport, identity: Option<&str>)

Source from the content-addressed store, hash-verified

284/// `contentHash`, and `proof` — verifiable with
285/// [`atomic_canonical::proof::verify_value`].
286pub fn attest_report(report: &TriageReport, identity: Option<&str>) -> CliResult<Value> {
287 let (identity, keypair) = resolve_person(identity)?;
288 let value = serde_json::to_value(report).expect("triage report serialization is infallible");
289 Ok(attest_value(value, &identity, &keypair))
290}
291
292// ── HTML skin ───────────────────────────────────────────────────────────────
293

Callers 1

render_reportFunction · 0.85

Calls 2

resolve_personFunction · 0.85
attest_valueFunction · 0.85

Tested by

no test coverage detected