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

gsec-scanner

v1.0.0

Published

Scan git commit history for leaked secrets, API keys, and tokens by username. Find what was deleted but never truly gone.

Readme

🔍 git-secrets-scanner

Scan git commit history for leaked secrets, API keys, and tokens by username. Find what was deleted but never truly gone.

npm version License: MIT Node.js


🚀 What it does

Secrets accidentally committed to git never really disappear — even after deletion, they live on in the commit history. git-secrets-scanner (alias: gsec) digs through the commit history of a specific author and surfaces:

  • 🔑 API keys (AWS, Google, Azure, Stripe, etc.)
  • 🎟️ Tokens (GitHub, GitLab, Slack, Discord, JWT, Bearer)
  • 🔐 Passwords (hardcoded in code or config files)
  • 🗝️ Private keys (RSA, SSH, PGP)
  • 🗄️ Database credentials (MongoDB, PostgreSQL, MySQL, Redis connection strings)
  • 📦 Package registry tokens (npm, PyPI)
  • 🧮 High-entropy strings (optional Shannon entropy analysis)

📦 Installation

# Install globally
npm install -g git-secrets-scanner

# Or run directly with npx
npx git-secrets-scanner scan --author "username"

🎯 Quick Start

# Scan current repo for secrets by a specific author
gsec scan --author "john.doe"

# Scan a specific repository
gsec scan --author "[email protected]" --repo /path/to/repo

# Export results as JSON
gsec scan --author "dev" --format json --output results.json

# Only show critical and high severity findings
gsec scan --author "dev" --severity high

# Enable entropy-based detection for unknown secret formats
gsec scan --author "dev" --entropy

🛠️ Usage

Usage: git-secrets-scanner scan [options]

Scan git commit history for secrets by a specific author

Options:
  -a, --author <name>       Git author name or email to filter (required)
  -r, --repo <path>         Path to git repository (default: ".")
  -f, --format <type>       Output format: table, json, csv (default: "table")
  -s, --severity <level>    Minimum severity: low, medium, high, critical (default: "low")
  -e, --entropy             Enable entropy-based detection (default: false)
  -o, --output <file>       Write results to a file
  -m, --max-commits <num>   Maximum number of commits to scan (default: "1000")
  -v, --version             Display version number
  -h, --help                Display help

📊 Output Formats

Table (Default)

Beautiful colored ASCII table with:

  • Severity badges (🔴 Critical, 🟠 High, 🟡 Medium, 🔵 Low)
  • Redacted secret values (first 4 chars visible)
  • Status indicators (⚠ ACTIVE vs 🗑 REMOVED)
  • Summary statistics box

JSON

Machine-readable output for CI/CD integration:

{
  "meta": {
    "tool": "git-secrets-scanner",
    "version": "1.0.0",
    "scanDate": "2024-01-15T10:30:00.000Z",
    "author": "developer",
    "totalCommitsScanned": 150
  },
  "summary": {
    "critical": 2,
    "high": 3,
    "medium": 1,
    "low": 0,
    "total": 6
  },
  "findings": [...]
}

CSV

Spreadsheet-friendly format for further analysis.

🔎 Detection Patterns

30+ patterns covering major services:

| Category | Services | |:---|:---| | Cloud | AWS, Google Cloud, Azure | | Source Control | GitHub (PAT, OAuth, App), GitLab | | Messaging | Slack, Discord, Telegram | | Payment | Stripe (secret, publishable, restricted) | | Auth | JWT, Bearer, Basic Auth | | Database | MongoDB, PostgreSQL, MySQL, Redis | | Private Keys | RSA, SSH (OpenSSH), PGP, EC, DSA | | Infrastructure | Twilio, SendGrid, Mailgun, Firebase, Heroku | | Registries | npm, PyPI | | Generic | api_key, secret, password, token assignments |

🧮 Entropy Detection

Use --entropy to enable Shannon entropy analysis. This catches high-randomness strings that don't match any known pattern — useful for custom tokens or secret formats.

🔒 Security

  • Secrets are partially redacted in all outputs (first 4 characters visible + ****)
  • The tool does not send any data externally
  • All scanning happens locally on your machine
  • Exit code 2 when critical/high secrets are found (for CI/CD pipelines)

🤝 CI/CD Integration

# GitHub Actions example
- name: Scan for secrets
  run: npx git-secrets-scanner scan --author "${{ github.actor }}" --format json --severity high --output scan-results.json
  
- name: Upload results
  if: failure()
  uses: actions/upload-artifact@v4
  with:
    name: secret-scan-results
    path: scan-results.json

📄 License

MIT © mannubaveja