# keyhush

Claude Code mod that hides API keys and passwords from the model.

- Category: Developer Tools
- Pricing: Free
- Tags: Security, Cybersecurity, Coding Assistants, Open-Source AI
- Website: https://github.com/ybonda/keyhush/?via=aigregator
- Aigregator page: https://aigregator.com/tools/keyhush
- API: https://x402.aigregator.com/v1/tools/keyhush

## Overview
keyhush is an open-source mod for Claude Code that keeps passwords, API keys and tokens out of the conversation. It scans every tool result (Bash, Read, MCP tools) and every prompt you submit, and replaces each secret it finds with a marker such as [REDACTED:github-token:5483c49a]. The model only ever sees the marker, so it cannot repeat the secret, write it to a file or send it anywhere.

It is built for developers who let Claude Code read .env files, config files, logs or printenv output, and there is nothing to configure. keyhush runs three checks: known key formats (AWS, GitHub, Anthropic, OpenAI, Google, Slack, Stripe, JWTs, PEM private keys), secret-sounding names followed by a value, and long random-looking strings measured by entropy. Git hashes, UUIDs, file paths, placeholders and code references pass through unchanged. The same secret gets the same marker for the whole session, salted per session, and the real value is never stored.

The main limitation: it fails open. If a scan crashes, the output passes through unredacted with a warning line. Short or letters-only passwords, and passwords with no name next to them, are not caught, and outputs over 2 MB only get the known-format check.
## Key Features
- Redacts secrets in tool results before Claude sees them
- Scans submitted prompts for accidentally pasted keys
- Detects known key formats: AWS, GitHub, Anthropic, OpenAI, Google, Slack, Stripe, npm, Polar, JWTs and PEM keys
- Catches values under secret-sounding names, including person-made passwords
- Entropy check for long random-looking strings
- Leaves git SHAs, UUIDs, paths, placeholders and code references unchanged
- Stable per-session fingerprints in redaction markers, never stores the real value
- No configuration needed; prints a status line at session start

## Use Cases
- Let Claude Code read .env and config files without exposing credentials
- Keep tokens from command output like printenv out of the AI session
- Catch API keys pasted into a prompt by accident

## Alternatives
- GitGuardian
- TruffleHog
- Gitleaks

---
Source: Aigregator — AI tools directory. https://aigregator.com/tools/keyhush
