Forty criticals, zero attackers: Hermes now checks whether a bug is reachable

The scanner returned forty-three critical findings and a PDF nobody wanted to open. Two engineers spent a week triaging them, and thirty-eight sat on code paths no request can reach: a deserialization helper whose only caller is a test fixture, a shell exec behind an admin flag the deployment never sets. The five that mattered took an afternoon. The other four days went into proving the negative.
That ratio is the argument for the hermes-security plugin: an official Nous Research plugin from NousResearch/hermes-official-plugins, official catalog tier, version 0.1.2, requiring Hermes 0.21.5+ and Python 3.11+. It does not change the detector. It changes what is asked about every hit.
Three words worth defining first
SAST, static application security testing, reads source without running it and matches shapes that historically cause incidents: a string built into a SQL query, a template rendered with unsanitized input, a shell command assembled from a variable. It answers one question well — does this look like the thing that usually breaks? — and cannot say whether anything calls that line.
Reachability is the second question. From the surface an outsider can touch — an HTTP route, a webhook receiver, an upload handler, a CLI flag — can a chain of calls arrive at that line with attacker-controlled input, and get something useful out of it? A hit with no answer is a hypothesis, not a vulnerability.
A threat model is the short document that makes the answer possible: who the attacker is, what they can already reach, which inputs are trusted. Written before anyone reads code, it turns “is this bad?” into “is this reachable from the door we know is unlocked?”
What a scan actually does
The threat model comes first. Then the repository is cut into blocks of roughly 4,000 lines — about one reviewer’s sitting — and up to ten reviewers work in parallel. One more reviewer never takes a chunk: it reads entry points and trust boundaries across the whole repository, so the pieces can be reassembled.
Every candidate is checked against the real code by the reviewer who found it, not asserted from a pattern, and optionally confirmed with a test. Then comes the step that names the plugin: following the path an attacker would take. If the code is unreachable with attacker-influenced input, it becomes context, not a finding.
Vendored code, symlinks, special files and anything over 8 MB are skipped and listed. The two most dangerous chunks get a second, independent reviewer. A file a reviewer could not finish goes to a fresh one, for up to six rounds while progress continues. The plan is written at scan start, so updating the plugin does not disturb a running scan.
The three modes
| Mode | What it reads | What it skips | Best for |
|---|---|---|---|
| standard | Production code: source, config, CI, IaC, migrations | tests, fixtures, docs, examples, translations, generated files, assets, lockfiles — unless one holds committed secrets. Each skip is listed with a reason | The default |
| deep | Everything, in multiple independent passes — 3 by default | Nothing | Before a release |
| diff | Only uncommitted changes, or the branch against the default branch | Everything outside the diff | Day to day |
Standard mode has a ceiling: production code fitting in 90 chunks, roughly 360,000 lines, is all read. Larger repositories are ranked by what the code does rather than where it lives — routes, request input, shell invocations, SQL, deserialization, authentication, webhooks — most dangerous first. That ranking is a judgement, so a standard scan on a monorepo may report partial coverage.
Installing it
hermes plugins install hermes-security --enable
# restart Hermes, then keep it current
hermes plugins update hermes-security
The desktop app gets a Security page, off by default, enabled under Capabilities → Plugins. It reads from the Python plugin, which has to stay installed and enabled.
python -m hermes_security start --path ~/src/my-service --mode diff --tests
Add --mode deep for a release-grade pass and --context to hand over a threat model you already have; hermes security-review takes the same arguments. In chat the agent drives the same machinery through nine security_scan_* tools, and /security covers status, authorize-validation, revoke and help. Reports export as Markdown, JSON, CSV or SARIF, so the output fits an existing pipeline. If you already run a supply-chain pass with hermes security audit, that is a different tool — see the end.
Dependencies are checked before the reading starts
A model is bad at what databases are good at: knowing that version 2.3.1 of a library has a published advisory. So before chunks are assigned, the plugin runs Google’s osv-scanner over your lockfiles and asks endoflife.date about the runtime versions you declare — Node, Python, Go, PHP, Ruby.
The first scan downloads a pinned osv-scanner from GitHub, about 55 MB, checks its SHA-256 and refuses to run on a mismatch. Package names and versions go to api.osv.dev; manifests without a lockfile go to api.deps.dev. HERMES_SECURITY_DEPENDENCY_CHECK=off disables the pass, and HERMES_SECURITY_OSV_SCANNER points at your own copy — what you want where GitHub is blocked.
Packages in uv.lock or package-lock.json that exist only for development are marked dev and rated low. Advisories collapse into one dependency finding graded by the most severe entry, with a separate finding only when code genuinely reaches the vulnerable behaviour. If the check cannot run, the report says so and the scan is marked partial.
Interrupting, resuming, auto-continue
Scans are long. The plugin records where each one is, so your next message — or the Continue scan button — picks it up. Automatic resumption is opt-in:
hermes config set plugins.entries.hermes-security.allow_gateway_injection true
With that on, if work remains when a turn ends, the plugin posts a “Continue security scan” message into the same chat; after three auto-continues with no progress it pauses and flags the scan for a human. Two cases never auto-continue: a scan you stopped yourself, and a turn where the model provider returned an error.
Optionally, validating the running app
Static reachability argues about what the code allows. Sometimes you want to know what the deployment does. Inside an open scan, enter an address and click Allow testing this app, or authorize it from chat:
/security authorize-validation scan-7f3a https://staging.example.com
An authorization is narrow on purpose: one origin, one hour, at most 200 requests, redirects followed only within that site, and a Stop that cancels early. Only you can grant it — the agent’s tools cannot authorize themselves, which is why that button sits behind a human.
What it stores, and refuses to do
Repository text is treated as data, never as instructions: a comment saying “ignore previous instructions” is a string a reviewer may quote, not a command it follows. Secrets are never stored — the report keeps the type, the location and a one-way fingerprint. Git hooks and filters are never executed. Every finding cites exact code from the scan snapshot, and a completed report is sealed, so later triage cannot rewrite it.
Artifacts live under the active profile at $HERMES_HOME/plugin-data/agent-plugin-hermes-security-974429e7, and python -m hermes_security data-dir prints the exact path. Nothing is uploaded to a findings service. But the model provider you configured receives the code under review, so treat the report as you would any internal security document.
The limits, stated plainly
| Limit | What it means for you |
|---|---|
| Unreviewed code, or a reviewer that returned nothing, is a coverage gap | Zero findings plus partial coverage is not a clean bill of health |
| OWASP Top 10:2025 and ASVS 5.0.0 mapping shows what was examined | Not a certification. A scan completes when every in-scope file and all ten categories close; ASVS only reports how many control points were checked |
| A model can miss a bug or misread code | Verify the findings that matter yourself |
| Deep-scan budget is fixed and resumable | Not guaranteed to survive a Hermes restart |
| Confirmation tests run as your user, with credential-shaped env vars stripped | Convenience, not a sandbox. Only enable tests on code you trust |
| “Confirmed by test” has a strict bar | The test must pass and a matching negative case behave as expected; tests that did not run are NOT_RUN and prove nothing either way |
Not the same command as hermes security audit
hermes security audit is a one-shot supply-chain check: it looks at the Hermes virtualenv, plugin dependencies and the pinned npx/uvx MCP servers in your config, and asks OSV.dev whether those versions have known advisories. The plugin reviews your repository’s code instead: threat model, chunked reading, reachability, sealed report. Its dependency pass borrows the same OSV.dev idea as a preliminary step, not as the deliverable.
The short version
The interesting shift is not better pattern matching — it is refusing to file a finding with no attacker path. A threat model up front, reviewer-sized chunks, ten reviewers plus one on the entry points, a real advisory check, and an honest coverage statement. At 0.1.2, treat it as a strong reviewer that shows its work, not an auditor that signs off.
Two related reads: the MCP catalog security guide covers what a plugin or MCP server may do once installed, the other half of the same trust question; the hidden characters in approval prompts is about the moment a human says yes, which no scanner automates. If the plugin is not installed yet, the install guide covers the base setup it depends on.