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

@intentsolutionsio/secret-scanner

v1.0.0

Published

Scan codebase for exposed secrets, API keys, passwords, and sensitive credentials

Readme

Secret Scanner Plugin

Scan codebase for exposed secrets, API keys, passwords, and sensitive credentials with pattern matching and entropy analysis.

Features

  • Multi-Platform API Keys - AWS, GCP, Azure, Stripe, GitHub, etc.
  • Pattern Matching - Known secret formats
  • Entropy Analysis - Detect random strings that may be secrets
  • Git History Scanning - Find secrets in commit history
  • Comprehensive Reporting - File locations and remediation steps
  • Pre-commit Integration - Prevent secret commits

Installation

/plugin install secret-scanner@claude-code-plugins-plus

Usage

# Scan current directory
/scan-secrets

# Or use shortcut
/secrets

What It Detects

API Keys & Tokens

  • AWS Access Keys
  • Google API Keys
  • Azure Storage Keys
  • Stripe API Keys
  • GitHub Personal Access Tokens
  • Slack Tokens
  • Twilio API Keys
  • SendGrid API Keys
  • Mailgun API Keys

Credentials

  • Database passwords
  • SMTP credentials
  • FTP credentials
  • SSH private keys
  • PGP private keys

Tokens

  • OAuth tokens
  • JWT tokens
  • Session tokens
  • Bearer tokens

High-Entropy Strings

  • Base64-encoded secrets
  • Hexadecimal keys
  • Random-looking strings (>4.5 entropy)

Example Report

SECRET SCAN REPORT
==================
Scan Date: 2025-10-11
Secrets Found: 4

CRITICAL SECRETS
----------------

1. AWS Access Key Exposed
   File: src/config/aws.js:12
   Pattern: AKIA[0-9A-Z]{16}
   Value: AKIA****************WXYZ (masked)

   Immediate Actions:
   1. Revoke this key in AWS IAM Console
   2. Generate new access key
   3. Store in environment variable or AWS Secrets Manager
   4. Remove from git history:
      git filter-branch --force --index-filter \
        'git rm --cached --ignore-unmatch src/config/aws.js' \
        --prune-empty --tag-name-filter cat -- --all

2. Database Password Hardcoded
   File: config/database.yml:15
   Pattern: password: ********

   Remediation:
   Use environment variables:
   password: <%= ENV['DB_PASSWORD'] %>

3. Private SSH Key
   File: deploy/id_rsa:1
   Pattern: -----BEGIN RSA PRIVATE KEY-----

   Immediate Actions:
   1. Remove key from repository
   2. Revoke key on all servers
   3. Generate new SSH key pair
   4. Add to .gitignore: deploy/*.pem, deploy/id_rsa

4. High-Entropy String (Potential Secret)
   File: src/utils/crypto.js:45
   Entropy: 4.8 bits
   Value: 3kx9f2nv8q1m4p7r... (base64)

   Review Required:
   Verify if this is a secret or legitimate code

Remediation Guide

For Exposed API Keys

# 1. Revoke the exposed key immediately
# (Use provider's console/CLI)

# 2. Remove from current files
# Replace with environment variable
export API_KEY="new-key-here"

# 3. Remove from git history
git filter-repo --path config/keys.js --invert-paths

# 4. Add to .gitignore
echo "config/keys.js" >> .gitignore

For Configuration Files

# Create template file
cp .env .env.example
# Remove sensitive values from .env.example

# Add .env to .gitignore
echo ".env" >> .gitignore

# Document required variables
cat > .env.example << EOF
# Required environment variables
API_KEY=your_api_key_here
DATABASE_URL=your_database_url_here
EOF

Best Practices

  1. Prevention

    • Use environment variables
    • Implement pre-commit hooks
    • Use secret management tools (Vault, AWS Secrets Manager)
    • Review code before committing
  2. Detection

    • Run scans regularly
    • Scan git history periodically
    • Monitor CI/CD logs
    • Enable secret scanning in GitHub/GitLab
  3. Response

    • Rotate exposed secrets immediately
    • Remove from git history
    • Update documentation
    • Notify security team
  4. Secret Management

    • Use HashiCorp Vault
    • Use cloud provider secret managers
    • Use encrypted configuration
    • Implement proper access controls

Pre-commit Hook

Add to .git/hooks/pre-commit:

#!/bin/bash
if /plugin secret-scanner | grep -q "CRITICAL"; then
    echo "ERROR: Secrets detected! Commit blocked."
    exit 1
fi

Requirements

  • Read access to codebase
  • Read access to git history
  • Write access for remediation scripts

License

MIT License - See LICENSE file for details