Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!




   1097

[TOOL] Open-Source Real-Time GitHub Secret Scanner (OpenAI, Gemini, Claude, AWS Keys

by zaimmka - 20 September, 2026 - 05:08 AM
This post is by a banned member (zaimmka) - Unhide
zaimmka  
Registered
18
Posts
1
Threads
#1
GitHub Repository: https://github.com/zaim-abbasi/APIRadar
(The repo README contains full documentation and the live scanner link if you want to inspect findings without running a local instance.)

I solo-built and open-sourced APIRadar, a real-time scanner that monitors public GitHub commit feeds to intercept exposed API keys, tokens, and database URIs the second developers push code.
[Image: explore.png]

What the scanner extracts per commit:
- Source GitHub repository URL
- Exact file path inside the repo (e.g. `src/config/keys.ts` or `.env`)
- Timestamp of when the commit hit the feed
- Redacted key preview with 1-click clipboard copy

How the detection engine works:

1. Event Feed Ingestion:
The Fastify backend worker connects to GitHub's public event stream API, ingesting commit diff payloads in real time.

2. Signature Regex Matching:
Diff payloads are matched against explicit key signatures:
- OpenAI: `sk-proj-[A-Za-z0-9_-]{48,}`
- Google Gemini: `AIzaSy[A-Za-z0-9_-]{33}`
- Anthropic Claude: `sk-ant-api03-[A-Za-z0-9_-]{93}`
- Slack Bot: `xoxb-[0-9]{10,13}-[0-9]{10,13}-[A-Za-z0-9]{24}`
- Telegram Bot: `[0-9]{8,10}:[A-Za-z0-9_-]{35}`

3. Shannon Entropy Filtering:
To drop dummy test strings like `sk-proj-YOUR_API_KEY_HERE`, the engine calculates Shannon entropy scores:
Entropy H(X) = -sum( P(x_i) * log2( P(x_i) ) )
Strings below the randomness threshold get dropped before database indexing.

4. Indexing & Redaction:
Key previews are redacted (`sk-proj-AbCd1234...9zYx`), stored in MongoDB, and broadcast to the dashboard via WebSockets.

Currently Supported Providers:
- AI & LLMs: Google (Gemini), OpenAI, OpenRouter, Groq, Anthropic (Claude), xAI (Grok), Cerebras
- Messaging & Bots: Telegram Bot, Discord, Slack

Adding Custom Rules:
The detection registry is modular. You can add regex rules for any new service, cloud provider, or internal key pattern.


Setup instructions, environment variable configuration, and local deployment steps are documented in the README.

This post is by a banned member (zaimmka) - Unhide
zaimmka  
Registered
18
Posts
1
Threads
Bumped #2
This is a bump
This post is by a banned member (admin_9zuuS9) - Unhide
102
Posts
1
Threads
#3
thanks

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)