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

@bhargavmahanta/envguard

v1.1.0

Published

Security linting for env, Docker, CI, and runtime configuration.

Readme

EnvGuard

Security linting for env, Docker, CI, and runtime configuration.

npm CI License PRs Welcome

EnvGuard helps developers catch unsafe environment values, risky runtime defaults, Docker/Compose hazards, and CI/CD configuration issues before they reach production. It complements deep secret-history scanners like Gitleaks and TruffleHog rather than replacing them.

Features

  • Scan .env, config, Docker, Compose, and GitHub Actions files
  • Scan GitLab CI and CircleCI configuration
  • Check .env hygiene and .env.example / .env.schema drift
  • Detect real-looking secrets, weak secrets, unsafe runtime settings, and wildcard CORS
  • Detect Docker and CI/CD security issues
  • Mask secrets by default in terminal, JSON, Markdown, SARIF, and GitHub annotation reports
  • Support local CLI usage, pre-commit hooks, and GitHub Actions
  • Scan only staged or changed files for fast developer workflows
  • Use the included reusable GitHub Action wrapper
  • Configure behavior with envguard.config.yml and .envguardignore

Installation

npx @bhargavmahanta/envguard scan .

Or install globally:

npm install -g @bhargavmahanta/envguard

Quick Start

envguard scan .
envguard scan . --ci --fail-on high
envguard scan . --format json --output report.json
envguard scan . --format markdown --output report.md
envguard scan --staged
envguard scan --changed origin/main
envguard scan . --format github
envguard baseline audit
envguard init
envguard rules
envguard doctor --json

On Windows PowerShell, if script execution blocks the generated envguard.ps1 shim, use the .cmd shim:

envguard.cmd scan .
npx --package @bhargavmahanta/envguard envguard.cmd scan .

Example Output

[HIGH] Database URL contains a password (database-url-password)
  File: .env:3
  Preview: DATABASE_URL=postgres://admin:********@localhost:5432/app
  Risk: 100/100 | Confidence: high
  Fix: Move database credentials to a secret manager or untracked local env file.

Supported Detections

  • AWS keys, GitHub tokens, Stripe keys, Slack tokens, Google API keys
  • Private keys, JWT tokens, bearer tokens, database URLs with passwords
  • Weak JWT/session/API secrets and placeholder values
  • DEBUG=true, development runtimes, disabled SSL/TLS verification
  • Wildcard CORS and wildcard CORS with credentials
  • .env duplicate keys, empty values, malformed lines, invalid keys, and schema drift
  • Dockerfiles that copy .env, use latest, run as root, miss .dockerignore, or use remote ADD
  • Compose privileged containers, public database ports, host networking, unsafe volumes, inline secrets, and latest tags
  • GitHub Actions secret printing, pull_request_target, floating actions, broad permissions
  • GitLab CI and CircleCI secret-printing and risky defaults

Configuration

Create starter files:

envguard init

Example envguard.config.yml:

severity:
  fail_on: high

entropy:
  enabled: true
  threshold: 4.2

output:
  mask: true

rules:
  disabled: []
  packs:
    - node
    - python
    - docker
    - github-actions
    - ci
  custom: []

allow: []

scan:
  max_file_mb: 2
  timeout_seconds: 0
  include_gitignored: false

Example .envguardignore:

node_modules/
dist/
docs/fixtures/

Reports

EnvGuard supports:

terminal
json
markdown
sarif
github

Sample Vulnerable Project

Try EnvGuard against the included fake vulnerable project:

npm install
npm run build
node dist/cli.js scan examples/vulnerable-project

Limitations

EnvGuard uses pattern-based and heuristic detection. It may produce false positives or miss some secrets. It does not validate, transmit, or use detected credentials.

Documentation

License

MIT

Disclaimer

EnvGuard is a defensive security tool. Only scan repositories you own or have permission to test.