> ## Documentation Index
> Fetch the complete documentation index at: https://zeropath.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Monorepo partitions

> Give directories in one repository separate findings, scanner settings, and scan schedules

Use partitions when teams need to scan and manage different directories in the same repository separately. Each partition appears as a repository in ZeroPath, with its own findings, scan history, settings, and schedules. All partitions use the same version control connection.

For example, you could split a repository like this:

| Partition | Directory paths |
| - | - |
| Web | `apps/web/` |
| API | `services/api/`, `services/worker/` |
| Fallback | Paths outside the named partitions, such as `packages/shared/` and files at the repository root |

ZeroPath adds the **fallback** partition automatically during conversion. It has no directory paths of its own; its scope is the paths that no named partition covers.

Partitions are configured by you. The [applications](https://zeropath.com/docs/platform/threat-model.md) shown in threat models and issue filters are discovered from code, and a partition can contain more than one application.

## Create partitions

Start with a repository already connected to ZeroPath. Creating partitions or changing their directory paths requires **Create Repositories** permission.

1. Open **Repositories → Monorepos**, then select **Create monorepo**.
2. Select the repository to convert.
3. Give the first partition a **Partition Name** and one or more **Directory paths**.
4. Use **Add Another Partition** for each additional group of directories.
5. Click **Convert to Monorepo**. The fallback is added alongside your named partitions.
6. Open each partition's repository page to review its scanner settings, configure its schedule, and start a scan.

New partitions inherit organization and tag settings. Repository-specific overrides and schedules from the original repository are not copied to the new entries. Existing scan history stays with the original entry.

You can also manage partitions from a repository's **Settings → General → Monorepo configuration**.

### Directory path rules

* Use paths relative to the repository root, ending in `/`, such as `apps/web/`.
* A partition can include several directories.
* Paths are directory prefixes. File names, glob patterns such as `**/*.ts`, absolute paths, and `..` are not supported.
* Different partitions cannot overlap: `apps/` and `apps/web/` cannot belong to separate partitions.

## How scans use partitions

### Full scans

Each partition runs a separate scan. The scanner can read the whole repository to understand imports and shared code, so scan time still includes work outside the partition's directories.

A SAST finding is kept for a named partition when its reported location or the start of its data flow is inside that partition. For example, the API partition can report a flow that starts in `services/api/` and reaches vulnerable code in `packages/shared/`.

Where your plan enforces a full-scan size limit, the check uses the partition's scope. For the fallback, that excludes directories assigned to named partitions.

### Pull requests

PR scans for a named partition skip changes that do not touch its directories. On GitHub, changed files select which partitions receive scans; a PR touching both Web and API can trigger a scan for each.

In the example above, a GitHub PR changing only `packages/shared/` routes to the fallback. It does not automatically trigger scans for every service that imports that code. Run full scans of the affected partitions when you need to check those services after a shared-code change.

## Edit or remove partitions

Open **Repositories → Monorepos → Existing monorepos** and expand a repository. Use **Add Partition** to create another partition, or the pencil icon to change a partition's name or paths.

Deleting partitions requires **Repository Deletion** permission. When removing a monorepo configuration, you can keep one entry as a normal repository or delete all entries from ZeroPath. Keeping one clears its directory scope so it scans the whole repository. If only one partition remains, the page offers to convert it back to a normal repository.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.