@guava-parity/guard-scanner 15.0.0 → 16.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.
Files changed (61) hide show
  1. package/README.md +208 -42
  2. package/README_ja.md +252 -0
  3. package/SKILL.md +40 -11
  4. package/dist/cli.cjs +5997 -0
  5. package/dist/cli.d.mts +1 -0
  6. package/dist/cli.d.ts +1 -0
  7. package/dist/cli.mjs +6003 -0
  8. package/dist/index.cjs +4825 -0
  9. package/dist/index.d.mts +17 -0
  10. package/dist/index.d.ts +17 -0
  11. package/dist/index.mjs +4798 -0
  12. package/dist/mcp-server.cjs +4756 -0
  13. package/dist/mcp-server.d.mts +1 -0
  14. package/dist/mcp-server.d.ts +1 -0
  15. package/dist/mcp-server.mjs +4767 -0
  16. package/dist/openclaw-plugin.cjs +4863 -0
  17. package/dist/openclaw-plugin.d.mts +11 -0
  18. package/dist/openclaw-plugin.d.ts +11 -0
  19. package/dist/openclaw-plugin.mjs +4847 -34
  20. package/dist/types.cjs +18 -0
  21. package/dist/types.d.mts +215 -0
  22. package/dist/types.d.ts +215 -0
  23. package/dist/types.mjs +1 -0
  24. package/docs/data/benchmark-ledger.json +1428 -0
  25. package/docs/data/corpus-metrics.json +3 -3
  26. package/docs/data/fp-ledger.json +18 -0
  27. package/docs/data/quality-contract.json +36 -0
  28. package/docs/generated/openclaw-upstream-status.json +13 -13
  29. package/docs/openclaw-compatibility-audit.md +3 -2
  30. package/docs/openclaw-continuous-compatibility-plan.md +2 -1
  31. package/docs/spec/capabilities.json +137 -5
  32. package/docs/spec/plugin-trust.json +11 -0
  33. package/hooks/{context.js → context.ts} +1 -0
  34. package/openclaw-plugin.mts +21 -5
  35. package/openclaw.plugin.json +2 -2
  36. package/package.json +58 -20
  37. package/src/asset-auditor.js +0 -508
  38. package/src/ci-reporter.js +0 -135
  39. package/src/cli.js +0 -434
  40. package/src/core/content-loader.js +0 -42
  41. package/src/core/inventory.js +0 -73
  42. package/src/core/report-adapters.js +0 -171
  43. package/src/core/risk-engine.js +0 -93
  44. package/src/core/rule-registry.js +0 -73
  45. package/src/core/semantic-validators.js +0 -85
  46. package/src/finding-schema.js +0 -191
  47. package/src/hooks/context.ts +0 -49
  48. package/src/html-template.js +0 -239
  49. package/src/ioc-db.js +0 -54
  50. package/src/mcp-server.js +0 -653
  51. package/src/openclaw-upstream.js +0 -128
  52. package/src/patterns.js +0 -629
  53. package/src/policy-engine.js +0 -32
  54. package/src/quarantine.js +0 -41
  55. package/src/runtime-guard.js +0 -384
  56. package/src/scanner.js +0 -1042
  57. package/src/skill-crawler.js +0 -254
  58. package/src/threat-model.js +0 -50
  59. package/src/validation-layer.js +0 -39
  60. package/src/vt-client.js +0 -202
  61. package/src/watcher.js +0 -170
package/SKILL.md CHANGED
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: guard-scanner
3
- description: "Security scanner and runtime guard for AI agent skills. 358 static threat patterns across 35 categories + 27 runtime checks (5 defense layers). Use when scanning skill directories for security threats, auditing npm/GitHub/ClawHub assets for leaked credentials, running real-time file watch during development, integrating security checks into CI/CD pipelines (SARIF/JSON), setting up MCP server for editor-integrated scanning (Cursor, Windsurf, Claude Code, OpenClaw), or runtime guarding tool calls via the OpenClaw v2026.3.8 before_tool_call hook. Single dependency (ws). MIT licensed."
3
+ description: "Security scanner and runtime guard for AI agent skills. 358 static threat patterns across 35 categories + 27 runtime checks, with v16 5-layer analysis output (`layer`, `layer_name`, `owasp_asi`, `protocol_surface`) and `--compliance owasp-asi`. Use when scanning skill directories for security threats, auditing npm/GitHub/ClawHub assets for leaked credentials, running real-time file watch during development, integrating security checks into CI/CD pipelines (SARIF/JSON), setting up MCP server for editor-integrated scanning (Cursor, Windsurf, Claude Code, OpenClaw), or runtime guarding tool calls via the OpenClaw v2026.3.8 before_tool_call compatibility surface. Single dependency (ws). MIT licensed."
4
4
  license: MIT
5
5
  metadata: {"openclaw": {"requires": {"bins": ["node"]}}}
6
6
  ---
7
7
 
8
8
  # guard-scanner
9
9
 
10
- Scan AI agent skills for 35 categories of threats. Detect prompt injection, identity hijacking, memory poisoning, MCP tool poisoning, supply chain attacks, and 27 more threat classes that traditional security tools miss.
10
+ Scan AI agent skills for 35 categories of threats. v16 adds a 5-layer analysis pipeline, OWASP ASI projection mode, richer finding metadata, and Rust runtime evidence integration on top of the existing prompt injection, identity hijacking, memory poisoning, MCP poisoning, and supply chain coverage.
11
11
 
12
12
  ## Quick Start
13
13
 
@@ -17,6 +17,9 @@ npx -y @guava-parity/guard-scanner ./my-skills/ --verbose
17
17
 
18
18
  # Scan with identity protection
19
19
  npx -y @guava-parity/guard-scanner ./skills/ --soul-lock --strict
20
+
21
+ # Filter to OWASP ASI mapped findings only
22
+ npx -y @guava-parity/guard-scanner ./skills/ --compliance owasp-asi --format json
20
23
  ```
21
24
 
22
25
  ## Core Commands
@@ -24,11 +27,12 @@ npx -y @guava-parity/guard-scanner ./skills/ --soul-lock --strict
24
27
  ### Scan
25
28
 
26
29
  ```bash
27
- guard-scanner scan <dir> # Scan directory
28
- guard-scanner scan <dir> -v # Verbose output
29
- guard-scanner scan <dir> --json # JSON output
30
- guard-scanner scan <dir> --sarif # SARIF for CI/CD
31
- guard-scanner scan <dir> --html # HTML report
30
+ guard-scanner <dir> # Scan directory
31
+ guard-scanner <dir> -v # Verbose output
32
+ guard-scanner <dir> --json # JSON report file
33
+ guard-scanner <dir> --sarif # SARIF for CI/CD
34
+ guard-scanner <dir> --html # HTML report
35
+ guard-scanner <dir> --compliance owasp-asi --format json
32
36
  ```
33
37
 
34
38
  ### Asset Audit
@@ -63,7 +67,25 @@ Editor config (Cursor, Windsurf, Claude Code, OpenClaw):
63
67
  }
64
68
  ```
65
69
 
66
- MCP tools: `scan_skill`, `scan_text`, `check_tool_call`, `audit_assets`, `get_stats`.
70
+ MCP tools: `scan_skill`, `scan_text`, `check_tool_call`, `audit_assets`, `get_stats`, and the async experimental task helpers.
71
+
72
+ ## Quality Contract
73
+
74
+ Public quality contract:
75
+
76
+ - Benchmark corpus version: `2026-03-13.quality-v1`
77
+ - Precision target: `>= 0.90`
78
+ - Recall target: `>= 0.90`
79
+ - FPR/FNR budgets: `<= 0.10`
80
+ - Explainability completeness: `1.0`
81
+ - Runtime policy latency budget: `5ms`
82
+
83
+ Evidence surfaces:
84
+
85
+ - `docs/spec/capabilities.json`
86
+ - `docs/data/corpus-metrics.json`
87
+ - `docs/data/benchmark-ledger.json`
88
+ - `docs/data/fp-ledger.json`
67
89
 
68
90
  ### Watch Mode
69
91
 
@@ -84,9 +106,9 @@ guard-scanner scan ./skills/ --vt-scan
84
106
 
85
107
  ## Runtime Guard
86
108
 
87
- 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.8`.
109
+ 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.8`. Newer upstream releases are measured by the drift watchdog before any public compatibility claim is widened.
88
110
 
89
- The `before_tool_call` hook provides 27 runtime checks across 5 defense layers:
111
+ The `before_tool_call` hook provides 27 runtime checks across 5 defense layers, while v16 scan output adds a second 5-layer analysis view:
90
112
 
91
113
  | Layer | Focus |
92
114
  |-------|-------|
@@ -98,6 +120,13 @@ The `before_tool_call` hook provides 27 runtime checks across 5 defense layers:
98
120
 
99
121
  Modes: `monitor` (log only), `enforce` (block CRITICAL, default), `strict` (block HIGH+).
100
122
 
123
+ ## v16 Output Surface
124
+
125
+ - Finding fields: `layer`, `layer_name`, `owasp_asi`, `protocol_surface`
126
+ - Compliance mode: `--compliance owasp-asi`
127
+ - MCP summaries: `scan_skill`, `scan_text`, and `get_stats` now surface layer and ASI context
128
+ - Runtime evidence: Rust `memory_integrity` and `soul_hard_gate` modules are represented in the TypeScript pipeline
129
+
101
130
  ## Key Flags
102
131
 
103
132
  | Flag | Effect |
@@ -105,12 +134,12 @@ Modes: `monitor` (log only), `enforce` (block CRITICAL, default), `strict` (bloc
105
134
  | `--verbose` / `-v` | Detailed findings with line numbers |
106
135
  | `--strict` | Lower detection thresholds |
107
136
  | `--soul-lock` | Enable identity protection patterns |
108
- | `--vt-scan` | Add VirusTotal double-layered check |
109
137
  | `--json` / `--sarif` / `--html` | Output format |
110
138
  | `--fail-on-findings` | Exit 1 on findings (CI/CD) |
111
139
  | `--check-deps` | Scan package.json dependencies |
112
140
  | `--rules <file>` | Load custom rules JSON |
113
141
  | `--plugin <file>` | Load plugin module |
142
+ | `--compliance owasp-asi` | Keep only OWASP ASI mapped findings in output |
114
143
 
115
144
  ## Custom Rules
116
145