Skip to content

About

The httpaudit website: scan any site's security headers, CSP, TLS, cookies, CORS and DNS in the browser, with paste-ready fixes, alerts, badges and embeds. Next.js on Vercel.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

HTTP Audit

httpaudit.com

The website for HTTP Audit (httpaudit): check any site's security headers, CSP, HSTS, cookies, CORS, TLS and DNS in the browser, get config you can paste for your stack, and add a grade badge to your README.

Live: httpaudit.vercel.app · try a report: github.com

HTTP Audit home page: a scan box with example sites, and lists of recent scans and top scores

HTTP Audit report for github.com: grade A+, score 115, 17 passed, 0 failed, 2 warnings, with a card for each check area

It runs the same checks as npx httpaudit yoursite.com, using the published npm package.

Pages and endpoints

Path What it is
/ Enter a domain; recent scans and top scores
/history Public scan history: most recent, or the leaderboard (?sort=top)
/r/example.com The full report: grade, every check, paste-ready fixes for Next.js, Vercel, Netlify, Nginx, Apache and Express, badge code. Shareable.
/api/audit?url=example.com The full result as JSON (CORS enabled)
/badge/example.com A shields-style security | A+ SVG badge
/embed/example.com A grade card for other sites to frame (?theme=light|dark), or <script src="/embed.js" data-host="example.com">
/alerts Confirm and unsubscribe pages for grade-drop alerts

Features

  • Fix verifier. Under the paste-ready config, "Did it work?" rescans immediately and lists what's now passing, what's still failing and anything newly broken.
  • Grade-drop alerts. Email (double opt-in, one-click unsubscribe) or a Slack, Discord or any JSON webhook (verified with a test message). A daily job rescans every watched site and alerts when the grade falls or the score drops 10+ points, naming the checks that broke.
  • Embeddable widget. A live grade card companies can put on their trust or security page. Only /embed/* can be framed; every other page sends frame-ancestors 'none'.

Results are cached for 10 minutes per domain; "Check again" on a report skips the cache. Badges are cached by the CDN for a day.

[![httpaudit](https://httpaudit.vercel.app/badge/yoursite.com)](https://httpaudit.vercel.app/r/yoursite.com)

Deploy

Deploy with Vercel

For public scan history, add Upstash Redis from the Vercel Marketplace (Storage → Upstash → Redis, free tier is plenty). It sets KV_REST_API_URL and KV_REST_API_TOKEN, which the app picks up automatically. Without it, history is kept in memory and resets on every deploy.

For alerts:

  • CRON_SECRET: any long random string. Vercel sends it to the daily job (vercel.json runs /api/cron/alerts at 06:00 UTC), and the job refuses to run without it.
  • Email (optional): create a free Resend account, verify your domain, then set RESEND_API_KEY and ALERT_FROM_EMAIL (e.g. httpaudit <alerts@yourdomain.com>). Without them, only webhook alerts are offered.

Optionally set NEXT_PUBLIC_SITE_URL (e.g. https://httpaudit.vercel.app) so badge links use your domain; otherwise the request's host is used.

What's stored per scan: domain, grade, score, pass/fail/warning counts and time. Visitors can untick "Show in public scan history", and unreachable sites are never listed.

Run locally

npm install
npm run dev     # http://localhost:3000
npm test        # unit tests
npm run build

Safety

The server fetches whatever domain a visitor types, so it's locked down against being used to reach internal networks (SSRF):

  • Only public domain names are accepted: no IP addresses, ports, credentials, localhost or internal TLDs.
  • Every request, including each redirect hop, the CORS probe and the TLS handshake, goes through a DNS lookup that refuses private, loopback, link-local, cloud-metadata and reserved addresses (lib/ip.ts, lib/safe-fetch.ts). The check runs at connect time, so DNS rebinding can't get around it.
  • Only ports 80 and 443; responses are capped at 5 MB.
  • Requests are rate limited per IP.

The site practices what it checks: a nonce-based Content-Security-Policy (proxy.ts), HSTS with preload, COOP, a strict Referrer-Policy and Permissions-Policy (next.config.ts).

License

MIT

About

The httpaudit website: scan any site's security headers, CSP, TLS, cookies, CORS and DNS in the browser, with paste-ready fixes, alerts, badges and embeds. Next.js on Vercel.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages