Scope: local/demo WalletOps Companion — Flutter client + Go API + Postgres. No real custody or production PII.
- User credentials (email/password hash)
- JWT access + refresh tokens
- Webhook shared secret
- Event payloads (simulated wallet ops data)
- AI prompt/response audit rows
| Threat | Control in MVP |
|---|---|
| Forged partner webhooks | HMAC-SHA256 over raw body (X-Signature: sha256=<hex>); reject bad sigs with 401 |
| Replay / duplicate ingest | Unique (user_id, idempotency_key); replay returns same event |
| Double-processing under two workers | FOR UPDATE SKIP LOCKED on claim |
Crash while processing |
claimed_at lease; stale rows are reclaimable |
| Stolen device tokens | flutter_secure_storage; short access TTL; refresh rotation on use |
| Prompt injection via payload | Summarize prompt uses allowlisted fields only (type, amount, status, rule name) |
| Cross-user event access | Ownership checks on event IDs for list/detail/summarize |
| Secret leak in git | .env gitignored; .env.example only |
SSO, device binding, WAF, production rate limits, multi-tenant RBAC, real on-chain keys.
Demo secrets in compose defaults are for local use only. Rotate before any shared deploy. Mock AI avoids network exfiltration in default config (AI_PROVIDER=mock).