Skip to main content
When a scan surfaces a finding you’ve investigated and confirmed is a false positive for this project, suppress it — with a written reason — so it stops adding noise. Suppressed findings are hidden, not deleted: the reason travels with the code and stays in the repository’s history.

.rafter.yml ignore rules

Add an ignore: list to your project’s .rafter.yml. Each rule names the file path(s), optionally the specific rule(s), and a reason:
Rules are evaluated top-to-bottom and the first matching entry wins, so put more specific entries first. Because .rafter.yml is committed to your repo, the suppression (and its reason) persists across scans and travels with the code.
For a local finding, match rules on the rule name (e.g. "AWS Access Key ID") — the rule field in rafter secrets --json. A local scan does not match R-XXXXX ids. For a hosted finding, copy the R-XXXXX id straight from the report or PR comment, or use the finding’s title.
With --engine auto (the default), when both engines flag the same secret at the same spot, Rafter reports it once under one engine’s rule name — but the merged finding is suppressed only when your rules: list covers every engine’s name for it. If you’re not sure the two engines agree on a name, omit rules: and suppress by paths alone, or list both names.

What suppression does to a scan

On a local scan (rafter secrets), suppressed findings move into a _suppressed[] array in --json output, so you can still see exactly what was hidden and why:
Suppression never changes the exit code — rafter secrets exits non-zero only when a non-suppressed finding remains. A clean run stays green, and your diligence stays on the record.

Hosted scans

The hosted scanner (rafter run, the GitHub app, the dashboard) reads the same file from the scanned commit — .rafter.yml first, then .rafter.yaml, .rafter/config.yml, .rafter/config.yaml — and applies the same ignore: rules and scan.exclude_paths. Two things are stricter than a local scan:
  • Protected findings need a reason. Findings Rafter classifies as must-fix, findings from a secret scanner, and unclassified critical/high findings can be suppressed only by an ignore: rule that states a reason. A rule without a reason keeps working for ordinary findings; a protected finding it matches stays in the report.
  • exclude_paths never hides a protected finding. A path exclusion carries no reason, so protected findings in excluded paths stay in the report; use an ignore rule with a reason.
If the config file is invalid (bad YAML, a key with the wrong type), the hosted scan applies none of it and reports every finding. Rafter stores a record of what the file did with each hosted scan; the dashboard and API do not show it. If a rule seems to have no effect, check its selector against the R-XXXXX id or title in the report, and its glob against the finding’s file path.
Because a repo’s own config can hide must-fix and secret findings when it states a reason, a committer can hide a planted secret in the same PR that suppresses it. The .rafter.yml change shows in the PR diff; review it like code.

Baseline — adopting on a noisy repo

To start using Rafter on a codebase that already has findings, snapshot the current state and only surface new findings from then on:
The baseline lives at ~/.rafter/baseline.json and is applied only when you pass --baseline. rafter agent baseline show lists current entries, rafter agent baseline add --file <path> --pattern <name> --line <number> adds one manually, and rafter agent baseline clear removes all of them.

.rafterignore (legacy)

A plain .rafterignore file — one glob per line — is still honored for path-based suppression. Prefer .rafter.yml ignore:: it carries per-rule scoping and a reason.

When not to suppress

Suppress only a real false positive for this context, with a reason. Don’t:
  • comment out or delete a rule globally,
  • broaden a suppression beyond the specific file/context,
  • drop the scan from CI.
If a finding is real but you can’t fix it yet, track it — don’t bury it.