Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

prism-code-review

Latest version: v2.0.2

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: Bibekbwn
1 Stars
0 Forks
3 Versions
Python Repo language

Scan summary

prism-code-review was last scanned on 29 Nov 2026 at version 2.0.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 2.0.2.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.0.2 LATEST 29 Nov 2026 No rules fired
2.0.1 14 Nov 2026 No rules fired
2.0.0 14 Nov 2026 No rules fired

No rules fired in 2.0.2

Findings

Findings for v2.0.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.0.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

PRISM — Pre-Commit Code Review System

Multi-agent code review pipeline that runs before every commit. 10 agents (4 deterministic regex + 6 AI-powered) scan your code for security flaws, quality issues, policy violations, test gaps, architecture problems, and performance bottlenecks. It reviews 12 languages — Python, JavaScript/TypeScript, Go, Rust, Java, C#, C, C++, Ruby, PHP, Kotlin and Swift. Each finding includes the file, line number, problem description, suggestion text, and suggested code fix.

Your code never leaves your machine. No server, no cloud, no database — just local JSON reports and a browser dashboard.


Table of Contents

  1. Features
  2. How It Works
  3. Languages
  4. Installation
  5. Quick Start
  6. Command Reference
  7. API Key Management
  8. Configuration
  9. Agents
  10. Severity Levels & Blocking
  11. Effort Levels
  12. Report System & Dashboard
  13. Codebase Cache
  14. Pre-Commit Hook
  15. CI/CD Integration
  16. IDE Integration (LSP)
  17. Auto-Fix
  18. Deviation Management
  19. Project Structure
  20. Running Tests

Features

Feature Description
10 agents 4 deterministic regex + 6 AI agents, each specialized for a concern
12 languages Python, JS/TS, Go, Rust, Java, C#, C, C++, Ruby, PHP, Kotlin, Swift — not Python with the rest ignored
Rich findings Every finding shows file, line, problem, suggestion text, and suggested code fix
Visual dashboard Self-contained HTML with severity charts, agent charts, filters, and per-finding detail
Multi-provider 8 providers: Gemini, Claude, OpenAI, OpenRouter, Groq, Together, DeepSeek, Mistral
Command-only setup prism key set writes the .env for you — no file editing ever
Install once, run anywhere Ship one wheel; prism key set --global configures every project on the machine
Self-explaining failures A missing SDK says pip install 'prism-code-review[gemini]', not "no API key"
Whole-project audit prism scan <path> reviews every file, not just the diff
Environment diagnostics prism doctor checks keys, SDKs and config before you wonder why AI is silent
Pre-commit hook Blocks commits with critical/high findings automatically
Auto-fix Language-aware fixes for secrets, eval(), debugger, banned patterns
One finding per issue The same problem reported by several agents is collapsed, with the other agents listed as corroboration
Codebase cache Only re-scans changed files on subsequent runs
IDE integration LSP server shows findings inline in VS Code, Vim, Emacs, Zed, Helix
CI/CD ready GitHub Actions tests the full suite on Ubuntu and Windows, Python 3.11–3.13
Test execution --test flag runs pytest on changed files before review
Finding verification Regex agents cross-check AI claims (halves confidence if unverified)
Zero cost Self-hosted, free tier of any provider

How It Works

git commit
  ├─→ pre-commit-hook → prism check-staged [--test]
  │       ├─→ Run pytest on changed Python files (optional, --test)
  │       ├─→ Deterministic regex agents (no API calls, instant):
  │       │     ├─→ security   (SECU-XXX)  — secrets, injection, dangerous patterns
  │       │     ├─→ quality    (QUAL-XXX)  — complexity, length, naming, TODOs, imports
  │       │     ├─→ policy     (POL-XXX)   — license headers, branch naming, banned patterns
  │       │     └─→ test       (TST-XXX)   — weak assertions, test naming
  │       └─→ AI agents (when API key is configured, --effort balanced/max):
  │             ├─→ ai_security      (SECU-AI-XXX)  — secrets, injection, auth flaws
  │             ├─→ ai_quality       (QUAL-AI-XXX)  — complexity, duplication, maintainability
  │             ├─→ ai_policy        (POL-AI-XXX)   — docs, compliance, standards
  │             ├─→ ai_test          (TST-AI-XXX)   — coverage, edge cases, test quality
  │             ├─→ ai_architecture  (ARC-AI-XXX)   — modularity, scalability, abstraction
  │             └─→ ai_performance   (PERF-AI-XXX)  — bottlenecks, memory, complexity
  │
  └─→ GitHub Actions (CI/CD) → runs tests + automated review on every push

Languages

Every review path reads the file's language first (prism/langs.py), so the agents measure structure and generate fixes in the language of the file instead of assuming Python.

Language Extensions
Python .py, .pyi
JavaScript / TypeScript .js, .jsx, .mjs, .cjs, .ts, .tsx
Go .go
Rust .rs
Java .java
C# .cs
C .c, .h
C++ .cpp, .cc, .cxx, .hpp, .hh, .hxx
Ruby .rb, .rake
PHP .php
Kotlin .kt, .kts
Swift .swift

A file with no declared language (Markdown, YAML, JSON, images) has no language-specific structure rules — the generic checks still run, and those files score lower on risk. Binary files are skipped outright rather than scanned as text.

What this changes in practice:

  • Function length and complexity are measured as structure. Comments and string literals are blanked across the whole file first, so a { inside a block comment, or an if quoted in a docstring, is not counted as a branch. In the brace languages that is the only way to get the count right.
  • Auto-fixes stay in the file's language. A hardcoded secret becomes os.getenv("NAME") in Python, process.env.NAME in JavaScript, System.getenv("NAME") in Java, os.Getenv("NAME") in Go, and so on — the declaration is kept and only the literal is swapped. See Auto-Fix.

Installation

Requirements
  • Python 3.9+
  • An API key for any one of the 8 supported providers. The regex agents need no key at all.
Install
# Clone the repo
git clone <repo-url>

# Install PRISM (no AI SDK — regex agents still work)
pip install -e .

# Gemini (default provider):
pip install -e .[gemini]

# Claude:
pip install -e .[claude]

# OpenAI — this one extra also covers OpenRouter, Groq, Together,
# DeepSeek and Mistral, which are OpenAI-compatible endpoints:
pip install -e .[openai]

# All SDKs at once:
pip install -e .[all]

# Test and lint dependencies:
pip install -e ".[dev]"

There are only three SDKs to install. The five OpenAI-compatible providers (openai, openrouter, groq, together, deepseek, mistral) reuse the openai client against a different base_url, so no extra package is needed for them.

Hand the tool to a teammate (no cd, no venv on their side)

One command from any folder — no virtualenv, no source checkout, no build tools:

# On the teammate's machine, once. The [all] extra installs every provider SDK
# plus python-dotenv; without an extra the regex agents run but AI agents skip:
pip install "prism-code-review[all]"

# Set the API key once for every project (tool-wide):
prism key set --global --provider gemini --key YOUR_GEMINI_API_KEY

# Then in any project folder: git init, prism init, prism check ...

No PyPI access (air-gapped machine, internal mirror)? Install straight from the GitHub Release wheel instead. Note the name[extras] @ url form — pip does not parse extras that are appended directly onto a wheel URL, so ...whl[all] returns a 404:

pip install "prism-code-review[all] @ https://github.com/Bibekbwn/prism-code-review/releases/download/v2.0.2/prism_code_review-2.0.2-py3-none-any.whl"

Both routes give the same package. To cut a new release, see Releasing.

Use [all] when you do not control which provider each developer will use. For a team standardised on one provider, install only that extra — [gemini], [claude], or [openai] (the last also covers openrouter, groq, together, deepseek and mistral).

When the SDK for the active provider is missing, PRISM names it and prints the fix instead of claiming the key is wrong:

gemini SDK not installed. Install it with: pip install 'prism-code-review[gemini]'

prism key set --global writes the key to the install folder's .env (next to site-packages), which load_env reads as a fallback after the project-local .env — so a project-level prism key set still overrides it. Without --global the key goes to the current project's .env as before.

Three entry points, one dispatcher: the prism console script after a pip install, py -m prism from anywhere, and py -m prism.cli from a source checkout with nothing installed.


Live Demo

A dashboard generated from the deliberately vulnerable files in demo/ is published at https://bibekbwn.github.io/prism-code-review/.

Reproduce it locally — the demo files are in the repo, so no setup beyond the install is needed:

pip install "prism-code-review[all]"

prism check demo/vulnerable.py
prism check demo/app.js
prism check demo/service.go
prism check demo/config.env

prism dashboard

Each check exits non-zero on purpose: every demo file is meant to be blocked.


Quick Start

1. Set your API key (command only — no file editing)
# Gemini (default provider)
prism key set --provider gemini --key YOUR_GEMINI_API_KEY

# Or switch to Claude
prism key set --provider claude --key YOUR_ANTHROPIC_API_KEY 

# Or switch to OpenAI
prism key set --provider openai --key YOUR_OPENAI_API_KEY 

# Any of the other five also work: openrouter, groq, together, deepseek, mistral
prism key set --provider groq --key YOUR_GROQ_API_KEY

The prism key set command writes .env for you and sets MODEL_PROVIDER. Switching provider removes the previous provider's key automatically, so exactly one key is active at a time. You never need to open .env or any file. Add --global to write the key to the install folder instead of the current project (set once, use from every project). See API Key Management for the full provider table.

2. Check the setup
prism doctor        # key present? SDK installed? config valid?

doctor explains why AI agents are silent when something is misconfigured, and it never fails the run.

3. Review a file
prism check path/to/file.py
4. Review staged changes (before commit)
git add .
prism check-staged --effort balanced
5. Install the pre-commit hook (blocks commits with critical/high findings)
prism install-hook
6. View the visual dashboard
prism dashboard

The dashboard opens in your browser automatically after every prism check-staged / prism check-diff review. It is a single self-contained HTML file (.prism-reports/dashboard.html) with all report data embedded, so it works offline and can be shared as-is.

Suppress the automatic open with --no-dashboard, the PRISM_NO_DASHBOARD environment variable, or by running in CI (auto-detected via CI / GITHUB_ACTIONS).


Command Reference

Every command available in PRISM, with all flags and options.

All commands work three ways — prism <cmd>, py -m prism <cmd>, and py -m prism.cli <cmd> from a source checkout. The examples below use prism.

Review Commands
prism check <file> — Review a single file
prism check path/to/file.py              # Review with all configured agents
prism check path/to/file.py --json       # Output results as JSON
prism check path/to/file.py --fix        # Apply auto-fixable changes
prism check path/to/file.py --fix --yes  # Apply without the confirmation prompt
prism check path/to/file.py --prompt     # Interactively ask about medium/low findings
prism check path/to/file.py --effort lite    # Only regex agents (fast, no API)
prism check path/to/file.py --effort balanced  # Regex + AI agents (default)
prism check path/to/file.py --effort max     # All agents, maximum thoroughness
prism check path/to/file.py --fast       # Two-pass summarization for large files
Flag Description
--json Output results as machine-readable JSON
--fix Apply auto-fixable changes to the file
--yes Apply --fix changes without the confirmation prompt
--prompt Ask developer: apply / skip / cancel for medium/low findings
--effort {lite,balanced,max} AI review effort level (default: balanced)
--fast Use two-pass summarization for large files (10K+ lines)

Output: Every finding shows the file, line number, problem, suggestion, and suggested code fix. A report is saved automatically to .prism-reports/.

Exit code: 0 if commit allowed, 1 if blocking findings or failed quality gates exist, 2 if the file does not exist.

prism check-diff — Review a PR diff against a base branch

prism diff is an alias for the same command.

prism check-diff                                  # Diff against origin/main
prism check-diff --base origin/develop            # Diff against another branch
prism check-diff --base origin/main --effort lite # Regex agents only (no API)
prism check-diff --base origin/main --json        # Machine-readable JSON
prism check-diff --base origin/main --fast        # Two-pass summarization
prism check-diff --no-dashboard                   # Do not open the dashboard
prism diff --base origin/main                     # Alias for check-diff

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases prism-code-review

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229