feat(raw-export): accept AUDIT-SP's signed audit.raw-export.v1 format

The AUDIT-SP collector (rebrand of the logpile collection tool) now stamps
raw_export.json with format "audit.raw-export.v1" instead of
"logpile.raw-export.v1" and ships a raw_export.sig alongside it, which broke
import entirely ("no parser found for this archive format").

- accept both format strings when parsing a raw-export bundle
- for the audit format, verify raw_export.sig (Ed25519, 64 bytes) against the
  exact bytes of raw_export.json using a trusted public key embedded in the
  binary (keys/audit-signing-public.pem); raw_export.sha256 is not consulted
- reject bundles with duplicate raw_export.json or raw_export.sig entries
- import proceeds even if the signature is missing or invalid, but the result
  is marked unverified rather than silently trusted
- expose GET /api/signature-status and show a "Signed" badge in the header
  when the signature verifies

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail ChusavitinandClaude Sonnet 5 committed 2026-10-08 11:55:42 +03:00
1 parent 28badfc90c
commit 2b0a2cb562
9 files changed
+356 -10

No files matched your search

+1
View File
@@ -92,6 +92,7 @@ func (s *Server) setupRoutes() {
s.mux.HandleFunc("GET /api/firmware", s.handleGetFirmware)
s.mux.HandleFunc("GET /api/parse-errors", s.handleGetParseErrors)
s.mux.HandleFunc("GET /api/privacy-scan", s.handleGetPrivacyScan)
s.mux.HandleFunc("GET /api/signature-status", s.handleGetSignatureStatus)
s.mux.HandleFunc("POST /api/sanitize", s.handleSanitize)
s.mux.HandleFunc("GET /api/sanitize/download", s.handleSanitizeDownload)
s.mux.HandleFunc("GET /api/export/csv", s.handleExportCSV)