Code review

Automated code review inspects GitHub pull requests before they merge and leaves inline findings directly on the diff. Each enabled Guardian runs a focused review charter to catch bugs, regressions, and security issues on every push.

Repository settings

In Settings → Reviews, an organization owner or admin chooses which connected GitHub repositories receive automated reviews and when they run:

SettingBehavior
AutoReviews when a PR is ready for review and again after each new push.
When readyReviews once when a PR opens ready for review or leaves draft.
OffNo automated review runs for that repository.
Pick when each repository gets reviewed.

If your organization requires subscription-backed models, the reviewing account needs a connected subscription it can use.

Guardians

A Guardian is a review charter that defines what automated reviews look for and which file paths they cover. Two built-in Guardians ship with every workspace:

  • Review (enabled by default): Flags correctness bugs, regressions, and edge cases.
  • Security (off by default): Flags security-sensitive regressions on GitHub pull requests.

You can toggle and configure built-in Guardians, or create custom charters for team-specific invariants such as migration safety, API compatibility, or missing regression tests.

Create a custom Guardian

Open Guardians

In Settings → Reviews, find Guardians and select New guardian.

Define what to flag

Name the charter and describe concrete failure conditions in What to flag, including the evidence each finding should cite (file, line, and breaking behavior).

Scope paths and model

Add up to 20 path patterns (one per line) in Scope, or leave it empty to cover the whole repository. Optionally override the organization's default review model, then save.

Review billing migrations for compatibility with the prior app version. Flag only reproducible problems—for each one, name the line, deployment order that triggers it, and behavior that breaks.

Tune charters

Test a new charter on a few real pull requests before broadening it. If a Guardian reports style noise instead of real defects, list what to ignore in What to flag; if it misses an invariant, add a concrete example or narrow Scope. Keep independent concerns in separate Guardians so you can enable, tune, or pause each one on its own.

Security review

Turn on the built-in Security Guardian in Settings → Reviews, or add a custom security charter tailored to your architecture:

Risk areaWhat to flag
Secrets and credentialsHardcoded secrets or code paths that log, return, or serialize secret values (cite the location without quoting the value).
Authentication and authorizationRoutes or handlers missing identity, role, or tenant authorization checks.
Injection and untrusted inputUnvalidated or unescaped input reaching queries, shell commands, or rendered HTML.
Data flowSensitive data crossing trust boundaries or leaking into logs, responses, or client bundles.
DependenciesDependency changes introducing unnecessary privileges or removing existing protections.
Review changes to request handlers for missing tenant authorization. Cite the changed line and missing check—never quote credentials or guess about unverified paths.

Guardians review pull request diffs—they complement, rather than replace, dependency scanning, secret scanning, runtime tests, and GitHub branch protection. If a review flags a committed credential, rotate or revoke it immediately; removing it from the diff is not enough.

Inline findings and merge checks

Read the unresolved review threads on this PR. Separate required code fixes from questions we can answer without editing. Don't comment or edit yet.
  • Inline threads: Findings appear on the GitHub diff with line anchors. After pushing a verified fix, reply in the thread with what changed and the verification you ran, and leave unresolved findings open.
  • Merge gates: Guardian reviews do not submit a GitHub Request changes review. Verify the current PR head along with GitHub's separate required checks, approvals, and branch protection rules before merging.

Next steps