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

hasura-security

v0.1.0

Published

Audit any self-hosted Hasura GraphQL endpoint for the misconfigs that actually leak data — open introspection without the admin secret, the anonymous 'public' unauthorized role exposing tables/columns/rows, and an unauthenticated console — and PROVE each

Downloads

127

Readme

hasura-security

Audit any self-hosted Hasura GraphQL endpoint for the misconfigurations that actually leak data — GraphQL introspection answered without the admin secret, the anonymous public unauthorized role exposing tables and columns, queryable rows leaking with no auth header, and an unauthenticated console — and prove each one live with an anonymous probe. Other checklists tell you what might be wrong; this fetches the bytes and shows you what is.

Run it in one line, no admin secret, no install:

npx hasura-security --url https://your-hasura.example.com

🤝 Want it done for you? Fixed-scope audit — $99 / 24h: I verify each finding live and send a written report with the exact config fixes.

npm downloads license node deps

$ npx hasura-security --url https://hasura.example.com
2 critical, 2 high, 0 medium — 4 CONFIRMED via anonymous probe
  CRITICAL  /v1/graphql           anonymous 'public' role answers queries — no auth header
  CRITICAL  /v1/graphql { users } public role leaks rows — 1 reachable with no secret
  HIGH      /v1/graphql           introspection answered without the admin secret
  HIGH      /console              admin console reachable unauthenticated

Why this exists

Hasura is one of the most deployed instant-GraphQL backends, and it ships with one famous footgun: HASURA_GRAPHQL_UNAUTHORIZED_ROLE. Set it to public (a hugely common tutorial copy-paste) and grant that role any SELECT, and a request with no admin secret and no Authorization header can query your data — Hasura itself documents this, and it's the heart of hasura/graphql-engine#5501 ("unrestricted access using HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public downloads the whole schema with no auth header").

On top of that, GraphQL introspection left on in production is a top recurring finding across HackerOne reports, the PortSwigger Web Security Academy, and OWASP: it hands an attacker your entire data model.

hasura-security checks for these and confirms the real ones by issuing the exact anonymous request an attacker would — so you triage facts, not maybes.

What it checks

| Check | Severity | How it's confirmed | |---|---|---| | No admin secret set at all | critical | anonymous run_sql / export_metadata on /v2/query succeeds | | Anonymous public unauthorized role | critical | a bare GraphQL query is answered with no admin secret / Authorization header | | Queryable rows leaking via the public role | critical | anonymous { table(limit:1) } returns rows | | Introspection answered without the secret | high | __schema query answered anonymously on /v1/graphql | | Console reachable unauthenticated | high | GET /console serves the admin UI with no secret prompt |

Usage

# Probe a live instance (auto-discovers table fields from anonymous introspection)
npx hasura-security --url https://hasura.example.com

# Probe specific query-root fields (tables) for row leakage
npx hasura-security --url https://hasura.example.com --tables users,orders

# Write a shareable HTML report
npx hasura-security --url https://hasura.example.com --html report.html

# Static only (no requests sent)
npx hasura-security --url https://hasura.example.com --no-probe

Output is JSON on stdout (pipe it into CI) and a one-line summary on stderr. Exit is non-zero only on usage errors — gate your pipeline on the JSON summary.

Install (optional)

npm i -g hasura-security
hasura-security --url https://hasura.example.com

Zero dependencies. Your data and credentials never leave your machine — every request goes straight from the tool to your Hasura instance.

Sister tools

Same active-probe philosophy for the rest of the backend stack, all MIT:

supabase-security · strapi-security · directus-security · pocketbase-security · firebase-security · appwrite-security · nhost-security · convex-security

License

MIT © Renzo Madueno