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

codex-tenantproof-skill

v0.1.0

Published

Codex Skill for reviewing SaaS tenant-isolation risks and generating cross-tenant regression tests.

Readme

TenantProof

TenantProof is an open-source Codex Skill for SaaS backend maintainers. It helps Codex review code for tenant-isolation bugs, missing authorization checks, unsafe migrations, and PII logging, then generate cross-tenant regression tests so maintainers can prove fixes before merge.

Quickstart

Install into the current repository:

npx --yes codex-tenantproof-skill@latest install --target repo

This writes:

.agents/skills/tenantproof/
tenantproof.config.example.json

Then ask Codex:

Use $tenantproof to review this repository for tenant-isolation risks. Focus on serious findings with concrete evidence and regression-test plans.

Install globally:

npx --yes codex-tenantproof-skill@latest install --target global

Preview writes without changing files:

npx --yes codex-tenantproof-skill@latest install --target repo --dry-run

Uninstall:

npx --yes codex-tenantproof-skill@latest uninstall --target repo

Local Development

From this repository:

npm test
node skills/tenantproof/scripts/detect-stack.js --pretty examples/vulnerable-hono-prisma-api
node bin/tenantproof.js install --target repo --dry-run

Validate the skill metadata with the Codex skill validator when available:

python3 /home/piccolo/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/tenantproof

Supported Stacks

| Layer | v0.1 support | | --- | --- | | Language | TypeScript, JavaScript | | Runtime | Node.js | | Frameworks | Hono, Express, NestJS | | ORM/query builders | Prisma, Drizzle, Knex, raw SQL patterns | | Databases | PostgreSQL, MySQL | | Test runners | Vitest, Jest | | API test helpers | Supertest, Hono app request helpers | | Package managers | npm, pnpm, yarn |

Example Prompts

Use $tenantproof in review mode. Review only the changed files in this PR for missing tenant scoping, missing authorization checks, unsafe update/delete operations, unsafe migrations, and PII logging.
Use $tenantproof to generate a cross-tenant regression test for GET /api/invoices/:id. A user from tenant A must not read tenant B's invoice.
Use $tenantproof to create AGENTS.md review guidelines for this multi-tenant API repository.

Expected Review Shape

TenantProof findings include severity, confidence, evidence, risk, suggested fix, regression test plan, and false-positive considerations. High and Critical findings should include a cross-tenant test plan.

# TenantProof Review

**Verdict:** High Risk
**Scope reviewed:** `src/routes/invoices.ts`
**Detected stack:** Hono, Prisma, PostgreSQL, Vitest
**Tenant markers:** `tenantId`

## Findings

### TP-001: Invoice lookup is not scoped to tenant

**Severity:** High
**Confidence:** High
**File:** `src/routes/invoices.ts`
**Area:** Route / Prisma query

**Evidence:**
The route fetches `invoice.findUnique({ where: { id } })` using only the URL ID.

**Risk:**
A user from tenant A may access tenant B's invoice if the ID is known or guessed.

**Suggested fix:**
Query by both invoice ID and `ctx.user.tenantId`, or use a tenant-scoped service method.

**Regression test plan:**
Create tenant A, tenant B, user A, and invoice B. Authenticate as user A, request `/api/invoices/${invoiceB.id}`, and assert 403 or 404.

Repository Contents

skills/tenantproof/SKILL.md
skills/tenantproof/references/
skills/tenantproof/scripts/detect-stack.js
skills/tenantproof/assets/templates/
bin/tenantproof.js
examples/vulnerable-hono-prisma-api/
examples/fixed-hono-prisma-api/
tests/

Examples

The examples/ directory contains:

  • vulnerable-hono-prisma-api: demonstrates an ID-only Prisma lookup that leaks invoices across tenants.
  • fixed-hono-prisma-api: demonstrates the same route with tenant-scoped lookup and regression test.

See examples/README.md for expected TenantProof output and test-generation guidance.

Limitations

TenantProof is not a full SAST replacement and does not formally prove security. It is a focused Codex Skill for tenant-isolation review and regression-test generation. It runs locally, performs no telemetry by default, and should only be used on repositories you own, maintain, or are authorized to review.

Generated tests may need project-specific factory/auth helper adjustments. TenantProof should mark those as TODOs instead of inventing unavailable helper APIs.

Contributing

See CONTRIBUTING.md for how to add framework references, test templates, and example vulnerabilities.