Claude Secret Scan
Secret scanning CLI for Claude Code. Blocks or warns on common credentials (cloud, source control, payment, collaboration) using zero dependencies and local regex matching.
Why
- Prevent accidental leakage in everyday editor/agent workflows.
- Zero dependencies, single-file core, runs locally only.
- Simple to set up; easy for teams to adopt.
Install
- pipx (recommended):
pipx install claude-secret-scan
- pip (user):
python3 -m pip install --user claude-secret-scan
Hook Setup (Claude Code)
Add to ~/.claude/settings.json for manual hooks:
{
"hooks": {
"UserPromptSubmit": [
{"hooks": [{"type": "command", "command": "claude-secret-scan --mode=pre"}]}
],
"PreToolUse": [
{"matcher": "Read|read", "hooks": [{"type": "command", "command": "claude-secret-scan --mode=pre"}]}
],
"PostToolUse": [
{"matcher": "Read|read", "hooks": [{"type": "command", "command": "claude-secret-scan --mode=post"}]},
{"matcher": "Bash|bash", "hooks": [{"type": "command", "command": "claude-secret-scan --mode=post"}]}
]
}
}
CLI Usage
- Pre mode (blocks on detection):
echo '{"hook_event_name":"UserPromptSubmit","prompt":"hello"}' | claude-secret-scan --mode=pre
- Post mode (warns on detection):
echo '{"tool_input":{"tool_name":"bash"},"tool_response":{"stdout":"OPENAI_API_KEY=...T3BlbkFJ..."}}' | claude-secret-scan --mode=post
How It Works
- Regex-based detection for common credentials: AWS, GitHub, GitLab, Stripe, Slack, Discord, Telegram, Google, OpenAI/Anthropic, JWT/keys, and more.
- Reads only from hook JSON input or file paths provided by the hook.
- Binary-aware scanning with size limits; local-only execution.
Notes
- Pre hooks block; post hooks print warnings.
- For plugin marketplace usage and more docs, see the repository.
Links
- Source, docs, and examples: https://github.com/mintmcp/agent-security
Metadata
Release files for claude-secret-scan 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| claude_secret_scan-0.1.14.tar.gz | 9.3 kB | With provenance | Details for claude_secret_scan-0.1.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| claude_secret_scan-0.1.14-py3-none-any.whl | Python 3 | none | any | Details for claude_secret_scan-0.1.14-py3-none-any.whl |
Total release size: 18.0 kB
Release files / claude_secret_scan-0.1.14.tar.gz
| Download URL | claude_secret_scan-0.1.14.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f4c8d32a709db82354d61a4af49da7254578cb328d7b932f70dcdb2e0191d6b
|
|
BLAKE2b-256 checksum How to use checksums |
34723cbcfce71c9b95371a11efe23352063b564f5922231ecdc9199a8130f631
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2025.
Transparency logRelease files / claude_secret_scan-0.1.14-py3-none-any.whl
| Download URL | claude_secret_scan-0.1.14-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6f4b4da2d1b30f5cd42e56d19123c29898dbcd193107910bbd057221896d0c9
|
|
BLAKE2b-256 checksum How to use checksums |
a6f6340446c563352af85bd18c979cda52d1a7b95d03a053c6883759c2217803
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2025.
Transparency logSecurity for claude-secret-scan 0.1.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for claude_secret_scan-0.1.14.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.