ai-saas-guard / All 65 checks
All 65 checks
Every deterministic rule in ai-saas-guard v0.45.0, grouped by area. Severities: 4 critical, 26 high, 24 medium, 7 low, 4 info. Run them all with npx ai-saas-guard@latest demo, or scan your own project.
GitHub Actions (6)
- medium
actions.checkout.fetch-depth— GitHub Actions checkout may be too shallow for PR risk
`pr-risk --base` needs enough Git history to compare trust-boundary changes reliably. - medium
actions.permissions.too-broad— GitHub Actions workflow grants broad write permissions
Launch preflight workflows usually need read access, not broad repository mutation privileges. - medium
actions.secrets-missing-failfast— GitHub Actions secrets lack fail-fast checks
Deploy or integration workflows should fail clearly when required secrets or tools are missing. - low
actions.docs-only-full-ci— Docs-only changes may trigger full CI
AI-assisted docs edits should not always spend the same launch-readiness CI budget as code changes. - low
actions.pr-missing-concurrency— Pull request workflow lacks concurrency cancellation
AI-assisted PRs can push many commits quickly, making stale CI runs wasteful and confusing. - info
actions.unpinned-action— GitHub Action is not pinned to a full commit SHA
Pinned actions make launch-preflight workflows more reproducible.
Secrets (1)
- high
secrets.detected— Secret-like value detected
Credentials committed to source, config, or examples can be exposed before launch.
Next.js (2)
- high
next.env.public-secret— Risky NEXT_PUBLIC environment variable
Next.js exposes NEXT_PUBLIC variables to browser code, so secret-like values can leak to users. - medium
next.middleware.missing-auth— Middleware has no auth or session check
Middleware without auth logic cannot gate protected routes; AI-generated middleware often handles redirects or i18n and forgets the auth gate.
Stripe billing (7)
- critical
stripe.webhook.missing-signature— Stripe webhook does not verify the Stripe signature
Unsigned webhook handlers can accept forged billing events. - critical
stripe.webhook.public-secret— Stripe signing secret appears public
Public Stripe secrets can be bundled into client code and abused. - high
stripe.webhook.missing-critical-event— Stripe webhook does not handle a critical lifecycle event
Failure, cancellation, update, and refund paths need explicit handling. - high
stripe.webhook.missing-idempotency— Stripe webhook lacks duplicate event idempotency
Stripe retries and duplicate events can drift billing state. - high
stripe.webhook.raw-body-risk— Stripe signature verification may use a parsed JSON body
Stripe signature checks require the exact raw request body. - medium
stripe.webhook.missing-route— No Stripe webhook handler found
Stripe checkout redirects are not a reliable source of billing truth. - medium
stripe.webhook.no-entitlement-path— Stripe webhook does not show an entitlement update path
Returning HTTP 200 is not the same as changing application access state.
Supabase (13)
- critical
supabase.rls.broad-policy— Broad Supabase RLS policy
`USING (true)` or `WITH CHECK (true)` can turn login into broad data access or writes. - critical
supabase.rls.not-enabled— Sensitive table does not enable row level security
User-data tables should enable row level security. - high
supabase.rls.enabled-no-policy— Supabase RLS is enabled without policies
RLS with no policies often looks like silent empty results instead of an explainable launch failure. - high
supabase.rls.missing-ownership-filter— Supabase policy lacks an ownership filter
Policies need resource ownership or tenant membership checks. - high
supabase.rls.public-write-policy— Supabase write policy grants public role
Public write policies can expose inserts or mutations when predicates are incomplete. - high
supabase.rls.tenant-predicate-missing— Supabase tenant-like table lacks tenant predicate
Multi-tenant SaaS tables need tenant, workspace, organization, owner, or membership predicates. - high
supabase.rls.weak-with-check— Supabase write policy has a weak WITH CHECK predicate
Insert and update policies need WITH CHECK predicates tied to the current user or tenant membership. - high
supabase.service-role.client-usage— Service role key used in client-side code
The service role key bypasses all RLS policies; referenced from a client component or a NEXT_PUBLIC_ variable it ships to browsers. - high
supabase.storage.public-bucket— Supabase storage policy or bucket appears public
Storage buckets can leak files even when database rows are protected. - medium
supabase.rls.uid-column-mismatch— Supabase policy compares auth.uid() to suspicious column
`auth.uid()` is a UUID; comparing it to text/email/name columns commonly causes silent policy failures. - medium
supabase.rls.update-without-with-check— Supabase UPDATE policy has no WITH CHECK predicate
Without WITH CHECK, an UPDATE policy lets a user change a readable row into a row they should not own. - medium
supabase.rls.write-policy-missing— Supabase table has read policy but no common write policy
Reads can work while inserts, updates, or deletes silently fail when write policies are missing. - medium
supabase.table.missing-owner-column— Sensitive table has no owner or tenant column
Sensitive tables are hard to protect without owner or tenant keys.
API routes (4)
- high
api.route.auth-without-ownership— API route checks auth but lacks an ownership guard
Login checks do not prove resource ownership checks. - high
api.route.provider-debug-exposed— Provider debug endpoint exposes server-side credential probe
Public provider probe endpoints can spend quota, reveal integration state, or exercise server credentials without returning the token. - medium
api.route.cors-wildcard— CORS allows any origin (*)
Wildcard CORS origins let any website read API responses. - medium
api.route.missing-rate-limit— Sensitive API route lacks obvious rate limiting
Login, checkout, upload, AI, and webhook routes are common abuse targets.
Auth & sessions (1)
- high
auth.clerk.unsafe-metadata— Clerk unsafe metadata is used for privileged state
Clerk unsafe metadata is user-writable and should not drive roles, plans, tenant membership, or entitlements.
Data access (1)
- high
data.prisma.tenant-scope-missing— Prisma resource access lacks tenant or owner scope
Authenticated Prisma reads or mutations on tenant-like resources need tenant, owner, organization, or workspace predicates.
Silent-success errors (5)
- high
silent-success.hardcoded-fallback— Sensitive path contains hardcoded fallback success
Hardcoded success fallbacks in auth, billing, AI, or data paths can grant access or hide broken integrations. - high
silent-success.swallowed-error— Error handling may return fake success
Swallowed provider, auth, billing, or data errors can make a launch path look successful when it failed. - high
silent-success.temporary-bypass— Temporary trust-boundary bypass
Temporary bypasses around auth, validation, webhook verification, rate limits, or ownership are common launch blockers. - medium
silent-success.production-mock-data— Production path may use mock or demo data
Fixtures and demo responses in sensitive paths can make AI-built integrations look complete before they are real. - medium
silent-success.weakened-test— Test may be skipped or placeholder-only
Skipped, TODO-only, empty, or truthy-only tests create fake confidence in AI-generated code.
Deploy & config (10)
- medium
deploy.edge-runtime-node-api— Route may use Node-only APIs in Edge runtime
Edge runtime can break Node-only dependencies. - medium
deploy.next.image-cost-risk— Next image optimization may be unbounded
Broad remote image patterns or user-controlled image sources can amplify deploy cost and trust risk. - medium
deploy.next.missing-security-headers— Next/Vercel app lacks obvious security headers
Apps with auth, payment, and API routes should launch with explicit browser security headers. - medium
deploy.next.static-export-api-risk— Next static export may conflict with server routes
Static export can conflict with runtime API assumptions. - medium
deploy.vercel.cron-missing-guard— Vercel cron route lacks launch guards
Scheduled billing, tenant, or cleanup jobs need a secret guard, idempotency, and request tracing before launch. - low
deploy.env.example-missing— Important runtime env var is not documented
Missing env docs cause local-success, production-failure deploys. - low
deploy.env.server-undocumented— Server route env var is not documented
Undocumented server env vars cause local-success, production-failure deploys. - low
deploy.next.request-amplification— Dynamic route prefetch may amplify requests
High-cardinality dynamic route prefetching can create unexpected production request volume. - low
deploy.observability.missing-request-id— Sensitive route lacks request ID logging
Billing, webhook, and tenant incidents are hard to debug without traceable request IDs. - info
deploy.env.public-inventory— Public Next.js env var inventory
`NEXT_PUBLIC_*` variables are browser-visible and should be reviewed as public config.
MCP servers (11)
- high
mcp.config.broad-filesystem— MCP server has broad filesystem or write access
Write access over broad paths increases prompt-injection blast radius. - high
mcp.config.non-local-bind— MCP server may bind outside localhost
Broad bind addresses can expose local tools to the network. - high
mcp.config.plaintext-secret— MCP server contains plaintext secret-like config
Prompt and tool logs can expose plaintext credentials. - high
mcp.tool.missing-policy-boundary— High-risk MCP tool lacks policy boundary
Shell, filesystem-write, database, network, and unknown tools need visible allow/deny boundaries. - high
mcp.tool.missing-scope— High-risk MCP tool lacks allowlist or scope
Shell, filesystem, and database tools should be constrained to explicit commands, paths, queries, or credentials. - high
mcp.tool.raw-sql— MCP server exposes database or raw SQL capability
Raw SQL tools can read or mutate production data if over-scoped. - high
mcp.tool.shell— MCP server exposes shell-like tools
Generic shell tools can turn prompt injection into command execution. - medium
mcp.config.insecure-http— MCP server uses insecure HTTP for a non-local endpoint
Plain HTTP can expose tool calls and credentials outside localhost. - medium
mcp.config.invalid-json— MCP config is not valid JSON
Broken MCP configs hide the actual tool inventory. - medium
mcp.tool.missing-side-effect-classification— MCP tool lacks side-effect classification
Tool policies need explicit read, write, shell, network, database, or unknown side-effect classes. - low
mcp.config.loose-permissions— MCP config file is readable by group or other users
Secret-bearing configs should not be group/world-readable.
PR risk (4)
- medium
pr-risk.sensitive-surface— Review first sensitive PR surface
AI-generated PRs often bury trust-boundary changes inside larger diffs. - medium
pr-risk.trust-boundary-missing-spec— Trust-boundary PR lacks nearby spec context
AI-generated PRs can change auth, billing, data access, deploy, or tool decisions without explaining the rationale. - info
pr-risk.diff-unavailable— Git diff could not be read
PR classification can be misleading when the requested base ref or Git history is unavailable. - info
pr-risk.no-diff— No git diff found
PR classification needs a diff to identify changed trust boundaries.