@guava-parity/guard-scanner 13.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 (96) hide show
  1. package/README.md +170 -215
  2. package/README_ja.md +252 -0
  3. package/SECURITY.md +12 -4
  4. package/SKILL.md +148 -57
  5. package/dist/cli.cjs +5997 -0
  6. package/dist/cli.d.mts +1 -0
  7. package/dist/cli.d.ts +1 -0
  8. package/dist/cli.mjs +6003 -0
  9. package/dist/index.cjs +4825 -0
  10. package/dist/index.d.mts +17 -0
  11. package/dist/index.d.ts +17 -0
  12. package/dist/index.mjs +4798 -0
  13. package/dist/mcp-server.cjs +4756 -0
  14. package/dist/mcp-server.d.mts +1 -0
  15. package/dist/mcp-server.d.ts +1 -0
  16. package/dist/mcp-server.mjs +4767 -0
  17. package/dist/openclaw-plugin.cjs +4863 -0
  18. package/dist/openclaw-plugin.d.mts +11 -0
  19. package/dist/openclaw-plugin.d.ts +11 -0
  20. package/dist/openclaw-plugin.mjs +4854 -0
  21. package/dist/types.cjs +18 -0
  22. package/dist/types.d.mts +215 -0
  23. package/dist/types.d.ts +215 -0
  24. package/dist/types.mjs +1 -0
  25. package/docs/EVIDENCE_DRIVEN.md +182 -0
  26. package/docs/banner.png +0 -0
  27. package/docs/data/benchmark-ledger.json +1428 -0
  28. package/docs/data/corpus-metrics.json +11 -0
  29. package/docs/data/fp-ledger.json +18 -0
  30. package/docs/data/latest.json +25837 -2481
  31. package/docs/data/quality-contract.json +36 -0
  32. package/docs/generated/npm-audit-20260312.json +96 -0
  33. package/docs/generated/openclaw-upstream-status.json +25 -0
  34. package/docs/glossary.md +46 -0
  35. package/docs/index.html +1085 -496
  36. package/docs/logo.png +0 -0
  37. package/docs/openclaw-compatibility-audit.md +45 -0
  38. package/docs/openclaw-continuous-compatibility-plan.md +37 -0
  39. package/docs/rules/a2a-contagion.md +68 -0
  40. package/docs/rules/advanced-exfil.md +52 -0
  41. package/docs/rules/agent-protocol.md +108 -0
  42. package/docs/rules/api-abuse.md +68 -0
  43. package/docs/rules/autonomous-risk.md +92 -0
  44. package/docs/rules/config-impact.md +132 -0
  45. package/docs/rules/credential-handling.md +100 -0
  46. package/docs/rules/cve-patterns.md +332 -0
  47. package/docs/rules/data-exposure.md +84 -0
  48. package/docs/rules/exfiltration.md +36 -0
  49. package/docs/rules/financial-access.md +84 -0
  50. package/docs/rules/identity-hijack.md +140 -0
  51. package/docs/rules/inference-manipulation.md +60 -0
  52. package/docs/rules/leaky-skills.md +52 -0
  53. package/docs/rules/malicious-code.md +108 -0
  54. package/docs/rules/mcp-security.md +148 -0
  55. package/docs/rules/memory-poisoning.md +84 -0
  56. package/docs/rules/model-poisoning.md +44 -0
  57. package/docs/rules/obfuscation.md +60 -0
  58. package/docs/rules/persistence.md +108 -0
  59. package/docs/rules/pii-exposure.md +116 -0
  60. package/docs/rules/prompt-injection.md +148 -0
  61. package/docs/rules/prompt-worm.md +44 -0
  62. package/docs/rules/safeguard-bypass.md +44 -0
  63. package/docs/rules/sandbox-escape.md +100 -0
  64. package/docs/rules/secret-detection.md +44 -0
  65. package/docs/rules/supply-chain-v2.md +92 -0
  66. package/docs/rules/suspicious-download.md +60 -0
  67. package/docs/rules/trust-boundary.md +76 -0
  68. package/docs/rules/trust-exploitation.md +92 -0
  69. package/docs/rules/unverifiable-deps.md +84 -0
  70. package/docs/rules/vdb-injection.md +84 -0
  71. package/docs/security-vulnerability-report-20260312.md +53 -0
  72. package/docs/spec/PRD_V2_ARCHITECTURE.md +55 -0
  73. package/docs/spec/capabilities.json +174 -0
  74. package/docs/spec/finding.schema.json +104 -0
  75. package/docs/spec/integration-manifest.md +39 -0
  76. package/docs/spec/plugin-trust.json +11 -0
  77. package/docs/spec/sbom.json +33 -0
  78. package/docs/threat-model.md +65 -0
  79. package/docs/v13-architecture-manifest.md +55 -0
  80. package/hooks/context.ts +306 -0
  81. package/hooks/guard-scanner/plugin.ts +24 -1
  82. package/openclaw-plugin.mts +107 -0
  83. package/openclaw.plugin.json +30 -53
  84. package/package.json +66 -13
  85. package/src/asset-auditor.js +0 -508
  86. package/src/ci-reporter.js +0 -135
  87. package/src/cli.js +0 -294
  88. package/src/html-template.js +0 -239
  89. package/src/ioc-db.js +0 -54
  90. package/src/mcp-server.js +0 -702
  91. package/src/patterns.js +0 -611
  92. package/src/quarantine.js +0 -41
  93. package/src/runtime-guard.js +0 -346
  94. package/src/scanner.js +0 -1157
  95. package/src/vt-client.js +0 -202
  96. package/src/watcher.js +0 -170
@@ -0,0 +1,174 @@
1
+ {
2
+ "package_version": "16.0.0",
3
+ "plugin_version": "16.0.0",
4
+ "static_pattern_count": 358,
5
+ "threat_category_count": 35,
6
+ "runtime_check_count": 27,
7
+ "test_file_count": 28,
8
+ "dependencies_runtime": 1,
9
+ "dependencies_dev": 5,
10
+ "mcp_tools": [
11
+ "scan_skill",
12
+ "scan_text",
13
+ "check_tool_call",
14
+ "audit_assets",
15
+ "get_stats",
16
+ "experimental.run_async",
17
+ "experimental.task_status",
18
+ "experimental.task_result",
19
+ "experimental.task_cancel"
20
+ ],
21
+ "cli_commands": [
22
+ "scan",
23
+ "benchmark",
24
+ "serve",
25
+ "watch",
26
+ "audit",
27
+ "crawl",
28
+ "patrol"
29
+ ],
30
+ "supported_outputs": [
31
+ "json",
32
+ "sarif",
33
+ "html",
34
+ "terminal"
35
+ ],
36
+ "supported_integrations": [
37
+ "openclaw",
38
+ "mcp",
39
+ "virustotal",
40
+ "github",
41
+ "npm"
42
+ ],
43
+ "benchmark_corpus_version": "2026-03-13.quality-v1",
44
+ "benchmark_layers": [
45
+ {
46
+ "id": "layer_a",
47
+ "benign": 17,
48
+ "malicious": 15,
49
+ "precision": 1,
50
+ "recall": 1,
51
+ "false_positive_rate": 0,
52
+ "false_negative_rate": 0
53
+ },
54
+ {
55
+ "id": "layer_b",
56
+ "benign": 12,
57
+ "malicious": 12,
58
+ "precision": 0.9167,
59
+ "recall": 0.9167,
60
+ "false_positive_rate": 0.0833,
61
+ "false_negative_rate": 0.0833
62
+ },
63
+ {
64
+ "id": "layer_c",
65
+ "benign": 8,
66
+ "malicious": 8,
67
+ "precision": 1,
68
+ "recall": 1,
69
+ "false_positive_rate": 0,
70
+ "false_negative_rate": 0
71
+ }
72
+ ],
73
+ "analysis_layers": [
74
+ {
75
+ "layer": 1,
76
+ "name": "Static Analysis"
77
+ },
78
+ {
79
+ "layer": 2,
80
+ "name": "Protocol Analysis"
81
+ },
82
+ {
83
+ "layer": 3,
84
+ "name": "Runtime Behavior"
85
+ },
86
+ {
87
+ "layer": 4,
88
+ "name": "Cognitive Threat Detection"
89
+ },
90
+ {
91
+ "layer": 5,
92
+ "name": "Threat Intelligence"
93
+ }
94
+ ],
95
+ "owasp_asi_coverage": [
96
+ {
97
+ "id": "ASI01",
98
+ "count": 11,
99
+ "categories": [
100
+ "prompt-injection"
101
+ ]
102
+ },
103
+ {
104
+ "id": "ASI02",
105
+ "count": 28,
106
+ "categories": [
107
+ "credential-handling",
108
+ "exfiltration",
109
+ "malicious-code",
110
+ "pii-exposure",
111
+ "secret-detection",
112
+ "suspicious-download"
113
+ ]
114
+ },
115
+ {
116
+ "id": "ASI04",
117
+ "count": 8,
118
+ "categories": [
119
+ "suspicious-download",
120
+ "unverifiable-deps"
121
+ ]
122
+ },
123
+ {
124
+ "id": "ASI05",
125
+ "count": 2,
126
+ "categories": [
127
+ "financial-access"
128
+ ]
129
+ },
130
+ {
131
+ "id": "ASI06",
132
+ "count": 10,
133
+ "categories": [
134
+ "exfiltration",
135
+ "memory-poisoning",
136
+ "pii-exposure"
137
+ ]
138
+ },
139
+ {
140
+ "id": "ASI07",
141
+ "count": 9,
142
+ "categories": [
143
+ "credential-handling",
144
+ "secret-detection"
145
+ ]
146
+ }
147
+ ],
148
+ "capability_flags": {
149
+ "protocol_analysis": true,
150
+ "runtime_evidence": true,
151
+ "cognitive_detection": true,
152
+ "threat_intelligence": true
153
+ },
154
+ "compliance_modes": [
155
+ "owasp-asi"
156
+ ],
157
+ "explainability_completeness_rate": 1,
158
+ "runtime_check_latency_budget_ms": 5,
159
+ "quality_targets": {
160
+ "precision_min": 0.9,
161
+ "recall_min": 0.9,
162
+ "false_positive_rate_max": 0.1,
163
+ "false_negative_rate_max": 0.1,
164
+ "explainability_completeness_rate_min": 1,
165
+ "runtime_check_latency_budget_ms": 5,
166
+ "false_positive_budget_by_category": {
167
+ "prompt-injection": 0.05,
168
+ "runtime-policy": 0.02,
169
+ "secret-detection": 0.08,
170
+ "supply-chain": 0.05,
171
+ "memory-poisoning": 0.03
172
+ }
173
+ }
174
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/koatora20/guard-scanner/docs/spec/finding.schema.json",
4
+ "title": "guard-scanner finding",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "source",
9
+ "rule_id",
10
+ "category",
11
+ "severity",
12
+ "description",
13
+ "rationale",
14
+ "preconditions",
15
+ "false_positive_scenarios",
16
+ "remediation_hint",
17
+ "validation_state",
18
+ "validation_status",
19
+ "confidence",
20
+ "evidence_spans",
21
+ "attack_chain_id",
22
+ "evidence"
23
+ ],
24
+ "properties": {
25
+ "schema_version": {
26
+ "type": "string"
27
+ },
28
+ "source": {
29
+ "type": "string",
30
+ "enum": ["static", "runtime"]
31
+ },
32
+ "rule_id": {
33
+ "type": "string"
34
+ },
35
+ "category": {
36
+ "type": "string"
37
+ },
38
+ "severity": {
39
+ "type": "string",
40
+ "enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW"]
41
+ },
42
+ "description": {
43
+ "type": "string"
44
+ },
45
+ "rationale": {
46
+ "type": "string"
47
+ },
48
+ "preconditions": {
49
+ "type": "string"
50
+ },
51
+ "false_positive_scenarios": {
52
+ "type": "array",
53
+ "items": { "type": "string" },
54
+ "minItems": 1
55
+ },
56
+ "remediation_hint": {
57
+ "type": "string"
58
+ },
59
+ "validation_state": {
60
+ "type": "string",
61
+ "enum": ["heuristic-only", "semantic-match", "chain-validated", "runtime-observed"]
62
+ },
63
+ "validation_status": {
64
+ "type": "string",
65
+ "enum": ["validated", "heuristic-only", "runtime-observed"]
66
+ },
67
+ "confidence": {
68
+ "type": "number",
69
+ "minimum": 0,
70
+ "maximum": 1
71
+ },
72
+ "evidence_spans": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "object",
76
+ "required": ["start_line", "end_line"],
77
+ "properties": {
78
+ "file": { "type": "string" },
79
+ "start_line": { "type": "integer", "minimum": 1 },
80
+ "end_line": { "type": "integer", "minimum": 1 }
81
+ },
82
+ "additionalProperties": true
83
+ }
84
+ },
85
+ "attack_chain_id": {
86
+ "type": ["string", "null"]
87
+ },
88
+ "evidence": {
89
+ "type": "object",
90
+ "additionalProperties": true,
91
+ "properties": {
92
+ "file": { "type": "string" },
93
+ "line": { "type": "integer", "minimum": 1 },
94
+ "sample": { "type": "string" },
95
+ "match_count": { "type": "integer", "minimum": 1 },
96
+ "tool_name": { "type": "string" },
97
+ "params_preview": { "type": "string" },
98
+ "layer": { "type": "integer", "minimum": 1 },
99
+ "layer_name": { "type": "string" }
100
+ }
101
+ }
102
+ },
103
+ "additionalProperties": true
104
+ }
@@ -0,0 +1,39 @@
1
+ # Guard-Scanner Integration Manifest
2
+
3
+ As per P2 Ecosystem Integration requirements, this manifest defines the required permissions and principle of least privilege for each operational mode.
4
+
5
+ ## 1. Offline Static Scan Mode (`guard-scanner scan`)
6
+ **Purpose:** Scans local directories for malicious patterns without executing code.
7
+ **Permissions Required:**
8
+ - `fs:read` (Target directory and subdirectories)
9
+ - `fs:write` (Only for generating reports like `guard-scanner-report.json`)
10
+ - **Blocked:** `network:*`, `exec:*`
11
+
12
+ ## 2. Runtime Guard Mode (OpenClaw `before_tool_call` hook)
13
+ **Purpose:** Intercepts agent tool calls before execution to enforce security policies.
14
+ **Permissions Required:**
15
+ - `fs:read` (To read configuration and context)
16
+ - `process:env` (To check execution context if needed)
17
+ - **Blocked:** `fs:write`, `network:*`, `exec:*`
18
+
19
+ ## 3. MCP Service Mode (`guard-scanner serve`)
20
+ **Purpose:** Runs as a persistent Model Context Protocol server exposing scanning tools to agents.
21
+ **Permissions Required:**
22
+ - `network:listen` (To expose the MCP API or WebSocket)
23
+ - `fs:read` (To scan requested paths)
24
+ - **Blocked:** `exec:*`
25
+
26
+ ## 4. Asset Audit Mode (`guard-scanner audit`)
27
+ **Purpose:** Queries external services (GitHub, npm, VT) to audit supply chain assets.
28
+ **Permissions Required:**
29
+ - `network:connect` (To connect to `api.github.com`, `registry.npmjs.org`, etc.)
30
+ - `fs:read` (To read local credential config if needed)
31
+ - **Blocked:** `exec:*`, `fs:write`
32
+
33
+ ## 5. CI Mode (GitHub Actions / GitLab CI)
34
+ **Purpose:** Integrates directly into CI pipelines emitting SARIF or Code Climate formats.
35
+ **Permissions Required:**
36
+ - `fs:read` (To scan workspace)
37
+ - `fs:write` (To write SARIF/JSON artifacts)
38
+ - `env:read` (To read CI-specific variables like `GITHUB_WORKSPACE`)
39
+ - **Blocked:** `exec:*`, `network:*` (Unless combined with Asset Audit)
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 1,
3
+ "enforce": true,
4
+ "entries": [
5
+ {
6
+ "path": "./dist/openclaw-plugin.mjs",
7
+ "issuer": "guard-scanner-release-gate",
8
+ "source": "local-build"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "bomFormat": "CycloneDX-like",
3
+ "specVersion": "0.1",
4
+ "metadata": {
5
+ "component": {
6
+ "name": "@guava-parity/guard-scanner",
7
+ "version": "14.0.0"
8
+ },
9
+ "generatedAt": "2026-03-10T10:00:34.350Z"
10
+ },
11
+ "components": [
12
+ {
13
+ "name": "@types/node",
14
+ "version": "22.19.11",
15
+ "license": "MIT"
16
+ },
17
+ {
18
+ "name": "typescript",
19
+ "version": "5.9.3",
20
+ "license": "Apache-2.0"
21
+ },
22
+ {
23
+ "name": "undici-types",
24
+ "version": "6.21.0",
25
+ "license": "MIT"
26
+ },
27
+ {
28
+ "name": "ws",
29
+ "version": "8.19.0",
30
+ "license": "MIT"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,65 @@
1
+ # Guard-Scanner Threat Model
2
+
3
+ ## Scope
4
+
5
+ Guard-scanner protects against threats targeting **AI agent skills and MCP-connected workflows**. It does **not** replace traditional application security tools (SAST, DAST, container scanners).
6
+
7
+ ## What guard-scanner defends against
8
+
9
+ ### Static Analysis (352 patterns, 32 categories)
10
+
11
+ | Threat Class | Examples | Detection Method |
12
+ |-------------|----------|-----------------|
13
+ | Prompt Injection | "ignore all previous instructions", role override | Regex pattern matching on doc/code files |
14
+ | Identity Hijack | SOUL.md overwrite, memory poisoning | File operation pattern + soul-lock patterns |
15
+ | Supply Chain | curl\|bash, npm postinstall abuse, typosquatting | Command pattern matching + IoC check |
16
+ | Data Exfiltration | env/credential harvesting, network exfil | Data flow + network pattern detection |
17
+ | Remote Code Execution | eval(), exec(), reverse shells | Dangerous function + shell pattern matching |
18
+ | PII Exposure | SSN/credit card collection, PII logging | PII regex patterns + context analysis |
19
+ | Social Engineering | Trust exploitation, authority claims | Social engineering phrase detection |
20
+ | Tool Shadowing | MCP tool descriptions with hidden instructions | MCP-specific pattern matching |
21
+ | Context Crush | Prompt overstuffing / context window manipulation | Token density heuristics |
22
+
23
+ ### Runtime Guard (26 checks, 5 layers)
24
+
25
+ | Layer | Name | Function |
26
+ |-------|------|----------|
27
+ | L1 | Command Safety | Block reverse shells, curl\|bash, SSRF, cred exfil |
28
+ | L2 | Identity Protection | Block SOUL.md/memory tampering |
29
+ | L3 | Prompt Safety | Detect injection/override in tool args |
30
+ | L4 | Behavioral Safety | Detect no-research execution |
31
+ | L5 | Trust Safety | Detect authority claims, creator bypass, fake audits |
32
+
33
+ ## What guard-scanner does NOT defend against
34
+
35
+ | Limitation | Explanation |
36
+ |-----------|-------------|
37
+ | Obfuscated code | Regex-only — no deobfuscation. Base64/encoded payloads may evade. |
38
+ | AST-level taint analysis | No data flow tracking across functions/files (planned P2). |
39
+ | Sandbox escape | Does not provide sandboxing — complementary to container isolation. |
40
+ | Zero-day attack patterns | Detects known patterns only — new techniques require pattern updates. |
41
+ | Code within markdown blocks | Doc files scanned for prompt patterns; JS in code blocks partially covered. |
42
+ | Pipe-to-curl variants | `env \| curl` not yet caught by runtime guard (tracked for improvement). |
43
+
44
+ ## Threat Categories (OWASP Agentic Security Mapping)
45
+
46
+ | OWASP ID | Name | guard-scanner Coverage |
47
+ |----------|------|----------------------|
48
+ | ASI01 | Agent Goal Hijack | ✅ prompt-injection, context-crush patterns |
49
+ | ASI02 | Tool Misuse | ✅ tool-shadowing, MCP poisoning patterns |
50
+ | ASI03 | Identity Abuse | ✅ soul-lock patterns, SOUL.md protection |
51
+ | ASI04 | Supply Chain | ✅ curl\|bash, typosquatting, IoC database |
52
+ | ASI05 | RCE | ✅ eval/exec detection, shell patterns |
53
+ | ASI06 | Memory Poisoning | ✅ memory write detection |
54
+ | ASI07 | Inter-Agent | ✅ A2A smuggle, SSRF patterns |
55
+ | ASI09 | Human-Trust | ✅ social engineering, authority claims |
56
+ | ASI10 | Rogue Agent | ✅ persistence, identity hijack |
57
+
58
+ ## CVE Coverage
59
+
60
+ | CVE | Product | Detection |
61
+ |-----|---------|-----------|
62
+ | CVE-2026-25905 | mcp-run-python (Pyodide) | ✅ Sandbox escape pattern |
63
+ | CVE-2026-27825 | mcp-atlassian | ✅ Path traversal pattern |
64
+ | CVE-2026-2256 | MS-Agent (CERT VU#431821) | ✅ Denylist bypass pattern |
65
+ | CVE-2026-25046 | execSync filename injection | ✅ Unsanitized exec pattern |
@@ -0,0 +1,55 @@
1
+ # guard-scanner V13 Architecture & Evolution Manifest
2
+
3
+ This document outlines the strategic roadmap for transforming `guard-scanner` from a "pattern scanner" into a fully realized **Agent-Native Security Policy & Analysis Layer**, directly responding to the V13 Enterprise Review requirements.
4
+
5
+ ## 1. P0: Source of Truth (Established)
6
+ **Goal:** Eliminate specification drift and contradictory capability claims.
7
+ - **Implementation:** `docs/spec/capabilities.json` is now the single canonical Source of Truth.
8
+ - **Enforcement:** `scripts/sync-capabilities.js` runs automatically during `npm test`, guaranteeing that `README.md`, `SKILL.md`, and `openclaw.plugin.json` are strictly aligned with reality.
9
+ - **Positioning:** Removed "first open-source" and "zero dependencies" marketing hyperbole. The tool is explicitly positioned as a *policy and analysis layer*, complementing rather than replacing full sandbox environments.
10
+
11
+ ## 2. P1: Rule Explainability (Planned)
12
+ **Goal:** Shift from high-noise detection to high-context triage.
13
+ - **Action:** Augment every detection pattern with metadata.
14
+ - **Schema Update:**
15
+ ```json
16
+ {
17
+ "rule_id": "ASI01_PROMPT_INJECTION",
18
+ "category": "Goal Hijacking",
19
+ "severity": "CRITICAL",
20
+ "rationale": "Attempts to override foundational agent instructions.",
21
+ "exploit_precondition": "Agent must process this input without contextual isolation.",
22
+ "likely_false_positive": "Mentioning the concept of prompt injection in security research docs.",
23
+ "remediation_hint": "Wrap untrusted input in structural XML tags or use a secondary verification LLM."
24
+ }
25
+ ```
26
+
27
+ ## 3. P1: Threat Model Layer (Planned)
28
+ **Goal:** Context-aware risk scoring rather than simple grep matches.
29
+ - **Action:** Before scanning, analyze the target to build a capability exposure profile.
30
+ - **Analysis Vectors:**
31
+ - **Reachable tools:** Does the skill request network access + shell execution simultaneously?
32
+ - **Credential surface:** Does it mount `.env` or read from `.ssh/`?
33
+ - **Lethal Trifecta:** Flag skills that combine *Private Data Access* + *External Input* + *Action Execution*.
34
+
35
+ ## 4. P1: Validation Layer (Planned)
36
+ **Goal:** Reduce False Positives via two-stage verification.
37
+ - **Action:** Differentiate between "heuristic matches" and "validated exploits."
38
+ - **Implementation:** For critical findings (e.g., suspicious shell pipes or remote fetches), integrate with the `ExecutionOrchestrator` to simulate the data flow and verify if the payload actually reaches a dangerous sink.
39
+
40
+ ## 5. P1: Runtime Guard Hardening (Planned)
41
+ **Goal:** Evolve the `before_tool_call` hook into a true Policy Engine.
42
+ - **Action:** Move beyond static regex blocking at runtime.
43
+ - **Implementation:**
44
+ - Define explicit `allowlist` and `denylist` policies per session.
45
+ - Apply the Principle of Least Privilege: if an agent was invoked for "code review," strictly block `fs.write` or `child_process.exec`.
46
+ - Maintain versioned audit logs for all enforcement actions.
47
+
48
+ ## 6. P2: Benchmarking & Ecosystem Integration (Planned)
49
+ **Goal:** Prove efficacy through data, not marketing claims.
50
+ - **Action:** Develop a standalone benchmark suite containing:
51
+ - Benign administrative skills.
52
+ - Indirect prompt injection traps.
53
+ - Supply chain dependency confusion examples.
54
+ - **Metrics:** Track Precision, Recall, False Positive Rate (FPR), and Runtime Hook Latency.
55
+ - **Ecosystem:** Clearly delineate operational modes (Offline Static, Runtime Hook, MCP Service, Asset Audit, CI) with explicitly documented permission requirements for each.