guardskills 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -69
- package/dist/cli.cjs +1368 -190
- package/dist/cli.js +1368 -190
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# guardskills
|
|
2
2
|
|
|
3
|
-
`guardskills` is a security wrapper around `skills`
|
|
3
|
+
`guardskills` is a security wrapper around skill installation CLIs (`skills`, `playbooks`, `openskills`, `skillkit`).
|
|
4
4
|
|
|
5
5
|
GitHub: https://github.com/felixondesk/guardskills
|
|
6
6
|
|
|
@@ -16,12 +16,24 @@ use:
|
|
|
16
16
|
npx guardskills add https://github.com/vercel-labs/skills --skill find-skills
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Or provider-prefixed wrappers:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx guardskills skills add https://github.com/vercel-labs/skills --skill find-skills
|
|
23
|
+
npx guardskills skills add planetscale/database-skills
|
|
24
|
+
npx guardskills playbooks add skill anthropics/skills --skill frontend-design
|
|
25
|
+
npx guardskills openskills install anthropics/skills ui-designer
|
|
26
|
+
npx guardskills openskills install anthropics/skills
|
|
27
|
+
npx guardskills skillkit install rohitg00/skillkit dev-tools
|
|
28
|
+
npx guardskills skillkit install rohitg00/skillkit
|
|
29
|
+
```
|
|
30
|
+
|
|
19
31
|
## What It Does
|
|
20
32
|
|
|
21
33
|
1. Resolves a skill from GitHub.
|
|
22
34
|
2. Scans resolved files for malicious patterns.
|
|
23
35
|
3. Computes a risk decision (`SAFE`, `WARNING`, `UNSAFE`, `CRITICAL`, `UNVERIFIABLE`).
|
|
24
|
-
4. Proceeds to
|
|
36
|
+
4. Proceeds to the selected installer CLI only if gate policy allows.
|
|
25
37
|
|
|
26
38
|
## Security Notice
|
|
27
39
|
|
|
@@ -33,13 +45,21 @@ npx guardskills add https://github.com/vercel-labs/skills --skill find-skills
|
|
|
33
45
|
|
|
34
46
|
## Current Readiness
|
|
35
47
|
|
|
36
|
-
- Current stage: **stable (v1.
|
|
48
|
+
- Current stage: **stable (v1.2.0)**.
|
|
37
49
|
- Suitable for production use with standard security review practices.
|
|
38
50
|
|
|
39
51
|
## Implemented Features
|
|
40
52
|
|
|
41
|
-
- `guardskills add <repo> --skill <name>`
|
|
53
|
+
- `guardskills add <repo> --skill <name>` (legacy alias for `guardskills skills add`)
|
|
54
|
+
- `guardskills skills add <repo> --skill <name>`
|
|
55
|
+
- `guardskills skills add <repo>` (scan all discovered skills, then skills.sh interactive selection)
|
|
56
|
+
- `guardskills playbooks add skill <repo> --skill <name>`
|
|
57
|
+
- `guardskills openskills install <repo> <skill>`
|
|
58
|
+
- `guardskills openskills install <repo>` (scan all discovered skills, then openskills interactive selection)
|
|
59
|
+
- `guardskills skillkit install <repo> <skill>`
|
|
60
|
+
- `guardskills skillkit install <repo>` (scan all discovered skills, then skillkit install flow)
|
|
42
61
|
- `guardskills scan-local <path>`
|
|
62
|
+
- `guardskills scan-clawhub <identifier>`
|
|
43
63
|
- GitHub resolver (`owner/repo` and `https://github.com/...`)
|
|
44
64
|
- Deterministic static scanner with rule matrix in `RULES.md`
|
|
45
65
|
- Score-based decision engine with hard-block guardrails
|
|
@@ -60,7 +80,7 @@ npx guardskills add https://github.com/vercel-labs/skills --skill find-skills
|
|
|
60
80
|
- `--max-file-bytes`
|
|
61
81
|
- `--max-aux-files`
|
|
62
82
|
- `--max-total-files`
|
|
63
|
-
- Installer handoff to `npx skills
|
|
83
|
+
- Installer handoff to `npx skills|playbooks|openskills|skillkit ...` when allowed
|
|
64
84
|
- Structured resolver error taxonomy + retry/backoff
|
|
65
85
|
- Tests:
|
|
66
86
|
- fixture scanner tests (`safe`, `warning`, `malicious`, `prose-only`)
|
|
@@ -89,61 +109,97 @@ npm run ci
|
|
|
89
109
|
npm run audit:prod
|
|
90
110
|
```
|
|
91
111
|
|
|
92
|
-
|
|
112
|
+
## Scan Skills by Source
|
|
113
|
+
|
|
114
|
+
Use this section as the clean reference for supported scan sources.
|
|
115
|
+
|
|
116
|
+
### 1. Local Skills
|
|
117
|
+
|
|
118
|
+
Scan a skill folder on disk:
|
|
93
119
|
|
|
94
120
|
```bash
|
|
95
|
-
guardskills
|
|
121
|
+
guardskills scan-local C:\path\to\skill-folder
|
|
96
122
|
```
|
|
97
123
|
|
|
98
|
-
|
|
124
|
+
If the path contains multiple skills:
|
|
99
125
|
|
|
100
126
|
```bash
|
|
101
|
-
guardskills scan-local C:\path\to\skill-folder
|
|
127
|
+
guardskills scan-local C:\path\to\skills --skill <skill-folder-name>
|
|
102
128
|
```
|
|
103
129
|
|
|
104
|
-
|
|
130
|
+
JSON output:
|
|
105
131
|
|
|
106
132
|
```bash
|
|
107
|
-
guardskills
|
|
133
|
+
guardskills scan-local C:\path\to\skill-folder --json
|
|
108
134
|
```
|
|
109
135
|
|
|
110
|
-
|
|
136
|
+
### 2. GitHub Skills
|
|
137
|
+
|
|
138
|
+
Scan a GitHub-hosted skill without installing:
|
|
111
139
|
|
|
112
140
|
```bash
|
|
113
|
-
guardskills add owner/repo --skill name
|
|
114
|
-
--github-timeout-ms 15000 \
|
|
115
|
-
--github-retries 2 \
|
|
116
|
-
--github-retry-base-ms 300 \
|
|
117
|
-
--max-file-bytes 250000 \
|
|
118
|
-
--max-aux-files 40 \
|
|
119
|
-
--max-total-files 120
|
|
141
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
120
142
|
```
|
|
121
143
|
|
|
122
|
-
|
|
144
|
+
Also supported:
|
|
123
145
|
|
|
124
|
-
|
|
146
|
+
```bash
|
|
147
|
+
guardskills add https://github.com/owner/repo --skill <skill-name> --dry-run
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
CI/machine-readable output:
|
|
125
151
|
|
|
126
152
|
```bash
|
|
127
|
-
guardskills
|
|
153
|
+
guardskills add owner/repo --skill <skill-name> --ci --json
|
|
128
154
|
```
|
|
129
155
|
|
|
130
|
-
|
|
156
|
+
### 3. `skills.sh` Skills
|
|
157
|
+
|
|
158
|
+
For `skills.sh` installs, run the same guarded GitHub scan flow first:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Then, only if acceptable, run the guarded install handoff:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
guardskills add owner/repo --skill <skill-name>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Never run `skills add ...` directly before `guardskills`.
|
|
171
|
+
|
|
172
|
+
### 4. ClawHub Skills
|
|
173
|
+
|
|
174
|
+
Scan by ClawHub identifier:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
guardskills scan-clawhub owner/skill-slug
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Scan by full ClawHub link:
|
|
131
181
|
|
|
132
182
|
```bash
|
|
133
|
-
guardskills scan-
|
|
183
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug
|
|
134
184
|
```
|
|
135
185
|
|
|
136
|
-
|
|
186
|
+
JSON output:
|
|
137
187
|
|
|
138
188
|
```bash
|
|
139
|
-
guardskills scan-
|
|
189
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug --json
|
|
140
190
|
```
|
|
141
191
|
|
|
142
|
-
|
|
192
|
+
## Resolver Controls
|
|
143
193
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
194
|
+
```bash
|
|
195
|
+
guardskills add owner/repo --skill name \
|
|
196
|
+
--github-timeout-ms 15000 \
|
|
197
|
+
--github-retries 2 \
|
|
198
|
+
--github-retry-base-ms 300 \
|
|
199
|
+
--max-file-bytes 250000 \
|
|
200
|
+
--max-aux-files 40 \
|
|
201
|
+
--max-total-files 120
|
|
202
|
+
```
|
|
147
203
|
|
|
148
204
|
## Configuration File
|
|
149
205
|
|
|
@@ -202,77 +258,64 @@ Use this section as instructions for OpenClaw so it runs `guardskills` before in
|
|
|
202
258
|
|
|
203
259
|
Before any skill install, always run a `guardskills` scan first.
|
|
204
260
|
|
|
205
|
-
### 1.
|
|
206
|
-
|
|
207
|
-
Use `guardskills add` with `--dry-run` for scan-only mode.
|
|
261
|
+
### 1. Local Skills
|
|
208
262
|
|
|
209
263
|
```bash
|
|
210
|
-
guardskills
|
|
264
|
+
guardskills scan-local <path-to-skill-folder>
|
|
211
265
|
```
|
|
212
266
|
|
|
213
|
-
|
|
267
|
+
If multiple skills are found:
|
|
214
268
|
|
|
215
269
|
```bash
|
|
216
|
-
guardskills
|
|
270
|
+
guardskills scan-local <path-to-skills-root> --skill <skill-folder-name>
|
|
217
271
|
```
|
|
218
272
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
`https://github.com/expo/skills/tree/main/plugins/expo-app-design`
|
|
222
|
-
|
|
223
|
-
convert it to:
|
|
224
|
-
|
|
225
|
-
- repo: `expo/skills`
|
|
226
|
-
- skill: `expo-app-design`
|
|
227
|
-
|
|
228
|
-
Then run:
|
|
273
|
+
### 2. GitHub Skills
|
|
229
274
|
|
|
230
275
|
```bash
|
|
231
|
-
guardskills add
|
|
276
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
232
277
|
```
|
|
233
278
|
|
|
234
|
-
|
|
279
|
+
Also supported:
|
|
235
280
|
|
|
236
281
|
```bash
|
|
237
|
-
guardskills add owner/repo --skill <skill-name> --
|
|
282
|
+
guardskills add https://github.com/owner/repo --skill <skill-name> --dry-run
|
|
238
283
|
```
|
|
239
284
|
|
|
240
|
-
###
|
|
285
|
+
### 3. `skills.sh` Skills
|
|
241
286
|
|
|
242
|
-
Use
|
|
287
|
+
Use the same guarded GitHub flow before install:
|
|
243
288
|
|
|
244
289
|
```bash
|
|
245
|
-
guardskills
|
|
290
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
246
291
|
```
|
|
247
292
|
|
|
248
|
-
If
|
|
293
|
+
If allowed:
|
|
249
294
|
|
|
250
295
|
```bash
|
|
251
|
-
guardskills
|
|
296
|
+
guardskills add owner/repo --skill <skill-name>
|
|
252
297
|
```
|
|
253
298
|
|
|
254
|
-
|
|
299
|
+
### 4. ClawHub Skills
|
|
300
|
+
|
|
301
|
+
Use `scan-clawhub` with either identifier or full URL:
|
|
255
302
|
|
|
256
303
|
```bash
|
|
257
|
-
guardskills scan-
|
|
304
|
+
guardskills scan-clawhub owner/skill-slug
|
|
258
305
|
```
|
|
259
306
|
|
|
260
|
-
### 3. Scan Other Skills
|
|
261
|
-
|
|
262
|
-
"Other skills" means any non-local skill from another GitHub repository.
|
|
263
|
-
|
|
264
|
-
Use:
|
|
265
|
-
|
|
266
307
|
```bash
|
|
267
|
-
guardskills
|
|
308
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug
|
|
268
309
|
```
|
|
269
310
|
|
|
270
|
-
|
|
311
|
+
For machine output:
|
|
271
312
|
|
|
272
313
|
```bash
|
|
273
|
-
guardskills
|
|
314
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug --json
|
|
274
315
|
```
|
|
275
316
|
|
|
317
|
+
If the ClawHub API does not expose GitHub source metadata, `guardskills` falls back to scanning the downloadable ClawHub archive payload.
|
|
318
|
+
|
|
276
319
|
### How OpenClaw Should Interpret Results
|
|
277
320
|
|
|
278
321
|
- `SAFE`: proceed.
|
|
@@ -283,13 +326,25 @@ guardskills add https://github.com/owner/repo --skill <skill-name> --dry-run
|
|
|
283
326
|
|
|
284
327
|
### Recommended Install Workflow
|
|
285
328
|
|
|
286
|
-
1. Run scan:
|
|
329
|
+
1. Run scan for source type:
|
|
287
330
|
|
|
288
331
|
```bash
|
|
289
332
|
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
290
333
|
```
|
|
291
334
|
|
|
292
|
-
|
|
335
|
+
or
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
guardskills scan-local <path>
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
or
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
guardskills scan-clawhub https://clawhub.ai/owner/skill-slug
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
2. Only if decision is acceptable, run install through guardskills (GitHub/skills.sh flow):
|
|
293
348
|
|
|
294
349
|
```bash
|
|
295
350
|
guardskills add owner/repo --skill <skill-name>
|
|
@@ -301,9 +356,10 @@ Do not run `skills add` directly first.
|
|
|
301
356
|
|
|
302
357
|
```text
|
|
303
358
|
Before installing any skill, always run guardskills first.
|
|
304
|
-
For GitHub skills, run: guardskills add owner/repo --skill <skill-name> --dry-run
|
|
305
359
|
For local skills, run: guardskills scan-local <path>
|
|
306
|
-
|
|
360
|
+
For GitHub or skills.sh skills, run: guardskills add owner/repo --skill <skill-name> --dry-run
|
|
361
|
+
For ClawHub skills, run: guardskills scan-clawhub <owner/slug-or-full-url>
|
|
362
|
+
If SAFE, proceed.
|
|
307
363
|
If WARNING, ask for confirmation.
|
|
308
364
|
If UNSAFE/CRITICAL, block.
|
|
309
365
|
If UNVERIFIABLE, block unless user explicitly requests override.
|