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

@culpritsql/devtools

Latest version: v0.6.5

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: cristipufu
0 Stars
0 Forks
11 Versions
1.4K Downloads
TypeScript Repo language

Scan summary

@culpritsql/devtools was last scanned on 28 Nov 2026 at version 0.6.5. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 11 versions; the latest 5 were published within 4 days (25–28 Nov 2026).
  • Findings: No rules fired in version 0.6.5.
  • Downloads: 1,357 downloads.

Versions

11 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.5 LATEST 28 Nov 2026 No rules fired
0.6.4 28 Nov 2026 No rules fired
0.6.3 27 Nov 2026 No rules fired
0.6.1 26 Nov 2026 Not shown
0.6.0 25 Nov 2026 Not shown

No rules fired in 0.6.5

Findings

Findings for v0.6.5. 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 0.6.5; other versions have their own rules, not their own score.

README

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

npm React 18 | 19 Node 20+ TypeScript License: MIT

In-app SQL DevTools HUD, automatic N+1 burst detector, and interactive EXPLAIN plan inspector for React and Node.js.

Powered by @culpritsql/plans WebAssembly and @culpritsql/plan-viewer.

Quickstart · Integrations · React HUD · Server Collector · API


Highlights

  • Floating SQL HUD (⚡ SQL · 12 · 1 N+1): Live query counter with green/amber/coral health dot and docked drawer (Queries · N+1 Bursts · Plan Inspector).
  • Automatic N+1 burst detection: Canonical SQL fingerprinting strips comments, literals, $1/?/:param, and IN (?, ?, ...) lists to group repeated queries per HTTP request and suggest JOIN or WHERE id = ANY($1) batching fixes.
  • Request correlation (AsyncLocalStorage): Tags every SQL query executed inside a route handler with its HTTP route badge (GET /api/orders).
  • Zero-dependency driver & diagnostics_channel hooks: Native support for Reylo (reylo:query), pg, mysql2, better-sqlite3 / node:sqlite, Prisma, and Drizzle.
  • Safe auto-EXPLAIN + instant .xel & deadlock inspector: Runs read-only EXPLAIN on slow single-statement SELECT queries via @culpritsql/plans Wasm, or paste/drop any PostgreSQL, MySQL, MariaDB, SQLite, YugabyteDB, or SQL Server .sqlplan, deadlock graph, or binary .xel / Extended Events XML directly inside the drawer.
  • Strict CSS & bundler isolation: Scoped to .culprit-dt (never mutates host body or <button> styles), and Node builtins live strictly behind @culpritsql/devtools/server.

Quickstart

npm install @culpritsql/devtools
1. Instrument your server & expose /__culprit
// lib/devtools.ts (Node.js server)
import { Pool } from "pg";
import {
  CulpritCollector,
  createDevtoolsHandler,
  instrumentPg,
} from "@culpritsql/devtools/server";

export const sqlCollector = new CulpritCollector({
  slowThresholdMs: 20,
  nPlusOneThreshold: 5,
});

// Optional: capture Reylo, pg, and mysql2 diagnostics_channel events automatically
sqlCollector.subscribeDiagnosticsChannels();

export const pool = instrumentPg(new Pool({ connectionString: process.env.DATABASE_URL }), {
  collector: sqlCollector,
  autoExplain: true,
});

export const devtoolsHandler = createDevtoolsHandler(sqlCollector);
2. Mount <CulpritDevtools /> in your React layout
// app/layout.tsx or src/App.tsx
import { CulpritDevtools } from "@culpritsql/devtools/react";
import "@culpritsql/devtools/styles.css";

export function DevOverlay() {
  if (process.env.NODE_ENV === "production") return null;
  return <CulpritDevtools endpoint="/__culprit" position="bottom-right" theme="dark" />;
}

Live Full-Stack Playground

Run the zero-Docker SQLite + React 19 + WebAssembly playground in demo/ to trigger live N+1 query bursts, compare batched fixes, emit reylo:query diagnostics_channel telemetry, and inspect interactive EXPLAIN flow graphs:

git clone https://github.com/culpritsql/culprit-devtools.git
cd culprit-devtools && bun install && bun run demo
# Open http://127.0.0.1:4321

Framework & Driver Integrations

Reylo (diagnostics_channel)

Reylo emits structured query telemetry on reylo:query. Subscribe once at startup to capture timings, row counts, parameters, and request correlation with zero wrapper code:

import { CulpritCollector } from "@culpritsql/devtools/server";

export const collector = new CulpritCollector();
collector.subscribeDiagnosticsChannels(["reylo:query"]);
Next.js App Router
// app/api/__culprit/[...slug]/route.ts
import { createDevtoolsHandler } from "@culpritsql/devtools/server";
import { sqlCollector } from "@/lib/devtools";

const handler = createDevtoolsHandler(sqlCollector, { basePath: "/api/__culprit" });

export const GET = handler;
export const POST = handler;

Wrap Route Handlers or Server Actions with sqlCollector.withRequest("GET /api/orders", () => ...) and point <CulpritDevtools endpoint="/api/__culprit" /> at the route.

Hono
import { Hono } from "hono";
import { CulpritCollector, createDevtoolsHandler } from "@culpritsql/devtools/server";

const collector = new CulpritCollector();
const devtools = createDevtoolsHandler(collector);
const app = new Hono();

app.all("/__culprit/*", (c) => devtools(c.req.raw));
app.use("*", (c, next) => collector.withRequest(`${c.req.method} ${c.req.path}`, next));
Express / Node http

createNodeDevtoolsMiddleware serves /__culprit/* and automatically wraps downstream Express routes in collector.withRequest("METHOD /path", ...):

import express from "express";
import { CulpritCollector, createNodeDevtoolsMiddleware } from "@culpritsql/devtools/server";

const app = express();
const collector = new CulpritCollector();

app.use(createNodeDevtoolsMiddleware(collector));
pg, mysql2, and SQLite
import {
  instrumentPg,
  instrumentMysql,
  instrumentSqlite,
} from "@culpritsql/devtools/server";

const pgPool = instrumentPg(rawPgPool, { autoExplain: true });
const mysqlPool = instrumentMysql(rawMysqlPool, { autoExplain: true });
const sqliteDb = instrumentSqlite(rawBetterSqlite3Db, { autoExplain: true });
Drizzle ORM & Prisma
import { drizzle } from "drizzle-orm/node-postgres";
import { sqlCollector, pool } from "./devtools";

// Passing an instrumented pg pool captures exact execution timings + auto-EXPLAIN:
export const db = drizzle(pool);

// Or attach a lightweight Drizzle logger directly:
export const loggedDb = drizzle(rawPool, {
  logger: sqlCollector.createDrizzleLogger("postgres"),
});

// Prisma client query event hook:
prisma.$on("query", (event) => {
  sqlCollector.recordQuery({
    sql: event.query,
    durationMs: event.duration,
    params: event.params,
    engine: "postgres",
  });
});

React HUD & Drawer

<CulpritDevtools /> works with live polling (endpoint="/__culprit"), SSR (initialSnapshot), or completely offline in Storybook and tests (snapshot={...}).

Prop Type Default Description
endpoint string "/__culprit" Base URL for /snapshot, /clear, and /parse
snapshot DevtoolsSnapshot undefined Controlled snapshot (disables background polling)
initialSnapshot DevtoolsSnapshot undefined Initial data for SSR and first client paint
pollIntervalMs number 1500 Polling cadence in ms (<= 0 disables polling)
position "bottom-right" \| "bottom-left" \| "top-right" \| "top-left" "bottom-right" Corner placement for the floating trigger pill
theme "dark" \| "light" \| "system" "dark" Theme applied to the drawer and <PlanViewer />
defaultOpen boolean false Render with the drawer open initially
defaultTab "queries" \| "bursts" \| "plan" "queries" Initial drawer tab

Server Collector & Security

  • Disabled in production by default: CulpritCollector becomes a zero-allocation no-op when NODE_ENV === "production", and createDevtoolsHandler returns 403 Forbidden unless allowProduction: true is explicitly configured.
  • Loopback-only guard: createDevtoolsHandler and createNodeDevtoolsMiddleware reject non-loopback Host, X-Forwarded-For, and socket addresses (403 Forbidden) unless allowRemote: true is passed.
  • Read-only autoExplain guard: Auto-EXPLAIN runs strictly on single-statement SELECT / WITH ... SELECT queries containing zero data-modifying keywords, tagged with /* culprit */ so explain queries never recurse.

Subpath Exports

Import Path Environment Exports
@culpritsql/devtools Browser / SSR / Universal CulpritDevtools, ExtendedEventsViewer, DeadlockViewer, PlanViewer, normalizeSqlForFingerprint, fingerprintSql, detectNPlusOneAdvice, shared types
@culpritsql/devtools/react Browser / SSR CulpritDevtools, ExtendedEventsViewer, DeadlockViewer, PlanViewer, and React prop types
@culpritsql/devtools/server Node.js / Bun (>=20) CulpritCollector, createDevtoolsHandler, createNodeDevtoolsMiddleware, instrumentPg, instrumentMysql, instrumentSqlite, parseExplainText, parseDeadlockText, parseExtendedEventsXmlText, parseXelBytes
@culpritsql/devtools/styles.css CSS Scoped .culprit-dt + @culpritsql/plan-viewer styles

License

MIT

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).

  • npm @culpritsql/devtools

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

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229