Metadata-Version: 2.4
Name: cloud_auditor
Version: 0.1.1
Summary: Layer 7 Cloud-Aware Web Security Auditor
Author: Hadi
Project-URL: Homepage, https://github.com/hadezedan34/cloud_auditor
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0

Markdown
# Cloud Security Auditor 🛡️

A lightweight, multi-threaded, **Layer 7 Cloud-Aware Web Security Auditor** written in Python.

Unlike traditional port scanners that rely strictly on raw Layer 4 TCP socket connections—which frequently get blocked or misreported as `CLOSED` by cloud reverse proxies (e.g., Render, Cloudflare, Vercel, Heroku)—`cloud_auditor` utilizes Layer 7 protocol probes to accurately evaluate cloud-hosted targets.

---

## 🚀 Key Features

* **Cloud-Aware Probing:** Uses Layer 7 HTTP/HTTPS protocol handshakes to bypass edge proxy filtering on cloud platforms.
* **Automated Warm-up:** Sends initial requests to wake up sleeping serverless/containerized applications (e.g., Render free tiers) before auditing.
* **Multi-Threaded Port Scanning:** Rapidly audits standard web and database ports (`80`, `443`, `8080`, `8443`, `22`, `21`, `3306`).
* **SSL/TLS Cryptographic Inspection:** Evaluates certificate issuers, validity dates, and expiration risk.
* **HTTP Header Hardening Audit:** Evaluates implementation of security headers including `HSTS`, `CSP`, `X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`, and `Permissions-Policy`.
* **Sensitive Content Enumeration:** Checks for exposed sensitive endpoints (`/.env`, `/.git/HEAD`, `/backup.sql`, `/admin`, etc.).

---

## 📦 Installation

Install directly via `pip`:

```bash
pip install cloud_auditor
Or install locally in editable mode:

Bash
git clone [https://github.com/yourusername/cloud_auditor.git](https://github.com/yourusername/cloud_auditor.git)
cd cloud_auditor
pip install -e .
💻 Usage
Quick Python Integration
Python
from cloud_auditor import CloudAuditor

# Instantiate with target domain
auditor = CloudAuditor("example.com")

# Run full security audit cycle
report = auditor.run_full_audit()

# Print results
print(f"Target IP    : {report['ip']}")
print(f"Open Ports   : {list(report['ports'].keys())}")
print(f"Header Score : {report['headers']['score']}%")
Modular Function Usage
You can also execute specific audit phases individually:

Python
from cloud_auditor import CloudAuditor

auditor = CloudAuditor("example.com")

# 1. Resolve IP & Warmup Container
auditor.resolve()

# 2. Audit Security Headers Only
headers_report = auditor.audit_headers()
print("Header Score:", headers_report["score"])
print("Missing Headers:", headers_report["missing"])
📊 Sample JSON Output
JSON
{
    "target": "bluechat-ft0t.onrender.com",
    "ip": "216.24.57.7",
    "ports": {
        "80": {"service": "HTTP", "status": "HTTP 200"},
        "443": {"service": "HTTPS", "status": "HTTP 200"}
    },
    "headers": {
        "score": 100.0,
        "present": [
            "Strict-Transport-Security",
            "Content-Security-Policy",
            "X-Frame-Options",
            "X-Content-Type-Options",
            "Referrer-Policy",
            "Permissions-Policy"
        ],
        "missing": []
    },
    "timestamp": "2026-08-30T16:00:00.000000+00:00"
}
📜 License
Distributed under the MIT License. See LICENSE for more information.
