@guava-parity/guard-scanner 16.0.1 → 17.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 +13 -9
- package/README_ja.md +12 -8
- package/SECURITY.md +6 -6
- package/SKILL.md +7 -5
- package/dist/cli.cjs +2735 -2229
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -1
- package/dist/cli.mjs +2713 -2230
- package/dist/index.cjs +4696 -4252
- package/dist/index.d.cts +214 -0
- package/dist/index.d.ts +210 -13
- package/dist/index.mjs +4673 -4242
- package/dist/mcp-server.cjs +4237 -3747
- package/dist/mcp-server.d.cts +318 -0
- package/dist/mcp-server.d.ts +318 -1
- package/dist/mcp-server.mjs +4677 -4229
- package/dist/openclaw-plugin.cjs +4708 -4264
- package/dist/openclaw-plugin.mjs +4685 -4252
- package/dist/{types.d.mts → types.d.cts} +97 -2
- package/dist/types.d.ts +97 -2
- package/docs/data/benchmark-ledger.json +449 -19
- package/docs/data/corpus-metrics.json +1 -1
- package/docs/data/fp-ledger.json +2 -2
- package/docs/data/quality-contract.json +15 -5
- package/docs/generated/openclaw-upstream-status.json +13 -13
- package/docs/openclaw-continuous-compatibility-plan.md +1 -1
- package/docs/spec/capabilities.json +96 -16
- package/guard-scanner +1 -3
- package/openclaw-plugin.mts +3 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +13 -9
- package/dist/cli.d.mts +0 -1
- package/dist/index.d.mts +0 -17
- package/dist/mcp-server.d.mts +0 -1
- /package/dist/{openclaw-plugin.d.mts → openclaw-plugin.d.cts} +0 -0
package/README.md
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<a href="https://www.npmjs.com/package/@guava-parity/guard-scanner"><img src="https://img.shields.io/npm/v/@guava-parity/guard-scanner?color=cb3837&label=npm" alt="npm" /></a>
|
|
14
14
|
<a href="https://www.npmjs.com/package/@guava-parity/guard-scanner"><img src="https://img.shields.io/npm/dm/@guava-parity/guard-scanner?color=blue&label=downloads" alt="downloads" /></a>
|
|
15
|
-
<a href="#test-results"><img src="https://img.shields.io/badge/tests-
|
|
15
|
+
<a href="#test-results"><img src="https://img.shields.io/badge/tests-362%20passed-brightgreen" alt="tests" /></a>
|
|
16
16
|
<a href="https://github.com/koatora20/guard-scanner/actions/workflows/codeql.yml"><img src="https://img.shields.io/badge/CodeQL-enabled-181717" alt="CodeQL" /></a>
|
|
17
17
|
<a href="https://doi.org/10.5281/zenodo.18906684"><img src="https://img.shields.io/badge/DOI-Zenodo-blue" alt="DOI" /></a>
|
|
18
18
|
<a href="https://github.com/koatora20/guard-scanner/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT" /></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
<p align="center">
|
|
22
|
-
<strong>
|
|
22
|
+
<strong>364</strong> detection patterns · <strong>35</strong> threat categories · <strong>27</strong> runtime checks · <strong>1</strong> dependency (<code>ws</code>)
|
|
23
23
|
</p>
|
|
24
24
|
|
|
25
25
|
---
|
|
@@ -29,7 +29,7 @@ Traditional security tools catch malware. **guard-scanner** catches what they mi
|
|
|
29
29
|
```
|
|
30
30
|
$ npx @guava-parity/guard-scanner ./skills/ --strict --soul-lock --compliance owasp-asi
|
|
31
31
|
|
|
32
|
-
guard-scanner v16.0.
|
|
32
|
+
guard-scanner v16.0.2
|
|
33
33
|
|
|
34
34
|
⚠ CRITICAL identity-hijack SOUL_OVERWRITE_ATTEMPT
|
|
35
35
|
skills/imported-tool/SKILL.md:47
|
|
@@ -153,7 +153,7 @@ Every v16 finding can now carry `layer`, `layer_name`, `owasp_asi`, and `protoco
|
|
|
153
153
|
| 4. Behavioral Analysis | No-research execution, hallucination-driven actions |
|
|
154
154
|
| 5. Trust Exploitation | Authority claim attacks, creator impersonation |
|
|
155
155
|
|
|
156
|
-
**27 runtime checks** across 5 layers.
|
|
156
|
+
**27 runtime checks** across 5 layers. Validated stable target: OpenClaw `v2026.3.13`. Regression baseline: `v2026.3.8` for manifest/discovery/`before_tool_call`.
|
|
157
157
|
|
|
158
158
|
Modes: `monitor` (log only) · `enforce` (block CRITICAL, default) · `strict` (block HIGH+)
|
|
159
159
|
|
|
@@ -219,6 +219,10 @@ When running as an MCP server, guard-scanner exposes:
|
|
|
219
219
|
| `check_tool_call` | Runtime validation of a single tool invocation |
|
|
220
220
|
| `audit_assets` | Audit npm/GitHub/ClawHub for credential exposure |
|
|
221
221
|
| `get_stats` | Return scanner capabilities, 5-layer summary, and ASI coverage |
|
|
222
|
+
| `experimental.run_async` | Start a long-running async scan task |
|
|
223
|
+
| `experimental.task_status` | Check the status of an async task |
|
|
224
|
+
| `experimental.task_result` | Retrieve the result of a completed async task |
|
|
225
|
+
| `experimental.task_cancel` | Cancel a running async task |
|
|
222
226
|
|
|
223
227
|
---
|
|
224
228
|
|
|
@@ -228,7 +232,7 @@ guard-scanner ships a measured quality contract, not a vague strength claim.
|
|
|
228
232
|
|
|
229
233
|
| Metric | Contract |
|
|
230
234
|
|--------|----------|
|
|
231
|
-
| Benchmark corpus | `2026-03-
|
|
235
|
+
| Benchmark corpus | `2026-03-15.quality-v17` |
|
|
232
236
|
| Precision target | `>= 0.90` |
|
|
233
237
|
| Recall target | `>= 0.90` |
|
|
234
238
|
| False Positive Rate budget | `<= 0.10` |
|
|
@@ -247,13 +251,13 @@ Evidence artifacts:
|
|
|
247
251
|
## Test Results
|
|
248
252
|
|
|
249
253
|
```
|
|
250
|
-
ℹ tests
|
|
251
|
-
ℹ suites
|
|
252
|
-
ℹ pass
|
|
254
|
+
ℹ tests 362
|
|
255
|
+
ℹ suites 38
|
|
256
|
+
ℹ pass 362
|
|
253
257
|
ℹ fail 0
|
|
254
258
|
```
|
|
255
259
|
|
|
256
|
-
|
|
260
|
+
38 test files. Run `npm test` to reproduce. 100% pass rate on [benchmark corpus](docs/data/corpus-metrics.json).
|
|
257
261
|
|
|
258
262
|
---
|
|
259
263
|
|
package/README_ja.md
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<a href="https://www.npmjs.com/package/@guava-parity/guard-scanner"><img src="https://img.shields.io/npm/v/@guava-parity/guard-scanner?color=cb3837&label=npm" alt="npm" /></a>
|
|
14
14
|
<a href="https://www.npmjs.com/package/@guava-parity/guard-scanner"><img src="https://img.shields.io/npm/dm/@guava-parity/guard-scanner?color=blue&label=downloads" alt="downloads" /></a>
|
|
15
|
-
<a href="#テスト結果"><img src="https://img.shields.io/badge/テスト-
|
|
15
|
+
<a href="#テスト結果"><img src="https://img.shields.io/badge/テスト-362_passed-brightgreen" alt="tests" /></a>
|
|
16
16
|
<a href="https://github.com/koatora20/guard-scanner/actions/workflows/codeql.yml"><img src="https://img.shields.io/badge/CodeQL-有効-181717" alt="CodeQL" /></a>
|
|
17
17
|
<a href="https://doi.org/10.5281/zenodo.18906684"><img src="https://img.shields.io/badge/DOI-Zenodo-blue" alt="DOI" /></a>
|
|
18
18
|
<a href="https://github.com/koatora20/guard-scanner/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT" /></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
<p align="center">
|
|
22
|
-
<strong>
|
|
22
|
+
<strong>364</strong> 検出パターン · <strong>35</strong> 脅威カテゴリ · <strong>27</strong> ランタイムチェック · 依存: <strong>1</strong> (<code>ws</code> のみ)
|
|
23
23
|
</p>
|
|
24
24
|
|
|
25
25
|
<p align="center">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
```
|
|
34
34
|
$ npx @guava-parity/guard-scanner ./skills/ --strict --soul-lock --compliance owasp-asi
|
|
35
35
|
|
|
36
|
-
guard-scanner v16.0.
|
|
36
|
+
guard-scanner v16.0.2
|
|
37
37
|
|
|
38
38
|
⚠ CRITICAL identity-hijack SOUL_OVERWRITE_ATTEMPT
|
|
39
39
|
skills/imported-tool/SKILL.md:47
|
|
@@ -157,7 +157,7 @@ v16 の JSON / MCP 出力では各 finding に `layer`, `layer_name`, `owasp_asi
|
|
|
157
157
|
| 4. 行動分析 | リサーチ未実施での実行、ハルシネーション駆動アクション |
|
|
158
158
|
| 5. 信頼搾取 | 権限主張攻撃、作成者なりすまし |
|
|
159
159
|
|
|
160
|
-
**27のランタイムチェック**を5
|
|
160
|
+
**27のランタイムチェック**を5層で実行。検証済みの安定ターゲットは OpenClaw `v2026.3.13`、回帰ベースラインは manifest/discovery/`before_tool_call` の `v2026.3.8`。
|
|
161
161
|
|
|
162
162
|
モード: `monitor`(ログのみ)· `enforce`(CRITICAL をブロック、デフォルト)· `strict`(HIGH+をブロック)
|
|
163
163
|
|
|
@@ -223,19 +223,23 @@ MCPサーバーとして実行時に公開されるツール:
|
|
|
223
223
|
| `check_tool_call` | 単一ツール呼び出しのランタイム検証 |
|
|
224
224
|
| `audit_assets` | npm/GitHub/ClawHubの認証情報露出監査 |
|
|
225
225
|
| `get_stats` | スキャナー能力、5-layer 概要、ASI カバレッジの取得 |
|
|
226
|
+
| `experimental.run_async` | 非同期スキャンタスクの開始 |
|
|
227
|
+
| `experimental.task_status` | 非同期タスクの状態確認 |
|
|
228
|
+
| `experimental.task_result` | 完了した非同期タスクの結果取得 |
|
|
229
|
+
| `experimental.task_cancel` | 実行中の非同期タスクのキャンセル |
|
|
226
230
|
|
|
227
231
|
---
|
|
228
232
|
|
|
229
233
|
## テスト結果
|
|
230
234
|
|
|
231
235
|
```
|
|
232
|
-
ℹ tests
|
|
233
|
-
ℹ suites
|
|
234
|
-
ℹ pass
|
|
236
|
+
ℹ tests 362
|
|
237
|
+
ℹ suites 38
|
|
238
|
+
ℹ pass 362
|
|
235
239
|
ℹ fail 0
|
|
236
240
|
```
|
|
237
241
|
|
|
238
|
-
テストファイル
|
|
242
|
+
テストファイル38件。`npm test` で再現可能。[ベンチマークコーパス](docs/data/corpus-metrics.json) 100%パス。
|
|
239
243
|
|
|
240
244
|
---
|
|
241
245
|
|
package/SECURITY.md
CHANGED
|
@@ -14,14 +14,14 @@ We will respond within 48 hours and provide a fix within 7 days for critical iss
|
|
|
14
14
|
|
|
15
15
|
| Version | Status |
|
|
16
16
|
|---------|--------|
|
|
17
|
-
| Latest major (`
|
|
17
|
+
| Latest major (`16.x`) | ✅ Supported |
|
|
18
18
|
| Older releases | ⚠️ Best effort only |
|
|
19
19
|
|
|
20
20
|
## Scope
|
|
21
21
|
|
|
22
22
|
guard-scanner is a **static analysis tool** — it reads files but never executes them. It does not:
|
|
23
23
|
- Execute any code from scanned skills
|
|
24
|
-
- Make network requests
|
|
24
|
+
- Make network requests (except optional VirusTotal integration)
|
|
25
25
|
- Modify any files in the scan directory
|
|
26
26
|
- Require elevated privileges
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ The only files guard-scanner writes are output reports (`--json`, `--sarif`, `--
|
|
|
29
29
|
|
|
30
30
|
## Supply Chain Security
|
|
31
31
|
|
|
32
|
-
guard-scanner itself keeps runtime dependencies intentionally small. As of `
|
|
32
|
+
guard-scanner itself keeps runtime dependencies intentionally small. As of `16.0.1`, it ships with **one runtime dependency** (`ws`) to support the MCP server.
|
|
33
33
|
|
|
34
34
|
- Small runtime surface area
|
|
35
35
|
- No `postinstall` scripts
|
|
@@ -38,16 +38,16 @@ guard-scanner itself keeps runtime dependencies intentionally small. As of `14.0
|
|
|
38
38
|
|
|
39
39
|
## Pattern Updates
|
|
40
40
|
|
|
41
|
-
The threat pattern database (`src/patterns.
|
|
41
|
+
The threat pattern database (`src/patterns.ts`) and IoC database (`src/ioc-db.ts`) are updated based on:
|
|
42
42
|
- Snyk ToxicSkills taxonomy
|
|
43
|
-
- OWASP
|
|
43
|
+
- OWASP LLM Top 10 & Agentic Security Top 10
|
|
44
44
|
- CVE reports affecting AI agents
|
|
45
45
|
- Community-reported incidents
|
|
46
46
|
- Original research from real-world attacks
|
|
47
47
|
|
|
48
48
|
## Responsible Disclosure
|
|
49
49
|
|
|
50
|
-
The test fixtures in `
|
|
50
|
+
The test fixtures in `tests/fixtures/malicious-skill/` contain **intentionally malicious patterns** for testing purposes. These files are:
|
|
51
51
|
- Clearly marked as test fixtures
|
|
52
52
|
- Non-functional (will error if executed)
|
|
53
53
|
- Necessary for validating detection capabilities
|
package/SKILL.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: guard-scanner
|
|
3
|
-
description: "Security scanner and runtime guard for AI agent
|
|
3
|
+
description: "Security scanner and runtime guard for OpenClaw skills, MCP servers, and AI agent workflows. Detects prompt injection, identity hijacking, memory poisoning, A2A contagion, secret leaks, supply-chain abuse, and dangerous tool calls with 364 static threat patterns across 35 threat categories plus 27 runtime checks. Use when reviewing a new skill before install, scanning a workspace in CI/CD (SARIF/JSON/HTML), auditing npm/GitHub/ClawHub assets for leaked credentials, running watch mode during development, exposing scanner tools over MCP for Cursor/Windsurf/Claude Code/OpenClaw, or enforcing before_tool_call policy in OpenClaw. v16 adds 5-layer analysis output (`layer`, `layer_name`, `owasp_asi`, `protocol_surface`) and `--compliance owasp-asi`. MIT licensed; single runtime dependency (`ws`)."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata: {"openclaw": {"requires": {"bins": ["node"]}}}
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# guard-scanner
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Security scanner and runtime guard for the agentic stack. Use it before installing a skill from ClawHub, when auditing MCP servers or OpenClaw workspaces, when wiring security checks into CI/CD, or when you want OpenClaw to block dangerous tool calls at runtime.
|
|
11
|
+
|
|
12
|
+
It covers prompt injection, identity hijacking, memory poisoning, A2A contagion, MCP abuse, secret leakage, supply-chain abuse, and dangerous execution patterns. v16 adds a 5-layer analysis pipeline, OWASP ASI projection mode, richer finding metadata, and Rust runtime evidence integration.
|
|
11
13
|
|
|
12
14
|
## Quick Start
|
|
13
15
|
|
|
@@ -79,7 +81,7 @@ MCP tools: `scan_skill`, `scan_text`, `check_tool_call`, `audit_assets`, `get_st
|
|
|
79
81
|
|
|
80
82
|
Public quality contract:
|
|
81
83
|
|
|
82
|
-
- Benchmark corpus version: `2026-03-
|
|
84
|
+
- Benchmark corpus version: `2026-03-15.quality-v17`
|
|
83
85
|
- Precision target: `>= 0.90`
|
|
84
86
|
- Recall target: `>= 0.90`
|
|
85
87
|
- FPR/FNR budgets: `<= 0.10`
|
|
@@ -112,7 +114,7 @@ guard-scanner scan ./skills/ --vt-scan
|
|
|
112
114
|
|
|
113
115
|
## Runtime Guard
|
|
114
116
|
|
|
115
|
-
The validated OpenClaw surface is the compiled runtime plugin entry (`dist/openclaw-plugin.mjs`) discovered through `package.json > openclaw.extensions` and mounted on `before_tool_call` for OpenClaw `v2026.3.
|
|
117
|
+
The validated OpenClaw surface is the compiled runtime plugin entry (`dist/openclaw-plugin.mjs`) discovered through `package.json > openclaw.extensions` and mounted on `before_tool_call` for OpenClaw `v2026.3.13`, with regression coverage kept on `v2026.3.8`.
|
|
116
118
|
|
|
117
119
|
The `before_tool_call` hook provides 27 runtime checks across 5 defense layers, while v16 scan output adds a second 5-layer analysis view:
|
|
118
120
|
|
|
@@ -175,7 +177,7 @@ guard-scanner ./skills/ --plugin ./my-plugin.js
|
|
|
175
177
|
|
|
176
178
|
## Threat Categories
|
|
177
179
|
|
|
178
|
-
35 categories covering OWASP LLM Top 10 + Agentic Security Top 10. See `src/patterns.
|
|
180
|
+
35 categories covering OWASP LLM Top 10 + Agentic Security Top 10. See `src/patterns.ts` for the full pattern database. Key categories:
|
|
179
181
|
|
|
180
182
|
- **Prompt Injection** — hidden instructions, invisible Unicode, homoglyphs
|
|
181
183
|
- **Identity Hijacking** ⚿ — persona swap, SOUL.md overwrites, memory wipe
|