Real-time GitHub AI API key scanner. Discovers exposed AI API keys in public GitHub repositories with direct links to the exact repo, file, and line number.
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Tailwind v4, Vite |
| State | Zustand, TanStack React Query |
| Backend | Hono, Node.js, TypeScript |
| Database | MongoDB + Mongoose |
| Docs | Swagger UI via @hono/swagger-ui |
| Tests | Vitest |
| CI/CD | GitHub Actions |
OpenAI · Anthropic · Google Gemini · Groq · Perplexity · HuggingFace · Replicate · Mistral · Cohere · xAI (Grok) · NVIDIA NIM · OpenRouter · Together AI · ElevenLabs · AssemblyAI · DeepSeek · Stability AI · Fireworks AI · Voyage AI · Azure OpenAI · AWS Bedrock · AI21 Labs · DeepInfra · Cerebras · and more.
- Node.js 20+
- MongoDB running locally or a connection URI
- A GitHub Personal Access Token (optional but recommended for rate limits)
cd server
cp .env.example .env
# Edit .env and set GITHUB_TOKEN, MONGODB_URI, etc.
npm install
npm run devcd client
npm install
npm run devVisit:
- App: http://localhost:5173
- API Docs (Swagger): http://localhost:3001/ui
GITHUB_TOKEN is optional, but recommended to increase GitHub API rate limits while scanning public repositories.
GitHub supports two personal token types:
- Fine-grained personal access token: recommended for this project because it is more restricted and safer by default.
- Personal access token (classic): older token type with broader access. Use it only if you specifically need it.
This project only reads public GitHub data, so a fine-grained token is the best option in most cases.
- Open GitHub
Settings. - Go to
Developer settings. - Open
Personal access tokens. - Click
Fine-grained tokens. - Click
Generate new token. - Give it a name like
sekreets-local. - Set an expiration date.
- Choose your personal account as the resource owner.
- Keep repository access as limited as possible.
- Do not grant write, admin, or private repository permissions unless you explicitly need them for another use case.
- Generate the token and copy it immediately.
Recommended for this repo:
- Token type:
Fine-grained - Resource owner: your personal GitHub account
- Repository access: minimal
- Permissions: read-only usage for public GitHub API access
Use this only if you cannot use a fine-grained token.
- Open GitHub
Settings. - Go to
Developer settings. - Open
Personal access tokens. - Click
Tokens (classic). - Click
Generate new token (classic). - Give it a name like
sekreets-local-classic. - Set an expiration date.
- Select only the minimum scopes you need.
- Generate the token and copy it immediately.
If you use a classic token for this project:
- Keep scopes as minimal as possible
- Do not grant write, delete, admin, or workflow scopes unless you explicitly need them
- This app only reads public GitHub API data, so broad scopes are unnecessary
Add the token to your server env file:
GITHUB_TOKEN=your_token_hereNotes:
- The app can run without a token, but GitHub rate limits will be much lower.
- This token is used for public GitHub API requests such as code search and reading repository file contents.
- Never commit your token to Git.
- If a token leaks, revoke it immediately in GitHub settings and create a new one.
| Variable | Default | Description |
|---|---|---|
PORT |
3001 |
Server port |
MONGODB_URI |
mongodb://localhost:27017/sekreets |
MongoDB connection string |
GITHUB_TOKEN |
— | GitHub PAT (increases rate limits) |
NODE_ENV |
development |
Environment |
CORS_ORIGIN |
http://localhost:5173 |
Allowed CORS origin |
SCAN_INTERVAL_MINUTES |
5 |
Auto-scan interval |
MAX_RESULTS_PER_SCAN |
100 |
Max queries per scan run |
RATE_LIMIT_DELAY_MS |
500 |
Delay between GitHub API calls (ms) |
cd server
npm test| Method | Path | Description |
|---|---|---|
| GET | /api/secrets |
List secrets (paginated) |
| GET | /api/secrets/stats |
Statistics |
| GET | /api/secrets/:id |
Get single secret |
| POST | /api/scan |
Trigger a scan |
| GET | /api/scan/jobs |
List scan jobs |
| GET | /api/providers |
List supported providers |
| GET | /ui |
Swagger UI |
| GET | /openapi.json |
OpenAPI spec |
This tool is for defensive security research and responsible disclosure only.
- Keys are masked in the UI — never fully displayed
- Do not use discovered keys for any purpose
- Follow responsible disclosure practices
- Comply with GitHub's Terms of Service
MIT