Tools
Shirudo
Read host and fleet status from Shirudo in OpenClaw.
Install
openclaw plugins install clawhub:@daniel-lxs/openclaw-plugin-shirudo
README
# Shirudo plugin for OpenClaw
Ask your OpenClaw agent what is exposed on a [shirudo](https://github.com/shirudo-dev/shirudo) host and which shields are actually loaded.
> What's exposed on this host, and which shields are loaded?
>
> Which nodes are still exposed to the critical kernel advisory?
>
> Is there a published shield for CVE-2026-63984, and how far has it rolled out?
The plugin only reads. It cannot load, append or remove a shield.
## What the agent can read
| Tool | Reads | Answers |
| --- | --- | --- |
| `shirudo_host_status` | `shirudo status --json` on the gateway's host, plus this node's rows from the backend when one is configured | The verdict and its reason, conditions and alerts, every upatch loaded now, the tamper and integrity counters that moved, and per advisory whether the linked shield is loaded here (`loadedHere`) |
| `shirudo_fleet_exposure` | `shirudo.node_vulns` in the backend | Without filters: advisories worst first, with node counts per exposure, coverage and stale SBOMs. With `nodeId`, `hostName`, `vulnId` or `exposure`: one row per node and finding |
| `shirudo_fleet_shields` | the tree tables and `shirudo.shield_catalog` | Each shield in a tree with its rollout (applied, not selected, module absent, pending), and each published shield with the advisories it fixes and the nodes they leave exposed |
`shirudo_host_status` flags a backend row that says `shielded` while no upatch of that name is loaded on the host, and the reverse.
A host's own report is what root on that host says. Only TPM-signed evidence (`shirudo attest`) proves it to a third party. The backend works from TPM-quoted keepalives and refreshes exposure every five minutes.
## Install
On the machine running your OpenClaw gateway, install the plugin with OpenClaw 2026.11.7 or newer.
```sh
openclaw plugins install clawhub:@daniel-lxs/openclaw-plugin-shirudo
openclaw shirudo doctor
```
Review and accept the plugin's capabilities if prompted. `openclaw shirudo doctor` checks host status, backend access and tool permissions. Run it again after the setup steps you need below. A working host check prints the verdict and a working backend check prints the node and shield counts.
### This host
Skip this if the gateway does not run on a shirudo target.
`shirudo status` needs root, and only the runtime image's binary, `/run/shirudo/runtime/usr/bin/shirudo`, is allowed to answer. Let the gateway's user run that one command, with those exact arguments, through sudo:
```sh
openclaw shirudo sudoers | head -1 > /tmp/openclaw-shirudo
sudo visudo -cf /tmp/openclaw-shirudo && sudo install -m 0440 /tmp/openclaw-shirudo /etc/sudoers.d/openclaw-shirudo
```
Run it as the user the gateway runs as, or pass `--user <name>`.
The rule reads `<user> ALL=(root) NOPASSWD: /run/shirudo/runtime/usr/bin/shirudo status --json`. sudo refuses every other argument list. If the gateway already runs as root, set `host.privilege` to `none` instead.
When the backend names this node differently from its host name, tell the plugin its `node_id`:
```sh
openclaw config set plugins.entries.shirudo.config.host.nodeId node-a
```
### The fleet
Use a ClickHouse account with only `SELECT` access to the `shirudo` database. Remote backends require HTTPS with a trusted certificate valid for the configured host. Plain HTTP is available only for `localhost` and loopback IP addresses.
```sh
openclaw config set plugins.entries.shirudo.config.backend.url https://clickhouse.example.com:8443/
openclaw config set plugins.entries.shirudo.config.backend.user openclaw
openclaw config set plugins.entries.shirudo.config.backend.password '${SHIRUDO_BACKEND_PASSWORD}'
```
Keep the password in the gateway's environment as `SHIRUDO_BACKEND_PASSWORD`. Every query is sent with `readonly=1`, so the backend refuses writes even for a user that has them.
### Let the agent use the tools
The tools are optional. `openclaw shirudo doctor` prints the `tools.alsoAllow` (or `tools.allow`) command with your existing entries kept and `shirudo` added.
## Settings
All under `plugins.entries.shirudo.config`:
| Key | Default | Meaning |
| --- | --- | --- |
| `host.enabled` | `true` | Read this host's status |
| `host.binary` | `/run/shirudo/runtime/usr/bin/shirudo` | The binary to run. Through sudo only the runtime image's binary is accepted |
| `host.privilege` | `sudo` | `sudo`, or `none` when the gateway runs as root |
| `host.sudo` | `/usr/bin/sudo` | The sudo to run |
| `host.nodeId` | the reported host name | This host's `node_id` in the backend |
| `host.expectedVersionId` | none | Alert when the host runs another shirudo build |
| `host.timeoutMs` | `20000` | How long `shirudo status` may take |
| `backend.url` | none | ClickHouse URL without credentials or a query string. Use HTTPS for remote backends |
| `backend.user`, `backend.password` | ClickHouse's default user | Sent as `X-ClickHouse-User` and `X-ClickHouse-Key` |
| `backend.timeoutMs` | `10000` | How long one query may take |
## Formats
The plugin reads the formats of shirudo `3dced17` (2026-11-24): the [status JSON](https://docs.shirudo.dev/reference/formats/status-json.html) at schema 1, and the backend's `node_vulns`, tree and `shield_catalog` tables. `sql/shields.sql` and `sql/shields-available.sql` are shirudo's own `tools/xtop` queries, copied unchanged under their BSD-2-Clause license, so the shields tool reports what xtop's shields view shows.
## Try it without a shirudo host
`scripts/dev-backend.sh start <shirudo-checkout>` runs the ClickHouse image shirudo's backend tests pin, loads shirudo's schema, the five-node fleet of `tools/backend/test/xtop-shields.setup.sql` and a shield catalog through shirudo's own `jobs/shields-put`, adds a SELECT-only user and prints the plugin config that reaches it. `scripts/dev-backend.sh stop` removes it. It needs Docker and `python3`.
## Tests
```sh
npm test
```
The status tests read the example report of shirudo's status JSON reference. The fleet and host tests replay answers recorded from the dev backend on 2026-11-24 (`test/fixtures/backend-2026-11-24.json`); re-record them with `node test/record-backend.mjs <url> <user> <password> test/fixtures/backend-<date>.json`.
## Later: applying shields and block alerts
Neither is built. The pieces are placed so that adding them does not change the read path:
- **Applying a shield** happens on the operator side, not on the target: `shirudo bpm tree append <reference> --package-digest sha256:<digest> <tree>` with the operator's keys, then `tree-ingest`, as xtop's create-tree flow does. `shirudo_fleet_shields` already returns each catalog shield's `reference`, `manifestDigest` and `inTrees` for that. It would be a separate tool, behind a [plugin permission request](https://docs.openclaw.ai/plugins/plugin-permission-requests), running on the operator host with its own command table. The target-side command table in `src/runner.js` (`READ_COMMANDS`) and its sudoers rule stay read-only.
- **Block alerts** fit a background service that polls the same status document (or reads the keepalive stream) and compares `tamper_attempts`, `integrity_attempts` and the verdict with the last reading, then sends a message through the gateway. `src/status.js` already computes the alert fields shirudo documents and the counters that moved.
tools
Comments
Sign in to leave a comment