Trey t
c77ff07ce9
fix(security): remediate 2026-05-12 audit findings (Stages 2–5)
...
Backend CI / Test (push) Has been cancelled
Backend CI / Contract Tests (push) Has been cancelled
Backend CI / Lint (push) Has been cancelled
Backend CI / Secret Scanning (push) Has been cancelled
Backend CI / Build (push) Has been cancelled
Remediation of the 2026-05-12/13 audits (78 findings + cluster gaps),
tracked in deploy-k3s/SECURITY.md, plus fixes from two independent
post-remediation reviews.
Auth & sessions:
- SHA-256 hashed auth-token storage (C1); prior-token cache eviction on
re-login (MEDIUM-1)
- local Google JWKS verification, iss/aud/exp checks (C2/C3)
- constant-time login + generic errors (L1/LIVE-L11/LIVE-L13)
- per-account login lockout keyed on distinct source IPs (M5/MEDIUM-3)
- verified-email gating, login rate limiting (LIVE-L19, H1-H3)
IAP & webhooks:
- Apple/Google cross-account replay protection (C5/C6/C10/C13, H5/H6)
- migrations 000003-000006 (token hashing, IAP replay, audit_log +
webhook_event_log table creation, append-only audit log)
Authorization & races:
- file-ownership owner-OR-member fix (C7), atomic share-code join
(C9/H9), device-token reassignment (C8/LOW-3)
Secrets & deploy:
- secrets file-mounted at /etc/honeydue/secrets, not env (F8); Redis
password out of the ConfigMap (HIGH-1); B2 keys reconciled
- digest-pinned images, admin ingress hardening, CSP/HSTS, /metrics
lockdown; kubeconfig 0600, etcd secrets-encryption, fail2ban +
unattended-upgrades at provision; secret-rotation runbook
Build, vet, and the full test suite (incl. -race) pass; the goose
migration chain is verified against PostgreSQL 16.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-16 22:28:33 -05:00
Trey t
4976eafc6c
Rebrand from Casera/MyCrib to honeyDue
...
Total rebrand across all Go API source files:
- Go module path: casera-api -> honeydue-api
- All imports updated (130+ files)
- Docker: containers, images, networks renamed
- Email templates: support email, noreply, icon URL
- Domains: casera.app/mycrib.treytartt.com -> honeyDue.treytartt.com
- Bundle IDs: com.tt.casera -> com.tt.honeyDue
- IAP product IDs updated
- Landing page, admin panel, config defaults
- Seeds, CI workflows, Makefile, docs
- Database table names preserved (no migration needed)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-07 06:33:38 -06:00
Trey t
72db9050f8
Add Stripe billing, free trials, and cross-platform subscription guards
...
- Stripe integration: add StripeService with checkout sessions, customer
portal, and webhook handling for subscription lifecycle events.
- Free trials: auto-start configurable trial on first subscription check,
with admin-controllable duration and enable/disable toggle.
- Cross-platform guard: prevent duplicate subscriptions across iOS, Android,
and Stripe by checking existing platform before allowing purchase.
- Subscription model: add Stripe fields (customer_id, subscription_id,
price_id), trial fields (trial_start, trial_end, trial_used), and
SubscriptionSource/IsTrialActive helpers.
- API: add trial and source fields to status response, update OpenAPI spec.
- Clean up stale migration and audit docs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-05 11:36:14 -06:00
Trey t
7690f07a2b
Harden API security: input validation, safe auth extraction, new tests, and deploy config
...
Comprehensive security hardening from audit findings:
- Add validation tags to all DTO request structs (max lengths, ranges, enums)
- Replace unsafe type assertions with MustGetAuthUser helper across all handlers
- Remove query-param token auth from admin middleware (prevents URL token leakage)
- Add request validation calls in handlers that were missing c.Validate()
- Remove goroutines in handlers (timezone update now synchronous)
- Add sanitize middleware and path traversal protection (path_utils)
- Stop resetting admin passwords on migration restart
- Warn on well-known default SECRET_KEY
- Add ~30 new test files covering security regressions, auth safety, repos, and services
- Add deploy/ config, audit digests, and AUDIT_FINDINGS documentation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-02 09:48:01 -06:00