Skip to main content

Security Header Analyzer — CLI tool for pentesters, DevOps and developers

Project description

🦅 HeaderHawk

Security Header Analyzer — Built for Pentesters, DevOps, and Developers

Python License Platform

HeaderHawk scans any website for missing HTTP security headers, assigns risk scores, explains real attack scenarios, and generates shareable HTML reports.


Features

  • Checks 9 critical security headers
  • Risk scoring — Critical / High / Medium
  • Shows real attack scenario for each missing header
  • Detects server info disclosure (version leakage)
  • Generates HTML report
  • CI/CD ready — fail builds on missing critical headers
  • Works on Kali Linux, Ubuntu, macOS

Installation

```bash git clone https://github.com/sachinsinsinwar/headerhawk.git cd headerhawk pip install -r requirements.txt ```


Usage

```bash

Basic scan

python -m cli.main --url https://target.com

Generate HTML report

python -m cli.main --url https://target.com --report html

CI/CD — exit code 1 if critical headers missing

python -m cli.main --url https://target.com --fail-on critical

Help

python -m cli.main -h ```


Example Output

``` Target: https://example.com Status Code: 200 Security Score: 30/100

Header Status Risk Attack Scenario strict-transport-security PRESENT Critical — content-security-policy MISSING Critical XSS — attacker injects malicious scripts x-frame-options MISSING High Clickjacking — attacker embeds site in iframe ```


Headers Checked

Header Risk Attack if Missing
Strict-Transport-Security Critical SSL stripping / MITM
Content-Security-Policy Critical XSS attacks
Access-Control-Allow-Origin Critical CORS misconfiguration
X-Frame-Options High Clickjacking
X-Content-Type-Options High MIME sniffing
Referrer-Policy Medium URL data leakage
Permissions-Policy Medium Feature abuse
Cache-Control Medium Sensitive data cached
X-XSS-Protection Medium Reflected XSS

Who Is This For

Pentester / Attacker — Recon phase. Find missing headers on target, understand what attacks are possible.

Security Engineer — Scan UAT before formal VAPT. Fix issues before the auditor finds them.

DevOps — Add to GitHub Actions pipeline. Block deployments if critical headers are missing.

Developer — Compare staging vs production. Catch header mismatches before release.


Created By

Sachin Singh — DevSecOps Engineer
LinkedIn | GitHub


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

headerhawk-1.0.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

headerhawk-1.0.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file headerhawk-1.0.0.tar.gz.

File metadata

  • Download URL: headerhawk-1.0.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for headerhawk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3aa2899356b3b6b8e403f8736893be2beddd92ee6baee43e0e1dd2def3e97a1a
MD5 1eabf1b40562ebdbe310e184855a3831
BLAKE2b-256 7b0f6c0b68087ab8784e37a0a46c7a39b5159d5bc7e99483e103f9068ca92c7a

See more details on using hashes here.

File details

Details for the file headerhawk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: headerhawk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for headerhawk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc8527a1c45f9e44bca54c559726bbd0608438b74a32fea920de1a182dfb2ec9
MD5 b50667446917ccfa97eb1b6651fabc6c
BLAKE2b-256 f4023ef5b266a5430d3665aeb66b34e0dd9f993798981ecafc18940ae6df4a3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page