@exorcist-98/cli 0.1.0 → 0.1.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.
@@ -0,0 +1,311 @@
1
+ # Capability rules for the lethal-trifecta check (EX-023, The Haunted House Map).
2
+ #
3
+ # An agent session is dangerous when it combines three powers:
4
+ # private-data the Vault of Secrets: files outside the project, email,
5
+ # databases, password managers, cloud consoles
6
+ # untrusted-input the Open Door: web pages, search results, issues and pull
7
+ # requests, an email inbox, chat
8
+ # exfiltration the Escape Tunnel: HTTP requests to any host, sending
9
+ # email or messages, creating gists, issues or comments,
10
+ # uploads
11
+ #
12
+ # Each rule labels an MCP server (by its package, image, script or URL), a
13
+ # tool (by name or description, from the Shield's pin file or an auto-approve
14
+ # list) or a built-in agent ability (a Claude Code `permissions.allow` entry)
15
+ # with one capability. Matching is case-insensitive.
16
+ #
17
+ # match.package regex tested against each name the server is known by:
18
+ # the package a runner (npx, uvx, bunx, pnpm dlx...) runs,
19
+ # a docker image, a script path, a command, or a remote
20
+ # URL's host and path. Versions are removed first.
21
+ # match.exclude regex: a name that also matches this is skipped
22
+ # (documentation servers, validators).
23
+ # match.path_scope outside-project: the package match counts only when one
24
+ # of the server's path arguments is outside the project
25
+ # (/, ~, a home folder, ~/.ssh, /etc, ../...). A server
26
+ # limited to "." or ${workspaceFolder} is not private data.
27
+ # match.tool regex tested against tool names
28
+ # match.description regex tested against tool descriptions
29
+ # match.ability regex tested against a built-in ability. With
30
+ # path_scope, group 1 is the path to check.
31
+ #
32
+ # Every rule has examples; a test runs each one (expect: true must match,
33
+ # expect: false must not). Tokens are delimited with (?<![a-z0-9]) and
34
+ # (?![a-z0-9]) so that "gmail" matches "server-gmail-autoauth-mcp" but
35
+ # "mail" does not match "mailchimp".
36
+ version: 1
37
+ rules:
38
+ # ── Vault of Secrets (private-data) ───────────────────────────────────────
39
+ - id: CAP-001
40
+ capability: private-data
41
+ label: reads files outside the project
42
+ match:
43
+ package: '^(?:@modelcontextprotocol/server-filesystem|mcp-server-filesystem|mcp/filesystem|@agent-infra/mcp-server-filesystem|@cyanheads/filesystem-mcp-server|filesystem-mcp|mcp-filesystem-server|@shtse8/filesystem-mcp)$'
44
+ path_scope: outside-project
45
+ examples:
46
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-filesystem@2025.1.14", "/"], expect: true }
47
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-filesystem", "~/.ssh"], expect: true }
48
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-filesystem", "/Users/alice"], expect: true }
49
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-filesystem", "../.."], expect: true }
50
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-filesystem", "."], expect: false, note: "limited to the project" }
51
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}"], expect: false }
52
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-filesystem", "./src", "./docs"], expect: false }
53
+
54
+ - id: CAP-002
55
+ capability: private-data
56
+ label: reads your email
57
+ match:
58
+ package: '(?<![a-z0-9])(?:gmail|googlemail|outlook|imap|e-?mail|inbox|mailbox|protonmail|fastmail|icloud-mail)(?![a-z0-9])'
59
+ exclude: '(?<![a-z0-9])(?:valid(?:ate|ator|ation)?|verif(?:y|ier)|template|templates|marketing|newsletter|campaigns?)(?![a-z0-9])'
60
+ tool: '^(?:read_email|read_emails|search_emails|list_emails|get_email|get_emails|read_inbox|list_inbox|get_thread|gmail_read|gmail_search)$'
61
+ examples:
62
+ - { command: npx, args: ["@gongrzhe/server-gmail-autoauth-mcp@1.1.1"], expect: true }
63
+ - { command: uvx, args: ["mcp-email-server"], expect: true }
64
+ - { command: node, args: ["server.js"], tools: [{ name: search_emails }], expect: true }
65
+ - { command: npx, args: ["email-validator-mcp"], expect: false, note: "checks addresses, reads no mail" }
66
+ - { command: npx, args: ["@mailchimp/mcp"], expect: false }
67
+
68
+ - id: CAP-003
69
+ capability: private-data
70
+ label: reads a database
71
+ match:
72
+ package: '(?<![a-z0-9])(?:postgres|postgresql|pg|mysql|mariadb|sqlite|mongodb|mongo|redis|supabase|neon|planetscale|bigquery|snowflake|clickhouse|dynamodb|mssql|sqlserver|duckdb|cockroachdb|firestore|airtable)(?![a-z0-9])'
73
+ exclude: '(?<![a-z0-9])(?:docs?|documentation)(?![a-z0-9])'
74
+ tool: '^(?:query|sql|execute_sql|run_sql|sql_query|execute_query|run_query|read_query|write_query|list_tables|describe_table|find_documents|mongo_find)$'
75
+ examples:
76
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/app"], expect: true }
77
+ - { command: uvx, args: ["mcp-server-sqlite", "--db-path", "data.db"], expect: true }
78
+ - { command: docker, args: ["run", "-i", "--rm", "mcp/postgres", "postgresql://db/app"], expect: true }
79
+ - { url: "https://mcp.supabase.com/mcp", expect: true }
80
+ - { command: node, args: ["dist/index.js"], tools: [{ name: execute_sql }], expect: true }
81
+ - { command: npx, args: ["@upstash/context7-mcp"], expect: false }
82
+
83
+ - id: CAP-004
84
+ capability: private-data
85
+ label: opens a password manager or secret store
86
+ match:
87
+ package: '(?<![a-z0-9])(?:1password|onepassword|op-mcp|bitwarden|lastpass|keepass|keepassxc|dashlane|keeper|hashicorp-vault|vault-mcp|mcp-vault|infisical|doppler|secrets?-manager|keychain)(?![a-z0-9])'
88
+ tool: '^(?:get|read|list|reveal|fetch|retrieve)_(?:secrets?|passwords?|credentials?|logins?|vault_items?)$'
89
+ examples:
90
+ - { command: npx, args: ["-y", "@bitwarden/mcp-server"], expect: true }
91
+ - { command: uvx, args: ["awslabs.secrets-manager-mcp-server"], expect: true }
92
+ - { command: node, args: ["index.js"], tools: [{ name: get_secret }], expect: true }
93
+ - { command: npx, args: ["@modelcontextprotocol/server-memory"], expect: false }
94
+
95
+ - id: CAP-005
96
+ capability: private-data
97
+ label: controls a cloud account
98
+ match:
99
+ package: '(?<![a-z0-9])(?:aws|awslabs|gcloud|google-cloud|gcp|azure|kubernetes|k8s|kubectl|cloudflare|terraform)(?![a-z0-9])'
100
+ exclude: '(?<![a-z0-9])(?:docs?|documentation|knowledge|pricing|diagrams?|learn)(?![a-z0-9])'
101
+ examples:
102
+ - { command: uvx, args: ["awslabs.ccapi-mcp-server@latest"], expect: true }
103
+ - { command: npx, args: ["-y", "@azure/mcp@latest", "server", "start"], expect: true }
104
+ - { command: npx, args: ["mcp-server-kubernetes"], expect: true }
105
+ - { command: uvx, args: ["awslabs.aws-documentation-mcp-server@latest"], expect: false, note: "reads public docs only" }
106
+ - { url: "https://docs.mcp.cloudflare.com/sse", expect: false }
107
+
108
+ - id: CAP-006
109
+ capability: private-data
110
+ label: reads your documents, notes or calendar
111
+ match:
112
+ package: '(?<![a-z0-9])(?:gdrive|google-?drive|google-?docs|google-?calendar|gcal|notion|dropbox|onedrive|sharepoint|box-mcp|obsidian|evernote|confluence)(?![a-z0-9])'
113
+ examples:
114
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-gdrive"], expect: true }
115
+ - { url: "https://mcp.notion.com/mcp", expect: true }
116
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-everything"], expect: false }
117
+
118
+ - id: CAP-007
119
+ capability: private-data
120
+ label: runs shell commands, so it can read any file
121
+ match:
122
+ package: '(?<![a-z0-9])(?:desktop-commander|mcp-server-commands|server-commands|mcp-shell|shell-mcp|mcp-shell-server|shell-server|terminal-mcp|mcp-terminal|iterm-mcp|cli-mcp-server|tmux-mcp|ssh-mcp|mcp-ssh|mcp-server-ssh|win-cli-mcp-server)(?![a-z0-9])'
123
+ tool: '^(?:run_command|execute_command|exec_command|shell|bash|run_shell|shell_exec|run_terminal_cmd|terminal_execute|execute_shell_command|start_process)$'
124
+ examples:
125
+ - { command: npx, args: ["-y", "@wonderwhy-er/desktop-commander"], expect: true }
126
+ - { command: uvx, args: ["mcp-shell-server"], expect: true }
127
+ - { command: node, args: ["build/index.js"], tools: [{ name: run_command }], expect: true }
128
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-sequential-thinking"], expect: false }
129
+
130
+ # ── Open Door (untrusted-input) ───────────────────────────────────────────
131
+ - id: CAP-010
132
+ capability: untrusted-input
133
+ label: reads web pages
134
+ match:
135
+ package: '(?<![a-z0-9])(?:fetch|mcp-server-fetch|web-?fetch|puppeteer|playwright|browser|browserbase|browser-use|browser-tools|firecrawl|crawl4ai|crawler|scraper|jina-reader|url-reader|webpage-reader|hyperbrowser|chrome-devtools|stagehand)(?![a-z0-9])'
136
+ tool: '^(?:fetch|fetch_url|fetch_html|fetch_markdown|fetch_txt|web_fetch|browse|navigate|browser_navigate|puppeteer_navigate|playwright_navigate|scrape|scrape_url|firecrawl_scrape|crawl|read_url|get_webpage|open_url)$'
137
+ description: '\b(?:fetch(?:es)?|retriev(?:e|es)|download(?:s)?|read(?:s)?|load(?:s)?)\s+(?:the\s+)?(?:contents?\s+of\s+)?(?:a|any|the)\s+(?:url|web\s?page|website)\b'
138
+ examples:
139
+ - { command: uvx, args: ["mcp-server-fetch"], expect: true }
140
+ - { command: npx, args: ["@playwright/mcp@latest"], expect: true }
141
+ - { command: npx, args: ["-y", "firecrawl-mcp"], expect: true }
142
+ - { command: node, args: ["s.js"], tools: [{ name: get, description: "Fetches the contents of a URL and returns it as markdown." }], expect: true }
143
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-memory"], expect: false }
144
+
145
+ - id: CAP-011
146
+ capability: untrusted-input
147
+ label: reads web search results
148
+ match:
149
+ package: '(?<![a-z0-9])(?:brave-search|tavily|tavily-mcp|exa|exa-mcp-server|perplexity|serper|serpapi|google-search|bing-search|duckduckgo|duckduckgo-mcp-server|kagi|searxng|web-search|websearch|search1api)(?![a-z0-9])'
150
+ tool: '^(?:web_search|search_web|brave_web_search|tavily_search|google_search|search_internet|internet_search|duckduckgo_search|perplexity_ask)$'
151
+ examples:
152
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-brave-search"], expect: true }
153
+ - { command: npx, args: ["-y", "tavily-mcp@0.1.4"], expect: true }
154
+ - { command: node, args: ["index.js"], tools: [{ name: web_search }], expect: true }
155
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-sequential-thinking"], expect: false }
156
+
157
+ - id: CAP-012
158
+ capability: untrusted-input
159
+ label: reads issues and pull requests written by anyone
160
+ match:
161
+ package: '(?<![a-z0-9])(?:github|githubcopilot|gitlab|bitbucket|gitea|forgejo|linear|jira|atlassian|youtrack)(?![a-z0-9])'
162
+ exclude: '(?<![a-z0-9])(?:docs?|documentation)(?![a-z0-9])'
163
+ tool: '^(?:get_issue|list_issues|search_issues|get_issue_comments|get_pull_request|list_pull_requests|get_pull_request_comments|get_pull_request_reviews|search_code|get_discussion|list_discussions)$'
164
+ examples:
165
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-github"], expect: true }
166
+ - { command: docker, args: ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"], expect: true }
167
+ - { url: "https://api.githubcopilot.com/mcp/", expect: true }
168
+ - { command: uvx, args: ["mcp-server-git", "--repository", "."], expect: false, note: "a local git repository" }
169
+
170
+ - id: CAP-013
171
+ capability: untrusted-input
172
+ label: reads chat messages or an email inbox
173
+ match:
174
+ package: '(?<![a-z0-9])(?:slack|discord|telegram|whatsapp|ms-teams|microsoft-teams|teams-mcp|mattermost|rocketchat|zulip|intercom|gmail|googlemail|outlook|imap|e-?mail|inbox|mailbox|protonmail|fastmail)(?![a-z0-9])'
175
+ exclude: '(?<![a-z0-9])(?:valid(?:ate|ator|ation)?|verif(?:y|ier)|template|templates|marketing|newsletter|campaigns?)(?![a-z0-9])'
176
+ tool: '^(?:read_email|read_emails|search_emails|list_emails|get_email|read_inbox|get_messages|read_messages|list_messages|get_channel_history|slack_get_channel_history|slack_get_thread_replies|conversations_history|read_channel)$'
177
+ examples:
178
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-slack"], expect: true }
179
+ - { command: npx, args: ["@gongrzhe/server-gmail-autoauth-mcp"], expect: true }
180
+ - { command: node, args: ["bot.js"], tools: [{ name: read_messages }], expect: true }
181
+ - { command: npx, args: ["email-validator-mcp"], expect: false }
182
+
183
+ - id: CAP-014
184
+ capability: untrusted-input
185
+ label: reads social media, feeds or videos
186
+ match:
187
+ package: '(?<![a-z0-9])(?:reddit|twitter|bluesky|mastodon|youtube|youtube-transcript|rss|hackernews|hacker-news|hn-mcp)(?![a-z0-9])'
188
+ examples:
189
+ - { command: npx, args: ["-y", "@kimtaeyoon83/mcp-server-youtube-transcript"], expect: true }
190
+ - { command: uvx, args: ["mcp-server-reddit"], expect: true }
191
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-everything"], expect: false }
192
+
193
+ # ── Escape Tunnel (exfiltration) ──────────────────────────────────────────
194
+ - id: CAP-020
195
+ capability: exfiltration
196
+ label: makes web requests to any address
197
+ match:
198
+ package: '(?<![a-z0-9])(?:fetch|mcp-server-fetch|web-?fetch|puppeteer|playwright|browser|browserbase|browser-use|firecrawl|crawl4ai|crawler|scraper|jina-reader|url-reader|hyperbrowser|chrome-devtools|stagehand|http-request|http-client|curl|webhook|webhooks|postman|n8n|zapier)(?![a-z0-9])'
199
+ tool: '^(?:fetch|fetch_url|http_request|http_get|http_post|post_request|send_request|make_request|webhook|call_webhook|trigger_webhook|curl|browser_navigate|navigate|puppeteer_navigate|playwright_navigate|open_url|scrape_url|firecrawl_scrape)$'
200
+ description: '\b(?:sends?|makes?|performs?)\s+(?:an?\s+)?(?:arbitrary\s+)?(?:http|https|web|post)\s+requests?\b'
201
+ examples:
202
+ - { command: uvx, args: ["mcp-server-fetch"], expect: true }
203
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-puppeteer"], expect: true }
204
+ - { command: node, args: ["x.js"], tools: [{ name: http_post }], expect: true }
205
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-brave-search"], expect: false, note: "searches one engine, cannot reach any address" }
206
+
207
+ - id: CAP-021
208
+ capability: exfiltration
209
+ label: sends email or messages
210
+ match:
211
+ package: '(?<![a-z0-9])(?:slack|discord|telegram|whatsapp|ms-teams|microsoft-teams|teams-mcp|mattermost|rocketchat|zulip|twilio|sms|gmail|googlemail|outlook|smtp|e-?mail|protonmail|fastmail|resend|sendgrid|mailgun|postmark|amazon-ses|aws-ses)(?![a-z0-9])'
212
+ exclude: '(?<![a-z0-9])(?:valid(?:ate|ator|ation)?|verif(?:y|ier)|template|templates)(?![a-z0-9])'
213
+ tool: '^(?:send_email|send_mail|send_message|post_message|reply_email|reply_to_email|forward_email|slack_post_message|slack_reply_to_thread|chat_post_message|send_sms|send_dm|send_direct_message|send_telegram_message|discord_send)$'
214
+ examples:
215
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-slack"], expect: true }
216
+ - { command: npx, args: ["-y", "resend-mcp"], expect: true }
217
+ - { command: node, args: ["mail.js"], tools: [{ name: send_email }], expect: true }
218
+ - { command: npx, args: ["email-validator-mcp"], expect: false }
219
+
220
+ - id: CAP-022
221
+ capability: exfiltration
222
+ label: posts issues, comments, gists or pull requests
223
+ match:
224
+ package: '(?<![a-z0-9])(?:github|githubcopilot|gitlab|bitbucket|gitea|forgejo|linear|jira|atlassian|youtrack)(?![a-z0-9])'
225
+ exclude: '(?<![a-z0-9])(?:docs?|documentation)(?![a-z0-9])'
226
+ tool: '^(?:create_issue|update_issue|create_gist|create_pull_request|add_issue_comment|create_comment|add_comment|create_or_update_file|push_files|create_repository|create_pull_request_review|create_release)$'
227
+ examples:
228
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-github"], expect: true }
229
+ - { url: "https://mcp.linear.app/sse", expect: true }
230
+ - { command: node, args: ["gh.js"], tools: [{ name: create_gist }], expect: true }
231
+ - { command: uvx, args: ["mcp-server-git", "--repository", "."], expect: false }
232
+
233
+ - id: CAP-023
234
+ capability: exfiltration
235
+ label: uploads files or opens remote connections
236
+ match:
237
+ package: '(?<![a-z0-9])(?:s3-upload|upload|uploader|pastebin|imgur|transfer-sh|ftp|sftp|scp|rsync|ssh-mcp|mcp-ssh|mcp-server-ssh)(?![a-z0-9])'
238
+ tool: '^(?:upload|upload_file|upload_files|put_object|share_file|create_share_link|create_public_link|ftp_put|sftp_upload|scp_upload|paste)$'
239
+ examples:
240
+ - { command: npx, args: ["-y", "mcp-server-ssh"], expect: true }
241
+ - { command: node, args: ["s3.js"], tools: [{ name: put_object }], expect: true }
242
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-memory"], expect: false }
243
+
244
+ - id: CAP-024
245
+ capability: exfiltration
246
+ label: runs shell commands, so it can send data anywhere
247
+ match:
248
+ package: '(?<![a-z0-9])(?:desktop-commander|mcp-server-commands|server-commands|mcp-shell|shell-mcp|mcp-shell-server|shell-server|terminal-mcp|mcp-terminal|iterm-mcp|cli-mcp-server|tmux-mcp|win-cli-mcp-server)(?![a-z0-9])'
249
+ tool: '^(?:run_command|execute_command|exec_command|shell|bash|run_shell|shell_exec|run_terminal_cmd|terminal_execute|execute_shell_command|start_process)$'
250
+ examples:
251
+ - { command: npx, args: ["-y", "@wonderwhy-er/desktop-commander"], expect: true }
252
+ - { command: node, args: ["build/index.js"], tools: [{ name: execute_command }], expect: true }
253
+ - { command: npx, args: ["-y", "@modelcontextprotocol/server-sequential-thinking"], expect: false }
254
+
255
+ # ── Built-in agent abilities (Claude Code permissions.allow) ──────────────
256
+ - id: CAP-030
257
+ capability: untrusted-input
258
+ label: built-in web fetch or search, allowed without asking
259
+ match:
260
+ ability: '^(?:WebFetch|WebSearch)(?:\(.*\))?$'
261
+ examples:
262
+ - { ability: "WebFetch", expect: true }
263
+ - { ability: "WebSearch", expect: true }
264
+ - { ability: "WebFetch(domain:docs.example.invalid)", expect: true }
265
+ - { ability: "Bash(npm test:*)", expect: false }
266
+
267
+ - id: CAP-031
268
+ capability: exfiltration
269
+ label: built-in web fetch to any address, allowed without asking
270
+ match:
271
+ ability: '^WebFetch(?:\((?:domain:\*)?\))?$'
272
+ examples:
273
+ - { ability: "WebFetch", expect: true }
274
+ - { ability: "WebFetch(domain:*)", expect: true }
275
+ - { ability: "WebFetch(domain:docs.example.invalid)", expect: false, note: "one fixed site" }
276
+
277
+ - id: CAP-032
278
+ capability: exfiltration
279
+ label: built-in shell that can reach the network, allowed without asking
280
+ match:
281
+ ability: '^Bash(?:\((?:\*|(?:curl|wget|nc|ncat|netcat|ssh|scp|sftp|rsync|ftp|telnet|http|https|xh|gh|git push)(?:[: ].*)?)\))?$'
282
+ examples:
283
+ - { ability: "Bash", expect: true }
284
+ - { ability: "Bash(curl:*)", expect: true }
285
+ - { ability: "Bash(git push:*)", expect: true }
286
+ - { ability: "Bash(npm run test:*)", expect: false }
287
+ - { ability: "Bash(git status)", expect: false }
288
+
289
+ - id: CAP-033
290
+ capability: private-data
291
+ label: built-in shell with no limits, allowed without asking
292
+ match:
293
+ ability: '^Bash(?:\(\*\))?$'
294
+ examples:
295
+ - { ability: "Bash", expect: true }
296
+ - { ability: "Bash(*)", expect: true }
297
+ - { ability: "Bash(curl:*)", expect: false }
298
+
299
+ - id: CAP-034
300
+ capability: private-data
301
+ label: built-in file reading outside the project, allowed without asking
302
+ match:
303
+ # Claude Code paths: //abs is absolute, ~/ is home, /x and ./x are in the project.
304
+ ability: '^Read\((.+)\)$'
305
+ path_scope: outside-project
306
+ examples:
307
+ - { ability: "Read(~/**)", expect: true }
308
+ - { ability: "Read(//**)", expect: true }
309
+ - { ability: "Read(~/.ssh/**)", expect: true }
310
+ - { ability: "Read(./src/**)", expect: false }
311
+ - { ability: "Read(/docs/**)", expect: false, note: "project-relative in Claude Code" }