Skip to content

Commit aa19713

Browse files
committed
docs: update CLAUDE.md with tool-level quarantine documentation
Add tool-level quarantine to Security Model, CLI commands, Built-in Tools, HTTP API endpoints, and Key Implementation Details sections.
1 parent f7a7de2 commit aa19713

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ go test -race ./internal/... -v # Race detection
174174
mcpproxy upstream list # List all servers
175175
mcpproxy upstream logs <name> # View logs (--tail, --follow)
176176
mcpproxy upstream restart <name> # Restart server (supports --all)
177+
mcpproxy upstream inspect <name> # Inspect tool approval status (Spec 032)
178+
mcpproxy upstream approve <name> # Approve pending/changed tools (Spec 032)
177179
mcpproxy doctor # Run health checks
178180
```
179181

@@ -300,6 +302,7 @@ See [docs/configuration.md](docs/configuration.md) for complete reference.
300302
- **`call_tool_destructive`** - Proxy destructive tool calls to upstream servers (Spec 018)
301303
- **`code_execution`** - Execute JavaScript to orchestrate multiple tools (disabled by default)
302304
- **`upstream_servers`** - CRUD operations for server management
305+
- **`quarantine_security`** - Security quarantine management: list/inspect quarantined servers, inspect/approve/approve-all tools (Spec 032)
303306

304307
**Tool Format**: `<serverName>:<toolName>` (e.g., `github:create_issue`)
305308

@@ -333,6 +336,9 @@ See [docs/configuration.md](docs/configuration.md) for complete reference.
333336
| `GET /api/v1/tokens/{name}` | Get agent token details |
334337
| `DELETE /api/v1/tokens/{name}` | Revoke agent token |
335338
| `POST /api/v1/tokens/{name}/regenerate` | Regenerate agent token secret |
339+
| `POST /api/v1/servers/{id}/tools/approve` | Approve pending/changed tools (Spec 032) |
340+
| `GET /api/v1/servers/{id}/tools/{tool}/diff` | View tool description/schema changes (Spec 032) |
341+
| `GET /api/v1/servers/{id}/tools/export` | Export tool approval records (Spec 032) |
336342
| `GET /events` | SSE stream for live updates |
337343

338344
**Authentication**: Use `X-API-Key` header or `?apikey=` query parameter.
@@ -439,6 +445,7 @@ See `docs/code_execution/` for complete guides:
439445
- **`require_mcp_auth`**: When enabled, `/mcp` endpoint rejects unauthenticated requests (default: false for backward compatibility)
440446
- **Quarantine system**: New servers quarantined until manually approved
441447
- **Tool Poisoning Attack (TPA) protection**: Automatic detection of malicious descriptions
448+
- **Tool-level quarantine (Spec 032)**: SHA-256 hash-based change detection for individual tool descriptions/schemas. New tools start as "pending", changed tools marked as "changed" (rug pull detection). Configurable via `quarantine_enabled` (global) and `skip_quarantine` (per-server).
442449

443450
See [docs/features/agent-tokens.md](docs/features/agent-tokens.md) and [docs/features/security-quarantine.md](docs/features/security-quarantine.md) for details.
444451

@@ -562,6 +569,17 @@ Exponential backoff, separate contexts for app vs server lifecycle, state machin
562569
### Tool Indexing
563570
Full rebuild on server changes, hash-based change detection, background indexing.
564571

572+
### Tool-Level Quarantine (Spec 032)
573+
SHA-256 hash-based approval system for individual tools. Key files:
574+
- `internal/storage/models.go` - `ToolApprovalRecord` model and `ToolApprovalBucket`
575+
- `internal/storage/bbolt.go` - CRUD operations for tool approvals
576+
- `internal/runtime/tool_quarantine.go` - Hash calculation, approval checking, blocking logic
577+
- `internal/runtime/lifecycle.go` - Integration in `applyDifferentialToolUpdate()`
578+
- `internal/server/mcp.go` - Tool-level blocking in `handleCallToolVariant()` and MCP tool operations
579+
- `internal/httpapi/server.go` - REST API endpoints for inspection/approval
580+
- `internal/config/config.go` - `QuarantineEnabled` (global) and `SkipQuarantine` (per-server)
581+
- `frontend/src/views/ServerDetail.vue` - Web UI quarantine panel
582+
565583
### Signal Handling
566584
Graceful shutdown, context cancellation, Docker cleanup, double shutdown protection.
567585

0 commit comments

Comments
 (0)