INNER CODE UNIT · JavaScript

auditOk

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

async function auditOk(serverName, toolName, args, executionResult) {
  const serverConfig = await getServerConfig(serverName);
  auditLog(serverConfig, toolName, args, { allowed: true }, executionResult);
}

// Execute command with timeout - using child_process timeout for real kill
/**
 * @param {any} ssh
 * @param {string} command
 * @param {{rawCommand?: boolean, platform?: string, execOptions?: Record<string, any>,
 *   [key: string]: any}} [options]
 * @param {number} [timeoutMs]
 */
async function execCommandWithTimeout(ssh, command, options = {}, timeoutMs = 30000) {
  // Pass through rawCommand and platform if specified
  const { rawCommand, platform = 'linux', ...otherOptions } = options;

  // Windows targets: encode the command as PowerShell -EncodedCommand (UTF-16

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…