Skip to content

Commit 5e8eb6d

Browse files
authored
Merge pull request #13 from Kilo-Org/chore/migration-stub
chore: migration stub for ShellSecurity rename (0.1.5)
2 parents 30be658 + 34ec114 commit 5e8eb6d

13 files changed

Lines changed: 117 additions & 1847 deletions

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.1.5] - Migration stub
11+
12+
This release is a migration stub. The plugin has been renamed to `@kilocode/shell-security`. Installing or invoking `@kilocode/openclaw-security-advisor@0.1.5` no longer runs a security checkup. Both the `/security-checkup` slash command and the `kilocode_security_advisor` tool return a notice explaining how to install the new package.
13+
14+
### Changed
15+
16+
- `index.ts` rewritten as a two-entry-point stub that returns the migration notice. The previous audit flow, auth flow, platform detection, client, and token-store modules are removed from this release (via `git rm` so the commit can be cleanly reverted on the renamed repo).
17+
- `openclaw.plugin.json` description and name reflect the deprecation; config schema removed (stub requires no config).
18+
- `README.md` replaced with a migration page.
19+
20+
### Removed
21+
22+
- `src/audit.ts`, `src/client.ts`, `src/platform.ts`, `src/auth/device-auth.ts`, `src/auth/token-store.ts`.
23+
- Tests that exercised the removed modules (`audit`, `device-auth`, `token-store`, `platform`).
24+
25+
### Migration path for existing users
26+
27+
1. `openclaw plugins install @kilocode/shell-security`
28+
2. `openclaw plugins enable shell-security`
29+
3. `openclaw gateway restart`
30+
4. `openclaw plugins uninstall openclaw-security-advisor`
31+
5. Run `/security-checkup` and complete device auth once on the new plugin.
32+
33+
The new plugin's runtime behavior is identical to 0.1.4 (including the `source.channel` forwarding added in 0.1.4). The rename is strictly a name change — no feature regressions.
34+
35+
Published with provenance attestation via npm OIDC trusted publishing; verify with `npm audit signatures`.
36+
37+
## [0.1.4] - 2026-04-21
38+
1039
### Added
1140

1241
- Plugin now forwards the active chat surface to the server as `source.channel` on every checkup request. The slash-command path reads `PluginCommandContext.channel` and the tool/natural-language path reads `OpenClawPluginToolContext.messageChannel` (tool registration converted to factory form so the ctx is accessible at tool-instantiation and closed over by `execute()`). Server uses this hint to pick a channel-appropriate format (e.g. collapsible `<details>` blocks on capable UIs, flat markdown on Telegram/Slack). Backward-compatible with older servers: the field is optional in the client payload and servers that don't declare it in their zod schema silently drop it at parse time (no coordinated release required).

README.md

Lines changed: 26 additions & 232 deletions
Original file line numberDiff line numberDiff line change
@@ -1,250 +1,44 @@
11
# @kilocode/openclaw-security-advisor
22

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.
69
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
1111

12-
---
13-
14-
## Install
12+
Install the new plugin:
1513

1614
```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
1917
openclaw gateway restart
2018
```
2119

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:
18921

19022
```bash
191-
openclaw config set plugins.entries.openclaw-security-advisor.config.apiBaseUrl https://your-kilocode.example.com
23+
openclaw plugins uninstall openclaw-security-advisor
19224
```
19325

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.
23929

240-
## Contributing
30+
## Why the rename?
24131

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.
24535

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)
24738

248-
## License
39+
## Last real release
24940

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

Comments
 (0)