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

@supauth/authorization-conformance

v0.3.0

Published

Pure conformance checks for SupAuth authorization adapters and generated RLS

Readme

@supauth/authorization-conformance

Pure, deterministic harnesses for application authorization adapters, generated SQL, and parsed PostgreSQL plans. The package has no CLI and performs no network or database access itself.

Installation

npm install --save-dev @supauth/authorization-conformance
# or
bun add --dev @supauth/authorization-conformance

In CI, pass an application fixture harness to runAuthorizationConformance. runDenialScenario must exercise the real adapter for every required denial, including inactive principals, explicit-deny precedence, ambiguous membership, and identity/application/domain isolation. runRevocationVisibilityScenario must first observe an allowed request, revoke its grant in the fixture, and then observe a 403 on the next request. An unavailable adapter must return 503 rather than masquerading as an ordinary denial.

Pass the reviewed projection preflight, installation, and RLS SQL to checkAuthorizationSql as separate projectionPreflightSql, installSql, and rlsSql fields. Pass legacyCleanupSql only for an upgrade that removes the old three-argument helper. The checker requires a read-only, machine-readable preflight; fixed application binding; helper hardening; authenticated policy clauses; and the uncorrelated allowed-scope shape. It rejects top-level procedural DO blocks, projection checks hidden inside installation SQL, mutating preflights, package-owned permission tables, legacy role adapters, caller-controlled application IDs, row-scoped helpers, row-column casts, tautological policies, array_agg/ANY defaults, and cascading legacy cleanup.

checkAuthorizationSql validates structure; it does not execute the preflight. Before submitting a migration, the client must execute the preflight separately and require zero rule/message rows. Never append the preflight to a migration and ignore its query result.

This structural lint accepts the generator's canonical SQL shape; it is not a general SQL parser or authorization proof. Release acceptance also requires real negative observations from the target database. Tables near or above 250,000 rows, or principals with more than 1,000 scopes, must run authenticated EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) with representative data and pass the parsed JSON value to checkAuthorizationExplain; each helper node must report Actual Loops = 1 and belong to the hashed subplan referenced by its ancestor filter.

See the Application Authorization Kit for the required scenario and release evidence contract.

License

MIT