Security Checklist
Use this checklist when changing authentication, authorization, data access, or deployment configuration. It records the safeguards this repository actually has and the gaps an application owner must close before production.
Existing Safeguards
- The browser uses one public origin. The web worker forwards API requests over a service binding, so the default deployment needs no CORS policy.
- Better Auth validates its own requests against
APP_ORIGIN; sessions use HTTP-only cookies. protectedProcedurerejects requests without both a session and user.- Better Auth, authorization, billing, and read-after-write paths use the uncached database binding. Cached reads are opt-in and may be 75 seconds old with the default Hyperdrive settings.
- API responses pass through Hono's
secureHeaders()middleware. Static web assets have a CSP and other headers inapps/web/public/_headers. - Wrangler requires
BETTER_AUTH_SECRETandRESEND_API_KEYbefore a deployed API version is accepted. Optional integrations validate complete credential sets at their feature boundary. - CI runs formatting, linting, type checking, tests, builds, and Terraform validation. Application deployment remains disabled in the starter kit until credentials are configured.
The auth-hint cookie is routing metadata, not authentication. A protected route must always trust the Better Auth session from the API, never the hint.
Code Review
Inputs and outputs
Authentication and authorization
Browser and API boundaries
Before Deployment
Configuration
Edge controls
Repository and operations
Verification
Run the repository checks before deployment:
bash
bun prettier --check .
bun lint
bun typecheck
bun run test -- --run
bun web:check
bun docs:build
terraform fmt -check -recursive infra/Then test the deployed environment:
See Authentication, Cloudflare deployment, Production database, and the incident playbook for the corresponding procedures.