How each finding tells you the fix
Last updated 24 November 2026
Since 1.21.0 every finding of a baseline rule says how to fix it: one sentence, the same wherever the finding shows, and a link to the rule's page with the full steps. This guide sets out what the sentence is, where each report shows it, which rules also give the exact lines to write, and what you see for findings that older scanners wrote.
What a fix sentence is
Each of the 66 baseline rules has one fix sentence, kept with the rule in the open-source scanner next to its title and severity. It is one sentence in plain words, an instruction you can act on. It names no product and holds no address: the address of the rule's page is a field of its own, https://spellwarden.ai/docs/rules/ followed by the rule id in lower case.
The sentence is the short form. Each rule's page on this site opens its How to fix section with the same sentence, read from the scanner's own list of rules, and goes on with the full steps, an example and what to do when the finding is not a problem. Scanner rules lists every rule and links its page.
To list every rule with its sentence and its page, run spellwarden rules --format json: each rule has fix and page.
Where the fix shows
Each report of the scanner shows the fix its own way:
| Report | What it shows |
|---|---|
text | A How to fix section after the findings: each rule that has an open finding, its sentence and its page, and a line starting with write in under a finding that has setting lines. |
markdown | A How to fix section under the table of findings, for the rules of the rows the table shows, with the setting lines under their rule. The pull request comment of the GitHub Action and the merge request note of the GitLab component are this report. |
html | The sentence and the setting lines in each finding, above its link to the rule page. |
json | Each finding's fix and rule_url, and fix_lines where the finding has setting lines. |
sarif | Each rule's help, as text and as Markdown, and its page as its helpUri, so a GitHub code scanning alert shows the fix. A result's setting lines are in properties.fix_lines. |
cyclonedx | Each vulnerability's recommendation, the sentence. |
gitlab-codequality | Nothing new: GitLab shows only the description, and the merge request note carries the fix. |
The links in the JSON, text, Markdown and SARIF reports open the rule page with the campaign tags utm_source=scanner&utm_medium=cli&utm_campaign=rule-fix, which count visits from reports and say nothing about your scan. The HTML report and the CycloneDX file keep the tags their links already had; The HTML report names those of the HTML report.
A worked example: an unpinned install
A skill's SKILL.md has a complete front matter (a name, a description, a licence and a version) and tells the agent to install a helper with pip, without a version:
---
name: helper
description: Use when a report needs the requests library.
license: MIT
version: 1.0.0
---
# Helper
```
pip install requests
```spellwarden scan . reports a finding of SW-SKL-009, Unpinned dependency install, and after the findings the terminal shows:
How to fix
SW-SKL-009 Pin each install to an exact version, for example package==1.4.2 for pip, and add a lock file or hashes where the tool supports them.
https://spellwarden.ai/docs/rules/sw-skl-009?utm_source=scanner&utm_medium=cli&utm_campaign=rule-fixOn a pull request the GitHub Action posts the Markdown report as its comment, so the comment ends its table of findings with the same section; the merge request note of the GitLab component does the same:
**How to fix**
- **SW-SKL-009** Pin each install to an exact version, for example package==1.4.2 for pip, and add a lock file or hashes where the tool supports them. [Rule page](https://spellwarden.ai/docs/rules/sw-skl-009?utm_source=scanner&utm_medium=cli&utm_campaign=rule-fix)In the JSON report the finding carries the sentence and the address as two fields of their own, beside its rule id, title and location:
"fix": "Pin each install to an exact version, for example package==1.4.2 for pip, and add a lock file or hashes where the tool supports them.",
"rule_url": "https://spellwarden.ai/docs/rules/sw-skl-009?utm_source=scanner&utm_medium=cli&utm_campaign=rule-fix",With the Action's SARIF upload, the code scanning alert of the finding shows the sentence as the rule's help, with a link to the page. In the Spellwarden dashboard, once the scan of the repository is uploaded in connected mode, the finding's detail shows How to fix with the same sentence and a link, Full steps on the rule page.
Pin the install to the version you have checked, add a lock file or hashes where pip supports them, and scan again: the finding is gone.
Setting lines: the lines to write
For three rules the scanner can also state the exact lines to write, because the lines are the same for every finding of the case. It shows them under the finding, as text to copy. Nothing is ever changed for you: no report edits your files, and the SARIF file holds no fixes object.
| The finding is about | Rule | Where to write | Lines |
|---|---|---|---|
the hosted Supabase endpoint without read_only=true | SW-CFG-013 | the query of the mcp.supabase.com address | read_only=true |
mcp-server-kubernetes with no restricting switch, in a JSON configuration | SW-CFG-013 | the server's env | "ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "true" |
mcp-server-kubernetes with no restricting switch, in Codex's config.toml | SW-CFG-013 | the server's env table | ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS = "true" |
| an authorization code flow without PKCE required | SW-A2A-006 | the authorizationCode flow of the card's OAuth scheme | "pkceRequired": true |
| dynamic client registration | SW-MCP-003 | the authorization server's metadata | "client_id_metadata_document_supported": true |
The lines are fixed words of the scanner, never text from your files. A line follows the syntax of the file its finding is in: the mcp-server-kubernetes line is a JSON member in a JSON configuration and a TOML key in Codex's config.toml. Every other server that SW-CFG-013 finds, the @supabase/mcp-server-supabase package and kubernetes-mcp-server among them, gets the sentence alone.
The text report writes the lines under their finding, after write in; the Markdown report puts them under their rule in its How to fix section; the JSON report holds them as fix_lines, with where and text, and SARIF as properties.fix_lines of the result. The rule pages show them too. The Spellwarden dashboard shows the sentence and links the rule page, where the lines are.
Organisation rules and registry rules
An organisation rule, whose id starts with SW-ORG-, has no fix sentence and no page, because its policy pack holds no fix text. In the JSON report its findings have fix and rule_url set to null, and the text and Markdown sections end with one line that says to ask the people who manage the pack. In the dashboard such a finding shows its rule's title, linked to the Rules page, and no How to fix. Rules, policy packs and exports describes organisation rules.
The three registry rules are baseline rules with pages, so they have sentences: request the item's admission to your organisation's private registry with the link in the report, or make the item identifiable first. See The private registry.
Findings from older scanners
The dashboard reads each sentence from its own copy of the scanner, by rule id, when it shows the finding, and stores nothing with the finding. So a finding uploaded by a scanner older than 1.21.0 shows the sentence of its rule too. The scanner's own reports gain the How to fix section from 1.21.0: move the GitHub Action or the GitLab component to 1.21.0, as Scan in CI with GitHub or GitLab shows, or upgrade the scanner with pip install --upgrade spellwarden.
The HTML report has linked each finding to its rule page since 1.18.0, and the CycloneDX file since 1.14.0. Before 1.21.0 those links wrote the rule id in capitals, an address this site did not have. 1.21.0 writes the page's own address, in lower case, and the site now answers the old address too by opening the rule's page, so the links in reports already written work as well.
In the dashboard, the API and the connector
In the Spellwarden dashboard, the detail of a finding shows How to fix after its rule: the sentence and a link, Full steps on the rule page, that opens the page in a new tab. The detail is the same under the Findings page and the pages of a skill, a server and a repository. The Rules page shows each detection rule's sentence under its title. A manual finding, a finding of an organisation rule and a finding of a rule the dashboard does not know show no How to fix.
The API's GET /orgs/{slug}/findings and the connector's tools list_findings, get_skill and get_migration_report give each finding fix and rule_url, both null when its rule has none, and GET /orgs/{slug}/rules gives them for each detection rule. Inside the product the address carries no campaign tags. See API and keys and Spellwarden connector for Claude.