Skip to content
DashboardWebsite

Repository Scan

Just want to do it in the dashboard? See the guide: Scan the default branch of a repository.

A repository scan reviews code on a repository’s default branch, pack by pack. This page explains how org admins preview, plan, start, and resume a scan, and how scans affect findings and usage.

Only an org admin with the repositories:scan permission can preview or start a scan because it uses the LLM budget. OpenTremor does not scan automatically when you connect a repository.

In the dashboard: Repositories → [repository] → Scan.

  1. Preview. Click Preview a scan. OpenTremor reads the default branch’s file list, not file contents, and makes no LLM call. The preview shows, for each enabled pack that claims files, the files it would read and an estimated unit count. It also shows packs that could read files but are not enabled.

  2. Plan. Include or exclude packs, choose their order, and optionally narrow each pack to folders such as infra/. You can also choose:

    • Rule categories per pack: choose categories to run only those rules, or choose none to run every rule. See Rule Categories in a Run.
    • Include test files, off by default.
    • Stop after a unit limit.
  3. Start. Start the scan as a background job. It uses the org’s configured LLM. The scan card shows its status, completed and remaining packs, and units analysed or reused from an earlier analysis.

  4. Resume. If a run stops because it reaches the unit limit, the budget is spent, or a pack reads more than 5,000 files, resume to run the remaining slices at the same commit. Narrow a pack to folders if it exceeds the file limit.

The API provides POST /v1/orgs/{org_id}/repositories/{provider}/{external_id}/scan/preview, POST /v1/orgs/{org_id}/repositories/{provider}/{external_id}/scan, and GET /v1/orgs/{org_id}/repositories/{provider}/{external_id}/scan. MCP tools are preview_repository_scan, start_repository_scan, and get_repository_scan.

  • The default branch, at the commit the scan starts from.
  • Files claimed by each selected pack, read through the code host’s API. OpenTremor does not clone the repository.
  • By default, the scan skips vendored and generated folders (vendor/, node_modules/, third_party/, dist/, build/), lockfiles, minified files, source maps, files over 200 KB, and test files. Select Include test files to include tests.
  • The scan never uses the generic pack, which would read every README, lockfile, and asset in the repository.

A pack can read at most 5,000 files in one run. Narrow it to folders if it would read more.

OpenTremor analyses a unit once per org, keyed by its content. A rescan reads the files again, but unchanged code already analysed in an earlier scan or pull request does not need a new LLM call. The scan reports those units as reused. A rescan of unchanged code finishes in seconds.

This also applies after you change the org’s model or rules: unchanged code keeps its earlier analysis.

Findings go to the repository’s changeset, scan-{provider}-{external_id}. Open them from the scan card’s Findings link, then triage them like other findings. Scan findings never hold a pull request.

Each run creates a new revision of that changeset. A finding closes only when a run reads its code again and no longer reports it. A run that covers only some packs or folders carries forward findings for the rest. A run that selects rule categories closes no findings.

  • Every unit counts toward the org’s usage, as it does for a pull request.
  • Each unit analysed during the run uses one LLM call from the org’s monthly budget. A run stops when the budget is spent.
  • Reused units do not use an LLM call, but still count toward usage.
  • Selecting rule categories does not reduce the number of LLM calls. A later run that selects different categories or all rules bills the code again.