secret-blocking

Detect embedded API keys, tokens, and private keys in source code and configuration files.

2|4|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/catpilotai/catpilot-ai-guardrails --skill secret-blocking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-blocking
Source: https://github.com/catpilotai/catpilot-ai-guardrails/tree/main/src/skills/core/secret-blocking
Command: npx skills add https://github.com/catpilotai/catpilot-ai-guardrails --skill secret-blocking

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill prevents sensitive credentials like API keys, tokens, and private keys from being exposed in code or logs, safeguarding organizational security.

Core Features & Use Cases

  • Secret Detection: Identifies hardcoded secrets across various formats and services in source code and configuration files.
  • Prevent Data Leaks: Stops secrets from being written, committed, or echoed, reducing incident risk.
  • Use Case: A developer pushes code to GitHub but the Skill detects embedded AWS credentials, alerting the team before deployment.

Quick Start

Apply the secret-blocking Skill to your repositories to automatically scan for secrets during pull requests and commits.

Frequently Asked Questions about secret-blocking

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

FAQPage Schema
How do I detect hardcoded API keys and tokens in source code before deployment?

Detecting hardcoded secrets in source code involves scanning repositories during pull requests to identify embedded API keys, tokens, and private keys. This prevents sensitive credentials from being exposed in code or logs, safeguarding organizational security before deployment.

What types of confidential credentials can be detected in configuration files?

Detection mechanisms scan configuration files for embedded API keys, access tokens, and private keys across various formats and services. Identifying these hardcoded secrets prevents credential leaks and reduces the risk of security incidents during environment setup processes.

Does this secret detection process work automatically during CI/CD pipelines?

Yes, secret detection works automatically within CI/CD pipelines by scanning commits and pull requests. Applying automated scanning stops secrets from being written or committed, enforcing security compliance best practices continuously throughout the development lifecycle.

Can I use this to prevent AWS credentials from leaking to GitHub?

Yes, you can prevent AWS credentials from leaking to GitHub by automatically scanning pushed code. The detection mechanism identifies embedded cloud credentials and alerts the development team before deployment, stopping secrets from being exposed in repositories or logs.

What is the best way to block secrets from being committed to source code?

The best way to block secrets from being committed is to apply automated detection directly to repositories. This enforces best practices for secret management by identifying and stopping hardcoded credentials in source code and configuration files before they are written.

When do I need to scan logs for confidential tokens and private keys?

You need to scan logs for confidential tokens and private keys whenever applications output sensitive data to prevent credential leaks. Detecting embedded secrets in logs reduces incident risk and enforces security compliance across code review and environment setup processes.