{"record":{"id":"823df0df0c4d3177","repo":"ruvnet/ruflo","slug":"security-warning-terminal-execute-is-enabled-t","errorCode":null,"errorMessage":"[security] WARNING: terminal_execute is enabled. This tool grants shell access inside the bridge container to any client the auth layer accepts. Ensure MCP_AUTH_TOKEN is set on any non-loopback bind. See ADR-166 §6 Phase 1d.","messagePattern":"\\[security\\] WARNING: terminal_execute is enabled\\. This tool grants shell access inside the bridge container to any client the auth layer accepts\\. Ensure MCP_AUTH_TOKEN is set on any non-loopback bind\\. See ADR-166 §6 Phase 1d\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ruflo/src/mcp-bridge/index.js","lineNumber":1765,"sourceCode":"  const isPublic = BIND_HOST !== \"127.0.0.1\" && BIND_HOST !== \"localhost\";\n  if (isPublic && !process.env.MCP_AUTH_TOKEN) {\n    console.error(\n      \"FATAL: refusing to bind a public interface without MCP_AUTH_TOKEN. \" +\n      \"Generate one with: MCP_AUTH_TOKEN=$(openssl rand -base64 32)\"\n    );\n    process.exit(1);\n  }\n  app.listen(PORT, BIND_HOST, () => {\n    console.log(`MCP Bridge v2.0.0 on port ${PORT} (${BIND_HOST})`);\n    const enabled = Object.entries(TOOL_GROUPS).filter(([, g]) => g.enabled).map(([n]) => n);\n    console.log(`Active groups: ${enabled.join(\", \")}`);\n    // ADR-166 §6 — startup posture banner\n    console.log(\n      `[security] bind=${BIND_HOST} auth=${process.env.MCP_AUTH_TOKEN ? \"bearer\" : \"off (local-only)\"} ` +\n      `terminal=${MCP_ENABLE_TERMINAL ? \"ENABLED (⚠ opt-in)\" : \"disabled\"}`,\n    );\n    if (MCP_ENABLE_TERMINAL) {\n      console.warn(\n        \"[security] WARNING: terminal_execute is enabled. This tool grants shell access \" +\n        \"inside the bridge container to any client the auth layer accepts. Ensure \" +\n        \"MCP_AUTH_TOKEN is set on any non-loopback bind. See ADR-166 §6 Phase 1d.\",\n      );\n    }\n  });\n\n  const anyBackendNeeded = BACKEND_DEFS.some(isBackendNeeded);\n  if (anyBackendNeeded) {\n    console.log(\"Initializing MCP backends...\");\n    await initBackends();\n  }\n}\n\nmain().catch(err => { console.error(\"Fatal:\", err); process.exit(1); });\n","sourceCodeStart":1747,"sourceCodeEnd":1781,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/mcp-bridge/index.js#L1747-L1781","documentation":"Error \"[security] WARNING: terminal_execute is enabled. This tool grants shell access inside the bridge container to any client the auth layer accepts. Ensure MCP_AUTH_TOKEN is set on any non-loopback bind. See ADR-166 §6 Phase 1d.\" thrown in ruvnet/ruflo.","triggerScenarios":"Thrown at ruflo/src/mcp-bridge/index.js:1765 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If shell access is not required, disable terminal_execute. If it is required, set MCP_AUTH_TOKEN and keep the bridge on a loopback bind."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}