security-ai-keys

Audit codebases for exposed AI API keys and recommend redaction strategies.

124|12|Updated Nov 17, 2025
One-click install
npx skills add https://github.com/IgorWarzocha/Opencode-Workflows --skill security-ai-keys-igorwarzocha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-ai-keys
Source: https://github.com/IgorWarzocha/Opencode-Workflows/tree/main/agents/security-reviewer/.opencode/skill/security-ai-keys
Command: npx skills add https://github.com/IgorWarzocha/Opencode-Workflows --skill security-ai-keys-igorwarzocha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ripgrep, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps identify and prevent the accidental exposure of sensitive AI API keys within your codebase, protecting your applications and infrastructure from unauthorized access and potential misuse.

Core Features & Use Cases

  • Detects exposed keys: Scans for common patterns of leaked API keys for major AI providers (OpenAI, Gemini, Anthropic, etc.).
  • Identifies leakage paths: Pinpoints where keys might be exposed, such as client-side code, build artifacts, or logs.
  • Provides hardening guidance: Offers a checklist to ensure best practices for secret management are followed.
  • Use Case: After integrating a new AI model, run this skill to proactively scan your project for any inadvertently committed API keys before deployment.

Quick Start

Use the security-ai-keys skill to scan the current directory for exposed AI API keys.

Frequently Asked Questions about security-ai-keys

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

FAQPage Schema
How do I scan my codebase for exposed AI API keys?

To scan your codebase for exposed AI API keys, run this Skill in your project directory. It uses ripgrep to efficiently pattern-match across files, identifying leaked keys for providers like OpenAI, Anthropic, and Gemini in environment variables, client-side code, build artifacts, and logs.

What are common patterns of leaked OpenAI or Anthropic API keys in source code?

Leaked OpenAI or Anthropic API keys often appear in environment variables, client-side code, build artifacts, or logs. This Skill detects these common leakage patterns by scanning project files for specific string formats associated with major AI providers.

Do I need ripgrep installed to audit my project for AI key leakage?

Yes, you need ripgrep installed to audit your project for AI key leakage. This Skill depends on ripgrep to perform efficient pattern matching and quickly scan across all your project files for exposed API keys.

What's the best way to prevent API key leakage when integrating AI providers?

The best way to prevent API key leakage when integrating AI providers is to proactively scan your project before deployment. This Skill identifies exposed keys and provides a hardening checklist recommending redaction strategies and best practices for secret management.

Can this tool detect API keys exposed in build artifacts and logs?

Yes, this tool can detect API keys exposed in build artifacts and logs. It specifically pinpoints these leakage paths along with environment variables and client-side code when scanning your codebase for exposed AI provider credentials.