hunt-api-key-exposure

Validates exposed API keys against scope restrictions in authorized sandbox environments.

10|3|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-api-key-exposure-baiqigo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-api-key-exposure
Source: https://github.com/baiqigo/baiqi-redteam-lab/tree/main/.agents/skills/hunt-api-key-exposure
Command: npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-api-key-exposure-baiqigo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security teams often find API keys and client credentials in public configs, SDKs, or frontend code but cannot tell whether they are harmless by-design public keys or genuinely dangerous exposures. This Skill provides an evidence-gated workflow to distinguish the two without touching production or third-party systems. ## Core Features & Use Cases - Evidence-Gated Validation: Follows a fixed baseline → single-variable probe → post-baseline → oracle → evidence pipeline so every finding is backed by provider or audit confirmation. - False Positive Filtering: Treats key format, base64 strings, SDK configs, invalid keys, and client-side errors as non-findings, reducing noise in reports. - Strict Safety Boundaries: Only permits testing with self-owned canary keys in sandbox tenants, and stops immediately on real key usage, third-party APIs, billing operations, or irreversible side effects. - Use Case: During an authorized assessment you discover a Google-style API key in a public JavaScript bundle. Use this Skill to plan a safe validation that checks whether the key exceeds its intended origin/referrer restrictions using only your own test project. ## Quick Start Use $hunt-api-key-exposure to plan an evidence-gated, authorized validation path for the API key I found in this client configuration.

Frequently Asked Questions about hunt-api-key-exposure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate an exposed API key safely?

Validate exposed API keys only in your own sandbox project using pre-provisioned canary keys or the provider's safe introspection endpoints. Never call production or third-party services, and confirm any finding with provider or audit evidence.

How to tell if a public API key is a real vulnerability?

A public API key is a real finding only if it performs protected actions beyond its designed restrictions, confirmed by provider or audit logs. Key format, base64 appearance, SDK configs, and client-side errors are false positives.

What counts as a false positive in API key exposure testing?

False positives include keys that match a known format but are invalid, public map keys restricted by design, base64-looking strings, and client error messages. WAF blocks, timeouts, and scanner hits are inconclusive, not findings.

When should API key exposure testing stop immediately?

Stop immediately when testing would use a real third-party key, brute-force validation, touch third-party APIs, or cause billing, resource, or irreversible side effects. Evidence involving third-party data or shared infrastructure also triggers an immediate halt.

What evidence should be saved for an API key exposure finding?

Save the key source and hash prefix, the restriction configuration such as origin, referrer, IP, or API scope limits, and the sandbox audit trail. Route source bundle findings to source-leak analysis and cloud permission issues to cloud misconfiguration review.