feat(reports): Signed badge + offline Verify on the report detail (A4b)#637
Merged
Conversation
Reports A4b (frontend) - completes signing from A4a. The report detail
shows a Signed badge and an offline Verify action.
- A verifyReport helper checks a signed report entirely in the browser:
fetch GET /api/v1/reports/signing-key, re-hash the canonical JSON face
(export?format=json) with SHA-256 and compare to content_sha256
(content integrity), then Ed25519-verify the signature via Web Crypto
over the same domain-separated payload the server signs
("openwatch/report-snapshot/v1\n" + content_sha256). The Ed25519 step
degrades gracefully where Web Crypto lacks it (content hash still
verified); an ephemeral dev key is disclosed in the result.
- The detail header shows a green Signed badge (key id on hover) and a
Verify control, both gated on report.signature; the verify result
(verified / failed / content-only) renders in the modal body.
- All Web Crypto inputs are ArrayBuffers to avoid the TS 5.7
Uint8Array<ArrayBufferLike> BufferSource mismatch.
SDD: frontend-reports v1.4.0 (C-07 + AC-08, source inspection).
schema.d.ts regenerated for the signing fields + endpoint. tsc/eslint/
prettier clean; reports vitest 8/8; full frontend suite 327; specter
frontend-reports 8/8 (100%). This completes Phase A of the reports
build-out.
remyluslosius
added a commit
that referenced
this pull request
Jun 21, 2026
Reconciles the docs with the merged reports build-out. - BACKLOG.md: the Reports entry flips Planned -> Phase A shipped (P1->P2), summarizing A1-A4b and the production signing-key op note; remaining work scoped to Phases B-D (OSCAL/CSV, async+scheduling, other kinds). - reports_design.md: a STATUS banner on §11 records Phase A as shipped and the two in-flight plan adjustments (coverage shipped before the structural migration; A3/A4 split backend/frontend). - SESSION_LOG.md: a Phase A handoff entry (per-PR summary, the live verification result, Phases B-D next, and the dev-serve / ephemeral-key gotchas).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reports A4b (frontend) — completes signing from A4a, and finishes Phase A of the reports build-out. The report detail gains a Signed badge and an offline Verify action.
What
verifyReporthelper checks a signed report entirely in the browser:GET /api/v1/reports/signing-keyfor the public key;export?format=json) with SHA-256 and compare tocontent_sha256(content integrity);"openwatch/report-snapshot/v1\n" + content_sha256).report.signature; the result (verified / failed / content-only) renders in the modal body.ArrayBuffers to sidestep the TS 5.7Uint8Array<ArrayBufferLike>/BufferSourcemismatch.This mirrors A4a's offline-verification contract exactly, so the UI is a faithful client of the signing-key endpoint.
SDD
frontend-reportsv1.4.0 — C-07 + AC-08 (source inspection of the verify helper + the Signed badge / Verify control).schema.d.tsregenerated for the signing fields + endpoint.Validation
tsc / eslint / prettier clean; reports vitest 8/8; full frontend suite 327; specter frontend-reports 8/8 (100%).
This completes Phase A (A1 scope → A2 coverage → A3a snapshots → A3b PDF → A3b-2 download → A4a signing → A4b verify).