thumbgate 1.30.0 → 1.34.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.
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +54 -16
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/forge/forge.yaml +3 -3
- package/adapters/mcp/server-stdio.js +105 -10
- package/adapters/opencode/opencode.json +1 -1
- package/bench/observability-eval-suite.json +2 -2
- package/bin/cli.js +168 -31
- package/config/evals/generation-quality-golden.json +95 -0
- package/config/evals/rag-answer-quality-golden.json +91 -0
- package/config/evals/retrieval-hybrid-ablation.json +66 -0
- package/config/evals/retrieval-ranking-golden.json +522 -0
- package/config/gates/claim-verifiers.example.json +42 -0
- package/config/gates/claim-verifiers.json +25 -0
- package/config/gates/default.json +217 -50
- package/config/mcp-allowlists.json +233 -206
- package/config/model-tiers.json +7 -2
- package/glama.json +6 -0
- package/hooks/hooks.json +1 -1
- package/package.json +69 -12
- package/public/assets/diagrams/before-after.svg +17 -16
- package/public/assets/diagrams/hero-thumbs.svg +68 -0
- package/public/assets/diagrams/loop.svg +19 -13
- package/public/assets/diagrams/self-improving-thumbs-loop.svg +105 -0
- package/public/compare.html +1 -0
- package/public/dashboard.html +126 -28
- package/public/evaluations.html +1 -1
- package/public/index.html +142 -13
- package/public/numbers.html +3 -2
- package/public/pricing.html +143 -30
- package/scripts/a-plus-evidence-scorecard.js +303 -0
- package/scripts/agent-readiness.js +110 -0
- package/scripts/async-eval-observability.js +36 -11
- package/scripts/audit-trail.js +37 -1
- package/scripts/auto-promote-gates.js +149 -34
- package/scripts/auto-wire-hooks.js +20 -8
- package/scripts/cli-schema.js +14 -0
- package/scripts/colbert-style-maxsim.js +236 -0
- package/scripts/cross-encoder-reranker.js +356 -126
- package/scripts/dashboard-chat.js +350 -17
- package/scripts/document-intake.js +283 -7
- package/scripts/eval-quality-suite.js +204 -0
- package/scripts/feedback-loop.js +115 -7
- package/scripts/feedback-paths.js +32 -13
- package/scripts/feedback-quality.js +53 -0
- package/scripts/feedback-schema.js +3 -0
- package/scripts/file-ledger-lock.js +130 -0
- package/scripts/filesystem-search.js +17 -7
- package/scripts/financial-control-plane.js +1514 -0
- package/scripts/gates-engine.js +202 -7
- package/scripts/gemini-embedding-policy.js +1 -0
- package/scripts/harness-tool-names.js +70 -0
- package/scripts/hook-runtime.js +15 -3
- package/scripts/hook-stop-anti-claim.js +63 -3
- package/scripts/human-escalation.js +353 -41
- package/scripts/lesson-db.js +16 -5
- package/scripts/lesson-embedding-index.js +67 -20
- package/scripts/lesson-embedding-maintenance.js +177 -0
- package/scripts/lesson-reranker.js +55 -9
- package/scripts/lesson-retrieval.js +305 -29
- package/scripts/lesson-search.js +22 -8
- package/scripts/llm-client.js +304 -15
- package/scripts/model-tier-router.js +593 -0
- package/scripts/pragmatic-hybrid-search.js +379 -0
- package/scripts/provider-action-normalizer.js +11 -4
- package/scripts/rag-document-pipeline.js +461 -0
- package/scripts/rag-structured-output.js +441 -0
- package/scripts/ragas-style-metrics.js +351 -0
- package/scripts/request-envelope.js +178 -0
- package/scripts/rerank-pipeline.js +370 -0
- package/scripts/rerank-quality-eval.js +155 -0
- package/scripts/retrieval-hybrid-ablation.js +120 -0
- package/scripts/retrieval-quality-tier.js +118 -0
- package/scripts/secret-scanner.js +395 -4
- package/scripts/self-distill-agent.js +7 -1
- package/scripts/self-healing-check.js +25 -0
- package/scripts/skill-packs.js +183 -0
- package/scripts/slow-loop.js +72 -0
- package/scripts/statusline-links.js +1 -1
- package/scripts/statusline.sh +8 -1
- package/scripts/telemetry-analytics.js +13 -1
- package/scripts/thumbgate-search.js +98 -6
- package/scripts/tier-budget-guard.js +186 -0
- package/scripts/tool-registry.js +141 -5
- package/scripts/universal-claim-evaluator.js +767 -0
- package/scripts/vector-store.js +154 -17
- package/scripts/verify-marketing-pages-deployed.js +85 -3
- package/scripts/workflow-sentinel.js +77 -11
- package/server.json +44 -0
- package/smithery.yaml +17 -0
- package/src/api/server.js +196 -13
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
"layer": "Identity",
|
|
7
7
|
"pattern": "^(git\\s+(add|commit|push|tag)|gh\\s+pr\\s+|gh\\s+release\\s+create|npm\\s+publish|yarn\\s+publish|pnpm\\s+publish)",
|
|
8
8
|
"action": "block",
|
|
9
|
-
"when": {
|
|
9
|
+
"when": {
|
|
10
|
+
"constraints": {
|
|
11
|
+
"local_only": true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
10
14
|
"message": "User requested local-only work. Git writes, PR operations, and release actions are blocked.",
|
|
11
15
|
"severity": "critical"
|
|
12
16
|
},
|
|
13
17
|
{
|
|
14
18
|
"id": "raw-gh-auto-merge-blocked",
|
|
15
19
|
"layer": "Execution",
|
|
16
|
-
"toolNames": [
|
|
20
|
+
"toolNames": [
|
|
21
|
+
"Bash"
|
|
22
|
+
],
|
|
17
23
|
"pattern": "gh\\s+pr\\s+merge\\b[^\\n]*--auto",
|
|
18
24
|
"action": "block",
|
|
19
25
|
"message": "Raw GitHub auto-merge is blocked. Use npm run pr:manage after all critical quality checks have terminal success.",
|
|
@@ -22,7 +28,9 @@
|
|
|
22
28
|
{
|
|
23
29
|
"id": "task-scope-required",
|
|
24
30
|
"layer": "Decisions",
|
|
25
|
-
"toolNames": [
|
|
31
|
+
"toolNames": [
|
|
32
|
+
"Bash"
|
|
33
|
+
],
|
|
26
34
|
"pattern": "^(git\\s+(add|commit|push)|gh\\s+pr\\s+(create|merge)|gh\\s+api\\b(?=.*(?:/pulls\\b|repos/[^\\s]+/[^\\s]+/pulls\\b))(?=.*(?:-f\\b|--field\\b|-F\\b|--raw-field\\b|--method\\s+POST\\b|-X\\s+POST\\b))|gh\\s+release\\s+create|git\\s+tag\\b|npm\\s+publish|yarn\\s+publish|pnpm\\s+publish)",
|
|
27
35
|
"requireTaskScope": true,
|
|
28
36
|
"action": "block",
|
|
@@ -32,7 +40,11 @@
|
|
|
32
40
|
{
|
|
33
41
|
"id": "task-scope-edit-boundary",
|
|
34
42
|
"layer": "Decisions",
|
|
35
|
-
"toolNames": [
|
|
43
|
+
"toolNames": [
|
|
44
|
+
"Edit",
|
|
45
|
+
"Write",
|
|
46
|
+
"MultiEdit"
|
|
47
|
+
],
|
|
36
48
|
"pattern": ".*",
|
|
37
49
|
"requireTaskScope": true,
|
|
38
50
|
"scopeMode": "declared-only",
|
|
@@ -43,7 +55,12 @@
|
|
|
43
55
|
{
|
|
44
56
|
"id": "protected-file-approval-required",
|
|
45
57
|
"layer": "Decisions",
|
|
46
|
-
"toolNames": [
|
|
58
|
+
"toolNames": [
|
|
59
|
+
"Edit",
|
|
60
|
+
"Write",
|
|
61
|
+
"MultiEdit",
|
|
62
|
+
"Bash"
|
|
63
|
+
],
|
|
47
64
|
"pattern": ".*",
|
|
48
65
|
"requireProtectedApproval": true,
|
|
49
66
|
"protectedGlobs": [
|
|
@@ -93,7 +110,9 @@
|
|
|
93
110
|
{
|
|
94
111
|
"id": "branch-governance-required",
|
|
95
112
|
"layer": "Decisions",
|
|
96
|
-
"toolNames": [
|
|
113
|
+
"toolNames": [
|
|
114
|
+
"Bash"
|
|
115
|
+
],
|
|
97
116
|
"pattern": "^(gh\\s+pr\\s+(create|merge)|gh\\s+api\\b(?=.*(?:/pulls\\b|repos/[^\\s]+/[^\\s]+/pulls\\b))(?=.*(?:-f\\b|--field\\b|-F\\b|--raw-field\\b|--method\\s+POST\\b|-X\\s+POST\\b))|gh\\s+release\\s+create|git\\s+tag\\b|npm\\s+publish|yarn\\s+publish|pnpm\\s+publish)",
|
|
98
117
|
"requireBranchGovernance": true,
|
|
99
118
|
"action": "block",
|
|
@@ -103,7 +122,9 @@
|
|
|
103
122
|
{
|
|
104
123
|
"id": "release-readiness-required",
|
|
105
124
|
"layer": "Execution",
|
|
106
|
-
"toolNames": [
|
|
125
|
+
"toolNames": [
|
|
126
|
+
"Bash"
|
|
127
|
+
],
|
|
107
128
|
"pattern": "^(gh\\s+release\\s+create|git\\s+tag\\b|npm\\s+publish|yarn\\s+publish|pnpm\\s+publish)",
|
|
108
129
|
"requireReleaseReadiness": true,
|
|
109
130
|
"action": "block",
|
|
@@ -153,29 +174,45 @@
|
|
|
153
174
|
"action": "block",
|
|
154
175
|
"message": "Force push blocked. This is destructive and irreversible.",
|
|
155
176
|
"severity": "critical",
|
|
156
|
-
"compliance": [
|
|
177
|
+
"compliance": [
|
|
178
|
+
"NIST-CM-5",
|
|
179
|
+
"SOC2-CC8.1",
|
|
180
|
+
"CWE-863"
|
|
181
|
+
]
|
|
157
182
|
},
|
|
158
183
|
{
|
|
159
184
|
"id": "git-reset-hard",
|
|
160
185
|
"layer": "Execution",
|
|
161
186
|
"trigger": "Bash:git_reset_hard",
|
|
162
|
-
"toolNames": [
|
|
187
|
+
"toolNames": [
|
|
188
|
+
"Bash"
|
|
189
|
+
],
|
|
163
190
|
"pattern": "(?:^|[;&|]\\s*)git\\s+reset\\s+--hard\\b",
|
|
164
191
|
"action": "block",
|
|
165
192
|
"message": "git reset --hard is blocked because it can destroy uncommitted work. Stash or use a non-destructive restore path with explicit user approval.",
|
|
166
193
|
"severity": "critical",
|
|
167
|
-
"compliance": [
|
|
194
|
+
"compliance": [
|
|
195
|
+
"NIST-CM-5",
|
|
196
|
+
"SOC2-CC8.1",
|
|
197
|
+
"CWE-863"
|
|
198
|
+
]
|
|
168
199
|
},
|
|
169
200
|
{
|
|
170
201
|
"id": "git-clean-force",
|
|
171
202
|
"layer": "Execution",
|
|
172
203
|
"trigger": "Bash:git_clean_force",
|
|
173
|
-
"toolNames": [
|
|
204
|
+
"toolNames": [
|
|
205
|
+
"Bash"
|
|
206
|
+
],
|
|
174
207
|
"pattern": "(?:^|[;&|]\\s*)git\\s+clean\\s+(?:-[^\\s]*f[^\\s]*|--force)\\b",
|
|
175
208
|
"action": "block",
|
|
176
209
|
"message": "git clean --force is blocked because it can delete untracked user work. Inventory files and get explicit approval before destructive cleanup.",
|
|
177
210
|
"severity": "critical",
|
|
178
|
-
"compliance": [
|
|
211
|
+
"compliance": [
|
|
212
|
+
"NIST-CM-5",
|
|
213
|
+
"SOC2-CC8.1",
|
|
214
|
+
"CWE-863"
|
|
215
|
+
]
|
|
179
216
|
},
|
|
180
217
|
{
|
|
181
218
|
"id": "protected-branch-push",
|
|
@@ -190,12 +227,30 @@
|
|
|
190
227
|
"id": "rm-rf-home-or-root",
|
|
191
228
|
"layer": "Execution",
|
|
192
229
|
"trigger": "Bash:rm_rf_home_or_root",
|
|
193
|
-
"toolNames": [
|
|
230
|
+
"toolNames": [
|
|
231
|
+
"Bash"
|
|
232
|
+
],
|
|
194
233
|
"pattern": "(?:^|[;&|]\\s*)rm\\s+-(?=[^\\s]*r)(?=[^\\s]*f)[^\\s]+\\s+(?:/|/\\*|~(?:/[^\\s]*)?|\\$HOME(?:/[^\\s]*)?)(?:\\s|$)",
|
|
195
234
|
"action": "block",
|
|
196
235
|
"message": "Broad rm -rf against root or home is blocked. Use a narrow, reviewed path and explicit approval for destructive deletes.",
|
|
197
236
|
"severity": "critical",
|
|
198
|
-
"compliance": [
|
|
237
|
+
"compliance": [
|
|
238
|
+
"NIST-CM-5",
|
|
239
|
+
"SOC2-CC8.1",
|
|
240
|
+
"CWE-732"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "secret-egress",
|
|
245
|
+
"layer": "Execution",
|
|
246
|
+
"toolNames": [
|
|
247
|
+
"Bash"
|
|
248
|
+
],
|
|
249
|
+
"pattern": "(?=.*(?:\\.env\\b|\\.env\\.[a-z]+|id_rsa|id_ed25519|\\.ssh/id_|\\.aws/credentials|\\.npmrc|\\.pypirc|\\.netrc|[\\w./-]*\\.pem\\b|[\\w./-]*\\.p12\\b|credentials\\.json|service[-_]account[\\w-]*\\.json|\\$\\{?[A-Z0-9_]*(?:API_KEY|APIKEY|SECRET|TOKEN|PASSWORD|PRIVATE_KEY)\\}?))(?=.*(?:\\bcurl\\b|\\bwget\\b|\\bnc\\b|\\bncat\\b|\\bnetcat\\b|\\bscp\\b|\\bsftp\\b|\\bftp\\b|\\bhttpie\\b|\\bhttp\\s+(?:POST|PUT)\\b|\\brsync\\b\\s+[^|]*@))",
|
|
250
|
+
"action": "block",
|
|
251
|
+
"message": "Blocked: this command reads credential material AND sends it off the machine. If this is intentional, move the secret through an approved secret manager rather than piping it to a network sink.",
|
|
252
|
+
"severity": "critical",
|
|
253
|
+
"_ordering": "MUST precede env-file-edit and deny-network-egress: both are action:warn and match broadly (any .env mention / any curl to a non-allowlisted host). First-match-wins means either would swallow this critical block."
|
|
199
254
|
},
|
|
200
255
|
{
|
|
201
256
|
"id": "env-file-edit",
|
|
@@ -203,27 +258,41 @@
|
|
|
203
258
|
"trigger": "Edit:env_file",
|
|
204
259
|
"pattern": "\\.env",
|
|
205
260
|
"action": "warn",
|
|
206
|
-
"message": "Editing .env file
|
|
261
|
+
"message": "Editing .env file \u2014 verify you are not deleting existing tokens",
|
|
207
262
|
"severity": "medium",
|
|
208
|
-
"compliance": [
|
|
263
|
+
"compliance": [
|
|
264
|
+
"NIST-IA-5",
|
|
265
|
+
"SOC2-CC6.1",
|
|
266
|
+
"CWE-798"
|
|
267
|
+
]
|
|
209
268
|
},
|
|
210
269
|
{
|
|
211
270
|
"id": "deny-network-egress",
|
|
212
271
|
"layer": "Cloud",
|
|
213
|
-
"toolNames": [
|
|
272
|
+
"toolNames": [
|
|
273
|
+
"Bash"
|
|
274
|
+
],
|
|
214
275
|
"pattern": "(?:\\b(?:curl|wget)\\b[^\\n]{0,600}https?://(?!(?:github\\.com|registry\\.npmjs\\.org|api\\.anthropic\\.com|localhost|127\\.0\\.0\\.1|\\[::1\\]|0\\.0\\.0\\.0)(?:[:/?#]|$))[\\w.-]+|\\b(?:curl|wget)\\b\\s+(?:-\\S+\\s+)*(?!(?:https?://)?(?:github\\.com|registry\\.npmjs\\.org|api\\.anthropic\\.com|localhost|127\\.0\\.0\\.1|\\[::1\\]|0\\.0\\.0\\.0)(?:[:/?#]|$))(?:[\\w.-]+\\.)+[a-z]{2,}(?:[:/?#]|\\s|$)|\\bopen\\b[^\\n]{0,240}https?://(?!(?:github\\.com|registry\\.npmjs\\.org|api\\.anthropic\\.com|localhost|127\\.0\\.0\\.1|\\[::1\\]|0\\.0\\.0\\.0)(?:[:/?#]|$))[\\w.-]+|\\bnode\\b[^\\n]{0,240}\\bfetch\\s*\\(|\\bpython3?\\b[^\\n]{0,240}\\b(?:requests\\.(?:get|post)|urllib\\.request))",
|
|
215
276
|
"action": "warn",
|
|
216
277
|
"unless": "egress_approved",
|
|
217
278
|
"message": "Potential unauthorized network egress detected.",
|
|
218
279
|
"severity": "medium",
|
|
219
|
-
"compliance": [
|
|
280
|
+
"compliance": [
|
|
281
|
+
"NIST-SC-7",
|
|
282
|
+
"SOC2-CC6.6",
|
|
283
|
+
"OWASP-A10"
|
|
284
|
+
]
|
|
220
285
|
},
|
|
221
286
|
{
|
|
222
287
|
"id": "unverified-skill-use",
|
|
223
288
|
"layer": "Supply Chain",
|
|
224
289
|
"trigger": "Skill:load",
|
|
225
290
|
"pattern": ".*",
|
|
226
|
-
"when": {
|
|
291
|
+
"when": {
|
|
292
|
+
"constraints": {
|
|
293
|
+
"THUMBGATE_DELEGATION_MODE": true
|
|
294
|
+
}
|
|
295
|
+
},
|
|
227
296
|
"action": "warn",
|
|
228
297
|
"unless": "skill_verified",
|
|
229
298
|
"message": "Skill provenance check failed. Run 'npm run skill:verify' or satisfy 'skill_verified' with a valid signature to proceed.",
|
|
@@ -232,12 +301,19 @@
|
|
|
232
301
|
{
|
|
233
302
|
"id": "supply-chain-dep-add",
|
|
234
303
|
"layer": "Supply Chain",
|
|
235
|
-
"toolNames": [
|
|
304
|
+
"toolNames": [
|
|
305
|
+
"Edit",
|
|
306
|
+
"Write"
|
|
307
|
+
],
|
|
236
308
|
"pattern": "package\\.json$",
|
|
237
309
|
"action": "warn",
|
|
238
310
|
"message": "Dependency mutation detected in package.json. Security scanner will audit for typosquatting, wildcard versions, and suspicious install scripts.",
|
|
239
311
|
"severity": "high",
|
|
240
|
-
"compliance": [
|
|
312
|
+
"compliance": [
|
|
313
|
+
"NIST-SA-12",
|
|
314
|
+
"OWASP-A06",
|
|
315
|
+
"CWE-1357"
|
|
316
|
+
]
|
|
241
317
|
},
|
|
242
318
|
{
|
|
243
319
|
"id": "blocked-npx-content",
|
|
@@ -245,7 +321,11 @@
|
|
|
245
321
|
"trigger": "Bash:exec",
|
|
246
322
|
"pattern": ".*",
|
|
247
323
|
"executable_hash": "237adf8f3747cad8b9b62fcfd0d9c8d509a64e550337707f55100afcb79e8900",
|
|
248
|
-
"when": {
|
|
324
|
+
"when": {
|
|
325
|
+
"constraints": {
|
|
326
|
+
"THUMBGATE_DELEGATION_MODE": true
|
|
327
|
+
}
|
|
328
|
+
},
|
|
249
329
|
"action": "block",
|
|
250
330
|
"message": "Blocked npx execution by content hash. Renaming the binary does not bypass this gate.",
|
|
251
331
|
"severity": "critical"
|
|
@@ -253,57 +333,91 @@
|
|
|
253
333
|
{
|
|
254
334
|
"id": "production-deploy-approval",
|
|
255
335
|
"layer": "Execution",
|
|
256
|
-
"toolNames": [
|
|
336
|
+
"toolNames": [
|
|
337
|
+
"Bash"
|
|
338
|
+
],
|
|
257
339
|
"pattern": "(?:railway|fly|heroku|vercel|render|kubectl|helm)\\s+(?:deploy|up|apply|release|push|rollout)",
|
|
258
340
|
"action": "approve",
|
|
259
341
|
"message": "Production deploy detected. Human approval required before this action can proceed.",
|
|
260
342
|
"severity": "high",
|
|
261
|
-
"compliance": [
|
|
343
|
+
"compliance": [
|
|
344
|
+
"NIST-CM-3",
|
|
345
|
+
"SOC2-CC8.1",
|
|
346
|
+
"OWASP-A05"
|
|
347
|
+
]
|
|
262
348
|
},
|
|
263
349
|
{
|
|
264
350
|
"id": "schema-migration-approval",
|
|
265
351
|
"layer": "Execution",
|
|
266
|
-
"toolNames": [
|
|
352
|
+
"toolNames": [
|
|
353
|
+
"Bash"
|
|
354
|
+
],
|
|
267
355
|
"pattern": "(?:npx\\s+(?:sequelize|typeorm|prisma|knex|drizzle|flyway|liquibase)|alembic\\s+upgrade|rails\\s+db:migrate|php\\s+artisan\\s+migrate)\\b",
|
|
268
356
|
"action": "approve",
|
|
269
357
|
"message": "Database schema migration detected. Human approval required before this action can proceed.",
|
|
270
358
|
"severity": "high",
|
|
271
|
-
"compliance": [
|
|
359
|
+
"compliance": [
|
|
360
|
+
"NIST-CM-3",
|
|
361
|
+
"SOC2-CC8.1",
|
|
362
|
+
"CWE-89"
|
|
363
|
+
]
|
|
272
364
|
},
|
|
273
365
|
{
|
|
274
366
|
"id": "permission-change-approval",
|
|
275
367
|
"layer": "Execution",
|
|
276
|
-
"toolNames": [
|
|
368
|
+
"toolNames": [
|
|
369
|
+
"Bash"
|
|
370
|
+
],
|
|
277
371
|
"pattern": "(?:chmod|chown|setfacl|iam|policy|role|grant|revoke)\\s+",
|
|
278
372
|
"action": "approve",
|
|
279
373
|
"message": "Permission or IAM change detected. Human approval required before this action can proceed.",
|
|
280
374
|
"severity": "high",
|
|
281
|
-
"compliance": [
|
|
375
|
+
"compliance": [
|
|
376
|
+
"NIST-AC-6",
|
|
377
|
+
"SOC2-CC6.1",
|
|
378
|
+
"CWE-732"
|
|
379
|
+
]
|
|
282
380
|
},
|
|
283
381
|
{
|
|
284
382
|
"id": "style-violation-log",
|
|
285
383
|
"layer": "Decisions",
|
|
286
|
-
"toolNames": [
|
|
384
|
+
"toolNames": [
|
|
385
|
+
"Edit",
|
|
386
|
+
"Write",
|
|
387
|
+
"MultiEdit"
|
|
388
|
+
],
|
|
287
389
|
"pattern": ".*",
|
|
288
390
|
"action": "log",
|
|
289
|
-
"when": {
|
|
391
|
+
"when": {
|
|
392
|
+
"constraints": {
|
|
393
|
+
"THUMBGATE_STYLE_AUDIT": true
|
|
394
|
+
}
|
|
395
|
+
},
|
|
290
396
|
"message": "Style audit mode active. Action recorded for review but allowed to proceed.",
|
|
291
397
|
"severity": "low"
|
|
292
398
|
},
|
|
293
399
|
{
|
|
294
400
|
"id": "large-file-creation-log",
|
|
295
401
|
"layer": "Execution",
|
|
296
|
-
"toolNames": [
|
|
402
|
+
"toolNames": [
|
|
403
|
+
"Write"
|
|
404
|
+
],
|
|
297
405
|
"pattern": ".*",
|
|
298
406
|
"action": "log",
|
|
299
|
-
"when": {
|
|
407
|
+
"when": {
|
|
408
|
+
"constraints": {
|
|
409
|
+
"THUMBGATE_LARGE_FILE_AUDIT": true
|
|
410
|
+
}
|
|
411
|
+
},
|
|
300
412
|
"message": "Large file write detected. Action recorded for audit trail but allowed to proceed.",
|
|
301
413
|
"severity": "low"
|
|
302
414
|
},
|
|
303
415
|
{
|
|
304
416
|
"id": "non-critical-warning-log",
|
|
305
417
|
"layer": "Decisions",
|
|
306
|
-
"toolNames": [
|
|
418
|
+
"toolNames": [
|
|
419
|
+
"Bash"
|
|
420
|
+
],
|
|
307
421
|
"pattern": "(?:console\\.log|debugger|TODO|FIXME|HACK|XXX)",
|
|
308
422
|
"action": "log",
|
|
309
423
|
"message": "Non-critical code pattern detected. Action recorded for audit trail but allowed to proceed.",
|
|
@@ -312,18 +426,26 @@
|
|
|
312
426
|
{
|
|
313
427
|
"id": "mcp-sql-delete-block",
|
|
314
428
|
"layer": "Execution",
|
|
315
|
-
"toolNames": [
|
|
429
|
+
"toolNames": [
|
|
430
|
+
"delete_record"
|
|
431
|
+
],
|
|
316
432
|
"pattern": ".*",
|
|
317
433
|
"requireTaskScope": true,
|
|
318
434
|
"action": "block",
|
|
319
435
|
"message": "SQL MCP delete_record requires explicit task scope. Destructive database operations must be scoped to prevent accidental data loss.",
|
|
320
436
|
"severity": "critical",
|
|
321
|
-
"compliance": [
|
|
437
|
+
"compliance": [
|
|
438
|
+
"NIST-AC-3",
|
|
439
|
+
"SOC2-CC6.1",
|
|
440
|
+
"CWE-89"
|
|
441
|
+
]
|
|
322
442
|
},
|
|
323
443
|
{
|
|
324
444
|
"id": "mcp-sql-execute-warn",
|
|
325
445
|
"layer": "Execution",
|
|
326
|
-
"toolNames": [
|
|
446
|
+
"toolNames": [
|
|
447
|
+
"execute_entity"
|
|
448
|
+
],
|
|
327
449
|
"pattern": "(?:drop|truncate|alter|grant|revoke)",
|
|
328
450
|
"action": "warn",
|
|
329
451
|
"message": "SQL MCP execute_entity matches a potentially destructive DDL pattern. Review before proceeding.",
|
|
@@ -332,70 +454,115 @@
|
|
|
332
454
|
{
|
|
333
455
|
"id": "mcp-sql-bulk-update-warn",
|
|
334
456
|
"layer": "Execution",
|
|
335
|
-
"toolNames": [
|
|
457
|
+
"toolNames": [
|
|
458
|
+
"update_record"
|
|
459
|
+
],
|
|
336
460
|
"pattern": "(?:WHERE\\s+1\\s*=\\s*1|WHERE\\s+true|WITHOUT\\s+WHERE)",
|
|
337
461
|
"action": "block",
|
|
338
462
|
"message": "SQL MCP bulk update without a safe WHERE clause. This could modify all records in the table.",
|
|
339
463
|
"severity": "critical",
|
|
340
|
-
"compliance": [
|
|
464
|
+
"compliance": [
|
|
465
|
+
"NIST-AC-3",
|
|
466
|
+
"CWE-89"
|
|
467
|
+
]
|
|
341
468
|
},
|
|
342
469
|
{
|
|
343
470
|
"id": "self-protect-config",
|
|
344
471
|
"layer": "Execution",
|
|
345
|
-
"toolNames": [
|
|
472
|
+
"toolNames": [
|
|
473
|
+
"Edit",
|
|
474
|
+
"Write",
|
|
475
|
+
"MultiEdit"
|
|
476
|
+
],
|
|
346
477
|
"pattern": "(?:config/gates/|config/(?:budget|enforcement|mcp-allowlists)\\.json|\\.thumbgate/config\\.json|thumbgate\\.json)",
|
|
347
478
|
"action": "block",
|
|
348
479
|
"message": "Self-protection: agent cannot modify ThumbGate configuration, gate rules, or budget settings.",
|
|
349
480
|
"severity": "critical",
|
|
350
|
-
"compliance": [
|
|
481
|
+
"compliance": [
|
|
482
|
+
"NIST-AC-3",
|
|
483
|
+
"OWASP-A01",
|
|
484
|
+
"SOC2-CC6.1"
|
|
485
|
+
]
|
|
351
486
|
},
|
|
352
487
|
{
|
|
353
488
|
"id": "self-protect-kill",
|
|
354
489
|
"layer": "Execution",
|
|
355
|
-
"toolNames": [
|
|
490
|
+
"toolNames": [
|
|
491
|
+
"Bash"
|
|
492
|
+
],
|
|
356
493
|
"pattern": "(?:kill|pkill|killall)\\s+.*(?:thumbgate|gates-engine|budget-enforcer)",
|
|
357
494
|
"action": "block",
|
|
358
495
|
"message": "Self-protection: agent cannot terminate ThumbGate processes.",
|
|
359
496
|
"severity": "critical",
|
|
360
|
-
"compliance": [
|
|
497
|
+
"compliance": [
|
|
498
|
+
"NIST-AC-3",
|
|
499
|
+
"OWASP-A01"
|
|
500
|
+
]
|
|
361
501
|
},
|
|
362
502
|
{
|
|
363
503
|
"id": "self-protect-env-override",
|
|
364
504
|
"layer": "Execution",
|
|
365
|
-
"toolNames": [
|
|
505
|
+
"toolNames": [
|
|
506
|
+
"Bash"
|
|
507
|
+
],
|
|
366
508
|
"pattern": "(?:export|unset)\\s+(?:THUMBGATE_|LANEKEEP_)",
|
|
367
509
|
"action": "block",
|
|
368
510
|
"message": "Self-protection: agent cannot modify ThumbGate environment variables.",
|
|
369
511
|
"severity": "critical",
|
|
370
|
-
"compliance": [
|
|
512
|
+
"compliance": [
|
|
513
|
+
"NIST-AC-3",
|
|
514
|
+
"SOC2-CC6.1"
|
|
515
|
+
]
|
|
371
516
|
},
|
|
372
517
|
{
|
|
373
518
|
"id": "self-protect-hooks-disable",
|
|
374
519
|
"layer": "Execution",
|
|
375
|
-
"toolNames": [
|
|
520
|
+
"toolNames": [
|
|
521
|
+
"Edit",
|
|
522
|
+
"Write",
|
|
523
|
+
"Bash"
|
|
524
|
+
],
|
|
376
525
|
"pattern": "(?:\\.claude/settings(?:\\.local)?\\.json|\\.codex/config\\.toml|scripts/hook-[^/]+\\.(?:js|sh))",
|
|
377
526
|
"action": "block",
|
|
378
527
|
"message": "Self-protection: agent cannot modify hook registrations.",
|
|
379
528
|
"severity": "critical",
|
|
380
|
-
"compliance": [
|
|
529
|
+
"compliance": [
|
|
530
|
+
"NIST-AC-3",
|
|
531
|
+
"OWASP-A01",
|
|
532
|
+
"SOC2-CC6.1"
|
|
533
|
+
]
|
|
381
534
|
},
|
|
382
535
|
{
|
|
383
536
|
"id": "on-demand-careful-mode",
|
|
384
537
|
"layer": "Execution",
|
|
385
|
-
"toolNames": [
|
|
538
|
+
"toolNames": [
|
|
539
|
+
"Bash"
|
|
540
|
+
],
|
|
386
541
|
"pattern": "(rm\\s+-rf|drop\\s+table|force-push|git\\s+push\\s+-[fF]|git\\s+push\\s+--force|kubectl\\s+delete)",
|
|
387
542
|
"action": "block",
|
|
388
|
-
"when": {
|
|
543
|
+
"when": {
|
|
544
|
+
"constraints": {
|
|
545
|
+
"careful_mode": true
|
|
546
|
+
}
|
|
547
|
+
},
|
|
389
548
|
"message": "Careful mode is active. Dangerous command is blocked.",
|
|
390
549
|
"severity": "critical"
|
|
391
550
|
},
|
|
392
551
|
{
|
|
393
552
|
"id": "on-demand-freeze-mode",
|
|
394
553
|
"layer": "Decisions",
|
|
395
|
-
"toolNames": [
|
|
554
|
+
"toolNames": [
|
|
555
|
+
"Edit",
|
|
556
|
+
"Write",
|
|
557
|
+
"MultiEdit"
|
|
558
|
+
],
|
|
396
559
|
"pattern": ".*",
|
|
397
560
|
"action": "block",
|
|
398
|
-
"when": {
|
|
561
|
+
"when": {
|
|
562
|
+
"constraints": {
|
|
563
|
+
"freeze_mode": true
|
|
564
|
+
}
|
|
565
|
+
},
|
|
399
566
|
"message": "Freeze mode is active. Edits outside the frozen directory are blocked.",
|
|
400
567
|
"severity": "high"
|
|
401
568
|
}
|