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

@hasna/security

v0.1.10

Published

AI-powered security scanner for git repos — CLI, MCP, API, Web Dashboard, SDK with Cerebras LLM

Downloads

1,178

Readme

@hasna/security

AI-powered security scanner for git repos with supply chain attack detection.

npm License

Install

npm install -g @hasna/security
# or
bun install -g @hasna/security

Quick Start

# Scan your repo for security issues
security scan .

# Check if a package is compromised (axios/litellm/Trivy supply chain attacks)
security check-package axios 1.14.1
security check-package litellm 1.82.8 --ecosystem pypi

# List known supply chain attack advisories
security advisories

# Quick scan (secrets + dependencies only)
security scan . --quick

Scanners

9 built-in scanners:

| Scanner | What it finds | |---------|--------------| | secrets | API keys, tokens, high-entropy strings | | dependencies | CVEs via OSV.dev (npm, PyPI, Go, Rust) | | code | SQL injection, XSS, command injection, path traversal | | git-history | Secrets committed in git history | | config | Insecure CORS, debug mode, missing security headers | | ai-safety | Prompt injection, PII exposure, unsafe tool use | | ioc | Supply chain attack indicators (C2 domains, RAT artifacts, malicious packages) | | lockfile | Compromised locked versions, unpinned ranges during attack windows | | supply-chain | Typosquatting, postinstall exploits, GitHub Actions tag hijacking |

Supply Chain Attack Detection

The IOC scanner checks against a built-in advisory database of known attacks:

  • [email protected]/0.30.4 (March 31, 2026) — maintainer account hijack, RAT dropper via plain-crypto-js
  • [email protected]/1.82.8 (March 24, 2026) — TeamPCP CI/CD compromise via poisoned Trivy, .pth file persistence
  • Trivy v0.69.4 (March 19, 2026) — TeamPCP tag hijack, 76 version tags force-pushed
  • Checkmarx KICS/AST (March 23, 2026) — TeamPCP tag hijack using stolen CI/CD credentials
# Run IOC scan
security scan . --scanner ioc

# Run lockfile forensics
security scan . --scanner lockfile

# Full supply chain check
security scan . --scanner supply-chain

Alert Pipeline

Configure alerts for new supply chain detections:

# Check alert status
security alerts status

# Test alerts with a known advisory
security alerts test

# Enable alerts (min severity: critical)
security alerts enable

Supports: Slack, Discord, Webhook, Twitter/X, Email

# Set via environment variables
export SECURITY_SLACK_WEBHOOK_URL=https://hooks.slack.com/...
export SECURITY_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
export SECURITY_WEBHOOK_URL=https://your-api.example.com/webhook

MCP Server (for AI agents)

# Install for Claude Code
security mcp --claude

# Install for all agents
security mcp --all

32 tools available including check_package, scan_repo, list_advisories, get_advisory.

REST API + Dashboard

security serve
# Opens at http://localhost:19428

Dashboard pages: Dashboard, Feed (live advisory feed), Package Lookup, Attack Timeline, Findings, Scans, Rules, Projects.

API endpoints:

  • GET /api/advisories — list known supply chain advisories
  • GET /api/check-package?name=axios&version=1.14.1 — check package safety
  • GET /api/findings — query scan findings
  • POST /api/scans — trigger a new scan

All CLI Commands

security scan [path]              Run security scan
security findings                 List findings
security explain <id>             AI explanation for a finding
security fix <id>                 AI-suggested fix
security review                   Review staged git changes
security init                     Initialize for this repo
security baseline                 Mark findings as baseline
security score                    Show security score
security check-package <name>     Check if package is compromised
security advisories               List supply chain advisories
security alerts status|test|...   Manage alert channels
security mcp --claude|--all       Install MCP server
security serve                    Start web dashboard

Data

Stored in ~/.hasna/security/ (override with SECURITY_DB env var).

Cloud Sync

cloud sync push --service security
cloud sync pull --service security

License

Apache-2.0 — see LICENSE