Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ LeakHunter

LeakHunter is a lightweight, high-performance, and 100% offline security scanner designed to detect sensitive credentials hidden inside local project files.

Stop secrets from reaching production or version control.
LeakHunter is your final local defense line, ensuring API keys, bot tokens, and environment files stay exactly where they belong β€” on your machine.

License Python Security Offline


πŸš€ Project Overview

LeakHunter is built for developers, DevOps engineers, and security students who want a fast and private way to audit repositories.

Why LeakHunter?

  • πŸ”’ Privacy First β€” No cloud processing, no API calls, no internet required
  • πŸ” Deep Scanning β€” Recursive directory scanning for hidden leaks
  • 🧠 Heuristic Regex β€” Detects high-entropy strings and known token formats
  • πŸ›‘οΈ Defensive Only β€” Designed for internal audits and education
  • πŸ€– AI-Powered Fixes β€” Intelligent analysis with remediation suggestions

🎯 Key Features

πŸ€– Smart Security Analysis

  • AI-powered detection for 15+ vulnerability types
  • Risk scoring (0–100) with priority recommendations
  • Automated and step-by-step security fixes
  • Context-aware detection beyond simple regex

πŸš€ High Performance

  • Batch processing for 10,000+ files
  • Supports 50+ programming languages
  • Memory-optimized to avoid browser crashes
  • Smart filtering of non-sensitive files

πŸ”’ Privacy & Security

  • 100% offline β€” zero network requests
  • Local processing only
  • No data collection
  • Fully open-source and transparent

πŸ–ΌοΈ Screenshots

πŸ“Š Dashboard Overview

Dashboard Overview


πŸ“‚ File Scanning Interface

File Scanner


πŸ” Security Findings with AI Fixes

Security Findings

πŸ§ͺ Code Analysis Results

Code Analysis Results

A clear side-by-side comparison showing insecure code patterns alongside secure AI-generated fixes, helping developers quickly understand and remediate security risks.


πŸ› οΈ How It Works

  1. Intelligent Discovery β€” Identifies high-risk files
  2. Recursive Crawling β€” Skips irrelevant directories
  3. Multi-Layer Analysis
    • Regex pattern matching
    • Semantic context analysis
    • AI-based risk scoring
  4. AI-Powered Reporting
    • Vulnerable code snippets
    • Secure code examples
    • Automated fixes
    • Step-by-step remediation guides

πŸ“Š Detection Capabilities

Vulnerability Type Severity Auto-Fix AI Analysis
Discord Bot Tokens πŸ”΄ Critical βœ… Yes βœ… Advanced
GitHub PATs πŸ”΄ Critical βœ… Yes βœ… Advanced
API Keys 🟠 High βœ… Yes βœ… Advanced
.env Files 🟠 High βœ… Yes βœ… Basic
Hardcoded Credentials πŸ”΄ Critical ❌ Manual βœ… Advanced
JWT Secrets πŸ”΄ Critical βœ… Yes βœ… Advanced
Sensitive Files 🟠 High βœ… Yes βœ… Basic

πŸš€ Quick Start

🌐 Web Interface (Recommended)

git clone https://github.com/yourusername/leakhunter.git
cd leakhunter
npm install
npm run dev
Open: http://localhost:3000

🐍 Python CLI Tool
python leakhunter.py --path ./your-project
πŸ’» Usage Examples
Scan Entire Project
Open http://localhost:3000

Click Scan Entire Project

Select your project folder

View AI-powered security analysis

Quick File Scan
Choose Select Files to Scan

Upload files or folders

Get instant feedback

Apply AI-recommended fixes

Severity Filters
πŸ”΄ Critical

🟠 High

🟑 Medium

🟒 Low

πŸ—οΈ Project Structure
leakhunter/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx
β”‚   β”‚   β”œβ”€β”€ FileScanner.tsx
β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   └── CodeOutput.tsx
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── securityModel.ts
β”‚   β”œβ”€β”€ types.ts
β”‚   └── constants.ts
β”œβ”€β”€ public/
β”œβ”€β”€ leakhunter.py
β”œβ”€β”€ package.json
└── README.md
🧱 Tech Stack
Frontend

React 19

TypeScript 5.8

Vite 6

Tailwind CSS

Lucide React Icons

Recharts

Backend / CLI

Python 3.6+

No external dependencies

AI Engine

Custom offline security knowledge base

🀝 Contributing
Contributions are welcome ❀️

Fork the repository

Create a feature branch

Make your changes

Add tests if applicable

Submit a pull request

πŸ“„ License
MIT License β€” see the LICENSE file for details.

βš–οΈ Security & Privacy Disclaimer
LeakHunter is for educational and defensive security use only.

Scan only directories you own or have permission to audit

Detection is not guaranteed to be 100%

Not a replacement for professional audits or penetration testing

The authors assume no responsibility for misuse.

Built with πŸ›‘οΈ for a safer web.
Happy (and secure) coding!

---

## Desktop App (Windows .exe)

This repo includes an Electron wrapper + `electron-builder` to ship LeakHunter as a Windows installer.

1) Put your taskbar icon here: `assets/icon.png`
2) Unblock Windows-downloaded executables (helps with EPERM): `npm run unblock:win`
3) Build the installer: `npm run package:win`

Output goes to `release/` (e.g. `LeakHunter-Setup-1.0.0.exe`).

If you still see `spawn EPERM` on Windows, it’s usually Defender/AV or β€œControlled folder access” blocking `node_modules/.../*.exe` (run PowerShell as Admin and add an exclusion for the project folder).

About

πŸ”’ AI-Powered Offline Security Scanner - Find & fix exposed credentials in your code. 100% private, zero internet required.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages