protect-mcp 0.3.1 → 0.3.3

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/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  buildDecisionContext,
4
4
  checkRateLimit,
5
5
  evaluateTier,
6
+ formatSimulation,
6
7
  getSignerInfo,
7
8
  getToolPolicy,
8
9
  initSigning,
@@ -10,16 +11,22 @@ import {
10
11
  listCredentialLabels,
11
12
  loadPolicy,
12
13
  meetsMinTier,
14
+ parseLogFile,
13
15
  parseRateLimit,
14
16
  queryExternalPDP,
15
17
  resolveCredential,
16
18
  signDecision,
19
+ simulate,
17
20
  validateCredentials
18
- } from "./chunk-U7TMVD3E.mjs";
21
+ } from "./chunk-WDCPUM2O.mjs";
19
22
  import {
20
23
  collectSignedReceipts,
21
24
  createAuditBundle
22
25
  } from "./chunk-5JXFV37Y.mjs";
26
+ import {
27
+ formatReportMarkdown,
28
+ generateReport
29
+ } from "./chunk-JQDVKZBN.mjs";
23
30
 
24
31
  // src/manifest.ts
25
32
  function isAgentId(s) {
@@ -182,6 +189,9 @@ export {
182
189
  collectSignedReceipts,
183
190
  createAuditBundle,
184
191
  evaluateTier,
192
+ formatReportMarkdown,
193
+ formatSimulation,
194
+ generateReport,
185
195
  getSignerInfo,
186
196
  getToolPolicy,
187
197
  initSigning,
@@ -193,10 +203,12 @@ export {
193
203
  listCredentialLabels,
194
204
  loadPolicy,
195
205
  meetsMinTier,
206
+ parseLogFile,
196
207
  parseRateLimit,
197
208
  queryExternalPDP,
198
209
  resolveCredential,
199
210
  signDecision,
211
+ simulate,
200
212
  validateCredentials,
201
213
  validateEvidenceReceipt,
202
214
  validateManifest
@@ -0,0 +1,8 @@
1
+ import {
2
+ formatReportMarkdown,
3
+ generateReport
4
+ } from "./chunk-JQDVKZBN.mjs";
5
+ export {
6
+ formatReportMarkdown,
7
+ generateReport
8
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "protect-mcp",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
+ "mcpName": "io.github.tomjwxf/protect-mcp",
4
5
  "description": "Security gateway for MCP servers. Shadow-mode logs, per-tool policies, optional local Ed25519-signed receipts. Programmatic hooks for trust tiers, credential config, and external policy engines.",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
@@ -22,6 +23,7 @@
22
23
  },
23
24
  "files": [
24
25
  "dist",
26
+ "policies",
25
27
  "README.md"
26
28
  ],
27
29
  "keywords": [
@@ -36,7 +38,15 @@
36
38
  "decision-log",
37
39
  "tool-protection",
38
40
  "ai-agent",
39
- "llm-gateway"
41
+ "llm-gateway",
42
+ "owasp",
43
+ "cedar",
44
+ "opa",
45
+ "ed25519",
46
+ "receipts",
47
+ "trust-tiers",
48
+ "agent-governance",
49
+ "claude-code"
40
50
  ],
41
51
  "author": "Tom Farley <tommy@scopeblind.com>",
42
52
  "license": "FSL-1.1-MIT",
@@ -49,7 +59,7 @@
49
59
  "url": "https://github.com/tomjwxf/scopeblind-gateway/issues"
50
60
  },
51
61
  "dependencies": {
52
- "@veritasacta/artifacts": "^0.2.0"
62
+ "@veritasacta/protocol": "^0.1.0"
53
63
  },
54
64
  "optionalDependencies": {
55
65
  "@noble/curves": "^1.8.0",
@@ -0,0 +1,18 @@
1
+ {
2
+ "$comment": "Claude Code hooks configuration. Add this to your .claude/settings.json to integrate protect-mcp as a pre-tool-use hook for Claude Code. Every tool call will be evaluated against your protect-mcp policy and produce a signed receipt.",
3
+ "hooks": {
4
+ "PreToolUse": [
5
+ {
6
+ "matcher": ".*",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "npx protect-mcp hook-eval --tool \"$TOOL_NAME\" --input \"$TOOL_INPUT\"",
11
+ "timeout": 5000,
12
+ "on_failure": "allow"
13
+ }
14
+ ]
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$comment": "CVE-2025-6514: Clinejection — Malicious MCP OAuth proxy hijacked 437,000+ developer environments. Blocks shell execution, restricts file access to non-sensitive paths, requires approval for any write operation.",
3
+ "incident": "CVE-2025-6514",
4
+ "incident_name": "Clinejection MCP OAuth Proxy Hijack",
5
+ "incident_date": "2025-07-15",
6
+ "owasp_categories": ["A01-Prompt-Injection", "A03-Supply-Chain"],
7
+ "tools": {
8
+ "*": {
9
+ "rate_limit": "30/minute"
10
+ },
11
+ "execute_command": {
12
+ "block": true
13
+ },
14
+ "run_command": {
15
+ "block": true
16
+ },
17
+ "shell": {
18
+ "block": true
19
+ },
20
+ "bash": {
21
+ "block": true
22
+ },
23
+ "terminal": {
24
+ "block": true
25
+ },
26
+ "write_file": {
27
+ "require_approval": true,
28
+ "rate_limit": "10/minute"
29
+ },
30
+ "edit_file": {
31
+ "require_approval": true,
32
+ "rate_limit": "10/minute"
33
+ },
34
+ "read_file": {
35
+ "rate_limit": "30/minute",
36
+ "min_tier": "signed-known"
37
+ },
38
+ "list_files": {
39
+ "rate_limit": "60/minute"
40
+ }
41
+ },
42
+ "signing": {
43
+ "enabled": true
44
+ }
45
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$comment": "Prevents data exfiltration via AI agents. Blocks all outbound data channels (email, webhooks, uploads, HTTP). Restricts file reads. Requires approval for any external communication.",
3
+ "incident": "agent-data-exfiltration-pattern",
4
+ "incident_name": "AI Agent Data Exfiltration via Tool Abuse",
5
+ "owasp_categories": ["A02-Sensitive-Data-Exposure", "A04-Tool-Call-Injection"],
6
+ "tools": {
7
+ "*": {
8
+ "rate_limit": "60/minute"
9
+ },
10
+ "send_email": {
11
+ "block": true
12
+ },
13
+ "send_message": {
14
+ "block": true
15
+ },
16
+ "upload_file": {
17
+ "block": true
18
+ },
19
+ "http_request": {
20
+ "block": true
21
+ },
22
+ "http_post": {
23
+ "block": true
24
+ },
25
+ "webhook": {
26
+ "block": true
27
+ },
28
+ "publish": {
29
+ "block": true
30
+ },
31
+ "post_to_api": {
32
+ "block": true
33
+ },
34
+ "execute_command": {
35
+ "block": true
36
+ },
37
+ "read_file": {
38
+ "rate_limit": "20/minute",
39
+ "min_tier": "signed-known"
40
+ },
41
+ "search": {
42
+ "rate_limit": "30/minute"
43
+ },
44
+ "database_query": {
45
+ "rate_limit": "10/minute",
46
+ "min_tier": "signed-known"
47
+ }
48
+ },
49
+ "signing": {
50
+ "enabled": true
51
+ }
52
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$comment": "Financial services safety policy. Every financial action requires human approval with evidenced trust tier. All reads are rate-limited. Destructive operations blocked entirely.",
3
+ "incident": "agent-unauthorized-transaction-pattern",
4
+ "incident_name": "Unauthorized Financial Transaction via AI Agent",
5
+ "owasp_categories": ["A05-Insufficient-Access-Control", "A06-Excessive-Autonomy"],
6
+ "tools": {
7
+ "*": {
8
+ "rate_limit": "30/minute",
9
+ "min_tier": "signed-known"
10
+ },
11
+ "transfer_funds": {
12
+ "require_approval": true,
13
+ "min_tier": "privileged"
14
+ },
15
+ "create_payment": {
16
+ "require_approval": true,
17
+ "min_tier": "privileged"
18
+ },
19
+ "approve_transaction": {
20
+ "require_approval": true,
21
+ "min_tier": "privileged"
22
+ },
23
+ "modify_account": {
24
+ "require_approval": true,
25
+ "min_tier": "evidenced"
26
+ },
27
+ "delete_account": {
28
+ "block": true
29
+ },
30
+ "close_account": {
31
+ "block": true
32
+ },
33
+ "read_balance": {
34
+ "rate_limit": "10/minute",
35
+ "min_tier": "evidenced"
36
+ },
37
+ "read_transactions": {
38
+ "rate_limit": "10/minute",
39
+ "min_tier": "evidenced"
40
+ },
41
+ "generate_report": {
42
+ "rate_limit": "5/hour",
43
+ "min_tier": "signed-known"
44
+ }
45
+ },
46
+ "signing": {
47
+ "enabled": true
48
+ }
49
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$comment": "GitHub MCP server hijacked via crafted issue containing prompt injection (2025). Agent exfiltrated private repo data. Blocks outbound data tools, restricts git operations, requires approval for any push/publish.",
3
+ "incident": "github-mcp-issue-hijack-2025",
4
+ "incident_name": "GitHub MCP Server Prompt Injection via Crafted Issue",
5
+ "incident_date": "2025-08-20",
6
+ "owasp_categories": ["A01-Prompt-Injection", "A02-Sensitive-Data-Exposure", "A03-Supply-Chain"],
7
+ "tools": {
8
+ "*": {
9
+ "rate_limit": "30/minute"
10
+ },
11
+ "git_push": {
12
+ "require_approval": true,
13
+ "min_tier": "evidenced"
14
+ },
15
+ "git_commit": {
16
+ "rate_limit": "10/minute"
17
+ },
18
+ "create_pull_request": {
19
+ "require_approval": true
20
+ },
21
+ "publish": {
22
+ "block": true
23
+ },
24
+ "npm_publish": {
25
+ "block": true
26
+ },
27
+ "send_email": {
28
+ "block": true
29
+ },
30
+ "send_message": {
31
+ "block": true
32
+ },
33
+ "upload_file": {
34
+ "require_approval": true,
35
+ "min_tier": "signed-known"
36
+ },
37
+ "http_request": {
38
+ "require_approval": true,
39
+ "rate_limit": "5/minute"
40
+ },
41
+ "webhook": {
42
+ "block": true
43
+ },
44
+ "read_file": {
45
+ "rate_limit": "30/minute"
46
+ },
47
+ "search_code": {
48
+ "rate_limit": "20/minute"
49
+ }
50
+ },
51
+ "signing": {
52
+ "enabled": true
53
+ }
54
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$comment": "Terraform agent destroyed production infrastructure (2025). Blocks all destructive infrastructure operations, requires human approval for any apply/deploy, rate-limits plan operations.",
3
+ "incident": "terraform-prod-destroy-2025",
4
+ "incident_name": "Autonomous Terraform Agent Destroys Production",
5
+ "incident_date": "2025-09-01",
6
+ "owasp_categories": ["A06-Excessive-Autonomy", "A05-Insufficient-Access-Control"],
7
+ "tools": {
8
+ "*": {
9
+ "rate_limit": "30/minute"
10
+ },
11
+ "terraform_apply": {
12
+ "require_approval": true,
13
+ "min_tier": "evidenced"
14
+ },
15
+ "terraform_destroy": {
16
+ "block": true
17
+ },
18
+ "terraform_plan": {
19
+ "rate_limit": "10/minute",
20
+ "min_tier": "signed-known"
21
+ },
22
+ "deploy": {
23
+ "require_approval": true,
24
+ "min_tier": "evidenced"
25
+ },
26
+ "kubectl_apply": {
27
+ "require_approval": true,
28
+ "min_tier": "evidenced"
29
+ },
30
+ "kubectl_delete": {
31
+ "block": true
32
+ },
33
+ "aws_cli": {
34
+ "require_approval": true,
35
+ "rate_limit": "5/minute"
36
+ },
37
+ "delete_resource": {
38
+ "block": true
39
+ },
40
+ "drop_database": {
41
+ "block": true
42
+ },
43
+ "truncate_table": {
44
+ "block": true
45
+ }
46
+ },
47
+ "signing": {
48
+ "enabled": true
49
+ }
50
+ }