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

securelens-ai

v1.0.2

Published

AI-Assisted Secure Code Auditor & AST Vulnerability Scanner

Readme


🚀 Quick Start — Global NPM CLI Tool

You can run SecureLens instantly on any Python codebase in your terminal without installing software:

# 1. Fast AST Static Security Scan (< 100ms)
npx securelens-ai scan ./ --ast-only

# 2. Full AST + ChromaDB Vector RAG + Gemini AI Audit
npx securelens-ai audit ./ --rag

# 3. Export Executive Security PDF Report
npx securelens-ai export ./ --pdf

🏛️ Project Architecture & Design System

SecureLens features a 2-page high-converting SaaS product architecture inspired by the Dala & Vercel design aesthetic:

  1. 🏠 Main Landing Page (/): Fast, high-converting home page with a 100% native HTML5 3D WebGL hero stage canvas, infinite tech stack marquee, 3 core security pillars, and animated rolling stat counters.
  2. 🚀 Interactive Capabilities Suite (/features): Dedicated interactive sandbox page housing the live Micro-Auditor code widget, 3D Vulnerability Class Radar Matrix (SQLi, Command Injection, Path Traversal, Deserialization), PDF Report Showcase, and macOS CLI Terminal.
  3. 🖥️ Auditor Workspace Dashboard (/app): Fixed viewport security auditor workspace featuring Monaco Code Editor, AST rule execution pipeline, risk score metrics, and side-by-side secure fix code diff comparisons.
graph TD
    A[Python Source Code / CLI / Web Editor] --> B[Decoupled AST Static Scanner]
    B -->|Flagged AST Nodes + File Paths| C[Local ChromaDB Vector Store]
    C -->|Semantic Cosine Similarity| D[OWASP & CWE Prevention Context]
    D -->|Cached Context Payload| E[Gemini 2.5 AI Reasoning Engine]
    E --> F[Enriched Vulnerability Findings]
    F -->|Render in Dashboard & CLI| G[React 19 & TanStack Router UI]
    F -->|Export Report PDF| H[ReportLab PDF Compiler]

⚡ Core Features & Capabilities

  • 13 AST Security Rule Detectors: Built-in deterministic static AST rules targeting SQL Injection (CWE-89), OS Command Injection (CWE-78), Path Traversal (CWE-22), Unsafe Deserialization (CWE-502), hardcoded secrets, weak hashing, and unsafe Flask/Django configurations.
  • Semantic Vector RAG Retrieval: Queries a persistent local ChromaDB vector store using ONNX MiniLM embeddings for OWASP Top 10 and CWE guidelines.
  • Gemini 2.5 AI Fix Synthesis: Generates grounded, hallucination-free secure code fixes and attack scenario explanations.
  • Executive Security PDF Exporter: In-memory PDF compiler creating corporate security reports containing risk metrics, vulnerability list tables, and side-by-side code diffs.
  • GitHub Actions CI/CD Pipeline Automation: Ready for integration into .github/workflows/security.yml to block vulnerable Pull Requests automatically.

📖 Detailed Documentation Index

All architecture, design, and CLI documentation is located in the docs/ folder:


🔌 API Reference

1. POST /api/scan

Audits a single block of Python code.

2. POST /api/scan-project

Audits multi-file project directories recursively.

3. POST /api/export-report

Compiles scan findings and returns a downloadable binary PDF report file.

4. GET /api/stats

Returns aggregated historical scan statistics and risk metrics.


💻 Local Development & Setup

1. Backend Setup (FastAPI & Python 3.12)

# 1. Install dependencies
pip3 install -r requirements.txt --break-system-packages

# 2. Populate ChromaDB Vector Database
python3 backend/rag/build_database.py

# 3. Add API Keys to .env
GEMINI_API_KEY=your_gemini_key

# 4. Start Server
python3 -m uvicorn backend.main:app --reload --port 8000

2. Frontend Setup (React 19 & TanStack Start)

npm install
npm run dev

📜 License

Distributed under the MIT License. See LICENSE for more information.