Skip to content
Saimul Islam

siteprobe: a security headers checker that also scans SEO and speed

A fetch-only security headers checker and website scanner: about a hundred security, SEO and speed checks, with a score and a fix hint for each finding.

Install
npm install siteprobe

Overview

siteprobe is a security headers checker you run from the command line or from code. It fetches a page and the few files around it (robots.txt, sitemap.xml, security.txt and a sample of its CSS and JS), runs about a hundred security, SEO and speed checks, and returns a score, a grade and findings with evidence and a fix hint for each.

It has no dependencies and no headless browser, so it runs anywhere fetch does: Node 20+, Cloudflare Workers, Deno and Bun. Lighthouse needs a headless Chrome and measures a rendered page, and Mozilla HTTP Observatory only looks at security headers. siteprobe reads the HTML and headers the server sends and covers security, SEO and speed in one pass.

It powers the free security scanner at developerlook.com.

Examples

Scan a site without installing
npx siteprobe https://example.com
Sample output
siteprobe https://example.com

security   53/100  F  2 high, 4 medium, 4 low, 4 info, 13 passed

HIGH (2)
  [security] Content-Security-Policy header missing (missing-csp)
      Fix: Add a Content-Security-Policy header. Minimum: Content-Security-Policy: default-src 'self'
  [security] HSTS (HTTP Strict-Transport-Security) not configured (missing-hsts)
      Fix: Add: Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Fail a CI build on medium findings or worse
npx siteprobe https://staging.example.com --fail-on medium
Run one scan from code
import { scanSecurity } from 'siteprobe';

const result = await scanSecurity('https://example.com');
console.log(result.score, result.grade); // 53 'F'
for (const finding of result.findings) {
  console.log(finding.severity, finding.id, finding.remediation);
}
Run several scans at once
import { scan } from 'siteprobe';

const report = await scan('https://example.com', { checks: ['security', 'seo'], timeoutMs: 8000 });
console.log(report.results.security?.score, report.results.seo?.metrics.word_count);
console.log(report.errors); // a scan that fails lands here and the others still run
Scan from a Cloudflare Worker
import { scanSecurity } from 'siteprobe';

export default {
  async fetch(request: Request): Promise<Response> {
    const url = new URL(request.url).searchParams.get('url') ?? '';
    const result = await scanSecurity(url, { ownHost: new URL(request.url).hostname });
    return Response.json(result);
  },
};

Features

01Security headers and more
Content-Security-Policy (missing, unsafe-inline, unsafe-eval), HSTS (missing, short max-age, no subdomains), clickjacking, Referrer-Policy, Permissions-Policy and cross-origin headers, plus cookies, CORS, HTTP methods, exposed files such as .env and .git/HEAD, leaked keys in the page source and open redirects.
02SEO checks
Title and meta description, headings, noindex and robots.txt rules, canonical URL, Open Graph and Twitter tags, image alt text, lang, JSON-LD, hreflang, landmarks, the sitemap and a sample of internal links.
03Speed checks
Time to first byte, HTML size, compression, caching, redirect chains, render-blocking assets, third-party hosts, lazy images, font-display and a sample of linked CSS and JS files.
04Scores with evidence
Each scan returns a 0 to 100 score, a grade from A to F and findings sorted by severity. Every finding has a stable id, what the scan saw and how to fix it.
05Zero dependencies
Only fetch, Headers, URL and TextDecoder, so the same code runs on Node 20+, Cloudflare Workers, Deno and Bun without a headless browser.
06Passive mode
With --no-active (or active: false) it sends only ordinary GET requests and skips the probes for sensitive files, CORS reflection and redirect parameters.

CLI usage

Usage
siteprobe <url> [--only security,seo,speed] [--json] [--fail-on high|medium|low|none] [--no-active] [--timeout ms]
--only <list>
Scans to run, comma-separated: security, seo, speed. Default: all three.
--json
Print the full report as JSON.
--fail-on <level>
Exit 1 if a finding is at or above critical, high (default), medium or low. none never fails on findings.
--no-active
Send only ordinary GET requests.
--max-body <bytes>
Most bytes to read from any response. Default: 5242880 (5 MiB).
--timeout <ms>
Timeout for each request. Default: 3 to 15 seconds, depending on the request.
--allow-private
Allow localhost and private network addresses (refused by default).
--verbose
Also list info-level findings, which are advisory and never lower the score.

Limits

  • It reads the HTML the server sends and runs no JavaScript, so a page that builds its content in the browser looks thin to it, as it does to many crawlers.
  • The speed scan does not measure Core Web Vitals (LCP, CLS, INP). Timings come from wherever the scan runs and are one sample, not a median.
  • It looks at one page. Broken-link and asset checks are samples: 6 links and 10 assets by default.
  • Checks are heuristics tuned to avoid false alarms. It is not a vulnerability scanner or a penetration test, and it does not check TLS certificates, DNS or email security.
  • Firewall and bot-protection pages are not scored: the scan throws a ScanError with the code not-a-page instead.
  • The private-address check applies to the URL you pass in, not to where a redirect leads. If you accept URLs from untrusted users, add your own network-level protection.

Frequently asked questions

How do I check security headers from the command line?

Run npx siteprobe https://example.com --only security. It prints a score, a grade and each finding with the header to add or change. Add --json for the full report, or --fail-on medium to make the command exit 1 in CI.

Is siteprobe a CSP checker and HSTS checker?

It checks both as part of the security scan. For Content-Security-Policy it reports a missing header, unsafe-inline and unsafe-eval. For HSTS it reports a missing header, a short max-age and no includeSubDomains. Each finding has a fix hint. It does not check TLS certificates, DNS or email security.

How is siteprobe different from Lighthouse?

Lighthouse loads the page in a headless Chrome and measures the rendered result. siteprobe uses only fetch: it reads the headers and HTML the server sends, so it runs in places a browser cannot, such as a Cloudflare Worker, and it covers security headers that Lighthouse does not.

Can I scan a site I do not own?

Scan only sites you own or are allowed to test. By default siteprobe also requests well-known sensitive paths such as /.env and /admin, which can trip alarms. Use --no-active to send only ordinary GET requests.

Can I use it in CI?

Yes. The CLI exits 1 when a finding is at or above the --fail-on level (high by default), so npx siteprobe https://staging.example.com --fail-on medium fails the build on anything medium or worse. Staging servers on a private network need --allow-private.

  • Web QA

    static-preflight

    A broken link checker and launch checklist for a static site build: SEO basics, links and assets, redirects, share cards, icons, JSON-LD and old-URL coverage.

  • Web QA

    viewport-qa

    Responsive design testing that measures the layout at every viewport width: overflow, clipping, inconsistent insets and radii, low-resolution images and layout shift.

  • Web QA

    redirect-lint

    Find redirect chains, loops and clashes in a whole rule set, then flatten every chain to one hop before you ship.

See all 9 open-source packages

Author

Built by Saimul Islam

Saimul Islam is a Forward Deployed Engineer and Solutions Architect. Several of these packages run in production on DeveloperLook, the Bundlewise CRM and Sitessa.