Insight
Web security basics before you launch
A pre-launch security checklist for product websites and web apps — auth, headers, secrets, uploads, and the mistakes that show up in the first week of traffic.
- Security
- Web
- Software
- Production
Framing note: Launch-gate security notes for marketing sites and authenticated web apps. Illustrative TriXCore guidance — not a penetration-test report.
Security work that waits until “after launch” becomes incident response. You do not need a red team on day one; you do need the boring controls that stop the obvious attacks.
Auth and sessions
- Prefer battle-tested auth (OIDC / session libraries) over hand-rolled JWT spaghetti
- HttpOnly, Secure cookies; short-lived access tokens; rotatable refresh
- CSRF protection on cookie-based mutating requests
- Lock down password reset, invite, and magic-link flows — these are favorite takeover paths
- Rate-limit login, signup, and password reset by IP and account
“We only have a marketing site” still needs form abuse protection and admin panel lockdown if a CMS exists.
Headers and transport
On every public origin:
- HTTPS only, HSTS once you are sure
- Sensible
Content-Security-Policy(start report-only, then enforce) X-Content-Type-Options: nosniff, frame protections as appropriate- Separate cookie domains / paths so a blog XSS cannot casually read app session cookies
Misconfigured CORS (Access-Control-Allow-Origin: * with credentials) is still a classic own-goal.
Secrets and config
- No API keys in the client bundle, repo history, or screenshot of
.env - Server-only secrets in the host / vault; rotate when people leave
- Different credentials per environment — staging should not hold production keys
- Signed webhooks with timestamp skew checks; reject replayed bodies
Inputs that hurt
Treat every input as hostile:
- Validate on the server with a schema (types, lengths, enums)
- Parameterized queries / ORM — never string-built SQL
- Sanitize or strictly allowlist HTML if you ever render user content
- File uploads: type sniffing, size caps, virus scan where risk warrants, store outside the web root
- SSRF: do not let users supply arbitrary URLs your server will fetch
Production launch gate
Before DNS cutover:
- Dependency audit on critical packages; pin versions
- Admin surfaces behind SSO or strong MFA
- Error pages that do not leak stack traces
- Backup + restore drill for the database you actually use
- Who gets paged, and how you revoke a leaked key in under 15 minutes
Security is product work. Ship the checklist with the same seriousness as the homepage hero.