Handle false positives
Last updated 23 November 2026
A false positive here is a finding of a rule on content that is not a problem. A rule matches a pattern, and a pattern can match something harmless: a script that deletes its own temporary directory, a hook that uploads a report whose name holds a sensitive word.
What you do about one depends on how far it reaches: accept one finding with a reason, quiet a rule that is noisy across a repository, or tell the project so that the rule can change. First, decide whether it is one.
How to tell a false positive from a finding to fix
A finding names the rule that raised it, the file it was found in and the evidence, the text that matched. Every rule has a page under Scanner rules that says what the rule detects, why it matters, shows an example, tells you how to fix it and says what to do when the finding is not a problem.
- Open the page of the rule from its id: the rules index lists every id, and the address of each page ends in its id, in lower case.
- Read what the rule detects, then read the evidence of your finding against it.
- Compare your content with the example on the page. If it does the same thing, the finding is not a false positive, and the page says how to fix it.
- If the rule's text matched something that is harmless in your case, the page's last section says what to look at before you decide. Then choose one of the ways below.
Which way depends on how far the noise reaches.
- One finding in one place: accept it, with a reason, in the baseline file or in the dashboard.
- One rule across the repository: use a preset, the
--fail-onlevel orexclude. - A rule that is wrong for everyone: tell the project.
Accept one finding in the baseline file
The scanner reads .spellwarden/baseline.yml from the repository. Each entry accepts one finding, by its fingerprint, which is shown in the report, from the date in added to the date in expires. The README's example:
version: 1
accepted:
- fingerprint: 9c1d... # 64 hex characters, from the report
rule: SW-SKL-009
path: .claude/skills/deploy/scripts/setup.sh
reason: Installed from our internal mirror, which pins versions.
added: 2026-12-01
expires: 2027-01-31An entry needs a reason. It may last at most 365 days, and at most 30 days for a malicious-indicator rule. The five malicious-indicator rules are SW-SKL-004, SW-SKL-008, SW-SKL-032, SW-CFG-006 and SW-CFG-007.
- An invalid entry accepts nothing and fails the scan with exit code 2.
- An expired entry stops accepting, and the report says which entry expired on which date.
- Accepted findings stay in every report, marked as accepted with their reason. Accepting a finding never removes it from view.
Three commands work on the file:
spellwarden baseline add --all --reason "..."accepts every current finding, for 90 days by default;spellwarden baseline pruneremoves entries that no longer match anything;spellwarden baseline listshows each entry's state.
Since 1.20.0, when your scan runs with --follow-links, give these three commands the same option. Without it, baseline prune removes the entries of findings in files that are read through a linked folder. Linked rule folders explains the option.
They work on the files in your working tree and scan without a connection, so they cannot see a finding of an SW-REG or SW-ORG rule. Use add --all with care: it accepts every finding that is there, the ones to fix among them. The file's other limits are in the baseline file of the scanner guide.
On a pull or merge request
On a pull or merge request the scan reads the baseline from the base revision, the commit the request targets, like the settings file, so a request cannot accept its own finding. A request that changes the baseline sees the change apply only once it is merged, and the report says so with the notice settings_from_base.
To accept a finding that a request introduces, merge the baseline entry first, in a request of its own; an entry that matches nothing yet is valid.
Accept a finding in the dashboard
In the hosted product, accepting a finding records the decision with a note. The finding stays in the list as Accepted, with your note beside it, and it no longer counts as open. A member, manager or owner can accept a medium or low finding. Accepting a critical or high finding, or a finding from a rule that flags a malicious indicator, needs a manager or owner.
- Open the Findings page, or the page of the skill or server, and find the finding.
- Choose
Accept with noteon its row, and write the note: why this is acceptable, and what would change your mind. It is required, from 1 to 500 characters. - Choose
Accept finding. To undo it, chooseReopenon the accepted row.
An acceptance belongs to the finding as the scan saw it: the same rule, in the same file, on the same matched text. If a later scan matches something different, that is a new finding and it starts as open. The steps, the roles and the cases where accepting is not offered are in accept a finding.
When one rule is noisy across a repository
Accepting finding after finding is the wrong tool when one rule fires again and again on content that is fine. Three settings act on a whole repository:
| Setting | What it does | What it leaves as it is |
|---|---|---|
preset: low-noise | Since 1.18.0. Turns off the rules about metadata, format or protocol age that fire on most benign content, and lowers to low the medium rules whose pattern is common in benign skills and configurations. | Critical and high findings, malicious indicators, organisation rules, the private registry's check and the baseline file. |
--fail-on or fail-on | Sets the severity at or above which a finding fails the scan. The default is high; the value never passes whatever the findings are. | Every error, and the exit code 2 of an incomplete scan, which wins over a failed finding. |
exclude in .spellwarden/config.yml | Leaves the files that match its globs out of the scan, whichever rule would have judged them. | Every file it does not name. |
A preset is the quickest: set preset: low-noise in the settings file, or pass --preset low-noise. A finding it turns off is counted in every report and never silently dropped. The levels and what each preset does to each rule are in presets.
--fail-on changes what fails a build, not what a rule detects. A flag wins over the environment variable SPELLWARDEN_FAIL_ON, which wins over the file.
exclude is a list of path globs, for example exclude: ["tests/fixtures/**"]. It makes the scan narrower, and a narrower scan is a change that shows in the diff, never a skip the scanner makes on its own. On a pull or merge request the settings file is read from the base revision, so a request cannot add an exclusion for its own files. In connected mode a skill with an excluded file has no identity for the private registry's check.
None of the three hides an error. An error stays an error: a file that cannot be read, an invalid baseline entry or a settings file with an unknown key ends the scan as incomplete or invalid. An incomplete scan stays exit code 2. That holds whichever preset, level or exclusion is set, since content the scanner leaves unread never looks like a pass. exclude is the way out of an unreadable file only because it narrows the scan on purpose.
Tell the project about a false positive
When a rule fires on content that is harmless and common, the rule may be the thing to change. The scanner's source and its issues are public.
- Open an issue in the scanner's public repository and name the rule by its id.
- Give the scanner version and the rules version. Every scan result carries both, so they are in the report you already have.
- Add a sample that is safe to publish: the smallest text that makes the rule fire, with every secret, address and private name taken out. An issue is public.
A change to what a rule detects raises the rules version and the scanner's minor version, and a fix anywhere else raises the patch version. So a change to a rule is visible in the version a result carries, and a stored finding always says which rules produced it. In the meantime, accept the finding in the baseline file or in the dashboard, so that it does not block you.