INNER CODE UNIT · JavaScript

loadServerConfig

bvisible/mcp-ssh-manager · src/index.js:254

async function loadServerConfig() {
  // This function is kept for backward compatibility
  return serverConfigManager.getServers();
}

// ── Per-server security policy plumbing (v3.5.0+) ──────────────────────────────
//
// Wire any handler that mutates remote state (or executes arbitrary commands)
// through the helpers below. They are *always* safe to call: for any server
// without a security mode configured (default `unrestricted`), evaluatePolicy()
// early-returns { allowed: true } and auditLog() is a no-op when AUDIT_LOG is
// absent — so pre-v3.5.0 configs see zero behavior change.

async function getServerConfig(serverName) {
  if (!serverName) return null;
  const servers = await loadServerConfig();
  return servers[String(serverName).toLowerCase()] || null;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…