secrets-in-prompts-detection

Detect and redact credentials in prompts, RAG data, and tool schemas.

4|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/maruakshay/mii-ai-security --skill secrets-in-prompts-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-in-prompts-detection
Source: https://github.com/maruakshay/mii-ai-security/tree/main/skills/secrets-in-prompts-detection
Command: npx skills add https://github.com/maruakshay/mii-ai-security --skill secrets-in-prompts-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Credentials and secrets often leak into prompt contexts, system prompts, or RAG data, which can lead to unauthorized access, credential exposure in model outputs, and compromised tooling. This skill helps teams detect, audit, and mitigate such leaks before they reach production or end users.

Core Features & Use Cases

  • Secret pattern detection across system prompts, RAG chunks, and tool schemas to identify potential credentials.
  • Automated redaction and blocking of sensitive data in model responses and in tool calls.
  • CI/CD integration for secret scanning and governance, enabling continuous prevention and remediation across codebases and data pipelines.
  • Use Case: A developer rescans a codebase and RAG corpus to remove embedded API keys before deployment.

Quick Start

Run automated secret scanning on prompts and RAG data, then redact or block any detected credentials.

Frequently Asked Questions about secrets-in-prompts-detection

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

FAQPage Schema
How do I prevent secrets from leaking into RAG ingestion and system prompts?

To detect credentials in RAG data, apply automated secret scanning to system prompts, RAG chunks, and tool schemas to identify and redact embedded API keys before deployment.

Can I integrate secret scanning into my CI/CD pipeline for prompt security?

Yes, you can integrate secret scanning into CI/CD pipelines to enforce continuous governance, automatically detecting and remediating credential exposure across codebases and data pipelines before production release.

What is the best way to redact API keys from LLM tool schemas and model outputs?

The best way to redact API keys from tool schemas and model outputs is to apply output filtering that identifies secret patterns and automatically blocks or redacts sensitive data in tool calls and responses.

Does automated credential detection work for pre-indexing RAG data?

Yes, automated credential detection works for pre-indexing RAG data by scanning and filtering the corpus chunks for embedded secrets before they enter the retrieval context, preventing data leakage.

Why do credentials appear in model responses and how can I block them?

Credentials appear in model responses when secrets leak into prompt contexts or RAG data; you block them by enforcing output filtering that redacts or blocks detected secret patterns before end users see the output.

Are there limitations to secret pattern detection in prompt injection scenarios?

Limitations of secret pattern detection in prompt injection scenarios include relying on predefined patterns for credentials, which may miss novel obfuscated secrets or non-standard sensitive data formats in complex tool integrations.