---
title: "Full Repo Security Scan"
description: "Scans whole repositories for exploitable vulnerabilities, ranks them by severity and exposure, and opens fix pull requests for the ones with a safe, proven fix."
canonical: "https://baz.ai/docs/agents/maintain/full-repo-security-scan"
---

# Full Repo Security Scan

Scans whole repositories for exploitable vulnerabilities, ranks them by severity and exposure, and opens fix pull requests for the ones with a safe, proven fix.

Full Repo Security Scan reviews code that was never part of a recent pull request. It finds exploitable weaknesses across each repository and sorts them for you: **FIX** when a safe fix follows a pattern already in your codebase, so Fixer opens a pull request, or **FLAG** when the fix needs a human decision.

## What it finds

Exploitable vulnerabilities reachable from real entry points: injection, broken access control, authentication gaps, unsafe deserialization, misconfiguration, and the other categories [Advanced Security](/docs/agents/build/advanced-security) covers, across the whole repository instead of one diff.

## Why you can trust it

The scan starts from your real entry points (APIs, webhooks, jobs, CLIs, uploads) and takes the defenses you already have into account, such as auth middleware and parameterized query helpers. It reports only weaknesses an attacker could actually reach, and it does not re-report issues an earlier scan already found.

### FIX or FLAG

Every finding is real and exploitable. It is a **FIX** when the safe fix follows a pattern your code already uses, so Fixer opens a pull request for you to review. It is a **FLAG** when the fix needs a human decision, like an architecture change, a broken API contract, or several valid approaches, so it is reported to your team instead.

When in doubt, Baz chooses FLAG, so automated pull requests stay small and safe.

Example: a SQL query built with string interpolation on a public endpoint, where the rest of the code uses a parameterized helper, is a FIX. A missing authorization check whose fix depends on your tenancy model is a FLAG.

Findings are ranked by severity and by how exposed the code is, so an internet-facing issue comes before one that needs host access. FIX findings become pull requests in that order, up to **Max open fix PRs**. The rest stay in the report. See [Prioritization](/docs/security/prioritization).

## What you see

Each scan is a **Full repository security scan** session in [Sessions](/docs/work/sessions), with setup, scanning, and findings stages. Fix pull requests use your PR conventions, for example:

```text title="Fix PR"
Branch: baz/security-a1b2c3
Title:  chore(security): Use parameterized query in invoice search
```

Fix pull requests are reviewed by your Build agents like any other change. **Insights → Evaluation → Maintain** shows **Total vulnerabilities split by severity**, **Vulnerabilities found & accepted**, **Security scans progress**, and **Last Scan**.

<figure><img src="/docs/docs-assets/appdemo-maintain-agents.png" alt="Maintain stage rows: Full Repo Security Scan, SRE Agent, and Skill Maintainer" width="1184" height="290" /><figcaption>The Maintain stage</figcaption></figure>

## Run a scan

Select **Full Repo Security Scan** on **Software Factory → Maintain**. The row reads "Scan your entire codebase and its dependencies for vulnerabilities".

- **On demand.** Choose repositories, or **All repositories**, select **Scan now**, and confirm in **Run full repository scan?**. A repository with a scan already running is skipped.
- **Scheduled scan.** "Control when scans are activated." Turn on **Enable scheduled scan** and pick a frequency: **3 days**, **Week**, or **2 weeks**. The section shows **Last scan** and **Next scan**.

## Prerequisites

- A payment method or credits, and remaining security scan budget ("No remaining budget for security scans" otherwise)
- Write access
- A [sandbox](/docs/integrations/sandbox)

## Settings

**Configure PR conventions for Advanced Security** ("Control how security fix PRs are created, including limits, titles, and branch names.").

**Max open fix PRs** caps how many fix pull requests the agent keeps open at once (default 3). **PR title prefix** and **PR branch prefix** name its pull requests and branches, with defaults `chore(security):` and `baz/security-`.

## Related

<CardGroup cols={2}>
  <Card title="Prioritization" href="/docs/security/prioritization" icon="gauge">
    Severity, exposure, and FIX vs FLAG in depth.
  </Card>
  <Card title="Advanced Security" href="/docs/agents/build/advanced-security" icon="shield-check">
    The same investigation on every PR.
  </Card>
  <Card title="Fixer" href="/docs/agents/build/fixer" icon="wrench">
    How fix PRs are built.
  </Card>
</CardGroup>
