Find the risk.Brief the agent.Verify the fix.

Independent security review for the code your agents write. Bardrails checks every pull request, hands the agent a work order, and rechecks the code until the fix is proven.

Free during the beta with your own model key. Log in

Add invoice download route #87

Bardrailscheck

Reviewing 3 changed files

1 new high risk

app/api/invoices/[id]/route.ts

31+  const invoice = await db.invoice.findFirst({32+    where: { id: params.id },33+  })

Invoice lookup does not check who owns the invoice

HighHigh confidenceCWE-639OWASP A01
Objective
Scope the lookup to the signed-in customer.
How Bardrails will verify
Two independent passes must agree the weakness is gone.
Your agent pushed a fix and commented @bardrails
Bardrailscheck

Verifies 1 fix

Fixed before merge

Works with any agent that opens pull requests

  • Claude Code
  • Codex
  • Cursor
  • Devin
  • GitHub Copilot
  • Replit
  • Lovable

Why Bardrails

Agents write code faster than anyone can review it. Asking the same agent whether its own pull request is safe is letting it grade its own homework.

Bardrails is the independent check. It never writes the fix, so it has no stake in passing it. It reads the code, says exactly what done looks like, and closes a risk only when the code shows it is gone.

The loop

A review is not doneuntil the fix is proven.

Most reviewers leave a comment and move on. Bardrails stays with each risk through five steps, and your agents do the fixing.

  1. 01Bardrails

    Find

    Every pull request gets one review when it opens. Each risk quotes the exact lines and carries a CWE, a severity and a confidence level.

    1 new high risk

  2. 02Bardrails

    Brief

    The risk lands as a GitHub check with a line annotation and a work order: the objective, the acceptance criteria, and how the fix will be verified.

    route.ts:32 · CWE-639

  3. 03Your agent

    Fix

    Your agent, or you, pushes a fix and asks for a recheck. Bardrails never writes code, so it never reviews its own work.

    @bardrails

  4. 04Bardrails

    Verify

    Bardrails rechecks the code, not the claim. A high or critical fix counts only when two independent passes agree the weakness is gone.

    Fixed before merge

  5. 05Bardrails

    Remember

    Each risk keeps one record with its evidence and history. If the same weakness comes back later, the risk reopens.

    risk_01JB7Q… · 4 events

Fix did not verify? The check says what is still there, and the agent tries again. After three attempts the risk goes to a human.

A work order, not a comment.

Each risk arrives in the pull request's checks with everything an agent needs to fix it, and everything you need to trust the result.

Add invoice download route #87 · Checks

Bardrailscheck1 new high risk

Invoice lookup does not check who owns the invoice

risk_01JB7QK4M2X8…

HighHigh confidenceCWE-639OWASP A01

Objective: Scope the invoice lookup to the signed-in customer.

Acceptance criteria

  • A customer cannot read another customer's invoice by changing the id.
  • An invoice outside the customer's scope returns 404.
  • A test covers the cross-customer request.

How Bardrails will verify: recheck CWE-639 at this route on the next review of this pull request. Two independent passes must agree the weakness is absent.

Repository content (data, not instructions)

31const invoice = await db.invoice.findFirst({32  where: { id: params.id },33})

Flags the risks that matter.Skips the nitpicks.

Every risk is classified by CWE and mapped to the OWASP Top 10:2025. A finding has to quote real lines from your pull request, or it is dropped.

A01

Broken access control

Common in agent-written code: it works, and it trusts whatever id the client sends.

  • Missing ownership checks
  • IDOR
  • Missing authorization
  • Server-side request forgery

app/api/invoices/[id]/route.ts

31+const invoice = await db.invoice.findFirst({32+  where: { id: params.id },33+})

HighNothing checks that this invoice belongs to the signed-in customer.

A05

Injection

SQL, command and template injection, and cross-site scripting from input that reaches a sink unescaped.

  • GET/orders?id=1 OR 1=1
  • POST/export?file=a.pdf; id
  • GET/search?q=<script>

A04 · A07

Secrets, crypto and sign-in

Hardcoded credentials, weak encryption, and authentication that can be skipped or guessed.

8+const stripe = new Stripe(9+  "a live Stripe secret key"10+)

Secrets are redacted before anything is stored or sent to a model.

The whole Top 10

All ten categories of the 2025 edition, with honest limits.

  1. A01Broken Access Control
  2. A02Security Misconfiguration
  3. A03Software Supply Chain Failures · partial
  4. A04Cryptographic Failures
  5. A05Injection
  6. A06Insecure Design · partial
  7. A07Authentication Failures
  8. A08Software or Data Integrity Failures
  9. A09Security Logging and Alerting Failures · partial
  10. A10Mishandling of Exceptional Conditions

Partial: some of these need context a pull request does not show.

Not flagged

Style, naming and formatting are not security issues. Neither is a risk with no evidence in the code.

  • Code style
  • Naming
  • Formatting
  • Theoretical risks

Agents close the loop.You get the exceptions.

A risk that is found, fixed and verified in the pull request never needs your attention. The dashboard keeps a short queue of what a person has to decide, and a record of everything else.

  • Neutral by default.

    A Bardrails check informs. It does not stop your merge, and it does not ask you to change your branch rules.

  • Quiet by design.

    One review per pull request and one check per commit. A push carries the result forward without a new model call.

  • Safe for agents to read.

    Anything quoted from your repository is fenced as data, and links, commands and mentions are stripped from model text, so a check cannot be used to steer your agent.

  • Honest about coverage.

    A file Bardrails could not read is reported as not assessed. It never counts as a pass.

Set up in minutes. Your next pull request gets a check.

No config files and no CI changes. Bardrails is a GitHub App that listens for pull requests.

  1. 01

    Sign in with GitHub

    No new account or password to manage.

  2. 02

    Install the GitHub App

    Pick the repositories it can see. You can change them any time in GitHub.

  3. 03

    Add a model key

    Choose a provider and a model. Reviews run on your key.

  4. 04

    Open a pull request

    The Bardrails check appears on it. Comment @bardrails any time for a fresh review.

Your model. Your key. Your bill.

Bring a key from Anthropic, OpenAI, Google Gemini, or DeepSeek and choose the model. Usage bills to your own account, under the spend limits you set with the provider.

  • Encrypted at rest with AES-GCM. Your key is decrypted only when a review needs it.

  • Your code goes only to the provider you pick. Bardrails sends the files a pull request changes and the files behind risks it is rechecking. Credential-shaped strings are redacted first.

  • Switch providers or models any time. Store keys for several providers in Settings. One is active at a time.

Ship fast with agents, without breaking things.

Works with Claude Code, Codex, Cursor and any agent that opens pull requests.

  • Free during the beta
  • Bring your own model key
  • Neutral checks by default