@guava-parity/guard-scanner 16.0.1 → 16.0.2
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 +7 -7
- package/README_ja.md +7 -7
- package/SECURITY.md +6 -6
- package/SKILL.md +7 -5
- package/dist/cli.cjs +2641 -2216
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -1
- package/dist/cli.mjs +2619 -2217
- package/dist/index.cjs +4616 -4253
- package/dist/index.d.cts +214 -0
- package/dist/index.d.ts +210 -13
- package/dist/index.mjs +4594 -4244
- package/dist/mcp-server.cjs +4161 -3752
- package/dist/mcp-server.d.cts +318 -0
- package/dist/mcp-server.d.ts +318 -1
- package/dist/mcp-server.mjs +4597 -4230
- package/dist/openclaw-plugin.cjs +4622 -4259
- package/dist/openclaw-plugin.mjs +4604 -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 +24 -6
- package/guard-scanner +1 -3
- package/openclaw-plugin.mts +3 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +11 -8
- 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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"package_version": "16.0.
|
|
3
|
-
"plugin_version": "16.0.
|
|
4
|
-
"static_pattern_count":
|
|
2
|
+
"package_version": "16.0.2",
|
|
3
|
+
"plugin_version": "16.0.2",
|
|
4
|
+
"static_pattern_count": 364,
|
|
5
5
|
"threat_category_count": 35,
|
|
6
6
|
"runtime_check_count": 27,
|
|
7
|
-
"test_file_count":
|
|
7
|
+
"test_file_count": 38,
|
|
8
8
|
"dependencies_runtime": 1,
|
|
9
|
-
"dependencies_dev":
|
|
9
|
+
"dependencies_dev": 7,
|
|
10
10
|
"mcp_tools": [
|
|
11
11
|
"scan_skill",
|
|
12
12
|
"scan_text",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"github",
|
|
41
41
|
"npm"
|
|
42
42
|
],
|
|
43
|
-
"benchmark_corpus_version": "2026-03-
|
|
43
|
+
"benchmark_corpus_version": "2026-03-15.quality-v17",
|
|
44
44
|
"benchmark_layers": [
|
|
45
45
|
{
|
|
46
46
|
"id": "layer_a",
|
|
@@ -68,6 +68,24 @@
|
|
|
68
68
|
"recall": 1,
|
|
69
69
|
"false_positive_rate": 0,
|
|
70
70
|
"false_negative_rate": 0
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "layer_protocol",
|
|
74
|
+
"benign": 4,
|
|
75
|
+
"malicious": 4,
|
|
76
|
+
"precision": 1,
|
|
77
|
+
"recall": 1,
|
|
78
|
+
"false_positive_rate": 0,
|
|
79
|
+
"false_negative_rate": 0
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "layer_capability",
|
|
83
|
+
"benign": 4,
|
|
84
|
+
"malicious": 4,
|
|
85
|
+
"precision": 1,
|
|
86
|
+
"recall": 1,
|
|
87
|
+
"false_positive_rate": 0,
|
|
88
|
+
"false_negative_rate": 0
|
|
71
89
|
}
|
|
72
90
|
],
|
|
73
91
|
"analysis_layers": [
|
package/guard-scanner
CHANGED
package/openclaw-plugin.mts
CHANGED
|
@@ -2,6 +2,7 @@ import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
|
2
2
|
import * as runtimeGuard from "./src/index.js";
|
|
3
3
|
|
|
4
4
|
const runtimeGuardApi = runtimeGuard as {
|
|
5
|
+
VERSION: string;
|
|
5
6
|
scanToolCall: (
|
|
6
7
|
toolName: string,
|
|
7
8
|
params: Record<string, unknown>,
|
|
@@ -90,7 +91,7 @@ function beforeToolCall(
|
|
|
90
91
|
const plugin = {
|
|
91
92
|
id: "guard-scanner",
|
|
92
93
|
name: "guard-scanner",
|
|
93
|
-
version:
|
|
94
|
+
version: runtimeGuardApi.VERSION,
|
|
94
95
|
description: "Runtime guard for OpenClaw before_tool_call hook execution.",
|
|
95
96
|
register(api: OpenClawPluginApi) {
|
|
96
97
|
api.on(
|
|
@@ -99,7 +100,7 @@ const plugin = {
|
|
|
99
100
|
{ priority: 90 },
|
|
100
101
|
);
|
|
101
102
|
api.logger.info(
|
|
102
|
-
"guard-scanner registered OpenClaw before_tool_call hook (stable: v2026.3.
|
|
103
|
+
"guard-scanner registered OpenClaw before_tool_call hook (stable: v2026.3.13, regression lane: v2026.3.8).",
|
|
103
104
|
);
|
|
104
105
|
},
|
|
105
106
|
};
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "guard-scanner",
|
|
3
3
|
"name": "guard-scanner",
|
|
4
4
|
"description": "Runtime guard plugin for OpenClaw before_tool_call enforcement with capability-scoped policy rationale.",
|
|
5
|
-
"version": "16.0.
|
|
5
|
+
"version": "16.0.2",
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guava-parity/guard-scanner",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"publishConfig": {
|
|
5
6
|
"access": "public",
|
|
6
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
"default": "./dist/index.mjs"
|
|
23
24
|
},
|
|
24
25
|
"./plugin": {
|
|
25
|
-
"types": "./dist/openclaw-plugin.d.
|
|
26
|
+
"types": "./dist/openclaw-plugin.d.ts",
|
|
26
27
|
"import": "./dist/openclaw-plugin.mjs",
|
|
27
28
|
"require": "./dist/openclaw-plugin.cjs",
|
|
28
29
|
"default": "./dist/openclaw-plugin.mjs"
|
|
@@ -57,9 +58,9 @@
|
|
|
57
58
|
"lint": "tsx scripts/lint.ts",
|
|
58
59
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
59
60
|
"release:gate": "npm run build && npm run benchmark && tsx scripts/generate-capabilities.ts && tsx scripts/release-gate.ts && tsx scripts/validate-tarball.ts",
|
|
60
|
-
"test": "npm run build && npm run benchmark && tsx scripts/generate-capabilities.ts && tsx scripts/verify-capabilities.ts && tsx scripts/test-quality-gate.ts &&
|
|
61
|
-
"test:core": "
|
|
62
|
-
"test:contracts": "npm run build:plugin && tsx scripts/release-gate.ts &&
|
|
61
|
+
"test": "npm run build && npm run benchmark && tsx scripts/generate-capabilities.ts && tsx scripts/verify-capabilities.ts && tsx scripts/test-quality-gate.ts && vitest run",
|
|
62
|
+
"test:core": "vitest run tests/scanner.test.ts tests/patterns.test.ts",
|
|
63
|
+
"test:contracts": "npm run build:plugin && tsx scripts/release-gate.ts && vitest run tests/finding-schema.test.ts tests/mcp.test.ts tests/e2e-mcp.test.ts tests/openclaw-plugin-compat.test.ts tests/stale-claims.test.ts tests/openclaw-upstream-check.test.ts",
|
|
63
64
|
"test:corpus": "tsx scripts/corpus-metrics.ts --check",
|
|
64
65
|
"test:perf": "tsx scripts/perf-regression.ts",
|
|
65
66
|
"test:quality": "tsx scripts/test-quality-gate.ts",
|
|
@@ -109,10 +110,12 @@
|
|
|
109
110
|
],
|
|
110
111
|
"devDependencies": {
|
|
111
112
|
"@types/node": "^22.0.0",
|
|
112
|
-
"
|
|
113
|
-
"
|
|
113
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
114
|
+
"openclaw": "2026.3.13",
|
|
114
115
|
"tsup": "^8.5.0",
|
|
115
|
-
"
|
|
116
|
+
"tsx": "^4.20.5",
|
|
117
|
+
"typescript": "^5.7.0",
|
|
118
|
+
"vitest": "^4.1.0"
|
|
116
119
|
},
|
|
117
120
|
"dependencies": {
|
|
118
121
|
"ws": "^8.19.0"
|
package/dist/cli.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
package/dist/index.d.mts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { GuardScannerConstructor, ScannerOptions, GuardScannerInstance, RuntimeCheckStats, RuntimeDecision } from './types.mjs';
|
|
2
|
-
export { CapabilityMetrics, CustomRule, Finding, GuardMode, McpRequest, PluginConfig, SarifReport, ScanReport, ScanResult, Severity } from './types.mjs';
|
|
3
|
-
|
|
4
|
-
declare const GuardScanner: GuardScannerConstructor;
|
|
5
|
-
declare const VERSION: string;
|
|
6
|
-
declare const THRESHOLDS: Record<string, unknown>;
|
|
7
|
-
declare const SEVERITY_WEIGHTS: Record<string, number>;
|
|
8
|
-
declare const scanToolCall: (toolName: string, params: Record<string, unknown> | string, options?: Record<string, unknown>) => RuntimeDecision;
|
|
9
|
-
declare const RUNTIME_CHECKS: Record<string, unknown>[];
|
|
10
|
-
declare const getCheckStats: () => RuntimeCheckStats;
|
|
11
|
-
declare const LAYER_NAMES: Record<number, string>;
|
|
12
|
-
declare const MCPServer: new () => unknown;
|
|
13
|
-
declare const startServer: () => void;
|
|
14
|
-
declare const TOOLS: Record<string, unknown>[];
|
|
15
|
-
declare function createScanner(options?: ScannerOptions): GuardScannerInstance;
|
|
16
|
-
|
|
17
|
-
export { GuardScanner, GuardScannerConstructor, GuardScannerInstance, LAYER_NAMES, MCPServer, RUNTIME_CHECKS, RuntimeCheckStats, RuntimeDecision, SEVERITY_WEIGHTS, ScannerOptions, THRESHOLDS, TOOLS, VERSION, createScanner, getCheckStats, scanToolCall, startServer };
|
package/dist/mcp-server.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
File without changes
|