GuardLayer Scan is a free GitHub Action that statically scans your Next.js + Supabase repo for exposed secrets, missing Row Level Security, unguarded Server Actions, unverified webhooks and known-vulnerable dependencies. It marks findings as annotations on the exact file and line, lists them in a summary on the workflow run, and can fail the build on critical issues. No signup, no account, no API key, and your code never leaves the runner.
It runs the same static engine as guardlayer.io. Want to try the rules before wiring up CI? Paste a migration into the free Supabase security checker — your SQL is never stored.
Add .github/workflows/guardlayer.yml:
name: GuardLayer
on: [pull_request, push]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: solvionsolutions/guardlayer-scan@v1
with:
fail-on: critical # critical | warning | neverThat's it. Findings appear as annotations on the exact file and line, plus a summary on the run. By default the build fails only on critical issues. A failed run blocks a merge only if you make this job a required status check in your branch protection rules.
- A vulnerable dependency can now fail the build. When a dependency's latest security fix is for an advisory its publisher rates Critical, GuardLayer reports it as a critical finding, so the default
fail-on: criticalfails the run. Today that coversnextbelow 16.4.1 on 16.x or 15.5.28 on 15.x (the October 14, 2026 release fixed two critical unauthenticated remote code execution bugs),react-server-dom-*below the 19.x patch releases, andminimist. - To fix it, upgrade the package, for example
npm install next@latest(ornext@15.5.28on 15.x). - To report without failing while you upgrade, set
fail-on: never. - Also new: far fewer false positives across the board, and a table that a migration creates without RLS and grants to
anonis now critical.
36 checks across six areas:
- Supabase RLS — tables with RLS disabled or missing,
USING (true)policies, policies not scoped to the user, policies keyed off user-editableuser_metadata, tablesGRANTed toanonwithout RLS,SECURITY DEFINERfunctions with an unpinnedsearch_path. - Exposed secrets — service-role keys and
sb_secret_keys leaked throughNEXT_PUBLIC_, hardcoded service_role JWTs, hardcoded provider keys. (A publishablesb_publishable_/ anon key is not flagged — it's public by design.) - Next.js app layer — Server Actions and API routes with no auth check, wildcard CORS, open redirects built from request input, missing middleware matchers,
getSession()trusted in server code. - Dependencies — known-vulnerable versions of
nextand the React Server Components packagesreact-server-dom-*(per release branch),@supabase/auth-js,next-authand@auth/core, plus deprecated packages like@supabase/auth-helpers-*. - Webhooks — Stripe/webhook handlers that never verify the signature.
- MCP / AI-agent config — secrets committed in
.mcp.json/.cursor/mcp.json, including credentials passed as command-lineargs; a Supabase MCP server without--read-only; and GitHub Actions workflows that let any user trigger an AI coding agent, or run untrusted pull-request code with your secrets.
These last checks flag configuration — an agent's blast radius and committed credentials. They do not detect prompt injection, tool poisoning, or anything about how an agent behaves at runtime.
Precision-first: rules are tuned to stay quiet on safe code (a publishable Supabase anon key is not flagged as a secret, a zod-validated route is not flagged as unvalidated).
| Input | Default | Description |
|---|---|---|
fail-on |
critical |
Fail the build on critical, on warning (and above), or never (report only). |
| Output | Description |
|---|---|
score |
Security score out of 100. |
grade |
Letter grade A–F. |
critical / warning / findings |
Finding counts. |
Add a .guardlayerignore (gitignore syntax) to your repo root to exclude test fixtures or intentional examples. Vendor and build directories (node_modules, .next, dist, …) are always skipped.
The Action walks your checked-out repo, runs GuardLayer's static analysis in-process, emits GitHub annotations and writes the job summary. It doesn't post pull request comments. It's pure static analysis — nothing is uploaded, no API key is required, and it works on private repos.
Want pull request comments, a GuardLayer check on every push and pull request, and a hosted dashboard? That's the hosted GuardLayer GitHub App, with the same checks: free for public repos, with paid plans for private ones.
To show that a repo is scanned by GuardLayer, add this to its README:
[](https://www.guardlayer.io/?utm_source=badge&utm_medium=readme)The badge is a static image, the same for every repo. It shows no score and no findings, so it says nothing about how secure a repo is.
Free to use in any repository, including private and commercial ones. The code itself is not open source: see LICENSE. Versions published before November 7, 2026 remain under the MIT License.
© 2026 Solvion Solutions (GuardLayer)