security-ai-keys

Detect AI API key leakage patterns in code repositories and build artifacts.

Updated Feb 9, 2025
One-click install
npx skills add https://github.com/xeon826/dotfiles --skill security-ai-keys-xeon826
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-ai-keys
Source: https://github.com/xeon826/dotfiles/tree/main/opencode/skill/security-ai-keys
Command: npx skills add https://github.com/xeon826/dotfiles --skill security-ai-keys-xeon826

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps identify and prevent the accidental exposure of sensitive AI API keys within your codebase and deployment artifacts, safeguarding against unauthorized access and potential misuse.

Core Features & Use Cases

  • Leakage Detection: Scans code, environment files, and build outputs for common AI API key patterns.
  • Provider Support: Covers major AI providers like OpenAI, Anthropic, Gemini, and more.
  • Use Case: Before deploying your application, run this skill to audit your project for any inadvertently exposed API keys in configuration files or client-side code.

Quick Start

Run 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 detect AI API key leakage in my codebase?

Use security-ai-keys to detect AI API key leakage by scanning code, environment files, and build artifacts for exposed patterns from providers like OpenAI, Anthropic, and Gemini.

What types of AI API key exposure can code scanning identify?

Code scanning identifies AI API key exposure risks including client-side exposure, embedded secrets in build outputs, and insecure logging practices across code repositories and deployment artifacts.

Do I need ripgrep to scan for exposed API keys in build artifacts?

Yes, you need ripgrep installed to scan for exposed API keys, as it provides the efficient pattern matching required to detect sensitive AI API key leakage across code repositories and build outputs.

Can I audit my project for OpenAI and Anthropic API keys before deploying?

Yes, you can audit your project for OpenAI and Anthropic API keys before deploying by running a scan to check for inadvertently exposed secrets in configuration files, environment files, and client-side code.

What is the best way to prevent accidental AI API key exposure in deployment artifacts?

The best way to prevent accidental AI API key exposure in deployment artifacts is to run an audit scan that detects embedded secrets in build outputs and insecure logging practices before application deployment.