Code governance for the AI era
Write your standards in plain language. PRGuard enforces them on every code change — with a complete audit trail of every decision.
Code changes arrive
From your developers — and their AI agents.
PRGuard enforces your standards
Written by your team, in plain language.
AI fix drafted — merge held until your team approves
- ALTER TABLE user_sessions DROP COLUMN legacy_token;+ ALTER TABLE user_sessions RENAME COLUMN legacy_token TO legacy_token_deprecated;
AI fix drafted — merge held until your team approves
- logger.debug(`session ${token} refreshed`);+ logger.debug(`session ${hash(token)} refreshed`);
✓ no violations — cleared to merge
Merged with confidence
Every decision recorded in the audit trail.
agent/refactor-auth
fix approved by your team, merged
j.tan/hotfix-cache
fix approved by your team, merged
dependabot/bump-stripe-sdk
merged
audit trail
9 rules checked · 2 fixes approved · 3 merges
PRGuard runs silently in the background — on pull requests, pushes, or both — posting inline comments and fixes directly where your team already works.
PRGuard catches the AI-era threats traditional scanners can’t — hidden prompt injections and semantic flaws that pattern-matching alone won’t catch. Every change is screened for hidden instructions before the AI reviewer reads it. How the screen works →
Reviews and proposed fixes aren’t generic — they are grounded in your code and your custom governance rules.
Your standards are applied uniformly and objectively to every change — set them organisation-wide for everyone, or per repository where a team needs its own.
Every flagged issue, fix, and approval is logged in records that can’t be altered after the fact — evidence you can hand straight to SOC 2 and security auditors. See the compliance view →
j.tan/hotfix-cache wants to merge 2 commits into main
Recorded for this pull request
See it run
Stop relying on memory and manual reviews. Unite engineering, security, and product around a single set of rules — enforced at the gate, on every PR and push.
Scenario: A developer opens a PR to add Stripe payments — and PRGuard checks it against the team’s standards, line by line. Each role’s rules run in turn below — or click any role to jump to what it catches.
This pull request introduces five error-level violations across security, compliance, architecture, and reliability — including unverified webhook input, card data written to logs, and a missing idempotency guard — plus two warnings on customer notification and test coverage. It should not merge until the error-level findings are resolved.
Overview
The diff adds a Stripe webhook handler in billing/webhooks.py, wiring payment events directly into the API view layer. The code processes events without verifying the signature, logs the full card number, leaks an exception message to the caller, writes to the database outside the service layer, and has no duplicate-event guard — with customer-notification and test-coverage gaps on top.
Key findings
Errors billing/webhooks.py: unverified Stripe signature, full PAN written to logs, a raw exception leaked in the 400 response, a direct DB write bypassing the service layer, and no idempotency guard — risking double charges.
Warnings billing/webhooks.py: no customer payment-confirmation email, and zero test coverage on the new payment path.
Recommendations
Stripe-Signature header with stripe.Webhook.construct_event(...) before processing.
PaymentService.record_charge(event) — no direct ORM calls from the view.
ProcessedEvent.objects.get_or_create(stripe_id=event.id).
notify_customer_payment(charge).
Direct database write bypasses the service layer. All mutations must go through PaymentService.
Stripe payload processed without verifying the Stripe-Signature header. Any caller can trigger payment events.
Full card number (PAN) written to logs in plain text. PCI-DSS v4.0 requires the PAN to be unreadable anywhere it is stored — including application logs.
Exception message returned verbatim in the HTTP 400 body — leaks internal stack details to potential attackers.
No duplicate event check. Stripe retries on timeout — without idempotency this will double-charge customers.
Charge recorded but no receipt email dispatched. Per spec, every successful payment must trigger a confirmation.
0% test coverage on this file. Team standard requires tests for all payment code paths before merge.
Language-agnostic
You shouldn’t need a different tool for every language in your codebase. PRGuard reviews the change itself — the diff, judged against your written standards, not a language-specific grammar. One rule written in plain language covers your modern Python services, your legacy PHP monolith, and everything in between.
Ten public demo repositories with real PRGuard findings — the same rules work in any language.
Why a governance layer
As AI writes more of your code, leaving automated comments isn’t enough. You need a way to govern what actually ships.
A reviewer offers an opinion. A governance layer enforces your standards, keeps a person in the decision, and leaves evidence behind.
Compare
PRGuard is designed to sit alongside your existing tools, not replace them. It enforces your team’s unique business logic, security rules, and house style — all written in plain language.
Here’s the honest comparison with the tools you may already run.
| Capability | PRGuard Deterministic pre-scan + your written standards, enforced | SonarQube Rule catalog & quality gates | Semgrep Code patterns authored in YAML | CodeRabbit AI feedback on each PR |
|---|---|---|---|---|
| Enforces standards you write in plain language | ✓ | — | — | ✓ |
| Judges the diff semantically, in any language | ✓ | — | — | ✓ |
| Verdict that can block a merge | ✓ | ✓ | ✓ | ✓ |
| Drafts fixes your team reviews & approves | ✓ | partial | partial | partial |
| Coverage & duplication metrics | — | ✓ | — | — |
| Screens the diff for prompt injection first | ✓ | — | — | — |
| Audit trail of every decision, with the AI’s reasoning | ✓ | — | — | — |
Compiled from each vendor’s public documentation, last reviewed September 2026. These tools ship continuously, so capabilities may have changed since — if anything here is out of date, tell us and we’ll fix it.
vs SonarQube
SonarQube is the spell-checker.
PRGuard is the editor.
Rules you write in plain language, not rules you pick from a catalog. Sonar’s analysis is deterministic where an LLM isn’t — a real trade-off, and why its coverage and duplication metrics are worth keeping. What a catalog can’t do is judge whether a change fits the way your team decided to build things.
Better together
Sonar keeps the deterministic floor; PRGuard enforces the standards only your team could write.
vs Semgrep
Semgrep is grep with a grammar.
PRGuard is a reviewer with your rulebook.
Patterns require configuration. PRGuard just requires a sentence. Semgrep is fast and precise where a rule genuinely is a pattern, and it drafts fixes of its own now. But each pattern is authored per language — one PRGuard sentence covers your whole stack, including the standards no pattern can express.
Better together
Patterns for the checks that truly are patterns; sentences for the standards that aren’t.
vs CodeRabbit
CodeRabbit gives you a review.
PRGuard gives you the record.
Both can block a merge. Only PRGuard screens the diff for injection first and keeps the model’s own reasoning on the record. CodeRabbit clones your repository to build its index; PRGuard never does — it reads the diff, and only the files your rules point at, from the branch you’re merging into. It also bills per developer seat where PRGuard bills usage, so adding reviewers costs nothing.
Better together
Let the assistant polish the code; PRGuard proves the standard was enforced.
For open source
A security checkpoint for inbound contributions.
AI-generated PRs can look plausible while carrying hidden prompt injection. PRGuard screens every diff for manipulation, then audits it against your contribution standards — comment-only or full merge gating, chosen per repository.
See how it works →For compliance
Turn every code review into audit-ready evidence.
Every finding, fix, and approval lands in an append-only record — the trail you hand to a security or SOC 2 review.
Read more →Governance
Maintain complete control over your codebase without slowing down development. PRGuard automatically reviews, drafts fixes on request, and logs every action — keeping your team moving fast and your auditors happy.
Every approved fix is re-audited — and every step is logged.
A developer or an AI agent submits code. PRGuard runs its deterministic pre-scan, then checks the change against your custom plain-language rules.
If a standard is broken, you get more than an error. Ask PRGuard to fix it and, where the solution is clear, it drafts a patch to approve. Where judgement is needed, you get the rule, the reason, and a ready-to-paste prompt for your own AI assistant.
A human on your team reviews and approves the fix. Findings can also be assigned — to a teammate or to PRGuard’s AI — and tracked from open to fixed, or recorded as won’t-fix with the reason. You always retain final control; PRGuard never merges on its own.
AI cost optimisation
The status check that gates your merges can gate your spending too. Already paying for premium AI reviewers or coding agents? Make PRGuard a required check and they only run on changes that already meet your standards — so you stop paying a premium model to review code that was never going to merge.
Your own engineering standards decide what passes.
Premium AI
Your existing reviewer or agent
Blocked
Your premium AI never runs · No tokens spent
AI-Assisted Remediation
Not every finding can be auto-fixed — and PRGuard never pretends otherwise.
But when the solution is clear, PRGuard drafts the exact code patch for your team to approve.
PRGuard pinpoints the exact file and line of code breaking your rules.
Webhook signature not verified
billing/webhooks.py · line 14 · Security
Ask PRGuard to fix it and it drafts the patch. On a pull request the fix lands on that PR’s own branch; on a direct push it opens a fix PR of its own. A human always has the final say before anything merges — and admins can make that mandatory across the whole org.
fix: verify webhook signature before processing
Pushed · j.doe/add-stripe-webhook · prguard-dev-app[bot]
PRGuard automatically re-audits the fix branch to confirm the finding is resolved, so you can merge with confidence.
PRGuard / audit — passing
0 errors · 0 warnings · All findings resolved
@csrf_exemptdef stripe_webhook(request): # Stripe POSTs a signed event on every billing change payload = request.body # no signature check — anyone can POST a forged event event = json.loads(payload) # Hand the event to the right service if event["type"] == "invoice.paid": handle_payment(event["data"]["object"]) return HttpResponse(status=200)
@csrf_exemptdef stripe_webhook(request): # Stripe POSTs a signed event on every billing change payload = request.body sig = request.headers.get("Stripe-Signature") # construct_event() verifies the signature, raising on a bad one try: event = stripe.Webhook.construct_event( payload, sig, settings.STRIPE_WEBHOOK_SECRET ) except stripe.error.SignatureVerificationError: return HttpResponse(status=400) # Hand the event to the right service if event["type"] == "invoice.paid": handle_payment(event["data"]["object"]) return HttpResponse(status=200)
Batch remediation
Don’t overwhelm your team with notifications. Select multiple findings at once and PRGuard bundles them into a single, clean pull request. It tries one combined rewrite first — far fewer model calls than fixing them one at a time — and falls back to applying each fix in sequence if that doesn’t hold the file’s score. Either way the batch is re-audited before the PR opens, to confirm the score improved rather than regressed.
Findings · billing/webhooks.py
3 selected
fix: resolve 3 governance findings
Open · prguard/batch-fixes · prguard-dev-app[bot]
Automatic escalation
Your primary model gets three attempts to land a patch that holds the file’s score. If it can’t, PRGuard makes one rescue pass with an escalation model you nominate — even one from a different provider — then reports back instead of forcing anything. Security fixes are the exception: they are never dropped just to protect a score.
Checks · fix-webhook-signature
Attempts 1–3 · primary model
Score gate not met
Rescue pass · escalation model your pick
Clean patch · all findings resolved
One rescue pass only — then PRGuard reports back instead of forcing anything.
Context Studio
Write your team’s rules in plain language. No special syntax, no complicated configuration files.
Start from our industry-standard templates or write your own.
Context Studio
Manage the context files that define how your AI agents think and behave.
Architect
Security
Compliance
AppSec
SRE
Product
QA
SysAdmin
OWASP Top 10 Security Review
You MUST review every pull request for the following OWASP Top 10 risks:
Injection
Flag SQL, NoSQL, OS, or LDAP injection. Require parameterised queries.
Broken Authentication
Reject hardcoded credentials, weak session management, or missing MFA enforcement.
Sensitive Data Exposure
Ensure secrets, tokens, and PII are never committed. Require encryption at rest and in transit.
Broken Access Control
Verify authorisation checks on every endpoint. No direct object references without ownership validation.
Cross-Site Scripting (XSS)
Require output encoding. Flag innerHTML or dangerouslySetInnerHTML without sanitisation.
Insecure Deserialisation
Flag pickle.loads, yaml.load, or unserialize on untrusted input.
You NEVER approve a PR that introduces any of these risks without a documented mitigation plan.
Deep-Context Retrieval
PRGuard doesn’t make generic guesses. When a rule points at a file with @ref:, PRGuard fetches it from the PR’s target branch — so a pull request can never author the context it’s judged against — and condenses it to a compact skeleton: its public API, types, and key patterns, not the whole file.
The audit reasons against your actual interfaces, and the fixes it proposes call them correctly — for a fraction of the tokens the whole file would have cost.
finance/discounts.md
Discounts over 20% must go through the approval workflow — @ref:billing/discount_policy.py
# condensed to its public surfaceclass DiscountPolicy: APPROVAL_THRESHOLD = Decimal("0.20") def requires_approval(pct: Decimal) -> bool def approve(discount: Discount, approver: User)
Insights
Stop digging through commit logs or interrupting your developers. Ask “What changed in the payments module this month?” and get a plain-language answer — with citations that link to the exact audit records.
What changed in the payments module in the last 30 days?
Three pull requests touched payments/ in the query window. The retry handler was rewritten and passed its audit [1]; a webhook change shipped with one warning about missing idempotency checks, fixed two days later by an auto-fix PR [2]; a refund-flow change is still carrying an open error-severity finding [3].
Sources: [1] PR #142 · [2] PR #147 · [3] PR #151 — each links to its full audit record.
Who has been changing our auth code this quarter?
Nine audited changes touched apps/auth/ this quarter — seven of them by priya-r and tomn [1]. Two are worth a look: the session-expiry rewrite passed its audit with no findings [2], and PR #163 loosened the password-reset token check — flagged as a warning and fixed the same day by an auto-fix PR [3].
Sources: [1] 9 audits · [2] PR #158 · [3] PR #163 — each links to its full audit record.
Anything still open that should block Friday’s release?
Two findings are still open in the release window. The error-severity one: reports/export.py builds SQL by string concatenation — flagged six days ago, auto-fix PR raised but not yet merged [1]. The warning: the invite endpoint has no rate limit, and the finding is unassigned [2]. Every other finding in the window is fixed and re-audited [3].
Sources: [1] PR #171 · [2] PR #168 · [3] 14 audits — each links to its full audit record.
Every audited change records the files it touched and who shipped it — so “who has been changing our auth code?” is a question, not an afternoon of git archaeology.
Every finding carries its fix status, so answers cleanly separate “already fixed” from “still open” — exactly what a product or engineering manager needs to call a release.
Every claim traces back to an audit record. If the history doesn't cover something, the answer says so instead of guessing.
Included with the Pro, Pro Team and Enterprise plans — and included in the $10 trial, so you can try it before choosing a plan.
Answers cover what PRGuard has audited on your connected repositories, from the day you install it — your history builds as it runs.
Evidence
When an AI blocks a code change, the first question is “says who?” Most AI review answers with “trust us”. PRGuard answers with the record: the full conversation behind every audit, and a rule-by-rule account of what was enforced.
Illustrative excerpt
Stop arguing with a robot. Every step the AI took is on the record, in order, in plain language — each with its outcome stated, and the model’s own reasoning wherever it produced any. The one exception is the prompt-injection screen: it reports its verdict but not its reasoning, because publishing how it decides would be a guide to evading it.
Illustrative excerpt
Proof the standards you wrote are the standards being enforced. Which of your rules were in force — at the exact version that ran, one click away — which were set aside and why, and what PRGuard’s deterministic checks flagged. Every violation the AI claims is cross-checked against the findings actually raised, so you always know which statements are record and which are the model’s word.
Your code is never kept.
PRGuard never keeps your source code. The record holds only names, sizes and fingerprints, and links back to GitHub for the content — where your own repository permissions decide who may read it.
The AI’s reasoning is shown for what it is: the model’s own narration, labelled as such — never presented as proof of how an answer was reached.
Explore the evidence record →Roles
Whether you're shipping code, securing it, or accountable for it — PRGuard fits your workflow.
Engineers
Get fast, automated feedback on every change — PR or push. Catch architectural drift the moment it's introduced, and spend less time waiting on review.
Read more →
Architects
Define your ideal coding patterns in plain language. PRGuard automatically enforces your architecture across every repository, keeping the foundation strong.
Read more →
Security & AppSec
Enable OWASP standards and hardcoded-secret checks and they run on every PR and push — every finding leaving an attributable record for your assessor to evaluate against SOC 2 or PCI-DSS.
Read more →
SRE & QA
Enforce idempotency, error-handling, and test-coverage standards automatically. Stop unreliable code from reaching production and causing late-night incidents.
Read more →
Product & Compliance
Turn complex regulatory requirements into automated rules. Ensure every new feature respects your core product flows and legal constraints without slowing down the team.
Read more →
CTOs, VPs & Executives
Track your organisation’s average governance score and audit trends from one overview — and see exactly where your AI spend is going, credit by credit.
Read more →
Workflow
PRGuard doesn’t just dump a list of errors on your team. Every finding is a structured record — and everything your team sees is a view of it.
The exact file, line, and broken rule — file, line, severity in the record.
Assign it to a teammate or to PRGuard’s AI — the suggestion travels with the assignment, tracked from open to fixed.
The ai_prompt is a copy-paste instruction for Copilot or Cursor — no interpretation, no guessing.
The same bundle PRGuard’s auto-fix runs on.
{
"schema": "prguard.remediation/v1",
"verdict": "FAIL",
"findings": [
{
"file": "billing/webhooks.py", ← 01
"line": 14,
"severity": "ERROR",
"rule": "signature-verification",
"suggestion": "Verify the Stripe-Signature before processing", ← 02
"ai_prompt": "Edit billing/webhooks.py line 14: verify the
Stripe-Signature header with
stripe.Webhook.construct_event() before processing", ← 03
"fix_kind": "patch"
}
]
}
Safety & Control
AI-assisted fixes are a tool and not a takeover. The AI is screened for manipulation, a person triggers every change, and nothing lands without your say-so — these guardrails are baked in, not optional settings.
Before the AI reviews a single line, a gatekeeper pass screens every change for prompt-injection attempts — so malicious instructions hidden in a diff can’t hijack the audit. How the screen works →
PRGuard doesn’t run wild fixing things on its own. A developer assigns each finding to the AI by hand — it only acts when a human on your team explicitly asks it to.
Auto-fix is enabled on every repository out of the box. An owner or admin can switch it off per repo at any time — your cost control. While it’s on, any developer can hand a finding to the AI, since they’re the one reviewing the result.
Fixes land as a reviewable pull request by default — you read the diff and merge on your terms. Org admins can make PR-only delivery a hard rule, so “a human approves every fix” is policy, not preference.
If a patch can’t apply cleanly — the file moved, a conflict exists, or the diff is ambiguous — PRGuard skips that finding and reports it for human review. No force-push, no guesswork.
Every finding, decision, and fix is permanently recorded and attributable. No software alone makes you SOC 2 compliant — but this is the audit trail you hand your assessor to show your standards were enforced.
Pricing
No hidden fees, no surprise API bills. Pick your plan and your model, and spending stops at your credit allowance unless you choose to top up. Every token and credit is logged — just the price you signed up for.
Prices in US dollars, billed by Stripe. Built in North Wales by Unifi Software Development Ltd, a UK-registered company. Prefer a 15-minute walkthrough first? Email us →
2,000 AI credits included
Platform access
2,250 AI credits / month
Platform access
6,000 AI credits / month
Platform access
11,250 AI credits / month
Platform access
Custom deployment and migration support for large-scale engineering orgs.
Tell us a bit about your organisation and we’ll be in touch within one business day.
FAQ
Everything you need to know before connecting your first repo.
Audits run in the background the moment a pull request or push lands — nothing in your workflow waits on PRGuard. Most reviews post back within a few minutes; small diffs are usually quicker, and very large changes, deep-context audits, or slower models take longer. In comment-only mode a running audit never holds anything up; in Full review mode the PR simply shows a pending status until the verdict arrives. Higher plan tiers run on priority processing queues.
No — not by PRGuard. We don’t build or train models of our own, and we never use your code or governance rules to train anything.
Your data stays scoped to your organisation, and diffs are processed in memory for the audit — never written to our database.
The audit runs through the major AI providers’ commercial APIs, whose current terms exclude data submitted this way from training their models, and we choose those channels deliberately for that reason. Those providers are third parties under their own terms, which are outside our control, so our privacy policy spells out exactly what is sent and to whom.
As a rule of thumb from our live runs, a typical pull-request audit charges on the order of 15–40 credits — small diffs at the low end; large changes, deeper context, or a premium model above it. A developer typically opens a handful of PRs a week, and the plans are cut to that shape: Starter comfortably covers a small team of up to 5, Pro a team of around 15, and Pro Team around 30 — matching each plan’s seat limit. If you audit pushes as well, budget more.
You don’t have to guess, though: the dashboard shows the exact credit cost of every audit from your first trial run, so a week of real usage tells you your own average.
[skip prguard] (or [skip ci]) to your PR title or commit message and PRGuard will bypass the audit entirely for that event.
prguard/… branch. You can opt in — via a confirmation step — to have a fix committed straight to your default branch instead, but that’s a deliberate choice you make each time; the default is always something you review first.prguard pull <org-slug>).
Built and operated by Unifi Software Development Ltd, a software company registered in England & Wales, number 11054002. Security-first by design — every change is screened for prompt injection, your data stays scoped to your organisation, and every decision is captured in a complete audit trail.
Trusted by engineering teams