Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SiteX

Open-Source Website Security, Performance & Tech Stack Analyzer

Scan any URL to detect security vulnerabilities, misconfigurations, performance bottlenecks, DNS issues, and tech stack signatures — complete with proof of findings and copy-paste fix code.

Quick StartKey FeaturesArchitectureContributing Guide

Python 3.10+ FastAPI Next.js 16 React 19 TypeScript PRs Welcome


🌟 Overview

Secure U (also known as SiteX) is a full-stack open-source platform designed to audit websites in seconds. Unlike generic scanners that just list raw errors, Secure U acts as an automated website engineer:

  1. Scans the target URL using multi-threaded asynchronous workers.
  2. Identifies security misconfigurations, missing headers, outdated SSL/TLS settings, DNS vulnerabilities, and performance flaws.
  3. Explains why each issue matters and assesses its risk severity (Critical, High, Medium, Low, Info).
  4. Generates framework-specific fix code (Nginx, Apache, Next.js, FastAPI, Cloudflare) so developers can resolve issues instantly.

✨ Key Features

Feature Description
🛡️ Security Header & SSL Audit Checks 12+ critical HTTP headers (HSTS, CSP, X-Frame-Options, X-Content-Type-Options), SSL certificate validity, cookie security flags (Secure, HttpOnly, SameSite), and server header disclosure.
🔬 Tech Stack Detection Detects frameworks (Next.js, React, Vue, Laravel), servers (Nginx, Apache, Caddy), CDNs (Cloudflare, CloudFront), CMS (WordPress), and analytics tools from headers and DOM inspection.
⚡ Performance Metrics Analyzes Time to First Byte (TTFB), total payload size, HTTP/2 & HTTP/3 support, Gzip/Brotli compression, cache control policies, and Google PageSpeed Insights integration.
🌐 DNS & Email Security Inspects A, AAAA, MX, NS, TXT, CAA, DMARC, and SPF records to identify DNS misconfigurations and email spoofing vulnerabilities.
🧩 Mistake Finder & Scoring Evaluates a overall Health Score (0-100) based on weighted rules across Security, Performance, Tech, and DNS categories.
💡 Copy-Paste Fix Snippets Provides tailored code fixes for Nginx, Apache, Vercel, FastAPI, Django, Express, and Cloudflare.
📄 Exportable Reports Download full scan reports as JSON or generate visual screenshot cards directly in browser.

🏗️ Architecture

Secure U is split into a decoupled FastAPI backend and a Next.js frontend:

 ┌─────────────────────────────────────────────────────────┐
 │               Next.js 16 (App Router)                   │
 │   - Responsive Dark Mode UI                             │
 │   - Real-time Progress Polling                          │
 │   - Fix Snippet Viewer & Report Exporter                │
 └────────────────────────────┬────────────────────────────┘
                              │ REST API / JSON
                              ▼
 ┌─────────────────────────────────────────────────────────┐
 │                     FastAPI Backend                     │
 │  ┌───────────────────────────────────────────────────┐  │
 │  │                  Async Router                     │  │
 │  └─────────────────────────┬─────────────────────────┘  │
 │                            │ Parallel Scanners          │
 │  ┌──────────────┬──────────┴───┬──────────────┐         │
 │  │ Security     │ Tech Stack   │ Performance  │ DNS     │
 │  │ Scanner      │ Scanner      │ Scanner      │ Scanner │
 │  └──────────────┴──────────────┴──────────────┴─────────┘
 │                            │ Raw Scan Results           │
 │  ┌─────────────────────────▼─────────────────────────┐  │
 │  │          Mistake Finder & Scoring Engine          │  │
 │  └─────────────────────────┬─────────────────────────┘  │
 │                            │ SQLite Storage             │
 │  ┌─────────────────────────▼─────────────────────────┐  │
 │  │                  aiosqlite DB                     │  │
 │  └───────────────────────────────────────────────────┘  │
 └─────────────────────────────────────────────────────────┘

🛠️ Tech Stack

Backend (/backend)

  • Python 3.10+
  • FastAPI — High performance async backend web framework.
  • Uvicorn — ASGI server.
  • HTTPX — Async HTTP client with HTTP/2 support.
  • BeautifulSoup4 & lxml — HTML parsing and tech detection.
  • DNSPython — Async DNS resolution and SPF/DMARC checks.
  • aiosqlite — Async SQLite database for scan persistence.
  • Pydantic v2 — Data validation and settings management.

Frontend (/frontend)

  • Next.js 16 (App Router) & React 19
  • TypeScript — Strict type safety.
  • Lucide React — Modern UI icons.
  • Custom CSS — Sleek dark-mode visual aesthetic, custom variables, glassmorphism, and responsive design.

🚀 Getting Started

Prerequisites

Make sure you have installed:

  • Node.js (v18.0.0 or higher)
  • npm or yarn / pnpm
  • Python (v3.10 or higher)
  • git

1. Clone the Repository

git clone https://github.com/your-username/secure-u.git
cd secure-u

2. Backend Setup (FastAPI)

  1. Navigate to the backend folder:

    cd backend
  2. Create and activate a Python virtual environment:

    • macOS / Linux:
      python3 -m venv venv
      source venv/bin/activate
    • Windows:
      python -m venv venv
      venv\Scripts\activate
  3. Install backend dependencies:

    pip install -r requirements.txt
  4. Create your .env file from the root example:

    cp ../.env.example .env
  5. Start the FastAPI development server:

    uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

    🌐 Backend API: http://localhost:8000
    📑 Interactive OpenAPI Docs: http://localhost:8000/docs


3. Frontend Setup (Next.js)

  1. Open a new terminal window and navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Create frontend environment configuration:

    • Create .env.local inside frontend/:
      NEXT_PUBLIC_API_URL=http://localhost:8000/api
  4. Start the Next.js development server:

    npm run dev
  5. Open your browser and navigate to:

    http://localhost:3000
    

📂 Project Structure

Secure U/
├── .env.example                # Base environment variables reference
├── CONTRIBUTING.md             # Guide for open-source contributors
├── README.md                   # Main project documentation
├── backend/
│   ├── app/
│   │   ├── ai/                 # AI explanation modules (Claude integration)
│   │   ├── analyzers/          # Scoring engine & mistake detection rules
│   │   │   ├── mistake_finder.py
│   │   │   ├── mistake_rules.py
│   │   │   └── score_engine.py
│   │   ├── api/                # FastAPI routes & endpoints
│   │   │   └── routes/
│   │   │       └── scan.py
│   │   ├── core/               # Configuration & SQLite database connection
│   │   │   ├── config.py
│   │   │   └── database.py
│   │   ├── scanners/           # Modular security/tech/DNS/performance scanners
│   │   │   ├── browser.py
│   │   │   ├── dns_scanner.py
│   │   │   ├── performance.py
│   │   │   ├── security.py
│   │   │   ├── seo_a11y.py
│   │   │   └── tech_stack.py
│   │   └── main.py             # FastAPI entry point
│   ├── data/                   # SQLite database storage directory
│   └── requirements.txt        # Python backend dependencies
└── frontend/
    ├── src/
    │   ├── app/                # Next.js App Router (pages & layout)
    │   │   ├── globals.css     # Global styles & design tokens
    │   │   ├── layout.tsx
    │   │   └── page.tsx
    │   ├── components/         # React UI components
    │   │   ├── DNSInfo.tsx
    │   │   ├── ExplanationBox.tsx
    │   │   ├── ExportButton.tsx
    │   │   ├── MistakeCard.tsx
    │   │   ├── Performance.tsx
    │   │   ├── ProgressBar.tsx
    │   │   ├── ScoreCard.tsx
    │   │   └── TechStack.tsx
    │   └── lib/                # API client & utilities
    │       └── api.ts
    ├── package.json            # Node.js dependencies & scripts
    └── tsconfig.json           # TypeScript configuration

🤝 Contributing to Secure U

We ❤️ open-source contributions! Whether you're fixing a bug, adding a new scanner, implementing security rules, or tweaking the UI design, your help is warmly welcomed.

How You Can Contribute:

  • 🛡️ Add Security Rules: Add detection for missing headers, weak SSL ciphers, or server leaks in backend/app/analyzers/mistake_rules.py.
  • 🔍 Expand Tech Stack Detection: Add framework or library signatures in backend/app/scanners/tech_stack.py.
  • Enhance Performance Scanners: Build new checks in backend/app/scanners/performance.py.
  • 🎨 Improve Frontend Components: Refine React components or styles in frontend/src/components.

📄 License

This project is open source and available under the MIT License.


Built with ❤️ by Souvik

About

Scan any URL to detect security vulnerabilities, performance bottlenecks, DNS issues, and tech stack signatures.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages