get_security_status
Check current security configuration and audit details for Supabase Storage to verify access controls and compliance status.
Instructions
Get current security configuration and audit information
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_security_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:806-839 (handler)Main handler function that executes the get_security_status tool logic. It retrieves audit log, rate limit info, and security config to construct the response.
async function handleSecurityStatus() { const auditLog = getAuditLog(); const securityStatus: SecurityStatusResponse = { security_config: SECURITY_CONFIG, rate_limit_status: { active_limits: getRateLimitStoreSize(), current_window: SECURITY_CONFIG.RATE_LIMIT_WINDOW }, audit_log: { total_entries: auditLog.length, recent_entries: auditLog.slice(-10).map(entry => ({ timestamp: new Date(entry.timestamp).toISOString(), tool: entry.toolName, success: entry.success, error: entry.error || 'none' })) }, server_info: { name: 'supabase-storage-mcp', version: '1.0.0', uptime: process.uptime(), node_version: process.version } }; return { content: [ { type: 'text', text: JSON.stringify(securityStatus, null, 2) } ] }; } - src/index.ts:235-242 (schema)Tool schema definition including input schema (empty object) and description, registered in ListTools handler.
name: 'get_security_status', description: 'Get current security configuration and audit information', inputSchema: { type: 'object', properties: {}, additionalProperties: false } }, - src/index.ts:479-480 (registration)Registration of the tool handler in the main CallToolRequestSchema switch statement.
case 'get_security_status': return await handleSecurityStatus(); - src/modules/security.ts:18-49 (helper)SECURITY_CONFIG constant used by the handler to provide configuration details in the response.
export const SECURITY_CONFIG: SecurityConfig = { ENABLE_RATE_LIMITING: true, ENABLE_THREAT_DETECTION: true, ENABLE_AUDIT_LOGGING: true, ENABLE_INPUT_VALIDATION: true, ENABLE_FILE_SECURITY: true, // Rate limiting configuration RATE_LIMIT_WINDOW: 60000, // 1 minute MAX_REQUESTS_PER_WINDOW: 100, GLOBAL_RATE_LIMIT: 1000, IP_RATE_LIMIT: 200, USER_RATE_LIMIT: 500, // File security limits MAX_FILE_SIZE: 50 * 1024 * 1024, // 50MB MAX_BATCH_SIZE: 500, ALLOWED_MIME_TYPES: [ 'image/jpeg', 'image/jpg', 'image/png', 'image/webp', 'image/gif', 'image/svg+xml', 'image/bmp', 'image/tiff', 'application/zip', 'application/x-zip-compressed' ], // Security thresholds MAX_PROMPT_LENGTH: 10000, SUSPICIOUS_ACTIVITY_THRESHOLD: 5, HIGH_RISK_SCORE_THRESHOLD: 80, // Session and authentication SESSION_TIMEOUT: 3600, // 1 hour JWT_EXPIRY: 7200 // 2 hours }; - src/modules/security.ts:599-601 (helper)Helper function getAuditLog() called by the handler to retrieve recent audit log entries.
export function getAuditLog(): AuditEntry[] { return [...auditLog]; // Return copy to prevent external modification } - src/modules/security.ts:618-620 (helper)Helper function getRateLimitStoreSize() called by the handler to get active rate limits count.
export function getRateLimitStoreSize(): number { return rateLimitStore.size; }