Skip to content

HeaderHawk v2.13.1 — Compliance Evidence

Choose a tag to compare

@kabiri-labs kabiri-labs released this 05 Aug 18:00
· 43 commits to main since this release
0cd22b2

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-age and includeSubDomains),
    frame protection, X-Content-Type-Options, Referrer-Policy, COOP,
    Permissions-Policy and 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-src accepts a default-src fallback while base-uri
    must be explicit, and *.example.com is an allowlist rather than an open door.
  • Per-cookie assessment — Secure, SameSite, __Secure-/__Host-
    prefixes and the 4096-byte limit, parsed per Set-Cookie field without
    tearing apart the comma inside an Expires date. HttpOnly is 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 says no-store or private is not reported.
  • CORS origin validation — reflection, null origin, 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-8 CR/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-desync because 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-cookie or 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 — --discover reads 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 — --baseline reports N new, N fixed, N unchanged, and
    --fail-on-new narrows 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-severity scores and stable fingerprints, so
    code-scanning alerts deduplicate instead of reopening.
  • Exit codes — 0 clean, 1 findings, 2 the scan could not run. An
    unreachable host never exits 0.
  • Rate limiting — --rate caps the whole scan, raw client included.
  • Proxy support end to end, with raw bypass traffic tunnelled via CONNECT.

Fixes

  • --insecure was silently broken when the environment set
    REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE — those override session.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 and CF-RAY no longer register as signal, and a vhost
    candidate must survive a second probe.
  • Stated minimum Python was 3.6 but the pinned requests and urllib3
    require 3.8. Corrected to 3.8+.

Breaking changes

  • host_header_scanner.py has been removed. The compatibility shim kept
    from the rename in v2.0.0 is gone; use python headerhawk.py and
    import headerhawk.
  • The scanner is now a package rather than a single file. import headerhawk
    and python 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 any

Full changelog: v2.0.0...v2.13.1