Skip to content
DashboardWebsite

Rule Categories in a Run

This page explains how org members choose which rule categories to check in a repository scan or server-side analysis. A rule category groups rules, such as Performance or Reliability. By default, a run checks every rule in each pack.

Categories belong to the org. In the dashboard, open Rules → Categories to manage them. Open a rule in Rules to change its category. OpenTremor assigns built-in rules to categories based on their pack file headings; headings it cannot map go to Other.

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

  1. Click Preview a scan.

  2. Under each included pack, Rule categories lists categories with at least one rule for that pack in this repository, along with each category’s rule count. Pick the categories to check.

  3. Leave all categories unpicked to run every rule in that pack. Each pack has its own selection.

  4. Click Start the scan. The scan shows the categories selected for each pack. Resume continues the remaining slices with the same selections.

In the API, preview the scan with POST /v1/orgs/{org_id}/repositories/{provider}/{external_id}/scan/preview. The response lists each pack’s rules_by_category counts. In POST /v1/orgs/{org_id}/repositories/{provider}/{external_id}/scan, add categories to each plan slice. Use category ids from the preview:

{
"plan": {
"slices": [
{ "pack": "python-code-change", "paths": [], "categories": ["performance", "reliability"] },
{ "pack": "typescript-code-change", "paths": ["web/"], "categories": null }
]
}
}

Every slice for the same pack must use the same categories. A selected category must have at least one rule for the pack in the repository; otherwise, the API rejects the scan plan.

The MCP tools use the same field: categories on each slice passed to start_repository_scan.

In the dashboard: Analyze.

  1. Choose a pack, or keep Auto-detect.

  2. Under Rule categories, pick the categories to check. With a pack selected, the list shows categories for that pack. With Auto-detect, it shows categories used by enabled packs; each pack matched to the input checks only its rules in the selected categories.

  3. Click Analyze. The report identifies the categories it checked.

In the API, send categories in the body of POST /v1/{pack_name}/{changeset}/analyze or POST /v1/{changeset}/analyze/auto:

Terminal window
jq -n \
--arg raw_input "$(cat pr.diff)" \
'{connection_id: "anthropic", model: "claude-sonnet-5", raw_input: $raw_input,
categories: ["performance", "reliability"]}' \
| curl -X POST -H "X-API-Key: $OPENTREMOR_API_KEY" http://localhost:8000/v1/my-changeset/analyze/auto \
-H "Content-Type: application/json" -d @-

GET /v1/packs returns rules_by_category for each pack. For Auto-detect, a selected category must have a rule in at least one pack matched to the input; otherwise, the API returns 422.

The MCP tool start_server_analysis accepts the same categories field.

  • A unit already analyzed with every rule is reused without another LLM call.
  • A unit with a previous category analysis is reused when that analysis already covers the selected categories. Checking other categories later, or running every rule, analyzes the same code again and is billed again.
  • A unit with no rule in the selected categories for its pack needs no LLM call.
  • It closes no finding. A category-limited run did not check every rule. A fixed finding stays open until a run with every rule reads the code and no longer reports it.
  • It does not count as a full analysis. A later pull request or full scan checks every rule on the same code. Findings keep their triage across both runs.
  • Pull request reviews check every rule. Category selection applies to repository scans and server-side analysis.

The category picker shows only categories with at least one rule for that pack in the current repository or analysis target. For built-in rules, OpenTremor maps pack file headings to categories. A heading it cannot map, such as 1. Security in the Kubernetes pack, maps to Other. Check the rule counts or change a rule’s category in its editor under Rules.