memstack-security-secrets-scanner

memstack-security-secrets-scanner is a skill for Claude Code from cwinvestments/memstack. It costs 62 tokens per session (6,657 once invoked), scanned B, original, MIT.

A codebase scanner that looks for hardcoded secrets, exposed API keys, and other credentials in source files and Git history. Secrets are private values used to authenticate software with services.

In plain words
What is it for?
Use it to scan source code and Git history for leaked keys and credentials, including during a pre-deployment security review or a targeted .env audit.
Why use it?
It helps locate credentials that may have been accidentally committed or exposed before deployment. It is focused on secret leaks, not dependency vulnerabilities or database access policies.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; positional $N argument.

Part of the memstack plugin — 87 skills, 2 commands, 6 hooks shipped together

Good fit Use it to scan source code and Git history for leaked keys and credentials, including during a pre-deployment security review or a targeted .env audit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cwinvestments/memstack/secrets-scanner
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cwinvestments/memstack --skill secrets-scanner
Clone the repo
git clone --depth 1 https://github.com/cwinvestments/memstack

Made for: Claude Code.

Or install memstack, the plugin that ships this one along with the rest of its 87 skills, 2 commands, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memstack-security-secrets-scanner

README.md
[![agentmods](https://agentmods.dev/badge/skills/cwinvestments/memstack/secrets-scanner/github.svg)](https://agentmods.dev/skills/cwinvestments/memstack/secrets-scanner)
Your own site
<a href="https://agentmods.dev/skills/cwinvestments/memstack/secrets-scanner"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/secrets-scanner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memstack-security-secrets-scanner

Your own site · 80×15
<a href="https://agentmods.dev/skills/cwinvestments/memstack/secrets-scanner"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/secrets-scanner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,657 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 33 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 26
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 28
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 54
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 57
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 60
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 63
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 66
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 77
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 80
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 84
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 87
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 94
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 208
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 210
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 212
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 215
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 218
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 347
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 386
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 396
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.06657
Opus 5.5 $0.00025 $0.02663
Sonnet 5.5 $0.00012 $0.01331
Haiku 4.5 $0.00006 $0.00666

Measured 1mo ago against content hash b293aa177475, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

memstack-security-secrets-scanner scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variablesmediumData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

# Extract all env var names from the codebase

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/security/secrets-scanner/SKILL.md · 550 lines

How it starts

The opening of the file, as written. The whole thing — 550 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🔑 Secrets Scanner: Scanning for Exposed Credentials...

Scan a codebase for hardcoded secrets, leaked API keys, and credential exposure across files and git history.

Activation

When this skill activates, output:

🔑 Secrets Scanner: Scanning for Exposed Credentials...

Then execute the protocol below.

Context Guard

Context Status
User asks to scan for secrets/keys ACTIVE: full scan
User mentions credential exposure ACTIVE: full scan
User asks about .env security ACTIVE: targeted .env audit
Pre-deployment security review ACTIVE: full scan
User is creating .env files DORMANT: let them work

⚠️ Enforcement lives in CLAUDE.md, not here

This skill cannot be the control that prevents secret leaks. Skill matching is semantic and probabilistic: it misses. In a real session that leaked a live SendGrid production key, the query "rotate object storage credentials S3 bucket key move secrets rotation" scored this skill at 0.24 and it never loaded. The task was credential handling end to end.

Therefore the hard rule ("never print a secret value") belongs in always-loaded context, a project CLAUDE.md block, which loads unconditionally regardless of matching, MCP reachability, or hooks. This skill carries the operational how-to below; CLAUDE.md carries the prohibition. If you are reading this skill and the project has no secrets block in CLAUDE.md, adding one is the highest-value fix available, ahead of any scan.

Safe Inspection Patterns (use these any time you touch a secrets file)

Rule: allowlist names, never denylist values

Redaction by denylist is the single most common way secrets leak during "safe" inspection. A pattern that redacts KEY=, SECRET=, PASSWORD= looks thorough and silently fails on SENDGRID_API_KEY_PROD=, STRIPE_SECRET_KEY_TEST=, DB_PASSWORD_2=: any suffixed variant. Never enumerate what to hide. Emit only what is provably safe: names.

Read the full file on GitHub · 550 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed b293aa177475
  2. 1mo ago First seen · 550 lines · 62 tokens per session scan B f2c5a5fee5d5

Subscribe to this mod's changes

memstack-security-secrets-scanner is a skill published in the GitHub repository cwinvestments/memstack (426 stars, last pushed 3d ago), licensed MIT. It adds 62 tokens to every session and 6,657 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.