LeakRay
GraphQL · __schema · Passive Audit

GraphQL Introspection Exposure Checker

Check whether your production /graphql or /api/graphql endpoint answers unauthenticated __schema introspection queries—exposing internal mutations, admin fields, and argument types.

01 · Exact Passive Checks

What LeakRay inspects on your live URL

Read /bot passive safety guarantees →
Rule ID & CheckWhat It InspectsWhy It's Passive & Safe
graphql-introspection
Public GraphQL __schema Introspection
Sends a minimal read-only GET query ({__schema{types{name}}}) to /graphql and /api/graphql and verifies whether a valid JSON schema type list is returned.Read-only metadata probe only—never executes mutations, queries business objects, or runs batching/depth attacks.
exposed-api-docs
Public OpenAPI & Swagger Specifications
Checks alongside GraphQL for unauthenticated /openapi.json, /swagger.json, or /docs specifications exposing REST/admin endpoints.Passive GET inspection on standard specification paths with soft-404 filtering.
cors-misconfiguration
GraphQL Endpoint CORS Credential Reflection
Verifies that your origin does not reflect untrusted Origin headers with credentials enabled, preventing cross-site authenticated API reads.Unauthenticated header check using a benign synthetic Origin value.
security-headers-core
Response & Content-Type Hardening
Checks X-Content-Type-Options: nosniff, CSP, and framing headers on your production origin.Reads standard HTTP response headers passively.

02 · Vulnerable vs. Fixed

Common production leak pattern and the exact fix

Vulnerable
ts
// Vulnerable: Apollo Server / GraphQL Yoga with introspection left on in prod
import { ApolloServer } from "@apollo/server";

export const server = new ApolloServer({
  typeDefs,
  resolvers,
  introspection: true, // Exposes every query, mutation & internal type in prod
});
Fixed
ts
// Fixed: Disable introspection in production (keep enabled locally)
import { ApolloServer } from "@apollo/server";

export const server = new ApolloServer({
  typeDefs,
  resolvers,
  introspection: process.env.NODE_ENV !== "production",
});

// For GraphQL Yoga:
// plugins: process.env.NODE_ENV === "production" ? [useDisableIntrospection()] : []

03 · AI Fix Prompt

Paste into Cursor, Claude Code, Lovable, or Bolt

Lock down GraphQL introspection in my production environment:
1. Locate my GraphQL server setup (Apollo Server, GraphQL Yoga, Pothos, Envelop, Hasura, or Express-GraphQL) serving `/graphql` or `/api/graphql`.
2. Disable `__schema` and `__type` introspection when `NODE_ENV === "production"` (for example `introspection: process.env.NODE_ENV !== "production"` in Apollo Server or `useDisableIntrospection()` in GraphQL Yoga).
3. Keep introspection working in local development so codegen and GraphiQL continue functioning.
4. Confirm sensitive queries and mutations enforce server-side authentication and authorization independently of introspection.

04 · Developer FAQ

Frequently asked questions

What does an attacker learn from open GraphQL introspection?
A single __schema introspection query returns every Query, Mutation, Subscription, input type, enum, and deprecated or internal admin field in your API—giving attackers a complete blueprint to probe authorization bugs.
Which GraphQL paths does LeakRay inspect?
LeakRay passively tests /graphql and /api/graphql with a minimal read-only GET query ({__schema{types{name}}}) and confirms the response is real JSON containing data.__schema.types before flagging an issue.
Is disabling GraphQL introspection enough to secure my GraphQL API?
No—disabling introspection is defense in depth, not a replacement for authorization. You still need per-resolver authentication/ownership checks, query depth/complexity limits, and field-suggestion suppression where supported.
Can I keep introspection enabled on public developer GraphQL APIs?
If your GraphQL API is intentionally public for third-party developers (like GitHub's API), public schema introspection is expected. For private SaaS backends, disabling introspection in production is standard OWASP guidance.

More Passive Scanners

Supabase · PostgREST · Passive Audit

Supabase RLS & Key Exposure Checker

Passively scan your live app for leaked Supabase service_role keys, exposed PostgREST schemas, and missing RLS signals. Zero signup, <15s.

Open scanner
Next.js · App Router & Pages Router · Passive Audit

Next.js Production Security Scanner

Audit live Next.js apps for __NEXT_DATA__ secret leaks, debug stack traces, exposed source maps, .env files, and missing security headers.

Open scanner
JS Bundles · Entropy + Context Validation · Passive Audit

Leaked API Key & Frontend Secret Scanner

Scan your live HTML and JavaScript bundles for leaked Stripe, OpenAI, Anthropic, Gemini, AWS, and GitHub keys—without false-positive noise.

Open scanner
Server Config · Dotfiles · Passive Audit

Exposed .env & .git File Checker

Check if your live website publicly exposes /.env, /.git/HEAD, or backup config files. Passive read-only URL scan with instant fixes. Zero signup.

Open scanner
Firebase · Firestore · Passive Audit

Firebase & Firestore Security Scanner

Passively audit live Firebase apps for leaked Admin SDK keys, exposed .env files, public source maps, and weak security headers without public apiKey noise.

Open scanner
Cursor · Lovable · Bolt · v0 · Passive Audit

Security Scanner for Vibe-Coded Apps

Free pre-launch security check for AI-built apps from Cursor, Claude Code, Lovable, Bolt, and v0. Catch leaked keys, open files, and missing headers.

Open scanner
JavaScript Bundles · .js.map · Passive Audit

Production Source Map Exposure Checker

Check if your live Next.js, Vite, or React app publicly exposes .js.map source maps. Passive URL scan with framework-specific fixes and AI prompts.

Open scanner
Headers · CORS · Cookies · Passive Audit

HTTP Security Headers & CORS Checker

Check HSTS, CSP, SRI, COOP, CORS credential reflection, and cookie flags — plus JS secret & file checks that header-only scanners miss. Zero signup.

Open scanner
Git Metadata · /.git/HEAD · Passive Audit

Exposed .git Directory & Config Checker

Check if your live site publicly serves /.git/HEAD or /.git/config before attackers dump source code and commit history. Passive URL scan, zero signup.

Open scanner
CORS · Origin Reflection · Passive Audit

CORS Misconfiguration & Reflection Checker

Test your live app for dangerous CORS origin reflection paired with Access-Control-Allow-Credentials: true. Passive read-only check with instant code fixes.

Open scanner
Set-Cookie · HttpOnly · Secure · SameSite

Cookie Security Flags Checker

Audit Set-Cookie headers on your live app for missing HttpOnly, Secure, and SameSite flags on session and auth cookies. Zero signup, passive URL scan.

Open scanner
Lovable · Supabase · Vite · Passive Audit

Lovable App Security & Supabase Scanner

Passive pre-launch security check for Lovable apps: catch leaked Supabase service_role keys, missing RLS signals, public source maps, and missing headers.

Open scanner
Bolt.new · Vite · Client Bundles · Passive Audit

Bolt.new Security & Vite Bundle Scanner

Scan live Bolt.new and Vite apps for VITE_* client bundle leaks, exposed .env files, public .js.map source maps, and BaaS key misconfigurations in <15s.

Open scanner
Cursor · Vercel v0 · Next.js · Passive Audit

Cursor & v0 Next.js Security Scanner

Audit live Next.js apps built with Cursor and Vercel v0 for __NEXT_DATA__ leaks, NEXT_PUBLIC_* secrets, debug routes, source maps, and missing headers.

Open scanner