|
1 | 1 | # @kilocode/openclaw-security-advisor |
2 | 2 |
|
3 | | -An [OpenClaw](https://openclaw.ai) plugin that runs a security checkup of |
4 | | -your OpenClaw instance and returns an expert analysis report from |
5 | | -KiloCode cloud. |
| 3 | +> **This package has been renamed to [`@kilocode/shell-security`](https://www.npmjs.com/package/@kilocode/shell-security).** |
| 4 | +> |
| 5 | +> Version `0.1.5` of `@kilocode/openclaw-security-advisor` is a migration |
| 6 | +> stub. Both the `/security-checkup` slash command and the |
| 7 | +> `kilocode_security_advisor` tool return a notice pointing to the new |
| 8 | +> package and nothing else. |
6 | 9 |
|
7 | | -The plugin takes the output of `openclaw security audit`, sends it to |
8 | | -the KiloCode Security Advisor API for analysis, and returns a detailed |
9 | | -markdown report with findings, risks, prioritized recommendations, and |
10 | | -concrete remediation guidance, displayed directly in your chat. |
| 10 | +## Migrating to ShellSecurity |
11 | 11 |
|
12 | | ---- |
13 | | - |
14 | | -## Install |
| 12 | +Install the new plugin: |
15 | 13 |
|
16 | 14 | ```bash |
17 | | -openclaw plugins install @kilocode/openclaw-security-advisor |
18 | | -openclaw plugins enable openclaw-security-advisor |
| 15 | +openclaw plugins install @kilocode/shell-security |
| 16 | +openclaw plugins enable shell-security |
19 | 17 | openclaw gateway restart |
20 | 18 | ``` |
21 | 19 |
|
22 | | -On first use, the plugin will walk you through a one-time device auth |
23 | | -flow to connect your KiloCode account. |
24 | | - |
25 | | -### Channels |
26 | | - |
27 | | -The plugin ships on two npm dist-tags: |
28 | | - |
29 | | -- **`latest`** — stable releases (`X.Y.Z`). Default for plain |
30 | | - `npm install` / `openclaw plugins install`. |
31 | | -- **`dev`** — prerelease snapshots (`X.Y.Z-dev.N`) published ahead of |
32 | | - stable cuts for early testing. Install with: |
33 | | - |
34 | | - ```bash |
35 | | - openclaw plugins install @kilocode/openclaw-security-advisor@dev |
36 | | - # or |
37 | | - npm install @kilocode/openclaw-security-advisor@dev |
38 | | - ``` |
39 | | - |
40 | | - Dev releases are real npm publishes with the same provenance |
41 | | - attestation as stable releases (verify with `npm audit signatures`). |
42 | | - |
43 | | -You can also install an exact version directly: |
44 | | - |
45 | | -```bash |
46 | | -openclaw plugins install @kilocode/openclaw-security-advisor@0.1.0 |
47 | | -``` |
48 | | - |
49 | | -### Staying up to date |
50 | | - |
51 | | -New versions ship regularly. To check the latest published stable: |
52 | | - |
53 | | -```bash |
54 | | -npm view @kilocode/openclaw-security-advisor version |
55 | | -``` |
56 | | - |
57 | | -Compare that against the `pluginVersion` line at the end of any security |
58 | | -checkup report. To upgrade: |
59 | | - |
60 | | -```bash |
61 | | -openclaw plugins install @kilocode/openclaw-security-advisor |
62 | | -openclaw gateway restart |
63 | | -``` |
64 | | - |
65 | | -Your security checkup report will occasionally include an inline |
66 | | -"stay current" tip at the bottom with these same commands — a gentle |
67 | | -periodic nudge, not every run. The reminder is appended to the report |
68 | | -markdown itself, so it appears on both invocation paths (the |
69 | | -`/security-checkup` slash command and the natural-language |
70 | | -`kilocode_security_advisor` tool). Security advice improves as the |
71 | | -plugin ships new audit signals, so staying current is worthwhile. |
72 | | - |
73 | | ---- |
74 | | - |
75 | | -## Usage |
76 | | - |
77 | | -The plugin exposes two entry points. They do the same thing; pick whichever |
78 | | -fits your workflow. |
79 | | - |
80 | | -### `/security-checkup` (recommended) |
81 | | - |
82 | | -Type it in chat: |
83 | | - |
84 | | -``` |
85 | | -/security-checkup |
86 | | -``` |
87 | | - |
88 | | -This is a slash command. It runs the plugin directly and renders the |
89 | | -full report, bypassing the agent's summarization layer entirely. **Use |
90 | | -this for guaranteed verbatim output.** |
91 | | - |
92 | | -> **Channel compatibility:** `/security-checkup` works in the OpenClaw |
93 | | -> native control UI chat and in Telegram. It does **not** currently work |
94 | | -> in Kilo Chat or Slack — those surfaces don't route slash commands to |
95 | | -> OpenClaw plugins. In Kilo Chat and Slack, use the natural-language |
96 | | -> invocation below instead; the agent will call the |
97 | | -> `kilocode_security_advisor` tool directly. |
98 | | -
|
99 | | -### Natural language |
100 | | - |
101 | | -You can also just ask the agent: |
102 | | - |
103 | | -> Run a KiloCode security checkup |
104 | | -
|
105 | | -> Check my OpenClaw security |
106 | | -
|
107 | | -> Audit my OpenClaw config |
108 | | -
|
109 | | -The agent will call the `kilocode_security_advisor` tool and the report |
110 | | -will appear in chat. |
111 | | - |
112 | | -**Heads up:** natural language invocation goes through your configured |
113 | | -language model, which may rewrite or summarize the report before |
114 | | -showing it to you. This works well on capable models (GPT-4o, Claude |
115 | | -Sonnet, Gemini Pro) but small summarizing models (e.g. GPT-4.1-nano, |
116 | | -Haiku) will often paraphrase the report down to a few sentences. **If |
117 | | -you're running a small or summarizing model, use the |
118 | | -`/security-checkup` slash command instead** (where supported — see |
119 | | -channel compatibility above). It renders the full report regardless of |
120 | | -which model is configured. |
121 | | - |
122 | | ---- |
123 | | - |
124 | | -## First run authentication |
125 | | - |
126 | | -The first time you run the checkup, you'll be prompted to connect your |
127 | | -KiloCode account: |
128 | | - |
129 | | -``` |
130 | | -## Connect to KiloCode |
131 | | -
|
132 | | -To run a security checkup, connect your KiloCode account. |
133 | | -
|
134 | | -1. Open this URL in your browser: |
135 | | - https://app.kilo.ai/openclaw-advisor?code=XXXX-XXXX |
136 | | -
|
137 | | -2. Enter this code: XXXX-XXXX |
138 | | -
|
139 | | -3. Sign in or create a free account |
140 | | -
|
141 | | -Once you've approved the connection, run the security checkup again. |
142 | | -``` |
143 | | - |
144 | | -Open the URL, sign in (or create a free account), and approve the |
145 | | -connection. Then run `/security-checkup` again. The plugin will pick |
146 | | -up the approval, persist your auth token, run the checkup, and return |
147 | | -the report in the same response. |
148 | | - |
149 | | -For every run after the first, no auth prompt appears. The saved token |
150 | | -is reused automatically. |
151 | | - |
152 | | ---- |
153 | | - |
154 | | -## What gets sent |
155 | | - |
156 | | -The plugin sends the following to the KiloCode Security Advisor API: |
157 | | - |
158 | | -- The JSON output of `openclaw security audit` (local config audit |
159 | | - results, with no secrets, no file contents, just finding IDs and |
160 | | - summaries) |
161 | | -- Your OpenClaw version and plugin version |
162 | | -- The public IP address of your instance (used for optional remote |
163 | | - probes) |
164 | | - |
165 | | -The plugin **does not** send: |
166 | | - |
167 | | -- Your OpenClaw config file contents |
168 | | -- Secrets, tokens, or API keys |
169 | | -- Conversation history or chat data |
170 | | -- Files from your workspace |
171 | | - |
172 | | -All requests are authenticated with your KiloCode account token over |
173 | | -HTTPS. |
174 | | - |
175 | | ---- |
176 | | - |
177 | | -## Configuration |
178 | | - |
179 | | -The plugin reads its config from `openclaw.json` under |
180 | | -`plugins.entries.openclaw-security-advisor.config`. In most cases, you |
181 | | -won't need to set anything. The defaults work out of the box. |
182 | | - |
183 | | -| Field | Default | Purpose | |
184 | | -| ------------ | ---------------------- | ----------------------------------------------------------------------- | |
185 | | -| `authToken` | _(set by device auth)_ | Your KiloCode auth token. Managed automatically by the plugin. | |
186 | | -| `apiBaseUrl` | `https://api.kilo.ai` | KiloCode API base URL. Override only if you run a self-hosted KiloCode. | |
187 | | - |
188 | | -To override via the OpenClaw CLI: |
| 20 | +Uninstall this old plugin: |
189 | 21 |
|
190 | 22 | ```bash |
191 | | -openclaw config set plugins.entries.openclaw-security-advisor.config.apiBaseUrl https://your-kilocode.example.com |
| 23 | +openclaw plugins uninstall openclaw-security-advisor |
192 | 24 | ``` |
193 | 25 |
|
194 | | -### Environment variables |
195 | | - |
196 | | -The plugin also respects these environment variables, useful for |
197 | | -non-interactive setups (CI, containerized deployments): |
198 | | - |
199 | | -- `KILOCODE_API_KEY` (alias: `KILO_API_KEY`): if set, the plugin uses |
200 | | - this as the auth token and skips the device auth flow entirely. |
201 | | - Intended for environments where an operator has already injected the |
202 | | - key at boot. |
203 | | -- `KILO_API_URL` or `KILOCODE_API_BASE_URL`: override the API base URL |
204 | | - without touching the plugin config. |
205 | | - |
206 | | -Plugin config takes precedence over env vars; env vars take precedence |
207 | | -over the default. |
208 | | - |
209 | | ---- |
210 | | - |
211 | | -## Troubleshooting |
212 | | - |
213 | | -**"Your KiloCode authentication has expired"** |
214 | | -The plugin automatically clears expired tokens and reruns the device |
215 | | -auth flow on the next invocation. Just run `/security-checkup` again. |
216 | | - |
217 | | -**"Security analysis failed: Rate limit exceeded"** |
218 | | -The KiloCode API rate limits security checkups per account. Wait a |
219 | | -little and try again. |
220 | | - |
221 | | -**Natural language invocation paraphrases the report** |
222 | | -This is a limitation of small summarizing language models, not the |
223 | | -plugin. Use `/security-checkup` (the slash command) to bypass the model |
224 | | -entirely and render the full report. |
225 | | - |
226 | | -**Plugin doesn't appear in `/plugins list`** |
227 | | -The `/plugins` slash command in OpenClaw chat is gated by a separate |
228 | | -OpenClaw setting. To enable it: |
229 | | - |
230 | | -```bash |
231 | | -openclaw config set commands.plugins true |
232 | | -openclaw gateway restart |
233 | | -``` |
234 | | - |
235 | | -The plugin itself works without this setting. It's only needed if you |
236 | | -want the `/plugins list` chat command to show installed plugins. |
237 | | - |
238 | | ---- |
| 26 | +You will need to approve the device auth flow once on the new plugin. |
| 27 | +After that, subsequent checkups are identical to what you got before |
| 28 | +the rename. |
239 | 29 |
|
240 | | -## Contributing |
| 30 | +## Why the rename? |
241 | 31 |
|
242 | | -- [`AGENTS.md`](https://github.com/Kilo-Org/openclaw-security-advisor/blob/main/AGENTS.md) — build, test, lint, code layout, and contribution rules. |
243 | | -- [`RELEASING.md`](https://github.com/Kilo-Org/openclaw-security-advisor/blob/main/RELEASING.md) — how to cut a release. |
244 | | -- [`CHANGELOG.md`](https://github.com/Kilo-Org/openclaw-security-advisor/blob/main/CHANGELOG.md) — release history. |
| 32 | +The original name tied the plugin to OpenClaw specifically. The plugin's |
| 33 | +mission (security posture checks for AI-agent shells) is broader than any |
| 34 | +single runtime. `ShellSecurity` is the clearer long-term name. |
245 | 35 |
|
246 | | ---- |
| 36 | +- **New npm package:** [`@kilocode/shell-security`](https://www.npmjs.com/package/@kilocode/shell-security) |
| 37 | +- **New repo:** [`Kilo-Org/shell-security`](https://github.com/Kilo-Org/shell-security) |
247 | 38 |
|
248 | | -## License |
| 39 | +## Last real release |
249 | 40 |
|
250 | | -MIT |
| 41 | +The last non-stub release of this package was `0.1.4`. Users pinned to |
| 42 | +`@0.1.4` or earlier can continue running it indefinitely; it still talks |
| 43 | +to the existing KiloCode Security Advisor API endpoint and returns real |
| 44 | +reports. New features will ship only under `@kilocode/shell-security`. |
0 commit comments