guardskills 0.1.0-alpha.4 → 1.0.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 +122 -3
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,9 +33,8 @@ npx guardskills add https://github.com/vercel-labs/skills --skill find-skills
|
|
|
33
33
|
|
|
34
34
|
## Current Readiness
|
|
35
35
|
|
|
36
|
-
- Current stage: **
|
|
37
|
-
-
|
|
38
|
-
- Not final production-grade yet; see `PRODUCTION_READINESS.md`.
|
|
36
|
+
- Current stage: **stable (v1.0.0)**.
|
|
37
|
+
- Suitable for production use with standard security review practices.
|
|
39
38
|
|
|
40
39
|
## Implemented Features
|
|
41
40
|
|
|
@@ -191,6 +190,126 @@ Template files are included as:
|
|
|
191
190
|
- `guardskills.config.json` (baseline default)
|
|
192
191
|
- `guardskills.config.example.json` (copy/reference template)
|
|
193
192
|
|
|
193
|
+
## OpenClaw Bot Instructions
|
|
194
|
+
|
|
195
|
+
Use this section as instructions for OpenClaw so it runs `guardskills` before installing any skill.
|
|
196
|
+
|
|
197
|
+
### Purpose
|
|
198
|
+
|
|
199
|
+
`guardskills` is a security gate for skill installs. It scans skill content first, then decides if install should proceed.
|
|
200
|
+
|
|
201
|
+
### Rule for OpenClaw
|
|
202
|
+
|
|
203
|
+
Before any skill install, always run a `guardskills` scan first.
|
|
204
|
+
|
|
205
|
+
### 1. Scan GitHub Skills
|
|
206
|
+
|
|
207
|
+
Use `guardskills add` with `--dry-run` for scan-only mode.
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Example:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
guardskills add expo/skills --skill expo-app-design --dry-run
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
If the user gives a full GitHub URL like:
|
|
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:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
guardskills add expo/skills --skill expo-app-design --dry-run
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
For CI/machine output:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
guardskills add owner/repo --skill <skill-name> --ci --json
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### 2. Scan Local Skills
|
|
241
|
+
|
|
242
|
+
Use `scan-local` when the skill is on disk:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
guardskills scan-local C:\path\to\skill-folder
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
If multiple skills exist under a parent folder:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
guardskills scan-local C:\path\to\skills --skill <skill-folder-name>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
For JSON output:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
guardskills scan-local C:\path\to\skill-folder --json
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### 3. Scan Other Skills
|
|
261
|
+
|
|
262
|
+
"Other skills" means any non-local skill from another GitHub repository.
|
|
263
|
+
|
|
264
|
+
Use:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Also supported:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
guardskills add https://github.com/owner/repo --skill <skill-name> --dry-run
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### How OpenClaw Should Interpret Results
|
|
277
|
+
|
|
278
|
+
- `SAFE`: proceed.
|
|
279
|
+
- `WARNING`: require confirmation before proceed (or explicit `--yes` behavior).
|
|
280
|
+
- `UNSAFE`: block unless user explicitly asks for override (`--force`).
|
|
281
|
+
- `CRITICAL`: block.
|
|
282
|
+
- `UNVERIFIABLE`: block unless user explicitly allows override (`--allow-unverifiable`).
|
|
283
|
+
|
|
284
|
+
### Recommended Install Workflow
|
|
285
|
+
|
|
286
|
+
1. Run scan:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
guardskills add owner/repo --skill <skill-name> --dry-run
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
2. Only if decision is acceptable, run install through guardskills:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
guardskills add owner/repo --skill <skill-name>
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Do not run `skills add` directly first.
|
|
299
|
+
|
|
300
|
+
### Copy/Paste Bot Instruction Block
|
|
301
|
+
|
|
302
|
+
```text
|
|
303
|
+
Before installing any skill, always run guardskills first.
|
|
304
|
+
For GitHub skills, run: guardskills add owner/repo --skill <skill-name> --dry-run
|
|
305
|
+
For local skills, run: guardskills scan-local <path>
|
|
306
|
+
If SAFE, proceed with guardskills add owner/repo --skill <skill-name>.
|
|
307
|
+
If WARNING, ask for confirmation.
|
|
308
|
+
If UNSAFE/CRITICAL, block.
|
|
309
|
+
If UNVERIFIABLE, block unless user explicitly requests override.
|
|
310
|
+
Never run skills add directly before a guardskills check.
|
|
311
|
+
```
|
|
312
|
+
|
|
194
313
|
## Exit Codes
|
|
195
314
|
|
|
196
315
|
- `0`: allowed/success
|
package/dist/cli.cjs
CHANGED
|
@@ -1493,7 +1493,7 @@ async function runScanLocalCommand(inputPath, rawOptions) {
|
|
|
1493
1493
|
// src/cli.ts
|
|
1494
1494
|
async function main() {
|
|
1495
1495
|
const program = new import_commander.Command();
|
|
1496
|
-
program.name("guardskills").description("Security wrapper around skills add").version("
|
|
1496
|
+
program.name("guardskills").description("Security wrapper around skills add").version("1.0.0");
|
|
1497
1497
|
program.command("add").description("Scan a skill source and conditionally install it via skills CLI").argument("<repo>", "GitHub repository URL or owner/repo").requiredOption("--skill <name>", "Skill name to install").option("--config <path>", "Path to guardskills.config.json").option("--strict", "Use stricter risk thresholds").option("--ci", "Deterministic CI mode: scan + gate only, no install handoff").option("--json", "Output machine-readable JSON").option("--yes", "Auto-confirm warnings").option("--dry-run", "Scan only, do not install").option("--force", "Override UNSAFE outcome").option("--allow-unverifiable", "Override UNVERIFIABLE outcome").option("--github-timeout-ms <ms>", "GitHub API request timeout in milliseconds").option("--github-retries <count>", "Retry count for retryable GitHub errors").option("--github-retry-base-ms <ms>", "Base backoff delay for GitHub retries").option("--max-file-bytes <bytes>", "Max file size to scan").option("--max-aux-files <count>", "Max auxiliary files from scripts/src folders").option("--max-total-files <count>", "Max total resolved files to scan").action(async (repo, options) => {
|
|
1498
1498
|
const code = await runAddCommand(repo, options);
|
|
1499
1499
|
process.exitCode = code;
|
package/dist/cli.js
CHANGED
|
@@ -1469,7 +1469,7 @@ async function runScanLocalCommand(inputPath, rawOptions) {
|
|
|
1469
1469
|
// src/cli.ts
|
|
1470
1470
|
async function main() {
|
|
1471
1471
|
const program = new Command();
|
|
1472
|
-
program.name("guardskills").description("Security wrapper around skills add").version("
|
|
1472
|
+
program.name("guardskills").description("Security wrapper around skills add").version("1.0.0");
|
|
1473
1473
|
program.command("add").description("Scan a skill source and conditionally install it via skills CLI").argument("<repo>", "GitHub repository URL or owner/repo").requiredOption("--skill <name>", "Skill name to install").option("--config <path>", "Path to guardskills.config.json").option("--strict", "Use stricter risk thresholds").option("--ci", "Deterministic CI mode: scan + gate only, no install handoff").option("--json", "Output machine-readable JSON").option("--yes", "Auto-confirm warnings").option("--dry-run", "Scan only, do not install").option("--force", "Override UNSAFE outcome").option("--allow-unverifiable", "Override UNVERIFIABLE outcome").option("--github-timeout-ms <ms>", "GitHub API request timeout in milliseconds").option("--github-retries <count>", "Retry count for retryable GitHub errors").option("--github-retry-base-ms <ms>", "Base backoff delay for GitHub retries").option("--max-file-bytes <bytes>", "Max file size to scan").option("--max-aux-files <count>", "Max auxiliary files from scripts/src folders").option("--max-total-files <count>", "Max total resolved files to scan").action(async (repo, options) => {
|
|
1474
1474
|
const code = await runAddCommand(repo, options);
|
|
1475
1475
|
process.exitCode = code;
|