Spellwarden or grep and your own script
Last updated 24 November 2026
A grep line or a short script is a sound way to check agent content, and for some checks it is the right way to stay. Read on for when a script is enough, what the scanner adds that a script would have to be built to do, how to keep both and what a scan sends anywhere.
Two other pages compare the scanner with other scanners, each from sources: Spellwarden and Snyk Agent Scan compared and Spellwarden and Cisco MCP Scanner compared.
When a script is enough
A script is enough when the check is a pattern that only your organisation cares about, in one repository, on one kind of file.
A banned internal hostname in .mcp.json, a required line in every AGENTS.md, a directory that no skill may write to: a grep line states each of these exactly, runs in a second and is easy for a colleague to read. No scanner has your hostname or your convention in its rules, so for these a script is the shorter path and often the only one.
Nothing below asks you to replace it. It lists what the scanner does beyond a pattern, so that you can judge whether any of it is worth having next to your script.
What the scanner adds
The scanner is the open-source engine of Spellwarden, version 1.21.0. The table has one row for each point and says where the detail is.
| Point | What the scanner does |
|---|---|
| Finding the content | It finds the files for you: skills, MCP client configuration, the settings and hooks of Claude Code and, since 1.20.0, of Codex, Gemini CLI, Cursor, Windsurf, Devin and GitHub Copilot, plugin marketplaces, instruction files and A2A agent cards, each at the paths the README lists, in what git tracks plus untracked files that are not ignored. spellwarden scan --user reads the same kinds on a workstation for seven clients (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf (Devin Desktop), Codex and Gemini CLI) since 1.14.0. What Spellwarden checks and what it does not lists the kinds, the workstation scan the clients. |
| Rules that read structure, not lines | A configuration file is read as JSON with comments and trailing commas, and Codex's config.toml as TOML; each MCP server in it is an item of its own, Claude Code settings are read with their hooks, and the front matter of an instruction file tells the report when the agent applies it. Two examples are below the table. Instruction files has the formats. |
| 66 rules with mappings | 66 rules, each with an id, a default severity and mappings to the OWASP Agentic Top 10, the OWASP MCP Top 10, the OWASP Agentic Skills Top 10, NIST SP 800-53 base controls (a provisional mapping) and MITRE ATLAS techniques where one fits. A change to what a rule detects changes the rules version and the package's minor version, and every scan result carries both. Rules lists them; the framework crosswalk reads them by framework. |
| Pinning by hash | spellwarden lock records a hash of every configuration file, MCP server, plugin source, skill and instruction file in .spellwarden/lock.json, and spellwarden scan --locked exits 3 and names each item that was added, removed or changed, so a change to agent content is a change the people who approve the request can see. Since 1.15.0, spellwarden lock --probe also pins the hash of each remote server's tool list; Tool change alerts has the detail. |
| Accepted findings with a reason and an expiry date | A finding you accept goes into .spellwarden/baseline.yml with a reason and an expiry date, at most 365 days, and at most 30 days for a malicious-indicator rule. Accepted findings stay in every report, marked as accepted with their reason. Accept a finding and the baseline file say how. |
| Report formats | One run writes each report you ask for: text, json, sarif, markdown, gitlab-codequality, cyclonedx and html. The same files, settings and date give byte-identical reports, so a report can be compared and stored. The open-source scanner says what each is for. |
| Exit codes | 0 is a pass, 1 a failure on findings, 2 an incomplete or invalid scan and 3 a lock file that is absent or out of date. An incomplete scan is exit code 2, and content the scanner leaves unread never looks like a pass: a file or a limit it could not read past ends the scan with that code, and narrowing the scan with exclude in the settings file is a change the people who approve the request can see. Scan in CI with GitHub or GitLab shows what a pipeline does with them. |
| Checks no grep can do on a file | With --probe it sends the unauthenticated MCP probe to each remote server in your configuration and judges the answers against the 2026-07-28 specification, with the migration checklist. It also verifies the signature of a signed A2A agent card, a JWS over the card canonicalised with RFC 8785, and reports one that does not verify as SW-A2A-010. See Check MCP servers and plan their migration and A2A agent cards. |
| Signed releases | Every surface of a release is signed: the package files, the container image, the tags of the GitHub Action and the GitLab component, and a release manifest that ties them together. The README shows the command that verifies each. The open-source scanner shows the one for the image. |
Two examples that a line match gets wrong
SW-SKL-002 is hidden text, which the scanner calls zero-width or bidirectional control characters. A character like that draws nothing, so a line looks the same on screen with or without it, and the rule's evidence is the list of code points found, each with its Unicode name, not the line. A match for one character also has to know where it stands: a zero-width joiner inside an emoji sequence is ordinary and passes the rule, and a variation selector is judged by its place. The rule reads every text file of the skill package, not only Markdown. SW-SKL-002 has the full list.
A repeated key is the other. A configuration file that holds the same key twice in one object means one thing to one agent and another to the next, because agents disagree on which copy wins. A pattern finds both copies and cannot say which one an agent reads. The scanner refuses the file as duplicate_key and ends the scan incomplete, exit code 2, so that nobody guesses.
Use both
Keep your own pattern next to the scanner. There are two ways.
- In the hosted product, an organisation rule runs your pattern beside the baseline rules. It catches a problem that no baseline rule does, and it runs on every scan of the organisation and in CI. For a skill you give the files to read as a glob and a pattern. Rules, policy packs and exports has the steps.
- Or run your script as a second step in CI, next to the scanner's step. Each step passes or fails by its own exit code. Scan in CI with GitHub or GitLab shows the scanner's step.
Cost, and what a scan sends
The scanner is Apache-2.0 and free. It runs on your machine or on your runner and works without a Spellwarden account. Without connected mode and without --upload, a scan sends nothing to Spellwarden except the usage ping in CI. The options and settings below add what each of them names:
- Without connected mode, and without an upload you ask for, a run on your own machine sends nothing to Spellwarden.
- In CI, and only in CI, each scan sends one usage ping with six fields: the schema number, the scanner and rules versions, the CI kind, a hash of the installation identity and whether the run checked an agent card. No file, path, finding or repository name is in it. It is sent by a scan, not by
--useror--staged. Switch it off with--no-telemetry,DO_NOT_TRACK=1ortelemetry: falsein the settings file. --probecontacts the remote MCP servers you list, from your machine or runner, and sends the URL and the protocol's own requests only. It also fetches the cards of the remote agents thata2a.agentslists and the key sets that your signed agent cards name.--analyzesends each skill's SKILL.md and scripts, masked, to the model endpoint you name, with your key. Nothing goes to Spellwarden.- Connected mode links a scan to a Spellwarden organisation. It starts when a run is given the organisation's slug with a token from its code host, or a CI key, and a CI key works on your own machine too. The run then signs in, asks for the organisation's CI policy and, where the private registry's check applies, sends the items to check. The results are uploaded from CI only, with a short excerpt of each finding and never a whole file.
spellwarden scan --user --upload, which needs a workstation key, sends the workstation inventory.
The open-source scanner and The model-assisted analyzer give the detail.
Try it
Run it once, without installing it, in a repository that holds agent content:
pipx run spellwarden scan .Or install it with pip install spellwarden and run spellwarden scan .. The exit code is 0 when nothing at or above the fail level is left unaccepted. Then run spellwarden lock once and commit the lock file, and spellwarden scan --locked starts to name every change to agent content. The open-source scanner has the install options.