# secret sentinel

> Prevent and remediate credential leaks in code, logs, and agent prompts using local MCP scanning and redaction.

secret sentinel is a free AI agent skill on Agensi by Alejandro Brito Olivera, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Alejandro Brito Olivera](https://www.agensi.io/creators/alejandro-brito-olivera)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-19
- Security: scan passed (2026-10-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/secret-sentinel
- Tags: llm-ops, security, api, python, devops

## About this skill

Credentials pushed to a repository or pasted into a prompt are compromised instantly, even if you delete them in the next commit. Secret Sentinel prevents these leaks before they happen and provides a systematic remediation path when exposures occur. It integrates directly into your agentic workflow to ensure API keys, tokens, and private keys never leave your local environment or enter your logs.

### What it does
- **Proactive scanning** checks staged git changes, full directories, or specific files for over 64 types of credentials.
- **Automated redaction** cleans logs, stack traces, and command outputs by replacing secrets with redacted placeholders before you share them.
- **Configuration auditing** scans MCP client configs, `.mcp.json`, and agent instructions to ensure no credentials are hardcoded in repo-tracked files.
- **Remediation playbooks** provide step-by-step guidance for rotating compromised keys and cleaning git history.
- **Pre-commit enforcement** installs local hooks to block any commit that contains a detected secret.

### How it works
1. Use `scan_git_staged` or `scan_git_range` before every commit or push to verify your changes are clean.
2. Run `redact_text` on any terminal output or log file before quoting it in a prompt or sharing it with the agent.
3. Replace hardcoded literals with environment variable lookups like `os.getenv` or `process.env` based on the detected finding.
4. Apply the `install-hook` command to automate local guardrails for the entire project.

### Frameworks & tools
Built for Python 3.10+ and available as both an MCP server and a CLI. It supports major agent environments including Claude Code and Cursor, with a dedicated GitHub Action for CI/CD integration.

### Why this beats prompting it yourself
Generic prompts often miss base64-encoded secrets or high-entropy strings that don't look like standard keys. This skill uses a specialized engine with 64 specific detectors and base64-aware scanning, ensuring that "security through obscurity" doesn't lead to a breach.

### Use cases
- **Pre-flight checks** to scan all staged files before running `git commit`.
- **Log sanitization** to strip sensitive tokens from a crash report before sending it to an AI for debugging.
- **Agent config hardening** to ensure your MCP server settings aren't leaking keys into your repository.
- **Incident response** to walk through a structured rotation and history cleanup after an accidental push.

### Known limitations
Scanning requires the secret-sentinel MCP server or CLI to be installed locally. The scanner may truncate output in extremely large repositories, showing only the most severe findings.

## Requires

- Python
- uv (Python tool runner)
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the secret sentinel skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does Secret Sentinel prevent my API keys from being leaked to an AI provider?

Secret Sentinel acts as a local security layer that scans code and logs for over 64 types of credentials, automatically redacting them before they reach your AI agent or are committed to a repository. It solves the critical problem of 'instant compromise' by blocking leaks before data leaves your local machine.

### Which AI agents and IDEs are compatible with this skill?

The skill is designed for any environment supporting Model Context Protocol (MCP), including Claude Code and Cursor. It also includes a CLI and a GitHub Action, making it compatible with most modern development workflows and CI/CD pipelines.

### Does my code or log data need to be sent to a cloud service for scanning?

No, scanning and redaction are performed locally using the Secret Sentinel MCP server or CLI. Your sensitive data is processed on your machine, ensuring that unredacted secrets are never sent to external servers or AI models for analysis.

### What exactly is included in the Secret Sentinel package?

Your purchase includes the full Secret Sentinel MCP server, a standalone CLI tool, a dedicated GitHub Action for repository protection, and a library of remediation playbooks for incident response.

### Can I automate the scanning process so I don't forget to run it?

Yes, the 'install-hook' command sets up local git hooks that automatically trigger a scan during the pre-commit phase. This ensures that any commit containing a detected secret is blocked until the security risk is addressed.

### Are there any technical limitations I should be aware of before installing?

While the scanner is highly efficient, it may truncate output in extremely large repositories to prioritize the most severe findings. It requires Python 3.10+ and a local installation of the Secret Sentinel server to function within your agentic workflow.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
