๐Ÿ›ก๏ธ KeySentry

May 29, 2026 ยท View on GitHub

๐Ÿ” KeySentry: Find leaked API keys & secrets in any GitHub repo or local project. No mercy.

A powerful, no-nonsense tool to detect unsecured API keys, tokens, and sensitive files โ€” either via command-line scan or a beautifully built frontend web scanner.

a-dark-cyberpunk-themed-digital-poster-w_-YePJ_1tRI2sxaEUqdGSIQ_a62RDOYRQqOHTq_0JMh4zg


๐Ÿš€ Features

  • ๐Ÿ”Ž Scans for 25+ common API key formats (AWS, Slack, Stripe, OpenAI, etc.)
  • ๐Ÿง  Regex + entropy-inspired patterns for high accuracy
  • ๐Ÿ—‚๏ธ Flags sensitive files like .env, id_rsa, firebase.json, etc.
  • ๐Ÿ’พ Outputs structured results to JSON
  • ๐Ÿงฉ Supports both GitHub repo URLs and local folder paths
  • ๐Ÿ’ป No GitHub API tokens needed
  • โšก Styled terminal banner and colorful terminal logs
  • ๐ŸŒ Frontend scanner hosted on Netlify for ease of use

๐Ÿ†• Latest Update

๐Ÿ›ก๏ธ YARA Detection Rule Added

KeySentry now includes KeySentry.yar, a YARA rule designed to detect exposed API keys, authentication tokens, cloud credentials, private keys, and sensitive configuration files commonly found in source code repositories.

The rule currently supports detection of secrets associated with:

  • AWS, Google Cloud, Slack, Stripe, OpenAI
  • GitHub, Twilio, SendGrid, DigitalOcean
  • Firebase, Cloudflare, Heroku, Mailgun
  • Azure Storage, Dropbox, Notion
  • Terraform Cloud, CircleCI, Facebook and more

It also identifies commonly leaked sensitive files such as:

  • .env, .env.local, .env.production
  • credentials.json, firebase.json
  • .aws/credentials, .npmrc
  • id_rsa, id_rsa.pub, .pypirc

This addition enables defenders, threat hunters, malware analysts, and security researchers to leverage KeySentry's detection logic directly through YARA-based workflows.


๐ŸŒ Live Frontend

We now have a frontend interface (located in project/ folder) for easier scanning.

๐Ÿ”— https://key-sentry.netlify.app/

Paste a GitHub repo URL and instantly view results in your browser.


๐Ÿณ Docker Support

You can build and run the CLI version via Docker.

๐Ÿ“ Dockerfile Provided

A ready-to-use Dockerfile is included.

๐Ÿ“ค DockerHub Image

โžก๏ธ https://hub.docker.com/r/adityabhatt3010/keysentry


๐Ÿ“ฆ Installation

๐Ÿ”ง Local Installation

git clone https://github.com/AdityaBhatt3010/KeySentry.git
cd KeySentry
pip install -r requirements.txt

๐Ÿณ Pull from DockerHub

docker pull adityabhatt3010/keysentry

๐Ÿงช Usage

๐Ÿ” Scan a GitHub repository:

python KeySentry.py --repo https://github.com/username/repo-name --output results.json

๐Ÿ’ป Scan a local directory:

python KeySentry.py --local /path/to/codebase --output results_local.json

โ–ถ๏ธ Using Docker:

docker run --rm adityabhatt3010/keysentry --repo https://github.com/username/repo-name --output results.json

๐Ÿ“ธ Screenshots

๐ŸŒ Web Interface Scanner

Frontend Scanner

Frontend Results

Frontend Analytics

๐Ÿงช CLI Scaner

GitHub Scan

Local Scan

Help

โš™๏ธ Docker Build & Run

Docker Build

Docker Run


๐Ÿ“ Sample Output

[
  {
    "file": "/tmp/tmpabcd1234/app/settings.py",
    "type": "AWS",
    "match": "AKIAIOSFODNN7EXAMPLE"
  },
  {
    "file": "/tmp/tmpabcd1234/.env",
    "type": "Sensitive File",
    "match": ".env"
  }
]

๐Ÿ” What It Detects

API Keys:

  • AWS, Google, Slack, Stripe, OpenAI, SendGrid, Twilio
  • GitHub, DigitalOcean, Heroku, Mailgun, Firebase
  • Cloudflare, JWT, Facebook, Dropbox, Azure
  • Netlify, Notion, Terraform, CircleCI, BasicAuth
  • RSA Private Keys, Base64 blobs, and more

Sensitive Files:

  • .env, .env.local, .aws/credentials, .dockercfg
  • credentials.json, firebase.json, id_rsa, .pypirc, etc.

๐Ÿง  Future Roadmap

  • โœ… Full local & GitHub scanning
  • โœ… Structured JSON reporting
  • โœ… Docker support
  • ๐Ÿ”œ Live token validation (OpenAI/AWS, etc.)
  • ๐Ÿ”œ GitHub username/org-wide scan
  • ๐Ÿ”œ FastAPI dashboard w/ SQLite visualization
  • ๐Ÿ”œ Discord/Telegram alert integrations

๐Ÿ‘จโ€๐Ÿ’ป Crafted By

Made with โค๏ธ by Aditya Bhatt โ€” Cybersecurity & VAPT Specialist.


โš ๏ธ Disclaimer

For educational & auditing use only. Do not use this tool on repositories you don't own or lack permission to scan.