Skip to content

AI-powered GitHub secret scanner using CodeBERT and regex to detect sensitive information in code and config files.

Notifications You must be signed in to change notification settings

dharmikd2905/DeepTrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” DeepTrace-AI: AI-Powered Secret Leak Detector

DeepTrace-AI is an advanced Python tool that scans GitHub repositories, files, and URLs for hardcoded secrets using both regex patterns and AI-based classification (CodeBERT).


πŸš€ Features

  • βœ… Regex + AI detection for secrets like API keys, tokens, passwords
  • ⚑ Fast scanning with multithreading
  • 🎯 Confidence threshold to reduce false positives
  • πŸ” Scans public GitHub repos using the GitHub API
  • πŸ“‚ Supports .env, config files, and raw URLs

πŸ“¦ Install Requirements

pip install torch transformers requests

🧠 AI Model


πŸ•ΉοΈ How to Use

python deeptrace_ai_scanner.py

Then choose one of the options:

1️⃣ Scan Laravel default .env.example
2️⃣ Scan any GitHub repo recursively
3️⃣ Scan a raw file URL


πŸ§ͺ Example Output

Scanning file: .env.example ...
Error [Regex] Generic Password in .env.example, line 15: password=mysecret
Error [AI] Sensitive line in config.py, line 42: stripe_api_key = "sk_test_..."
=== Scan Summary ===
Total files scanned: 5
Files with sensitive info detected: 2
Total issues found: 6
Secure files: 3

πŸ“š Supported Secrets (Regex)

  • AWS Access Keys
  • Google API Keys
  • JWT Secrets
  • Bearer Tokens
  • Database URLs
  • Stripe Keys
  • Private SSH Keys
  • Generic passwords & API keys

πŸ“œ License

MIT License Β© 2025


πŸ‘¨β€πŸ’» Author

Dharmik Dudhat
Feel free to ⭐ the repo or contribute improvements!

About

AI-powered GitHub secret scanner using CodeBERT and regex to detect sensitive information in code and config files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published