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

sudeshi-code-review

v1.2.0

Published

A TypeScript and React code review CLI with security rules and optional Sarvam AI analysis.

Readme

Sudeshi Code Review

A TypeScript and React code-review CLI that scans JavaScript and TypeScript repositories for selected security patterns and produces Markdown or JSON reports. Optional AI-assisted analysis is powered by Sarvam AI.

Features

  • Scans JavaScript and TypeScript repositories, including JSX and TSX source files.
  • Detects selected dangerous HTML insertion patterns, hardcoded secrets, and JavaScript URLs in JSX links.
  • Reports findings with severity and evidence in Markdown or JSON, with support for saving reports to a file.
  • Works without an AI API key using deterministic rules.
  • Supports optional Sarvam AI analysis using your own API key.
  • Includes automated tests for scanning, rules, reporting, and AI-provider behavior.

Requirements

  • Node.js 24 or later.
  • npm.

Installation

Install globally:

npm install --global sudeshi-code-review

Or run without a global install:

npx sudeshi-code-review /path/to/repository

Usage

Scan a local repository:

sudeshi-code-review /path/to/repository

Show command-line help:

sudeshi-code-review --help

Show the installed version:

sudeshi-code-review --version

Choose a report format and destination

Interactive terminals display a formatted terminal summary by default. When output is redirected or the process is non-interactive, the default report is Markdown.

Generate machine-readable JSON:

sudeshi-code-review /path/to/repository --format json

Save a Markdown report:

sudeshi-code-review /path/to/repository --output report.md

Save a JSON report:

sudeshi-code-review /path/to/repository --format json --output report.json

The repository path comes first; place options after it. Use --help for the complete list of options and examples.

Review findings and validate them before acting on them.

Terminal output

Interactive terminals display a formatted summary with severity-colored findings and confidence details. Color output is automatically disabled when stdout is not an interactive terminal or when the NO_COLOR environment variable is set. JSON selected with --format json remains machine-readable and contains no terminal styling.

Disable terminal colors explicitly:

Git Bash

export NO_COLOR=1
sudeshi-code-review /path/to/repository

PowerShell

$env:NO_COLOR = "1"
sudeshi-code-review "C:\path\to\repository"

Optional AI-assisted review

AI review is optional. Without SARVAM_API_KEY, the CLI uses its deterministic rules.

Git Bash

export SARVAM_API_KEY="your_actual_api_key"
sudeshi-code-review /path/to/repository

PowerShell

$env:SARVAM_API_KEY = "your_actual_api_key"
sudeshi-code-review "C:\path\to\repository"

Never commit API keys or include them in source code.

When AI review is enabled, selected source context is sent to Sarvam AI for analysis. Only enable this feature for repositories whose source you are authorized and comfortable sharing with the configured provider. AI assessments are advisory and must be reviewed by a developer.

Current detection rules

| Rule | Purpose | | ------------------ | ------------------------------------------------- | | dangerous-html | Flags selected uses of dangerouslySetInnerHTML. | | hardcoded-secret | Detects selected hardcoded credential patterns. | | unsafe-link | Detects JavaScript URLs in JSX link targets. |

These rules cover selected patterns, not every possible instance of these issues. Repository scanning supports .js, .jsx, .ts, and .tsx source files.

Detection scope and interpretation

  • dangerous-html: Flags selected uses of dangerouslySetInnerHTML. The rule detects the HTML-insertion sink; it does not establish that the supplied value is attacker-controlled or prove that an exploitable XSS vulnerability exists. A narrowly scoped static JSON-LD case is exempted by the rule.
  • hardcoded-secret: Detects non-empty static strings and static template literals assigned to supported secret-like variable names or object-property keys, including quoted and statically computed property keys. Database URL values are flagged when they contain embedded username and password credentials. Detected secret literals are redacted from finding evidence, but arbitrary secret formats and dynamically constructed values are outside the rule's coverage.
  • unsafe-link: Detects statically identifiable javascript: URLs in JSX href attributes, including direct string expressions, static template expressions, and supported locally resolvable variable values. It does not perform comprehensive data-flow analysis of dynamic values.

Finding severity describes the potential impact of a matched pattern. Rule confidence describes confidence in the pattern match; neither value proves exploitability or attacker control. Review the source context before treating a finding as a confirmed vulnerability.

Limitations and responsible use

Sudeshi Code Review is a focused static-analysis tool—not a complete security scanner or a certification that a repository is secure.

  • Findings can include false positives and false negatives.
  • Dynamic data flows are not comprehensively analyzed.
  • Detection is limited to the currently implemented JavaScript and TypeScript rules.
  • A clean report does not establish that a repository is secure.
  • AI assessments can be inaccurate and require human review.
  • AI-context redaction is best-effort. It attempts to redact recognized secret values in supported code patterns and selected repeated occurrences, but cannot guarantee that every secret will be detected or removed. Dynamically constructed values and syntax the implementation does not recognize may still be sent to the configured AI provider.
  • Review the privacy implications before enabling AI review on private or sensitive repositories.

Development

git clone https://github.com/sriram23/sudeshi-code-review.git
cd sudeshi-code-review
npm ci
npm run setup:hooks

Run the validation checks:

npm run format:check
npm run lint
npm test
npm run build
npm pack --dry-run

npm run setup:hooks initializes Husky hooks for contributors working in a Git checkout. It is not required by users installing the published CLI.

Contributing

See CONTRIBUTING.md for development and pull-request guidance.

Security

Please see SECURITY.md for vulnerability-reporting guidance. Do not disclose exploitable vulnerabilities or real credentials in public issues.

License

MIT. See LICENSE.