protect-mcp 0.7.4 → 0.7.6
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/{chunk-NVJHGXXG.mjs → chunk-6E2DHBAR.mjs} +12 -5
- package/dist/{chunk-36UID5WY.mjs → chunk-JCMDLN5I.mjs} +399 -8
- package/dist/{chunk-LYKNULYU.mjs → chunk-LJQOALYR.mjs} +152 -0
- package/dist/{chunk-KPSICBAJ.mjs → chunk-SETXVE2K.mjs} +2 -2
- package/dist/{chunk-UBZJ3VI2.mjs → chunk-VTPZ4G5I.mjs} +1 -1
- package/dist/{chunk-D2RDY2JR.mjs → chunk-WIPWNWMJ.mjs} +1 -1
- package/dist/{chunk-F2FKQ4XN.mjs → chunk-WV4DKYE4.mjs} +78 -2
- package/dist/cli.js +649 -44
- package/dist/cli.mjs +247 -39
- package/dist/demo-server.js +2 -2
- package/dist/demo-server.mjs +1 -1
- package/dist/{ed25519-DZMMNNVE.mjs → ed25519-BSHMMVNX.mjs} +1 -1
- package/dist/hook-server.js +11 -4
- package/dist/hook-server.mjs +2 -2
- package/dist/{http-transport-4GMMRPW7.mjs → http-transport-JBORN27G.mjs} +3 -3
- package/dist/index.d.mts +46 -12
- package/dist/index.d.ts +46 -12
- package/dist/index.js +1747 -37
- package/dist/index.mjs +1182 -34
- package/dist/{signing-committed-MMLJ6OGG.mjs → signing-committed-QXCW24RF.mjs} +2 -2
- package/package.json +2 -2
- package/policies/agent.cedar +50 -0
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
discloseField,
|
|
4
4
|
signCommittedDecision,
|
|
5
5
|
verifySelectiveDisclosurePackage
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-WV4DKYE4.mjs";
|
|
7
|
+
import "./chunk-LJQOALYR.mjs";
|
|
8
8
|
import "./chunk-D733KAPG.mjs";
|
|
9
9
|
import "./chunk-PQJP2ZCI.mjs";
|
|
10
10
|
export {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "protect-mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"mcpName": "com.scopeblind/protect-mcp",
|
|
5
|
-
"description": "Fail-closed Cedar policy gate + signed receipts for AI agent tool calls.
|
|
5
|
+
"description": "Fail-closed Cedar policy gate + Ed25519 signed receipts for AI agent tool calls. Denies on any policy error, proves the gate is live with a startup self-test, and turns every decision into a local searchable record you own. The open gate behind Legate by ScopeBlind. scopeblind.com",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"module": "dist/index.mjs",
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Generated by protect-mcp init-hooks
|
|
2
|
+
// Customize these policies to match your security requirements.
|
|
3
|
+
// Cedar deny decisions are AUTHORITATIVE — they cannot be overridden.
|
|
4
|
+
|
|
5
|
+
// Allow all read-only tools by default
|
|
6
|
+
permit(
|
|
7
|
+
principal,
|
|
8
|
+
action == Action::"MCP::Tool::call",
|
|
9
|
+
resource == Tool::"Read"
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
permit(
|
|
13
|
+
principal,
|
|
14
|
+
action == Action::"MCP::Tool::call",
|
|
15
|
+
resource == Tool::"Glob"
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
permit(
|
|
19
|
+
principal,
|
|
20
|
+
action == Action::"MCP::Tool::call",
|
|
21
|
+
resource == Tool::"Grep"
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
// Allow write/edit tools (remove these to require explicit approval)
|
|
25
|
+
permit(
|
|
26
|
+
principal,
|
|
27
|
+
action == Action::"MCP::Tool::call",
|
|
28
|
+
resource == Tool::"Write"
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
permit(
|
|
32
|
+
principal,
|
|
33
|
+
action == Action::"MCP::Tool::call",
|
|
34
|
+
resource == Tool::"Edit"
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
// Allow Bash with caution (Cedar evaluates before hook patterns)
|
|
38
|
+
permit(
|
|
39
|
+
principal,
|
|
40
|
+
action == Action::"MCP::Tool::call",
|
|
41
|
+
resource == Tool::"Bash"
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
// Block dangerous tools entirely
|
|
45
|
+
// Uncomment any of these to block specific tools:
|
|
46
|
+
// forbid(
|
|
47
|
+
// principal,
|
|
48
|
+
// action == Action::"MCP::Tool::call",
|
|
49
|
+
// resource == Tool::"delete_file"
|
|
50
|
+
// );
|