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

@hugozauad/security-audit-toolkit

v0.2.0

Published

Toolkit para auditoria e análise de segurança de projetos Node.js via CLI e como biblioteca.

Readme

🔐 Security Audit Toolkit

npm version license node

Toolkit para auditoria e análise de segurança em projetos Node.js.
Disponível como CLI e também como biblioteca TypeScript.


🚀 Why use this?

Este toolkit foi criado para resolver um problema comum:

🔍 “Como auditar rapidamente segurança e qualidade de um projeto Node sem depender de várias ferramentas separadas?”

✔️ O que ele resolve

  • Centraliza ferramentas como npm audit, eslint e ts-prune
  • Adiciona scan inteligente de código
  • Gera relatórios legíveis em Markdown
  • Funciona como CLI e biblioteca
  • Pronto para uso em scripts e CI/CD

🎥 Demonstração

CLI Demo


🚀 Instalação

Uso direto com npx

npx security-audit

Instalar no projeto

npm install @hugozauad/security-audit-toolkit

💻 Uso via CLI

🧭 Modo interativo

npx security-audit

⚡ Comandos diretos

npx security-audit deps-audit
npx security-audit code-scan
npx security-audit full-check

📦 Uso em scripts do package.json

{
  "scripts": {
    "security:audit": "security-audit deps-audit",
    "security:scan": "security-audit code-scan",
    "security:full": "security-audit full-check"
  }
}

📊 Funcionalidades

🔍 Auditoria de dependências (deps-audit)

  • npm audit --json
  • npm outdated
  • eslint
  • ts-prune

Gera relatório:

.security-reports/<data>/audit-report.md

🛡️ Scan avançado de código (code-scan)

Detecta padrões como:

  • uso de eval
  • tokens hardcoded
  • regras permissivas (ex: Firestore)
  • possíveis webhooks sem validação

Gera relatório:

.security-reports/<data>/scan-report.md

🔄 Auditoria completa (full-check)

Executa:

  • auditoria de dependências
  • scan de código

📄 Exemplo real de saída

🔎 Resumo de vulnerabilidades

## Resumo de Vulnerabilidades

| Severidade | Qtde |
|------------|------|
| Crítica    | 1    |
| Alta       | 2    |
| Moderada   | 3    |
| Baixa      | 5    |
| Total      | 11   |

🚨 Scan de código

## Uso de eval
Risco: Execução arbitrária de código

| Arquivo       | Linha | Trecho            |
|--------------|------|------------------|
| src/app.ts   | 12   | eval("danger")   |

📚 Uso como biblioteca

import { auditProject, scanProject } from '@hugozauad/security-audit-toolkit';

const audit = auditProject();
const findings = scanProject();

console.log(audit);
console.log(findings);

📁 Estrutura de saída

.security-reports/
  └── 2026-04-16/
      ├── audit-report.md
      └── scan-report.md

⚙️ Tecnologias

  • Node.js
  • TypeScript
  • Inquirer
  • ESLint
  • ts-prune

🧪 Testes

npm test

📌 Requisitos

  • Node.js >= 18
  • npm >= 8

⚠️ Observações

  • ESLint e ts-prune precisam estar disponíveis no projeto alvo
  • O scan analisa diretórios comuns (src, functions, scripts)
  • Pode gerar falsos positivos dependendo do contexto

🛠️ Roadmap

  • [ ] Configuração customizada (security-audit.config.json)
  • [ ] Integração com CI/CD
  • [ ] Exportação JSON estruturada
  • [ ] Regras customizadas de segurança
  • [ ] Dashboard web

📄 Licença

MIT


👨‍💻 Autor

Hugo Zeymer Auad