keyreach
Paste a leaked API key, get a capability map and a disclosure-ready severity report.
Security note: Deterministic, read-only, zero AI by design
- Role
- Author
- Status
- open source · Apache-2.0 · on PyPI
- Layer
- L1 Platform & delivery
- Stack
- Python, httpx, pydantic, Typer, Rich, Jinja2
AI Cortex, AI systems layer1 graph · 5 agentskeyreach, Platform & delivery layer32 providersContributor Scout, AI systems layer6 reviewersSBOM + SCA (SBOM & SCA Automation), Platform & delivery layer3,500+ secretsProductForge, AI systems layer5 gated stagesSDLC agents (SDLC Agent Family), AI systems layer5 agentsGlyphMemory, AI systems layer308 writersZephyron, AI systems layer151 attack typesCyberShastra, Backend & data layer27 look-up typesKodeAtlas, Backend & data layer6 languagesRelease train (Release-Train Orchestration), Platform & delivery layer100+ servicesDoc storage (Hybrid Document Storage), Backend & data layer200K+ uploads/moCloud Critic, Platform & delivery layer13 Azure toolsLLM Guard (LLM Guard & LeakGuard), AI systems layeron-device DLPData masking (Dynamic Data Masking), Backend & data layerMySQL + PostgreSQLCyber range (Cyber Range Platform), Backend & data layer1,000+ learnersPentest bot (Automated Web Pentest Bot), Backend & data layerrecon → report
Attacker’s note: Per-project isolation, enforced at every layer.Attacker’s note: Deterministic, read-only, zero AI by design.Attacker’s note: Findings without an input-to-impact chain are rejected.Attacker’s note: 3,500+ exposed credentials surfaced, then gated.Attacker’s note: Every claim carries a confidence label.Attacker’s note: Audit log keeps field names, never values.Attacker’s note: Negative results kept: 115 of 308 writers got worse.Attacker’s note: Every leak proven by a canary the target can’t fake.Attacker’s note: No access until an admin approves; every look-up logged.Attacker’s note: Every edge traced to an exact source line.Attacker’s note: Single-click rollback for the whole train.Attacker’s note: Keeps serving through network-tunnel failures.Attacker’s note: Read-only: it never modifies infrastructure.Attacker’s note: Prompt injection → explainable allow / flag / block.Attacker’s note: Sensitive data masked by role, with auditability.Attacker’s note: An isolated Kali environment per learner.Attacker’s note: Recon, scanning and reporting as one workflow.
Problem
When a hunter finds an exposed key — a Google AIza…, an OpenAI sk-…, an AWS AKIA… — the finding is only worth what the key can actually do. Answering that means a different tool per provider, ad-hoc curl recipes for the rest, and a hand-written report every time.
Constraints
- It handles live secrets: sending a key to an external model would itself be a credential leak.
- The same key against the same provider state must always produce the same capability map, severity, and report.
- Every probe is non-destructive — it never writes, deletes, or spends money by default.
- Built only for keys you own or are explicitly authorized to test.
Decisions
- No AI, enforced by CI
- keyreach contains zero AI/LLM calls or SDKs in any dependency group, and an ai_ban check fails any build that introduces one.
- Plugins declare, the engine executes
- Provider plugins declare probes; one shared HTTP layer executes them and owns rate limiting, record/replay, redaction, and the read-only guard — so determinism is enforced in one place.
- Default-deny the dangerous verbs
- The HTTP layer default-denies non-idempotent methods; anything aggressive is opt-in, explicitly flagged, and loudly warned.
- Severity is computed, not labeled
- A pure, rule-based function turns confirmed capabilities into a severity band with a visible rationale — never a hardcoded per-provider label. That rationale is the bounty argument.
- Unknown beats a guess
- If a rule can’t decide a capability, keyreach reports it as unknown.
Architecture
Build view: components and how data flows. Hover a part to trace it.
Press B to flip between build and break.
InputLeaked keyauthorized to test
PipelineDetectpattern + entropy rules
PipelineValidateread-only identity call
PipelineEnumerateread-only probes
PipelineScorepure rule function
Shared HTTP layerHTTP layerrate limit, record/replay, redaction
Shared HTTP layerProvider APIs32 providers, 9 categories
OutputReportterminal, JSON, Markdown, HTML
Read this diagram as text
Flow in keyreach
- Leaked key → Detect
- Detect → Validate
- Validate → Enumerate
- Enumerate → Score (confirmed capabilities)
- Score → Report (severity + rationale)
- Validate → HTTP layer
- Enumerate → HTTP layer
- HTTP layer → Provider APIs
Security reading
- Boundary, no AI/LLM anywhere: CI ai_ban fails the build: Detect, Validate, Enumerate, Score
- Boundary, read-only guard: non-idempotent methods denied: HTTP layer, Provider APIs
- Score: can’t decide → “unknown”, never a guess
- Report: key masked, evidence per capability
Implementation
- Pipeline: detect (pattern and entropy rules) → validate (cheapest read-only identity call) → enumerate (read-only probes) → score → report.
- 32 providers across 9 categories: cloud, AI, payment, communications, email/marketing, dev platforms, databases, monitoring, and a generic JWT/bearer inspector.
- Reports as terminal, JSON, Markdown, or a self-contained HTML file, with the key masked and evidence per capability.
- A scheduled drift canary re-verifies detection rules and probe endpoints against the vendors they came from; coverage is enforced at 100% in CI.
Results
- v0.2.0 on PyPI with Phase 2 complete; each roadmap item lands on its own branch and pull request, auditable in the open.
Takeaways
- “A finding you can’t reproduce is a finding you can’t report.” Determinism is a security property when the input is a live secret.
Connections
Skills: Bug Bounty, Python, Secrets Detection.