Startups rarely suffer launch-week compromises because an attacker burned an exotic kernel exploit. Incidents happen because someone disabled SSL verification during an API integration on Wednesday, left a .git directory readable under the web root, or shipped an unauthenticated staging subdomain that Google indexed overnight.
Having shipped software since 2017 across 170+ client deliveries—and hardened server operations across a Finnish partner's fleet of 300+ WordPress installations—I treat the final 72 hours before public DNS cutover as a structured verification gate. Half a day of disciplined probing catches the flaws that actually break new products.
1. Lock Down DNS Records and Edge Certificates
Automated crawlers monitor Certificate Transparency feeds continuously. Within moments of issuing an HTTPS certificate for your brand domain, scanners begin enumerating subdomains and probing old endpoints.
Hunt Down Dangling CNAMEs
If your marketing team tested a third-party landing page builder at promo.yourdomain.com, deleted the SaaS trial, and forgot the CNAME record in Cloudflare or Route 53, an outsider can register that same tenant name and serve phishing pages on your domain.
# Audit every DNS record before opening public traffic
dig +noall +answer yourdomain.com ANY
dig +noall +answer staging.yourdomain.com A CNAME
dig +short yourdomain.com CAA
Remove orphaned CNAME entries immediately. Add a CAA record restricting certificate issuance solely to your chosen Certificate Authority (letsencrypt.org or amazon.com), and verify TLS 1.0 and 1.1 remain disabled at the load balancer.
Gate Staging Subdomains Properly
Never rely on an obscure hostname like beta-v2-internal.yourdomain.com for privacy. Protect non-production environments with HTTP Basic Auth or IP allowlists, and pair that with an X-Robots-Tag: noindex, nofollow response header so pre-release builds never leak into search results.
2. Inspect Build Artifacts and Environment Boundaries
Frontend bundlers and misconfigured Nginx blocks quietly leak credentials that backend engineers assume are private.
Strip Source Maps and Debug Tooling
Check whether vite build or next build publishes .js.map files to your public CDN. Source maps expose unreleased feature flags, internal endpoint paths, and proprietary business logic. Configure your bundler to upload maps only to your error tracker (such as Sentry) rather than serving them publicly.
At the same time, verify from an external cellular connection—never your office VPN—that diagnostic tools and dotfiles return 403 or 404:
for uri in "/.env" "/.git/config" "/composer.json" "/telescope" "/horizon" "/_debugbar"; do
status=$(curl -sS -o /dev/null -w "%{http_code}" "https://yourdomain.com${uri}")
printf "%-18s %s\n" "$uri" "$status"
done
Audit Public Prefixes and Git History
Inspect compiled client bundles for accidental secret inclusion (VITE_, NEXT_PUBLIC_, or REACT_APP_ variables containing private tokens). Run gitleaks detect --redact across your commit log; if an API key ever entered git history—even if deleted in a later commit—rotate that credential immediately before launch.
3. Verify Privilege Separation Across Users and Databases
Broken authorization remains the top risk tracked by the OWASP Top Ten, especially when founders rush multi-user dashboards out the door.
| Boundary Layer | Common Startup Oversight | Hardened Launch Baseline |
|---|---|---|
| Tenant / Record Access | Controller checks auth() only, skipping ownership validation |
Enforce policy checks comparing record.account_id === user.account_id on every read/write |
| Role Escalation | Request body accepts role=admin via mass assignment |
Explicitly whitelist permitted fields in form requests or DTO schemas |
| Database Credentials | Web app connects as postgres or schema-owner superuser |
Separate a DML-only runtime role (SELECT, INSERT, UPDATE, DELETE) from migration privileges |
| Session & Token Hygiene | JWTs never expire or cookies omit SameSite flags |
Set HttpOnly, Secure, SameSite=Lax, rotate session IDs on login, and bound token TTLs |
| Cross-Origin Rules | Access-Control-Allow-Origin reflects any incoming Origin |
Maintain a strict static array of approved frontend origins |
Run a Two-Account Replay Test
Open two incognito sessions: Account A (organization admin) and Account B (basic viewer in a different workspace). Trigger sensitive mutations as Account A—exporting invoices, inviting teammates, updating billing emails—copy each request via browser DevTools as curl, replace only the session cookie or Bearer header with Account B's token, and verify the backend refuses every single call with 403.
4. Defend Webhooks, Uploads, and Metered Endpoints
Launch announcements attract automated abuse within hours: carding bots hammering checkout routes, credential stuffers hitting login forms, and spoofed webhook payloads attempting to mark unpaid orders as settled.
Enforce Constant-Time Webhook Verification
Never accept inbound billing or messaging callbacks solely because they arrive at an unlisted route. Validate the cryptographic signature header over the raw request body and enforce a tight timestamp tolerance:
import crypto from "node:crypto";
export function verifyWebhookHmac(
rawBody: Buffer,
headerSig: string,
secret: string
): boolean {
const expected = crypto
.createHmac("sha256", secret)
.update(rawBody)
.digest("hex");
const sigBuffer = Buffer.from(headerSig, "hex");
const expectedBuffer = Buffer.from(expected, "hex");
if (sigBuffer.length !== expectedBuffer.length) {
return false;
}
return crypto.timingSafeEqual(sigBuffer, expectedBuffer);
}
Combine signature checks with idempotency keys stored in Redis or PostgreSQL so replayed deliveries cannot double-credit a customer balance.
Throttle Costly Routes and Lock Down Uploads
- Rate limiting: Apply sliding-window limits to login, password recovery, SMS OTP triggers, and any LLM-backed endpoint that incurs per-request vendor fees.
- Upload isolation: Inspect file magic bytes server-side, rewrite filenames to random UUIDs, and store customer files on private object buckets served via short-lived signed URLs rather than inside executable web directories. For deeper PHP-specific protections, review the complete Laravel security audit checklist.
- SSRF protection: If users submit profile URLs or webhook destinations that your backend fetches, block private IPv4/IPv6 ranges (
169.254.169.254,10.0.0.0/8,127.0.0.1) at the HTTP client or egress proxy so attackers cannot query cloud instance metadata.
5. Check Infrastructure Ports, Backups, and Search Readiness
Before pointing production traffic at your stack, verify host networking and search-crawl fundamentals together.
- Close internal data ports: Confirm PostgreSQL (
5432), MySQL (3306), and Redis (6379) bind exclusively to private VPC subnets or loopback interfaces—never0.0.0.0. Disable password SSH logins and require key-based authentication or AWS SSM sessions. - Test a live database restore: Snapshot schedules mean nothing until verified. Restore yesterday's backup into a disposable database instance to confirm encryption keys, permissions, and schema integrity actually work under pressure.
- Align security headers with SEO: Enable
Strict-Transport-Security,X-Content-Type-Options: nosniff, andReferrer-Policy, then check rendered production pages against Google's SEO Starter Guide and Core Web Vitals benchmarks. Confirmrobots.txtallows crawling on the live domain, canonical tags matchhttps://, and security rules do not accidentally block Googlebot from fetching CSS or JS bundles. - Automate dependency vulnerability checks: Wire
composer auditornpm audit --omit=devinto CI so critical CVEs surface before merge. When operating CMS platforms rather than custom apps, server-level isolation matters even more—a lesson reinforced daily while managing 300+ WordPress sites at server level.
If your codebase runs on aging dependencies where patching headers or upgrading auth libraries breaks legacy templates, scheduling an old software upgrade alongside launch prep prevents compounding risk.
Ship Your Launch Review With SmitDev
Security reviews fail when treated as a 200-row spreadsheet nobody finishes. Through custom web application development and targeted pre-launch audits, I inspect live infrastructure, database permissions, webhook signatures, and CI gates directly in your codebase before traffic arrives.
Whether you need a lean $399 7-day business website built cleanly from day one, hands-on hardening sprints at $55/day (8–9 hours of senior engineering), or $1,999/month dedicated product delivery, SmitDev gives startups direct principal-level execution. Browse engineering services or contact SmitDev to schedule your pre-launch audit this week.