protect-mcp 0.4.2 → 0.4.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/README.md +1 -1
- package/dist/{chunk-7HBHIKLN.mjs → chunk-VF3OCG4D.mjs} +422 -9
- package/dist/{chunk-VWUN6AI6.mjs → chunk-VIA2B65K.mjs} +1 -1
- package/dist/cli.js +690 -93
- package/dist/cli.mjs +183 -7
- package/dist/{http-transport-RIVV2RVQ.mjs → http-transport-VLIPOPIC.mjs} +1 -1
- package/dist/index.d.mts +1429 -2
- package/dist/index.d.ts +1429 -2
- package/dist/index.js +1728 -25
- package/dist/index.mjs +1273 -3
- package/package.json +4 -3
- package/policies/cedar/clinejection.cedar +50 -0
- package/policies/cedar/terraform-destroy.cedar +44 -0
- package/policies/clinejection.json +6 -0
- package/policies/data-exfiltration.json +6 -0
- package/policies/financial-safe.json +8 -0
- package/policies/github-mcp-hijack.json +6 -0
- package/policies/terraform-destroy.json +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "protect-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"mcpName": "io.github.tomjwxf/protect-mcp",
|
|
5
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.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,15 +53,16 @@
|
|
|
53
53
|
"homepage": "https://www.scopeblind.com",
|
|
54
54
|
"repository": {
|
|
55
55
|
"type": "git",
|
|
56
|
-
"url": "git+https://github.com/
|
|
56
|
+
"url": "git+https://github.com/scopeblind/scopeblind-gateway.git"
|
|
57
57
|
},
|
|
58
58
|
"bugs": {
|
|
59
|
-
"url": "https://github.com/
|
|
59
|
+
"url": "https://github.com/scopeblind/scopeblind-gateway/issues"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@veritasacta/protocol": "^0.1.0"
|
|
63
63
|
},
|
|
64
64
|
"optionalDependencies": {
|
|
65
|
+
"@cedar-policy/cedar-wasm": "^4.9.1",
|
|
65
66
|
"@noble/curves": "^1.8.0",
|
|
66
67
|
"@noble/hashes": "^1.7.0"
|
|
67
68
|
},
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Clinejection Protection — Cedar Edition
|
|
3
|
+
//
|
|
4
|
+
// CVE-2025-6514: Clinejection MCP OAuth Proxy Hijack
|
|
5
|
+
// A prompt injection in a GitHub issue title caused an AI agent
|
|
6
|
+
// to publish backdoored npm packages. 437,000+ developer
|
|
7
|
+
// environments compromised in 8 hours.
|
|
8
|
+
//
|
|
9
|
+
// Controls: SOC2-CC6.1, SOC2-CC6.8, SOC2-CC7.2, SOC2-CC8.1
|
|
10
|
+
// EU-AI-Art.9, EU-AI-Art.12, EU-AI-Art.14
|
|
11
|
+
// OWASP-A01, OWASP-A03
|
|
12
|
+
// MCP-01, MCP-03, MCP-04
|
|
13
|
+
// NIST-GOVERN-1.1, NIST-MAP-3.1, NIST-MEASURE-2.1
|
|
14
|
+
// ============================================================
|
|
15
|
+
|
|
16
|
+
// Block all shell execution tools
|
|
17
|
+
@id("sb-clinejection-001")
|
|
18
|
+
forbid (
|
|
19
|
+
principal,
|
|
20
|
+
action == Action::"MCP::Tool::call",
|
|
21
|
+
resource == Tool::"execute_command"
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
@id("sb-clinejection-002")
|
|
25
|
+
forbid (
|
|
26
|
+
principal,
|
|
27
|
+
action == Action::"MCP::Tool::call",
|
|
28
|
+
resource == Tool::"run_command"
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
@id("sb-clinejection-003")
|
|
32
|
+
forbid (
|
|
33
|
+
principal,
|
|
34
|
+
action == Action::"MCP::Tool::call",
|
|
35
|
+
resource == Tool::"shell"
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
@id("sb-clinejection-004")
|
|
39
|
+
forbid (
|
|
40
|
+
principal,
|
|
41
|
+
action == Action::"MCP::Tool::call",
|
|
42
|
+
resource == Tool::"bash"
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
@id("sb-clinejection-005")
|
|
46
|
+
forbid (
|
|
47
|
+
principal,
|
|
48
|
+
action == Action::"MCP::Tool::call",
|
|
49
|
+
resource == Tool::"terminal"
|
|
50
|
+
);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Terraform Destroy Protection — Cedar Edition
|
|
3
|
+
//
|
|
4
|
+
// CVE-2026-XXXX: AI Agent Terraform Destroy Incident
|
|
5
|
+
// An AI agent unpacked old Terraform configs and ran
|
|
6
|
+
// terraform destroy, wiping a production VPC, RDS database
|
|
7
|
+
// and ECS cluster.
|
|
8
|
+
//
|
|
9
|
+
// Controls: SOC2-CC6.1, SOC2-CC6.6, SOC2-CC8.1
|
|
10
|
+
// EU-AI-Art.9, EU-AI-Art.14
|
|
11
|
+
// OWASP-A06, OWASP-A09
|
|
12
|
+
// MCP-02, MCP-06
|
|
13
|
+
// NIST-GOVERN-1.2, NIST-MAP-3.1
|
|
14
|
+
// ============================================================
|
|
15
|
+
|
|
16
|
+
// Block bash/shell (primary vector for terraform commands)
|
|
17
|
+
@id("sb-terraform-001")
|
|
18
|
+
forbid (
|
|
19
|
+
principal,
|
|
20
|
+
action == Action::"MCP::Tool::call",
|
|
21
|
+
resource == Tool::"bash"
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
@id("sb-terraform-002")
|
|
25
|
+
forbid (
|
|
26
|
+
principal,
|
|
27
|
+
action == Action::"MCP::Tool::call",
|
|
28
|
+
resource == Tool::"execute_command"
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
@id("sb-terraform-003")
|
|
32
|
+
forbid (
|
|
33
|
+
principal,
|
|
34
|
+
action == Action::"MCP::Tool::call",
|
|
35
|
+
resource == Tool::"run_command"
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Block destructive file operations
|
|
39
|
+
@id("sb-terraform-004")
|
|
40
|
+
forbid (
|
|
41
|
+
principal,
|
|
42
|
+
action == Action::"MCP::Tool::call",
|
|
43
|
+
resource == Tool::"delete_file"
|
|
44
|
+
);
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
"incident_name": "Clinejection MCP OAuth Proxy Hijack",
|
|
5
5
|
"incident_date": "2025-07-15",
|
|
6
6
|
"owasp_categories": ["A01-Prompt-Injection", "A03-Supply-Chain"],
|
|
7
|
+
"controls": {
|
|
8
|
+
"soc2": ["CC6.1", "CC6.8", "CC7.2", "CC8.1"],
|
|
9
|
+
"eu_ai_act": ["Art.9", "Art.12", "Art.14"],
|
|
10
|
+
"owasp_mcp": ["MCP-01", "MCP-03", "MCP-04"],
|
|
11
|
+
"nist_ai_rmf": ["GOVERN-1.1", "MAP-3.1", "MEASURE-2.1"]
|
|
12
|
+
},
|
|
7
13
|
"tools": {
|
|
8
14
|
"*": {
|
|
9
15
|
"rate_limit": "30/minute"
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
"incident": "agent-data-exfiltration-pattern",
|
|
4
4
|
"incident_name": "AI Agent Data Exfiltration via Tool Abuse",
|
|
5
5
|
"owasp_categories": ["A02-Sensitive-Data-Exposure", "A04-Tool-Call-Injection"],
|
|
6
|
+
"controls": {
|
|
7
|
+
"soc2": ["CC6.1", "CC6.3", "CC6.6", "CC7.1", "CC7.2"],
|
|
8
|
+
"eu_ai_act": ["Art.9", "Art.12", "Art.13"],
|
|
9
|
+
"owasp_mcp": ["MCP-02", "MCP-04", "MCP-08", "MCP-09"],
|
|
10
|
+
"nist_ai_rmf": ["GOVERN-1.1", "MAP-3.1", "MEASURE-2.1"]
|
|
11
|
+
},
|
|
6
12
|
"tools": {
|
|
7
13
|
"*": {
|
|
8
14
|
"rate_limit": "60/minute"
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
"incident": "agent-unauthorized-transaction-pattern",
|
|
4
4
|
"incident_name": "Unauthorized Financial Transaction via AI Agent",
|
|
5
5
|
"owasp_categories": ["A05-Insufficient-Access-Control", "A06-Excessive-Autonomy"],
|
|
6
|
+
"controls": {
|
|
7
|
+
"soc2": ["CC6.1", "CC6.2", "CC6.3", "CC6.6", "CC6.8", "CC7.1", "CC7.2", "CC8.1"],
|
|
8
|
+
"eu_ai_act": ["Art.9", "Art.12", "Art.13", "Art.14", "Art.15"],
|
|
9
|
+
"owasp_mcp": ["MCP-03", "MCP-07", "MCP-08", "MCP-09"],
|
|
10
|
+
"nist_ai_rmf": ["GOVERN-1.1", "GOVERN-6.1", "MAP-3.1", "MEASURE-2.1", "MANAGE-2.1"],
|
|
11
|
+
"pci_dss": ["Req-7", "Req-10"],
|
|
12
|
+
"iso_27001": ["A.9.2", "A.12.4"]
|
|
13
|
+
},
|
|
6
14
|
"tools": {
|
|
7
15
|
"*": {
|
|
8
16
|
"rate_limit": "30/minute",
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
"incident_name": "GitHub MCP Server Prompt Injection via Crafted Issue",
|
|
5
5
|
"incident_date": "2025-08-20",
|
|
6
6
|
"owasp_categories": ["A01-Prompt-Injection", "A02-Sensitive-Data-Exposure", "A03-Supply-Chain"],
|
|
7
|
+
"controls": {
|
|
8
|
+
"soc2": ["CC6.1", "CC6.3", "CC6.6", "CC7.1", "CC7.2"],
|
|
9
|
+
"eu_ai_act": ["Art.9", "Art.12", "Art.13", "Art.14"],
|
|
10
|
+
"owasp_mcp": ["MCP-01", "MCP-02", "MCP-04", "MCP-08"],
|
|
11
|
+
"nist_ai_rmf": ["GOVERN-1.1", "MAP-3.1", "MEASURE-2.1", "MANAGE-2.1"]
|
|
12
|
+
},
|
|
7
13
|
"tools": {
|
|
8
14
|
"*": {
|
|
9
15
|
"rate_limit": "30/minute"
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
"incident_name": "Autonomous Terraform Agent Destroys Production",
|
|
5
5
|
"incident_date": "2025-09-01",
|
|
6
6
|
"owasp_categories": ["A06-Excessive-Autonomy", "A05-Insufficient-Access-Control"],
|
|
7
|
+
"controls": {
|
|
8
|
+
"soc2": ["CC6.1", "CC6.6", "CC6.8", "CC7.2", "CC8.1"],
|
|
9
|
+
"eu_ai_act": ["Art.9", "Art.12", "Art.14", "Art.15"],
|
|
10
|
+
"owasp_mcp": ["MCP-03", "MCP-07", "MCP-09"],
|
|
11
|
+
"nist_ai_rmf": ["GOVERN-1.1", "GOVERN-6.1", "MAP-3.1", "MANAGE-2.1"]
|
|
12
|
+
},
|
|
7
13
|
"tools": {
|
|
8
14
|
"*": {
|
|
9
15
|
"rate_limit": "30/minute"
|