Skip to main content
Glama

review.security.config

Retrieve current security configuration from ReviewExtension to validate and correct Re:VIEW manuscript files by checking unauthorized tags and fixing duplicate IDs.

Instructions

Get current security configuration (SSOT from ReviewExtention)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes
forceReloadNo

Implementation Reference

  • Handler implementation for the 'review.security.config' tool. It calls loadSecurityConfig with cwd and optional forceReload, then returns the config as JSON text content.
    case "review.security.config": { const config = await loadSecurityConfig( args.cwd as string, args.forceReload as boolean | undefined ); return { content: [ { type: "text", text: JSON.stringify(config) } ] }; }
  • src/index.ts:367-378 (registration)
    Tool registration in the tools array, including name, description, and input schema. Used by ListToolsRequestSchema handler.
    { name: "review.security.config", description: "Get current security configuration (SSOT from ReviewExtention)", inputSchema: { type: "object", properties: { cwd: { type: "string" }, forceReload: { type: "boolean" } }, required: ["cwd"] } },
  • TypeScript interface defining the structure of the security configuration returned by the tool.
    export interface SecurityConfig { maxFileSize: number; allowedExtensions: string[]; allowedPaths: string[]; blockAbsolutePaths: boolean; blockTraversal: boolean; source: "reviewextention" | "local" | "default"; timestamp: string; }
  • Core helper function that implements the logic to load the security configuration from ReviewExtention Ruby script, local YAML files, or falls back to defaults. Called by the tool handler.
    export async function loadSecurityConfig(cwd: string, forceReload = false): Promise<SecurityConfig> { const now = Date.now(); if (!forceReload && cachedConfig && now < cacheExpiry) { console.log("[Security] Using cached SSOT config"); return cachedConfig; } console.log("[Security] Loading SSOT configuration..."); try { const reviewExtConfig = await loadFromReviewExtention(cwd); if (reviewExtConfig) { cachedConfig = reviewExtConfig; cacheExpiry = now + 5 * 60 * 1000; logConfigSource(reviewExtConfig); return reviewExtConfig; } } catch (error) { console.warn("[Security] Failed to load from ReviewExtention:", error); } try { const localConfig = await loadFromLocalConfig(cwd); if (localConfig) { cachedConfig = localConfig; cacheExpiry = now + 5 * 60 * 1000; logConfigSource(localConfig); return localConfig; } } catch (error) { console.warn("[Security] Failed to load local config:", error); } console.log("[Security] Using default configuration"); cachedConfig = DEFAULT_SECURITY; cacheExpiry = now + 5 * 60 * 1000; logConfigSource(DEFAULT_SECURITY); return DEFAULT_SECURITY; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dsgarage/ReviewMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server