open-source web security scanner

Find the weak spots before attackers do.

ThreatHarbor checks any URL for the web-security mistakes that show up again and again: missing headers, cookies without protection, forms posting over plain HTTP. Run one command, get a color-coded report.

~/scanner $ python main.py --url https://example.com
HIGH

Directly dangerous today — an invalid TLS certificate, or the reflected-XSS probe firing.

MEDIUM

A real weakening of defenses, or impact for an attacker on the network path.

LOW

A small or mostly browser-mitigated weakness worth tightening.

INFO

Not a flaw, just something an attacker would find useful to know.

// 01 — checks

What it checks

Six modules, run in order. Most share a single fetch of the page; the TLS check opens its own handshake. Each returns findings tagged with a severity.

  1. 01

    Security headers

    Looks for missing response headers (X-Frame-Options, CSP, HSTS, Referrer-Policy, X-Content-Type-Options, Permissions-Policy, Cross-Origin-Opener-Policy), flags present-but-weak ones (CSP allowing unsafe-inline, short HSTS max-age), and catches servers that leak their software version.

    MediumLowInfo
  2. 02

    TLS & certificate

    Opens its own TLS handshake to validate the certificate (expiry, untrusted issuer, hostname mismatch) and flags connections negotiated over a legacy protocol like TLS 1.0/1.1.

    HighMediumInfo
  3. 03

    Cookie flags

    Inspects every Set-Cookie for the three flags that matter: HttpOnly (hide from JavaScript), Secure (HTTPS only), and SameSite (cross-site defense).

    MediumLow
  4. 04

    Redirects

    Checks whether plain HTTP upgrades to HTTPS, and whether the redirect chain ever jumps to a different host (a possible open redirect).

    MediumLow
  5. 05

    Forms

    Parses every form on the page. Flags forms that submit over HTTP, and POST forms with no field that looks like a CSRF token.

    MediumInfo
  6. 06

    Reflected XSS active

    Submits a probe payload through text inputs and checks whether it comes back unescaped in the HTML. Off by default; only runs with the --unsafe flag.

    High
// 02 — usage

Three commands to your first report

Python 3.10+ and three packages. No accounts, no API keys.

1

Install dependencies

$ pip install -r requirements.txt
2

Scan a URL

$ python main.py --url https://example.com
3

Open the report

$ start report.html

Useful flags

--output
name the report file (default report.html)
--verbose
log findings to the terminal as they run
--timeout
per-request timeout in seconds (default 5, max 10)
--unsafe
enable the active XSS probe (authorized targets only)
// 03 — report

The report you get

Self-contained HTML. No external files, no internet needed to view it. This is a faithful preview of a real scan.

report.html

Vulnerability Scan Report

https://example.com

Generated 2026-05-29 at 14:02:11. 9 findings.

0HIGH
3MEDIUM
4LOW
2INFO
Missing Content-Security-Policy headerMEDIUM

No Content-Security-Policy is set; CSP is the strongest defense against reflected and stored XSS.

Header 'Content-Security-Policy' not present in response from https://example.com
Missing Referrer-Policy headerLOW

Missing Referrer-Policy leaks the full referring URL to third parties on outbound links.

Header 'Referrer-Policy' not present in response from https://example.com
Server header exposes softwareINFO

The Server response header reveals the underlying web server, which helps attackers target known CVEs.

Server: cloudflare
TLS connection detailsINFO

Negotiated transport security for the target host, including protocol version and certificate expiry.

example.com:443 — TLSv1.3, cert valid until Aug 29 21:41:26 2026 GMT
// 04 — notes

What this is, and what it isn't

Built as a learning project. Being clear about the limits is part of the point.

Design decisions worth knowing

  • Fetches the target once and shares the response across every check. Fewer round trips, less load on the target.
  • Each check is a plug-in module exposing one run() function. Adding a check is dropping a file in checks/.
  • A failing check is caught and logged as a warning. One broken check never aborts the scan.
  • Severities are deliberately conservative. The weak CSRF heuristic is Info, not a louder level.

Honest limitations

  • Scans one URL. It does not crawl a whole site.
  • No JavaScript rendering. Forms drawn by client-side JS are invisible to it.
  • The XSS check is a basic reflection test, not a full XSS engine.
  • No authentication, no SQL-injection or SSRF testing.

For educational use on systems you own or are explicitly authorized to test. Scanning targets without permission may be illegal.

// 05 — about

Who built this

A portfolio project, not a product — here's the person behind it.

I'm KASSIDI Iliasse, an IT engineering student. I built ThreatHarbor to understand how the everyday web-security checks actually work under the hood — and to practice shipping a small tool end to end: readable code, honest docs, and a front door that explains itself.

It's deliberately scoped and deliberately honest about its limits. If you want to see how it's put together, the source is on GitHub.