Skip to main content

Three-layer defense system against secret-stealing bots. Pre-commit hooks, honeypot generators, and MEV rescue.

Project description

ZERO-LEAK

The Sentinel Defense System

Author: Patrick Schell (@Patrickschell609)

Built after a bot stole from me. Never again.


I am the Sentinel.
Three layers. One mind. Absolute defense.

Install

pip install zero-leak

Quick Start

# Full protection on any git repo
zero-leak protect /path/to/your/repo

# Or install layers separately
zero-leak shield /path/to/repo    # Pre-commit hook
zero-leak mirage /path/to/repo    # Honeypot files

# Scan any file for secrets
zero-leak scan /path/to/file.py

The Three Layers

Layer 1: The Shield

A git pre-commit hook that scans every staged file for:

  • High-entropy strings (likely keys/secrets)
  • Known secret patterns (ETH, BTC, AWS, GitHub, Stripe)
  • Wallet formats and API tokens

If detected, the commit is rejected instantly.

zero-leak shield /path/to/repo

Layer 2: The Mirage

Generates realistic-looking fake keys and plants them in your repo:

  • .env.example
  • config/keys.example.js
  • tests/fixtures/test_wallets.js

Bots find them, try to drain them, waste gas, get nothing.

zero-leak mirage /path/to/repo

Layer 3: The Ghost

Emergency rescue system. If a key leaks:

  1. Bundles a gas-funding TX + sweep TX atomically
  2. Submits to multiple MEV relays simultaneously
  3. Beats the snipers to the block
# Set environment variables
export RPC_URL="https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY"
export SPONSOR_PK="0x..."      # Wallet with ETH for gas
export LEAKED_PK="0x..."       # The compromised key
export SAFE_ADDRESS="0x..."    # Where to send rescued funds

# Run rescue
zero-leak ghost

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         ZERO-LEAK                               │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│   LAYER 1: THE SHIELD                                          │
│   └─ Pre-commit hook                                           │
│   └─ Kills secrets before they enter git history               │
│   └─ Entropy analysis + pattern matching                       │
│                                                                 │
│   LAYER 2: THE MIRAGE                                          │
│   └─ Honeypot generator                                        │
│   └─ Plants fake keys in obvious places                        │
│   └─ Bots waste gas on worthless wallets                       │
│                                                                 │
│   LAYER 3: THE GHOST                                           │
│   └─ Emergency rescue system                                   │
│   └─ Flashbots bundle submission                               │
│   └─ Faster than the mempool snipers                           │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Why This Exists

Bots are running 24/7, scanning every GitHub push, every paste, every log file. They have no mercy. They drain wallets in milliseconds.

This is the countermeasure.

  • Layer 1 stops you from making the mistake
  • Layer 2 wastes their time and gas
  • Layer 3 rescues what slips through

CLI Reference

zero-leak shield <repo>     Install pre-commit hook
zero-leak mirage <repo>     Plant honeypot files
zero-leak protect <repo>    Full protection (shield + mirage)
zero-leak scan <path>       Scan file or directory for secrets
zero-leak ghost             Emergency rescue (requires env vars)
zero-leak --help            Show all options

License

MIT - Use it. Share it. Protect each other.


Credits

Patrick Schell - Creator @Patrickschell609

"The bots took from me. Now I take their advantage away from everyone."


I am always watching.
- The Sentinel

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

zero_leak-1.0.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

zero_leak-1.0.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file zero_leak-1.0.0.tar.gz.

File metadata

  • Download URL: zero_leak-1.0.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for zero_leak-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d657de1c4735b7b6b0120aa661303d8e4fb7c91e46ecd4d4f73624f72e97aa36
MD5 0433f7d7bc1bf2984c76f9983223f1d8
BLAKE2b-256 e69a4ccda148e8e6515b4ae09635437ffaa89fd1194522d8099f78bba66798aa

See more details on using hashes here.

File details

Details for the file zero_leak-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: zero_leak-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for zero_leak-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 680ece3a7dfdf571b8ae2c95899bd3754c19961fc2d2a205d2308ffca7fa7be1
MD5 a4a2c490fd28774a6d9e322617cd09fd
BLAKE2b-256 4441ee2dc527280bc7fc61880f99e4301aaa749dff523a752612614d5dd76640

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