Skip to main content

Python security scanner with pentest mode - audit your website, API, or server

Project description

๐Ÿ”’ Security Audit Tool

One command to audit your website, API, or server. Built for business owners who care about security.

Python security scanner with defensive checks + active pentest mode. Find vulnerabilities, test performance, and generate professional reports for your business.

A Python-based security assessment tool that helps you identify vulnerabilities, performance issues, and security misconfigurations in your own systems. Perfect for business owners, developers, and DevOps teams who want to proactively secure their infrastructure.

โš ๏ธ Legal Notice

For authorized security testing only. Use exclusively on:

  • Systems you own
  • Systems you have explicit written permission to test

Unauthorized scanning may violate laws. By using this tool, you confirm proper authorization.


๐Ÿš€ What This Tool Does

This tool performs two types of security assessments:

1. Defensive/Read-Only Checks (Safe)

  • Scan file permissions, services, firewall rules
  • Detect hardcoded secrets in code
  • Check TLS certificates, container configs
  • Analyze dependencies for known vulnerabilities

2. Active/Pentest Checks (Sends Traffic)

  • Performance testing: Measure response times
  • Vulnerability scanning: Test for SQL injection, XSS
  • Load testing: Simulate traffic to test capacity

๐Ÿ’ก Perfect For

Use Case What You Get
Business Owner Know if your website has security holes
Developer Find secrets in code before committing
DevOps/SRE Test if your servers can handle traffic spikes
Security Team Quick first-line vulnerability assessment
Compliance Generate audit reports for security reviews

๐Ÿ› ๏ธ Quick Start (5 minutes)

1. Install

pip install cache-wraith-audit-tool

2. Run Your First Scan

Interactive Mode (Easiest) - Just run with no arguments:

security-audit

The TUI will guide you through target selection, scan mode, and reporting.

Command Line Mode:

# Simple security audit
security-audit --url https://your-website.com --full-scan

# Scan local system
security-audit --local --full-scan

This creates:

  • audit_report_*.html - Professional HTML report
  • audit_report_*.json - Machine-readable JSON
  • audit_report_*.pdf - PDF report (pentest mode)

3. View Results

# Open the HTML report
firefox audit_report_*.html

๐Ÿ“‹ Common Commands

Basic Scanning

# Scan any website
security-audit --url https://example.com --full-scan

# Scan your local system
security-audit --local --full-scan

# Scan a project directory
security-audit --path ./my-project --full-scan

# Scan multiple websites
security-audit --url https://api1.com --url https://api2.com --full-scan

# Interactive mode (no arguments)
security-audit

Pentest Mode (Active Testing)

# Full pentest with performance, vulnerability, and load tests
security-audit --url https://your-business.com --pentest-mode

# Just vulnerability scan (SQLi, XSS tests)
security-audit --url https://your-api.com --enable-vulnerability-scan

# Performance test only
security-audit --url https://your-api.com --enable-performance-test

# Load test (simulates traffic - use with caution!)
security-audit --url https://your-api.com --enable-load-test

โš ๏ธ Pentest features send actual traffic to your target. Only use on your own systems.


๐Ÿ” What Gets Checked

By Default (Safe, Read-Only)

  • โœ… File/directory permissions
  • โœ… Running services and open ports
  • โœ… Firewall configuration
  • โœ… Hardcoded secrets in code
  • โœ… Outdated dependencies with known CVEs
  • โœ… Docker/container security
  • โœ… Web application configuration

With --full-scan

  • โœ… Everything above, plus:
  • โœ… TLS/SSL certificate validation
  • โœ… Performance testing
  • โœ… Vulnerability scanning (SQLi, XSS)

With --pentest-mode

  • โœ… Everything above, plus:
  • โœ… Load testing / DDoS simulation

๐Ÿ”ฌ Security Checks Reference

Check ID Category Description Default
permissions Read-Only File/directory permissions (world-writable, SUID/SGID) โœ… Enabled
services Read-Only Running service and port enumeration โœ… Enabled
firewall Read-Only Firewall status and configuration โœ… Enabled
hardening Read-Only OS hardening indicator checks โœ… Enabled
secrets Read-Only Hardcoded secrets and credential patterns โœ… Enabled
dependencies Read-Only Outdated and vulnerable dependencies โœ… Enabled
containers Read-Only Docker/container security configuration โœ… Enabled
webapp_config Read-Only Web application configuration checks โœ… Enabled
tls Read-Only TLS/SSL certificate inspection โš ๏ธ --enable-tls-checks
performance Active Response time measurement โš ๏ธ --enable-performance-test
vulnerability Active SQL injection, XSS tests โš ๏ธ --enable-vulnerability-scan
load_test Active DDoS simulation (intensive) โš ๏ธ --pentest-mode only

Use with --skip-checks or --only-checks:

# Skip specific checks
security-audit --url example.com --skip-checks "tls,containers"

# Run only specific checks
security-audit --url example.com --only-checks "vulnerability,secrets"

# List all available checks
security-audit --list-checks

๐Ÿ“Š Output Formats

Format File Extension Use Case
Terminal - Quick review during development
HTML .html Share with team, management, compliance
JSON .json CI/CD integration, automation, archiving
PDF .pdf Formal documentation, offline review

๐Ÿ—๏ธ For Developers (Architecture)

Want to extend the tool? Here's how it's structured:

app/
โ”œโ”€โ”€ cli.py              # Command-line interface
โ”œโ”€โ”€ main.py             # Entry point and orchestration
โ”œโ”€โ”€ config.py           # Configuration management
โ”œโ”€โ”€ scope.py            # Target validation and scoping
โ”œโ”€โ”€ checks/             # Security test implementations
โ”‚   โ”œโ”€โ”€ base.py         # Base class for all checks
โ”‚   โ”œโ”€โ”€ permissions_check.py
โ”‚   โ”œโ”€โ”€ vulnerability_check.py  # SQLi, XSS tests
โ”‚   โ”œโ”€โ”€ performance_check.py
โ”‚   โ””โ”€โ”€ load_test_check.py      # DDoS simulation
โ”œโ”€โ”€ collectors/         # Data gathering modules
โ”œโ”€โ”€ report/             # Output generators (JSON, HTML, Terminal)
โ””โ”€โ”€ utils/              # Rate limiting, timeouts, validators

Adding a New Check

  1. Create app/checks/my_check.py
  2. Inherit from BaseCheck
  3. Implement run() method
  4. Register in app/checks/__init__.py
from .base import BaseCheck, CheckResult
from ..models import SeverityLevel

class MyCheck(BaseCheck):
    check_id = "my_check"
    check_name = "My Security Check"

    def run(self) -> CheckResult:
        result = self._create_result()
        # Your check logic here
        finding = self._create_finding(
            title="Example issue",
            severity=SeverityLevel.MEDIUM,
            target="example.com",
            evidence="Found issue X",
            remediation="Fix by doing Y"
        )
        result.findings.append(finding)
        return self._finish_result(result)

Running Tests

# Install dev dependencies
venv/bin/pip install -e ".[dev]"

# Run tests
venv/bin/pytest

# Run with coverage
venv/bin/pytest --cov=app

๐Ÿ“š Documentation

Document What's Inside
docs/RUN.md How to install and run the tool
docs/COMMANDS.md All available commands and examples
docs/PENTEST.md Pentest mode guide for active testing
docs/FEATURES.md Feature list and what each check does
docs/ARCHITECTURE.md Code structure for developers
docs/TROUBLESHOOTING.md Common issues and solutions

๐Ÿ” Safety Features

  1. Explicit Scope Required - Tool won't run without defined targets
  2. Authorization Prompt - Legal confirmation required
  3. Rate Limiting - Built-in request throttling
  4. Read-Only by Default - No modifications to target systems
  5. Opt-in Active Tests - Pentest features must be explicitly enabled
  6. Auditable - All actions logged

๐Ÿ“ CI/CD Integration

# .github/workflows/security.yml
name: Security Scan
on: [push, pull_request]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Setup
        run: |
          python -m venv venv
          venv/bin/pip install -e .
      - name: Run Security Audit
        run: security-audit --url https://staging.your-app.com --full-scan
      - name: Upload Report
        uses: actions/upload-artifact@v3
        with:
          name: security-report
          path: audit_report_*.html

๐ŸŽฏ Roadmap

  • CIS Benchmark compliance checks
  • SBOM generation (CycloneDX, SPDX)
  • Kubernetes security scanning
  • API endpoint fuzzing
  • Compliance mapping (NIST, PCI-DSS, SOC2)

๐Ÿค Contributing

Contributions welcome! Please ensure:

  1. All checks are defensive and non-destructive by default
  2. Code includes type hints
  3. Tests included for new functionality
  4. Documentation updated

๐Ÿ“„ License

MIT License - See LICENSE file for details.


Built with โค๏ธ for business owners who take security seriously.

Got questions? Open an issue or check the docs/ folder.

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

cache_wraith_audit_tool-1.0.7.tar.gz (108.0 kB view details)

Uploaded Source

Built Distribution

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

cache_wraith_audit_tool-1.0.7-py3-none-any.whl (114.0 kB view details)

Uploaded Python 3

File details

Details for the file cache_wraith_audit_tool-1.0.7.tar.gz.

File metadata

  • Download URL: cache_wraith_audit_tool-1.0.7.tar.gz
  • Upload date:
  • Size: 108.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for cache_wraith_audit_tool-1.0.7.tar.gz
Algorithm Hash digest
SHA256 270eb1570d64f218af614e59fa4038ce5fe16c4cdf9ebd940dc4051a8da75833
MD5 5eea050f749d2d338ca35c09978d0929
BLAKE2b-256 3f82824d3a5b65a81ae01411c8d7266222c1562bcdd04035f5970e8fb265d58a

See more details on using hashes here.

File details

Details for the file cache_wraith_audit_tool-1.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for cache_wraith_audit_tool-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a20c1d53c531344649e28aa48442570f3d3323412b9786ee0c147844b936158f
MD5 6a4ee06e0493b8f96b448f6433b8cca4
BLAKE2b-256 318a6bd003e86080f505d8d41bc50adf0d2a946a2df47fefc02ec580f7cff6b2

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