Repository navigation
HeaderHawk v2.13.1 — Compliance Evidence
The first release since v2.0.0, and the one where HeaderHawk stopped being a
header scanner and became a source of compliance evidence.
| v2.0.0 | v2.13.1 | |
|---|---|---|
| Check modules | 9 | 14 |
| Finding types | 9 | 35 |
| Catalogued requirements | — | 26 |
| Response-side assessment | — | HSTS, CSP, cookies, framing, banners |
| Tests | 137 | 549 |
Compliance evidence
--evidence report.md (or .json) writes a report keyed by requirement
rather than by finding — the question an assessor actually asks. Every control
appears with its framework, the requirement text transcribed from the standard,
a link to the source chapter, and its evidence.
The rule that makes the document worth submitting: a control only passes when
a check that covers it actually completed. Anything the scan could not judge
is reported as not assessed, with the reason, rather than counted as
compliant. A scan of an unreachable host produces no findings — reporting that
as full compliance would be worse than producing no report at all.
Every finding also carries the requirements it is evidence against, in all three
output formats. OWASP ASVS 5.0 (25 requirements) and PCI DSS 4.0.1 11.6.1
are catalogued; ids are transcribed from the published standard, and a finding
type with no genuinely matching requirement is reported as unmapped rather than
attached to an approximate one.
The response side, which did not exist before
- Header posture — HSTS (including
max-ageandincludeSubDomains),
frame protection,X-Content-Type-Options,Referrer-Policy, COOP,
Permissions-Policyand version banners. - CSP read the way a browser reads it —
'unsafe-inline'is not reported
when a nonce or hash is present,'strict-dynamic'suppresses allowlist
findings,object-srcaccepts adefault-srcfallback whilebase-uri
must be explicit, and*.example.comis an allowlist rather than an open door. - Per-cookie assessment —
Secure,SameSite,__Secure-/__Host-
prefixes and the 4096-byte limit, parsed perSet-Cookiefield without
tearing apart the comma inside anExpiresdate.HttpOnlyis reported only
for names that suggest a session value, since analytics cookies legitimately
need script access.
Posture findings are counted as a separate class, and --fail-on decides which
classes gate the exit code — so this can be switched on without turning an
existing pipeline red.
New attack classes
- Unkeyed input discovery — 91 intermediary-set header fields searched by
bisection. Ruling out the whole list costs one request; isolating one header
among ninety costs about a dozen. Every probe carries its own cache-buster,
without which a cache in front of the target answers the entire search with
the first response it stored. - Web cache deception — static-looking suffixes a router ignores but a CDN
keys on, confirmed by re-requesting the same URL with no credentials at all.
A response that already saysno-storeorprivateis not reported. - CORS origin validation — reflection,
nullorigin, prefix/suffix/
trailing-dot/subdomain bypasses and plaintext-origin trust, each confirmed by
the server echoing back a per-scan origin that cannot exist. - CRLF injection / response splitting — percent-encoded, double-encoded and
overlong-UTF-8CR/LF, confirmed by a response header field named after a
unique marker. - HTTP request smuggling — CL.TE and TE.CL by timing, reported only after
two consecutive probes agree and a well-formed request in between still
returns normally. Confirmation is opt-in via--enable-desyncbecause it is
intrusive, and every finding says out loud that timing is evidence rather than
proof.
Scanning what you actually ship
--request FILE— drive the scan from a raw HTTP request saved from a
browser or an intercepting proxy. Cookies, tokens, content type and body stay
intact; each check replaces the header it is testing or adds it when absent,
down to the raw-socket probes. Credentials from the file never reach a report.- Authenticated scanning —
--auth-cookieor a form login, with the session
verified before and after the run. If you said what a logged-in page
contains and it is not there, the scan stops rather than assess the logged-out
pages and present them as the product's. - Endpoint discovery —
--discoverreads the target's own OpenAPI, sitemap,
robots.txt and links. URLs that are the same endpoint collapse, and host-level
checks run once rather than once per route.
Workflow
- Baseline diffing —
--baselinereportsN new, N fixed, N unchanged, and
--fail-on-newnarrows the gate to regressions so the pipeline stops failing
forever. Running it on a schedule is what satisfies PCI DSS 4.0.1 11.6.1. - SARIF 2.1.0 with
security-severityscores and stable fingerprints, so
code-scanning alerts deduplicate instead of reopening. - Exit codes —
0clean,1findings,2the scan could not run. An
unreachable host never exits0. - Rate limiting —
--ratecaps the whole scan, raw client included. - Proxy support end to end, with raw bypass traffic tunnelled via
CONNECT.
Fixes
--insecurewas silently broken when the environment set
REQUESTS_CA_BUNDLEorCURL_CA_BUNDLE— those overridesession.verify, so
scans of self-signed hosts failed every request while reporting the target as
unreachable. Verification is now named explicitly and the CA bundle cannot win.- False positives cut in SSRF and virtual-host discovery: header anomalies
are measured only against headers proven stable across baseline samples, so
request ids, tracing andCF-RAYno longer register as signal, and a vhost
candidate must survive a second probe. - Stated minimum Python was 3.6 but the pinned
requestsandurllib3
require 3.8. Corrected to 3.8+.
Breaking changes
host_header_scanner.pyhas been removed. The compatibility shim kept
from the rename in v2.0.0 is gone; usepython headerhawk.pyand
import headerhawk.- The scanner is now a package rather than a single file.
import headerhawk
andpython headerhawk.py <target>are unchanged, but code reaching into
internals will need the new module paths — see the layout in the README.
Nothing else changes existing behaviour: posture findings do not gate the exit
code unless you ask for them, and --fail-on defaults to vuln.
Upgrading
git pull && pip install -r requirements.txt
python headerhawk.py https://app.example.com/ --discover \
--evidence compliance.md --output findings.sarif --fail-on anyFull changelog: v2.0.0...v2.13.1