Skip to main content
By the end of this guide, the pull requests in a repository you pick each get one security review from an AI reviewer. It threat-models the diff and posts its findings grouped by severity. Each finding names a path:line, says whether it is confirmed or suspected, and carries evidence, an exploit sketch and a fix. This is autopilot-security-review, one of the Autopilot built-ins. You turn it on rather than write it. Unlike PR review, it needs a machine with a clone of the repository: the reviewer reads the code around the diff in that checkout, read-only.

Before you begin

  • The reliant CLI, v1.21 or later, signed in (Sign in and tokens), and gh for the GitHub side.
  • The Reliant GitHub App installed on the repository (GitHub integration).
  • A machine that is online and holds a clone of the repository.
  • In an organization: an organization AI account that can run the powerful model tag. See What this does not do.
1

See what it will do before you turn it on

The workflow’s scenarios run its control flow with the model and GitHub mocked, at no cost. Each shows one path: a draft is skipped, a head commit is reviewed once.
terminal
19 scenarios pass. Test workflows with scenarios explains the format.
2

Create a project on the machine's clone

Run this in the clone, on the machine the reviews will run on. The workflow looks for a checkout whose origin remote is the pull request’s repository, either at the project root or in a subfolder named after the repository.
terminal
project create prints the project ID. The pull request’s own files are read from GitHub at its head commit; this checkout is never changed.
3

Turn on security review

--machine takes a daemon ID or hostname from reliant machine list. require_labels makes it opt-in: only pull requests carrying security-review are reviewed. Leave it out to review every non-draft pull request on every push.
terminal
It prints one row per declared trigger: pr-updated, label-added and review-comment. They turn on together, or none do. review_guidance is your threat model. Every setting is in Autopilot settings. In the app, this is Workflows → Library → Autopilot · security review → Set up.
4

Ask for a review

Open a pull request and add the label, or comment /autopilot security-review on any open pull request, a draft included. Only you and the accounts in trusted_ids can ask by comment.
terminal
A launched row means the review started. Follow it with reliant workflow follow <chat> or under Workflows → Runs.
5

Read the findings

terminal
Look for one review comment, headed 🛡️ Security review, at the pull request’s head commit. It opens with a count, such as “2 finding(s): 1 critical, 0 high, 1 medium, 0 low (1 confirmed)”, and the reviewer’s summary. Then come the findings, grouped Critical, High, Medium and Low. Each finding shows:
  • Confirmed (the path from attacker input to the vulnerable code was traced) or Suspected (the reviewer could not trace one link in that path, and says which), the title, path:line and category
  • Evidence, an Exploit sketch and a Fix
A collapsed What was checked section lists each area it covered and the dependency advisory lookups. A scope note closes the review: the review read code only, nothing was run against live systems, and it is not a penetration test. A clean pull request gets “No security findings in the changed code.”
6

Turn it off

Pass --project-id. Without it, deactivate pauses this workflow in every project you own.
terminal

What this does not do

  • It is not a guarantee. The findings are advisory: a model reading code can miss a vulnerability or flag one that is not exploitable, which is why each finding says confirmed or suspected. Keep your own scanners, dependency checks and human review for security-sensitive changes.
  • It never approves, requests changes or merges. The workflow posts the review with the literal event COMMENT, and the reviewer has no GitHub write tools. Autopilot never merges; a person does.
  • It does not run your code or touch live systems. The reviewer is told never to build, test, install or execute the repository, and never to scan or probe a host. Its shell runs with no credentials. Its only network calls are advisory lookups for changed dependencies. Agents in production explains these limits.
  • It has no budget of its own. Each review can take up to 50 turns (max_turns) on the powerful tag. Without require_labels, every push to every non-draft pull request is reviewed. See What it costs.
  • In an organization, runs spend only the organization’s AI accounts by default. A person can allow their own accounts on the automation in the app, or an admin can add an organization account.

Troubleshooting

The run found no clone whose origin is the repository at the project root or in a subfolder named after it. It fails, and posts a note on the pull request once per head commit. Clone the repository into the project, or activate on the project and machine that hold it.
Each head commit is reviewed once. Push a commit, or comment /autopilot security-review to review the same commit again.
require_labels is set and the pull request has no matching label. Add the label, which also starts a review.

Next steps

Review every pull request with an AI agent

The general code reviewer, which needs no machine.

Run a scheduled vulnerability scan

Scan the whole repository on a schedule and file GitHub issues.

Autopilot reference

Every setting, label and cost of the Autopilot workflows.

Agents in production

What unattended agents can and cannot reach.