mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:54:31 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { resolveChannelDefaultAccountId } from "../channels/plugins/helpers.js";
|
||||
import { listChannelPlugins } from "../channels/plugins/index.js";
|
||||
import type { ChannelId } from "../channels/plugins/types.js";
|
||||
import type { MoltbotConfig, GatewayBindMode } from "../config/config.js";
|
||||
import type { OpenClawConfig, GatewayBindMode } from "../config/config.js";
|
||||
import { readChannelAllowFromStore } from "../pairing/pairing-store.js";
|
||||
import { note } from "../terminal/note.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import { resolveGatewayAuth } from "../gateway/auth.js";
|
||||
import { isLoopbackHost, resolveGatewayBindHost } from "../gateway/net.js";
|
||||
|
||||
export async function noteSecurityWarnings(cfg: MoltbotConfig) {
|
||||
export async function noteSecurityWarnings(cfg: OpenClawConfig) {
|
||||
const warnings: string[] = [];
|
||||
const auditHint = `- Run: ${formatCliCommand("moltbot security audit --deep")}`;
|
||||
const auditHint = `- Run: ${formatCliCommand("openclaw security audit --deep")}`;
|
||||
|
||||
// ===========================================
|
||||
// GATEWAY NETWORK EXPOSURE CHECK
|
||||
@@ -48,19 +48,19 @@ export async function noteSecurityWarnings(cfg: MoltbotConfig) {
|
||||
const authFixLines =
|
||||
resolvedAuth.mode === "password"
|
||||
? [
|
||||
` Fix: ${formatCliCommand("moltbot configure")} to set a password`,
|
||||
` Or switch to token: ${formatCliCommand("moltbot config set gateway.auth.mode token")}`,
|
||||
` Fix: ${formatCliCommand("openclaw configure")} to set a password`,
|
||||
` Or switch to token: ${formatCliCommand("openclaw config set gateway.auth.mode token")}`,
|
||||
]
|
||||
: [
|
||||
` Fix: ${formatCliCommand("moltbot doctor --fix")} to generate a token`,
|
||||
` Fix: ${formatCliCommand("openclaw doctor --fix")} to generate a token`,
|
||||
` Or set token directly: ${formatCliCommand(
|
||||
"moltbot config set gateway.auth.mode token",
|
||||
"openclaw config set gateway.auth.mode token",
|
||||
)}`,
|
||||
];
|
||||
warnings.push(
|
||||
`- CRITICAL: Gateway bound to ${bindDescriptor} without authentication.`,
|
||||
` Anyone on your network (or internet if port-forwarded) can fully control your agent.`,
|
||||
` Fix: ${formatCliCommand("moltbot config set gateway.bind loopback")}`,
|
||||
` Fix: ${formatCliCommand("openclaw config set gateway.bind loopback")}`,
|
||||
...authFixLines,
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user