npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rimenko-dev/aiguard

v0.1.6

Published

Protect your projects from AI-tool secret leaks — catches .claude/, .cursor/, and hidden credentials before npm publish or git push

Readme

aiguard

Stop AI coding tools from leaking your secrets.

Claude Code, Cursor, Copilot, and Windsurf write fast — and regularly sneak API keys, session tokens, and crypto seed phrases into your public repos and npm packages. aiguard catches them before npm publish or git push.

npm install -g @rimenko-dev/aiguard
aiguard

npm version License: MIT


Real-world findings

We scanned 50,000 public GitHub repositories for AI tool artifacts. Results:

| Metric | Count | |--------|-------| | Files analyzed | 362 | | Unique secrets found | 138 | | Crypto seed phrases (12-word mnemonics) | 45 | | Database connection strings | 40 | | Generic API keys | 22 | | Plaintext passwords | 16 | | Anthropic API keys | 3 | | AWS access keys | 2 | | SSH private keys | 4 |

The #1 leak vector: CLAUDE.md. Developers paste credentials into Claude Code's context file (CLAUDE.md) so the AI can reference them — then commit it to a public repo. We found over 63 CLAUDE.md variants containing live secrets.

45 crypto seed phrases were exposed in project files. That's 45 wallets — potentially drained.


The problem

Your AI assistant stores credentials in hidden folders:

| Tool | Folder | What's stored | |------|--------|---------------| | Claude Code | .claude/ | API keys, MCP server tokens, CLAUDE.md context | | Cursor | .cursor/ | OAuth tokens, MCP configs, API keys | | Windsurf | .windsurf/ | Auth tokens, workspace credentials | | Aider | .aider/ | Model API keys, git credentials | | Continue | .continue/ | LLM provider keys, embeddings tokens | | Codeium | .codeium/ | Authentication tokens |

These folders are not excluded by default from npm publish or git push. One missing .npmignore line, or a CLAUDE.md with a seed phrase committed to a public repo, and secrets are exposed — forever cached by GitHub.


What it catches

AI tool folders in your publish.claude/, .cursor/, .windsurf/, etc. included in npm tarball or git commit.

Known AI context files with secretsCLAUDE.md, mcp.json, settings.local.json.

Secrets in published files — 55+ patterns across every major provider:

| Category | Services | |----------|----------| | AI providers | Anthropic, OpenAI, xAI/Grok, Gemini, Groq, HuggingFace, Replicate, Mistral | | Cloud | AWS, GCP service accounts, Azure, DigitalOcean, Cloudflare | | Source control | GitHub (classic / OAuth / Actions / fine-grained PAT), GitLab | | Payments | Stripe, PayPal, Braintree | | Messaging | Slack, Discord, Telegram bots, Twilio | | Email | SendGrid, Mailgun, Resend, Postmark | | Databases | PostgreSQL, MySQL, MongoDB, Redis, Supabase, PlanetScale, Neon, Pinecone | | Hosting | Vercel, Netlify, Heroku, Railway, Fly.io, npm tokens | | Monitoring | Sentry, Datadog | | Crypto | BIP39 12-word mnemonics, Ethereum private keys, Bitcoin WIF keys | | Keys | RSA / EC / SSH private keys, JWT secrets | | Catch-all | Any PASSWORD=, SECRET=, API_KEY=, TOKEN= longer than 8 chars |


Usage

# Scan current directory
aiguard

# Scan a specific project
aiguard /path/to/project

Exit codes:

  • 0 — clean or warnings only
  • 1 — CRITICAL or HIGH findings (publish blocked)

Example output:

aiguard — AI secret leak scanner
Project: /my-package

🚨 CRITICAL — publish blocked (1):
   .claude/settings.local.json
   This file contains API keys and tokens — it will be included in your npm package!

⚠️  HIGH RISK — publish blocked (1):
   CLAUDE.md
   Crypto mnemonic (12 words): abandon abandon ***...*** 

❌ Publish blocked: 1 critical + 1 high findings.
Add to .npmignore:
  .claude
  .cursor
  .env
  *.local

Use as a pre-publish hook

Add to your package.json to block every npm publish automatically:

{
  "scripts": {
    "prepublishOnly": "aiguard"
  }
}

Use as a Claude Code hook

Runs before every Bash command inside Claude Code — catches secrets before they land in committed files.

Add to .claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "npx @rimenko-dev/aiguard"
          }
        ]
      }
    ]
  }
}

Or copy the included config:

cp node_modules/@rimenko-dev/aiguard/claude-hook/settings.json .claude/settings.json

Severity levels

| Level | Meaning | Blocks publish? | |-------|---------|-----------------| | 🚨 CRITICAL | AI secret file will be included in the package | ✅ Yes | | ⚠️ HIGH | Known secret pattern found in a file that will be published | ✅ Yes | | 💡 WARN | Potential risk (file exists locally, .npmignore gap) | ❌ No |


How it works

For npm projects (has package.json):

  1. Resolves exactly which files npm publish would include — respects files field and .npmignore
  2. Scans only those files — no false positives from files that won't be published
  3. Blocks publish on CRITICAL or HIGH findings

For non-npm projects (Go, Python, Rust, etc.):

  1. Scans all non-gitignored files
  2. Reports findings before git push

Recommended .npmignore

.claude
.cursor
.windsurf
.continue
.aider
.codeium
.env
.env.*
*.local
CLAUDE.md

Install

npm install -g @rimenko-dev/aiguard

Or run without installing:

npx @rimenko-dev/aiguard

Contributing

Pull requests welcome. To add new secret patterns, edit src/patterns.js — each entry needs a name and a regex with the g flag.


License

MIT — github.com/RimenKo/aiguard