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

@j3r3mcdev/scoring

v1.0.0

Published

Moteur de scoring, corrélation d'événements et génération de rapports (JSON, Markdown, HTML) destiné aux middlewares de sécurité, WAF applicatifs et pipelines DevSecOps.

Readme

@j3r3mcdev/auth-service – Scoring & Reporting Engine

Moteur de scoring, corrélation d'événements et génération de rapports (JSON, Markdown, HTML) destiné aux middlewares de sécurité, WAF applicatifs et pipelines DevSecOps.

Ce module fournit :

  • un moteur de scoring normalisé
  • un système de corrélation d'événements
  • un format unifié pour les findings
  • trois reporters professionnels (JSON, Markdown, HTML)
  • une factory pour sélectionner dynamiquement un reporter
  • des utilitaires de rendu sécurisés (Markdown/HTML)
  • une suite de tests complète (74 tests)

Installation

npm install @j3r3mcdev/auth-service

Fonctionnalités principales

Scoring

Score normalisé entre 0 et 100

Conversion automatique en labels (Low, Medium, High, Critical)

Informations enrichies via scoreInfo() (label, couleur, niveau de risque)

Tri automatique des findings par sévérité

Corrélation

Construction de chaînes d'événements (CorrelationChain)

Calcul de confiance (0–1)

Résumés lisibles via chainSummary()

Tri automatique des chaînes par confiance

Reporting

JSONReporter : export structuré pour CI/CD, ingestion ou stockage

MarkdownReporter : rapport lisible pour développeurs, compatible GitHub/GitLab/VSCode

HTMLReporter : rapport visuel, thème sombre, sections claires

ReporterFactory : sélection dynamique du reporter (json, markdown, html)

Génération de fichiers avec nom, MIME type et contenu final

Sécurité

Échappement Markdown (escapeMarkdown)

Échappement HTML (escapeHtml)

Rendu sécurisé des tableaux, listes, sections et paragraphes

Protection contre l’injection dans les rapports

Utilitaires

renderTable, renderList, renderSection (Markdown)

renderHtmlTable, renderHtmlList, renderHtmlParagraph (HTML)

formatIso() pour les dates

sortFindingsBySeverity() et sortChains() pour un rendu cohérent

Utilisation

Génération d’un rapport

import { createReporter } from "@j3r3mcdev/auth-service";

const reporter = createReporter("markdown");

const findings = [
  {
    id: "f1",
    vulnerability: "xss",
    severity: "high",
    score: 80,
    details: "Reflected XSS detected",
    evidence: ["<script>alert(1)</script>"],
    chains: [],
  },
];

const chains = [];

const report = reporter.generate(findings, chains);

console.log(report.filename);
console.log(report.mime);
console.log(report.content);

API

createReporter(format)

const reporter = createReporter("json" | "markdown" | "html");

Retourne une instance de :

JSONReporter MarkdownReporter HTMLReporter

ReporterOutput

interface ReporterOutput {
  filename: string;
  content: string;
  mime: string;
}

Reporters

JSONReporter Format structuré Idéal pour CI/CD, ingestion, stockage

MarkdownReporter

Rapport lisible Compatible GitHub/GitLab/VSCode

HTMLReporter

Rapport visuel Thème sombre Sections claires et structurées

Tests

La suite de tests couvre :

scoring corrélation reporters factory échappements Markdown/HTML rapports vides intégration complète

Exécution :

npm run test
Résultat attendu :
Test Suites: 24 passed, 24 total
Tests: 74 passed, 74 total
Structure du projet

Licence

MIT