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

guardog

v1.0.0

Published

Secret scanning in your codebase, the FOSS way.

Readme

Guardog

Secret scanning in your codebase, the FOSS way.

What is Guardog?

Guardog is a fast, zero-config secret scanner that scans your codebase (not git history) for leaked secrets using regex pattern matching and Shannon entropy analysis. Designed for Forgejo Actions on Codeberg, invoked via npx with zero setup.

Why Guardog?

  • Codeberg/Forgejo-native: Built for self-hosted Forgejo instances
  • FOSS: 100% open source, MIT licensed
  • EU-friendly: No data leaves your infrastructure
  • Zero config: Works out of the box with sensible defaults
  • Minimal: Only essential dependencies

Installation

Via npx (recommended)

npx guardog scan .

Via npm install

npm install -g guardog
guardog scan .

Usage

Basic usage

guardog scan .

Scan the current directory for secrets.

Scan a specific path

guardog scan /path/to/repo

Options

| Flag | Description | Default | |------|-------------|---------| | --config <file> | Path to config file | .guardog.yml | | --entropy-threshold <number> | Entropy threshold override | 5.0 | | --no-entropy | Disable entropy analysis | enabled | | --json | Output findings as JSON | human-readable | | --quiet | Suppress all output except exit code | false | | --fail-on-warning | Treat low-confidence findings as failures | false |

Exit codes

  • 0 — No findings
  • 1 — One or more high-confidence findings
  • 2 — Config or runtime error

Configuration

Create a .guardog.yml file in your repository root:

ignore:
  - "**/*.test.ts"
  - "test/fixtures/**"

allowlist:
  - "EXAMPLE"
  - "your-placeholder-here"

entropy_threshold: 5.0
entropy_min_length: 20

custom_patterns:
  - name: "Internal service token"
    regex: "svc_[a-zA-Z0-9]{32}"
    severity: high

Configuration reference

| Field | Type | Description | |-------|------|-------------| | ignore | string[] | Glob patterns to ignore | | allowlist | string[] | Strings that suppress findings | | entropy_threshold | number | Shannon entropy threshold (default: 5.0) | | entropy_min_length | number | Minimum token length for entropy check | | custom_patterns | array | Custom regex patterns |

Forgejo Actions Integration

name: Secret Scan

on:
  push:
    branches: ["*"]
  pull_request:

jobs:
  guardog:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Run Guardog
        run: npx --yes guardog scan .

Detected Patterns

Guardog detects numerous secret patterns including:

  • AWS Access Key ID / Secret Key
  • GitHub Personal Access Token / OAuth Token
  • GitLab PAT
  • Stripe Secret Key
  • OpenAI API Key
  • Anthropic API Key
  • SendGrid API Key
  • Twilio Account SID / Auth Token
  • Mailgun API Key
  • Slack Bot/User Token / Webhook URL
  • Discord Bot Token / Webhook URL
  • Google API Key
  • Firebase API Key
  • JWT Token
  • PEM Private Key
  • Generic API keys, secrets, and passwords
  • URL with embedded credentials

Development

Requirements

  • Node.js 18+
  • npm

Setup

npm install

Build

npm run build

Test

npm test

Development mode

npm run dev

Contributing

Contributions are welcome.

License

AGPL-3.0-only