mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-15 07:06:15 +00:00
Adds a "Download diagnostic report" button on the Health tab that
produces an age-encrypted .age file the user can attach to a GitHub
issue without exposing sensitive data.
Archive contents (tar.gz, then age-encrypted with the maintainer's
SSH ed25519 public key):
- diagnostic.json structured health/device summary (no secrets)
- datastore/…/*.xml raw on-disk XML verbatim for diff vs HTTP
- http/service/… live service HTTP responses per account/device
- http/speaker/… live speaker API responses (port 8090)
- ssh/speaker/… CA bundles + logread (last 20 min, 127.0.0.1
filtered) + dmesg fetched via SSH
- system/ca.pem service CA cert
- system/resolv.conf host DNS resolver config
- settings.json service settings (OAuth secrets redacted)
- env.txt filtered process environment
- logs/service.txt in-memory service log buffer
Supporting tooling:
- scripts/setup-diagnostic-key.sh one-time SSH key-pair generation
- scripts/decrypt-diagnostic.go go run helper for maintainer decryption
- keys/public/diagnostic.pub committed public key (matches github.com/gesellix.keys)
- docs/DIAGNOSTIC-EXPORT.md maintainer setup + user workflow guide
- docs/concepts/ENCRYPTED-EXPORT.md research notes and architecture rationale
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
580 B
Go
21 lines
580 B
Go
package export
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"filippo.io/age/agessh"
|
|
)
|
|
|
|
// TestDiagnosticPublicKeyParseable ensures the embedded diagnostic.pub is a
|
|
// valid SSH public key that age can use as a recipient. Catches a truncated or
|
|
// corrupted embed before it reaches a user trying to send a report.
|
|
func TestDiagnosticPublicKeyParseable(t *testing.T) {
|
|
key := diagnosticPublicKey()
|
|
if key == "" {
|
|
t.Fatal("embedded diagnostic.pub is empty")
|
|
}
|
|
if _, err := agessh.ParseRecipient(key); err != nil {
|
|
t.Errorf("embedded diagnostic.pub is not a valid age SSH recipient: %v", err)
|
|
}
|
|
}
|