Skip to main content

🛡️ SecHead

PyPI version License: MIT Python 3.6+

SecHead is a lightweight, powerful cybersecurity tool designed to audit website security headers. It helps penetration testers, developers, and security researchers identify missing or misconfigured HTTP headers that leave applications vulnerable to attacks like XSS, Clickjacking, and MIME sniffing.

Unlike simple scanners, SecHead provides context-aware analysis, explaining why a configuration is dangerous and offering best-practice remediation.


✨ Key Features

  • 🛡️ Deep Header Analysis: Audits critical headers including CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy.
  • 🖱️ Clickjacking PoC: Automatically detects if a site is vulnerable to Clickjacking and generates a live Proof-of-Concept iframe in the HTML report.
  • 📊 Smart Reporting: Generates a beautiful, dark-mode compatible HTML Report containing raw traffic, compliance scores, and remediation guides.
  • 🧬 Technology Fingerprinting: Passive detection of server technologies (e.g., IIS, Nginx, PHP, ASP.NET) based on response signatures.
  • ⚡ Zero-Config: Works out of the box with a simple CLI command.

🚀 Installation

You can install SecHead directly from PyPI:

pip install SecHead

Alternatively, you can clone the repository and install it manually:

git clone https://github.com/h4rithd/SecHead.git
cd SecHead
pip install .

🛠️ Usage

  1. Quick Scan (Terminal Output) Run a scan against a target URL. The results will be displayed directly in your terminal with color-coded alerts.
SecHead -u https://example.com
  1. Generate HTML Report Save the detailed analysis to an HTML file. This report is perfect for attaching to penetration testing deliverables.
SecHead -u https://example.com -o report.html

📊 Sample Output

Terminal View

🔎  Analysis for: https://example.com
📡  Status Code: 200

🛡️   SECURITY HEADERS ANALYSIS
------------------------------------------------------------
❌  Strict-Transport-Security : MISSING
    ℹ️  Forces the browser to communicate only via HTTPS.
    💡 Best Practice: max-age=63072000; includeSubDomains; preload
    ⚠️  Issue: Header is missing entirely.

✅  X-Content-Type-Options    : OK
    ℹ️  Prevents the browser from 'sniffing' the response type.
    💡 Best Practice: nosniff
    ....

HTML Report Preview

  • The generated HTML report includes:
  • Executive Summary: Pass/Fail status for all headers.
  • Vulnerability Proof: A working iframe demonstrating Clickjacking risks (if applicable).
  • Raw Data: Full HTTP request and response logs.
  • Remediation: Copy-pasteable best practices for developers.

⚠️ Disclaimer

This tool is designed for educational and ethical security testing purposes only. Do not use this tool on websites or systems you do not own or do not have explicit permission to test. The author is not responsible for any misuse or damage caused by this program.

📄 License

This project is licensed under the MIT License.

Metadata

Release files for SecHead 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SecHead 1.2.0
File Size Uploaded
sechead-1.2.0.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SecHead 1.2.0
File Interpreter ABI Platform
sechead-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / sechead-1.2.0.tar.gz

Download URL sechead-1.2.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
68b438918ee33e7200c5c6a1d49cb87027330933511dcaef4a2c3cec3a363b57
BLAKE2b-256 checksum
How to use checksums
56a1e5a0d8ba89d3dbd184c9db6c441bca1dba65dc6817c6bd947bfded64e26b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.

Transparency log

Release files / sechead-1.2.0-py3-none-any.whl

Download URL sechead-1.2.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8153a0a6ae8f04e657e842287bb77fcafdc5a3e6a85c72bbc0323f431ccba909
BLAKE2b-256 checksum
How to use checksums
88d1cb1185ee5e92fdaac83d3513410291c23718853cffe22d21281976703e1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page