Skip to content

openclaw security audit 输出的所有 checkId 含义、严重等级和修复路径参考。通过此表快速定位配置或文件权限漏洞,并查看哪些检查项可通过 --fix 自动修复。适用于安全审计后逐项排查和加固。

OpenClaw 安全审计检查项参考

openclaw security audit 输出的检查结果以 checkId 为标识。下表列出实际部署中最常遇到的 checkId(非完全枚举),包含严重等级、影响原因及主要修复键/路径。

检查ID严重等级影响原因主要修复键/路径自动修复
fs.state_dir.perms_world_writablecritical其他用户/进程可修改整个 OpenClaw 状态目录文件权限 ~/.openclawyes
fs.state_dir.perms_group_writablewarn组用户可修改整个 OpenClaw 状态目录文件权限 ~/.openclawyes
fs.state_dir.perms_readablewarn状态目录可被其他用户读取文件权限 ~/.openclawyes
fs.state_dir.symlinkwarn状态目录目标成为另一个信任边界状态目录文件系统布局no
fs.config.perms_writablecritical其他人可更改认证/工具策略/配置文件权限 ~/.openclaw/openclaw.jsonyes
fs.config.symlinkwarn符号链接的配置文件不支持写入且引入额外信任边界替换为常规配置文件或设置 OPENCLAW_CONFIG_PATH 指向真实文件no
fs.config.perms_group_readablewarn组用户可读取配置中的令牌/设置配置文件权限yes
fs.config.perms_world_readablecritical配置可能暴露令牌/设置配置文件权限yes
fs.config_include.perms_writablecritical配置文件包含文件可被其他人修改openclaw.json 引用的 include 文件权限yes
fs.config_include.perms_group_readablewarn组用户可读取包含的机密/设置openclaw.json 引用的 include 文件权限yes
fs.config_include.perms_world_readablecritical包含的机密/设置世界可读openclaw.json 引用的 include 文件权限yes
fs.auth_profiles.perms_writablecritical其他人可注入或替换存储的模型凭证agents/<agentId>/agent/auth-profiles.json 权限yes
fs.auth_profiles.perms_readablewarn其他人可读取 API 密钥和 OAuth 令牌agents/<agentId>/agent/auth-profiles.json 权限yes
fs.credentials_dir.perms_writablecritical其他人可修改渠道配对/凭证状态~/.openclaw/credentials 文件权限yes
fs.credentials_dir.perms_readablewarn其他人可读取渠道凭证状态~/.openclaw/credentials 文件权限yes
fs.sessions_store.perms_readablewarn其他人可读取会话记录/元数据会话存储权限yes
fs.log_file.perms_readablewarn其他人可读取已被脱敏但仍敏感的日志网关日志文件权限yes
fs.synced_dirwarn状态/配置位于 iCloud/Dropbox/Drive 中,扩大令牌/记录暴露范围将配置/状态移出同步文件夹no
gateway.bind_no_authcritical远程绑定没有共享密钥gateway.bind, gateway.auth.*no
gateway.loopback_no_authcritical反向代理的回环可能变为未认证gateway.auth.*, 代理设置no
gateway.trusted_proxies_missingwarn存在反向代理头部但未信任gateway.trustedProxiesno
gateway.http.no_authwarn/critical网关 HTTP API 在 auth.mode="none" 时可访问gateway.auth.mode, gateway.http.endpoints.*, plugins.entries.admin-http-rpcno
gateway.http.session_key_override_enabledinfoHTTP API 调用者可以覆盖 sessionKeygateway.http.allowSessionKeyOverrideno
gateway.tools_invoke_http.dangerous_allowwarn/critical通过 HTTP API 重新启用危险工具gateway.tools.allowno
gateway.nodes.allow_commands_dangerouswarn/critical启用了高影响节点命令(摄像头/屏幕/联系人/日历/SMS)gateway.nodes.allowCommandsno
gateway.nodes.deny_commands_ineffectivewarn模式匹配的拒绝项未匹配 shell 文本或组gateway.nodes.denyCommandsno
gateway.tailscale_funnelcritical暴露到公共互联网gateway.tailscale.modeno
gateway.tailscale_serveinfo通过 Serve 启用了 Tailnet 暴露gateway.tailscale.modeno
gateway.control_ui.allowed_origins_requiredcritical非回环 Control UI 未设置浏览器来源白名单gateway.controlUi.allowedOriginsno
gateway.control_ui.allowed_origins_wildcardwarn/criticalallowedOrigins=["*"] 禁用了浏览器来源白名单gateway.controlUi.allowedOriginsno
gateway.control_ui.host_header_origin_fallbackwarn/critical启用了 Host 头来源回退(降低了 DNS 重绑定加固)gateway.controlUi.dangerouslyAllowHostHeaderOriginFallbackno
gateway.control_ui.insecure_authwarn启用了不安全认证兼容开关gateway.controlUi.allowInsecureAuthno
gateway.control_ui.device_auth_disabledcritical禁用了设备身份检查gateway.controlUi.dangerouslyDisableDeviceAuthno
gateway.real_ip_fallback_enabledwarn/critical信任 X-Real-IP 回退可能因代理误配置导致源 IP 伪造gateway.allowRealIpFallback, gateway.trustedProxiesno
gateway.token_too_shortwarn共享令牌太短,更容易暴力破解gateway.auth.tokenno
gateway.auth_no_rate_limitwarn暴露的认证无速率限制增加暴力破解风险gateway.auth.rateLimitno
gateway.trusted_proxy_authcritical代理身份成为认证边界gateway.auth.mode="trusted-proxy"no
gateway.trusted_proxy_no_proxiescritical使用受信任代理认证但未设置受信任代理 IPgateway.trustedProxiesno
gateway.trusted_proxy_no_user_headercritical受信任代理认证无法安全解析用户身份gateway.auth.trustedProxy.userHeaderno
gateway.trusted_proxy_no_allowlistwarn受信任代理认证接受任何经过认证的上游用户gateway.auth.trustedProxy.allowUsersno
gateway.trusted_proxy_allow_loopbackwarn受信任代理认证接受明确允许的回环代理来源gateway.auth.trustedProxy.allowLoopbackno
gateway.probe_auth_secretref_unavailablewarn深度探测在此命令路径下无法解析认证 SecretRef深度探测认证源 / SecretRef 可用性no
gateway.probe_failedwarn/critical实时网关探测失败网关可达性/认证no
discovery.mdns_full_modewarn/criticalmDNS 全模式在本地网络上广播 cliPath/sshPort 元数据discovery.mdns.mode, gateway.bindno
config.insecure_or_dangerous_flagswarn启用了一个不安全的调试标志查找详情中命中的键no
security.audit.suppressions.activeinfo审计输出配置了抑制规则,结果可能被过滤security.audit.suppressionsno
config.secrets.gateway_password_in_configwarn网关密码直接存储在配置中gateway.auth.passwordno
config.secrets.hooks_token_in_configwarnHook 承载令牌直接存储在配置中hooks.tokenno
hooks.token_reuse_gateway_tokencriticalHook 入口令牌也可用于网关认证hooks.token, gateway.auth.tokenno
hooks.token_too_shortwarnHook 入口更容易被暴力破解hooks.tokenno
hooks.default_session_key_unsetwarnHook 智能体扇形扩散到生成的每个请求会话hooks.defaultSessionKeyno
hooks.allowed_agent_ids_unrestrictedwarn/critical经过认证的 Hook 调用者可路由到任何已配置智能体hooks.allowedAgentIdsno
hooks.request_session_key_enabledwarn/critical外部调用者可以选择 sessionKeyhooks.allowRequestSessionKeyno
hooks.request_session_key_prefixes_missingwarn/critical未限制外部会话键形状hooks.allowedSessionKeyPrefixesno
hooks.path_rootcriticalHook 路径为 /,更容易冲突或错误路由hooks.pathno
hooks.installs_unpinned_npm_specswarnHook 安装记录未固定到不可变的 npm 规范hook 安装元数据no
hooks.installs_missing_integritywarnHook 安装记录缺少完整性元数据hook 安装元数据no
hooks.installs_version_driftwarnHook 安装记录与已安装的包存在版本漂移hook 安装元数据no
logging.redact_offwarn敏感值泄露到日志/状态中logging.redactSensitiveyes
browser.control_invalid_configwarn浏览器控制配置在运行时前无效browser.*no
browser.control_no_authcritical浏览器控制暴露未携带令牌/密码认证gateway.auth.*no
browser.remote_cdp_httpwarn远程 CDP 通过明文 HTTP 缺少传输加密浏览器配置文件 cdpUrlno
browser.remote_cdp_private_hostwarn远程 CDP 定位到私有/内部主机浏览器配置文件 cdpUrl, browser.ssrfPolicy.*no
sandbox.docker_config_mode_offwarn沙箱 Docker 配置存在但未激活agents.*.sandbox.modeno
sandbox.bind_mount_non_absolutewarn相对绑定挂载可能解析出问题agents.*.sandbox.docker.binds[]no
sandbox.dangerous_bind_mountcritical沙箱绑定挂载目标位于被阻止的系统、凭证或 Docker 套接字路径agents.*.sandbox.docker.binds[]no
sandbox.dangerous_network_modecritical沙箱 Docker 网络使用 hostcontainer:* 命名空间加入模式agents.*.sandbox.docker.networkno
sandbox.dangerous_seccomp_profilecritical沙箱 seccomp 配置文件削弱容器隔离agents.*.sandbox.docker.securityOptno
sandbox.dangerous_apparmor_profilecritical沙箱 AppArmor 配置文件削弱容器隔离agents.*.sandbox.docker.securityOptno
sandbox.browser_cdp_bridge_unrestrictedwarn沙箱浏览器桥暴露未限制来源范围sandbox.browser.cdpSourceRangeno
sandbox.browser_container.non_loopback_publishcritical现有浏览器容器在非回环接口上发布 CDP浏览器沙箱容器发布配置no
sandbox.browser_container.hash_label_missingwarn现有浏览器容器早于当前配置哈希标签openclaw sandbox recreate --browser --allno
sandbox.browser_container.hash_epoch_stalewarn现有浏览器容器早于当前浏览器配置纪元openclaw sandbox recreate --browser --allno
tools.exec.host_sandbox_no_sandbox_defaultswarnexec host=sandbox 在沙箱关闭时失败关闭tools.exec.host, agents.defaults.sandbox.modeno
tools.exec.host_sandbox_no_sandbox_agentswarn每个智能体 exec host=sandbox 在沙箱关闭时失败关闭agents.list[].tools.exec.host, agents.list[].sandbox.modeno
tools.exec.security_full_configuredwarn/critical主机 exec 以 security="full" 运行tools.exec.security, agents.list[].tools.exec.securityno
tools.exec.fs_tools_disabled_but_exec_enabledwarn文件系统工具策略未使 shell 执行变为只读tools.deny, agents.list[].tools.deny, agents.*.sandbox.workspaceAccessno
tools.exec.auto_allow_skills_enabledwarnExec 批准隐式信任技能包~/.openclaw/exec-approvals.jsonno
tools.exec.allowlist_interpreter_without_strict_inline_evalwarn解释器白名单允许内联求值而不强制重新批准tools.exec.strictInlineEval, agents.list[].tools.exec.strictInlineEval, exec 批准白名单no
tools.exec.safe_bins_interpreter_unprofiledwarnsafeBins 中的解释器/运行时没有显式配置文件扩大了执行风险tools.exec.safeBins, tools.exec.safeBinProfiles, agents.list[].tools.exec.*no
tools.exec.safe_bins_broad_behaviorwarnsafeBins 中宽行为工具削弱了低风险 stdin 过滤可信模型tools.exec.safeBins, agents.list[].tools.exec.safeBinsno
tools.exec.safe_bin_trusted_dirs_riskywarnsafeBinTrustedDirs 包含可变或危险目录tools.exec.safeBinTrustedDirs, agents.list[].tools.exec.safeBinTrustedDirsno
skills.workspace.symlink_escapewarn工作区 skills/**/SKILL.md 解析到工作区根目录之外(符号链接链漂移)工作区 skills/** 文件系统状态no
plugins.extensions_no_allowlistwarn安装插件时未设置显式插件白名单plugins.allowlistno
plugins.installs_unpinned_npm_specswarn插件索引记录未固定到不可变的 npm 规范插件安装元数据no
plugins.installs_missing_integritywarn插件索引记录缺少完整性元数据插件安装元数据no
plugins.installs_version_driftwarn插件索引记录与已安装包版本漂移插件安装元数据no
plugins.code_safetywarn/critical插件代码扫描发现可疑或危险模式插件代码/安装源no
plugins.code_safety.entry_pathwarn插件入口路径指向隐藏或 node_modules 位置插件 manifest entryno
plugins.code_safety.entry_escapecritical插件入口逃出插件目录插件 manifest entryno
plugins.code_safety.scan_failedwarn插件代码扫描无法完成插件路径/扫描环境no
skills.code_safetywarn/critical技能安装元数据/代码包含可疑或危险模式技能安装源no
skills.code_safety.scan_failedwarn技能代码扫描无法完成技能扫描环境no
security.exposure.open_channels_with_execwarn/critical共享/公开房间可访问已启用 exec 的智能体channels.*.dmPolicy, channels.*.groupPolicy, tools.exec.*, agents.list[].tools.exec.*no
security.exposure.open_groups_with_elevatedcritical开放群组 + 高权限工具产生高影响提示注入路径channels.*.groupPolicy, tools.elevated.*no
security.exposure.open_groups_with_runtime_or_fscritical/warn开放群组可访问命令/文件工具,缺少沙箱/工作区保护channels.*.groupPolicy, tools.profile/deny, tools.fs.workspaceOnly, agents.*.sandbox.modeno
security.trust_model.multi_user_heuristicwarn配置看起来是多用户,但网关信任模型是个人助手拆分信任边界,或共享用户加固(sandbox.mode, 工具拒绝/工作区范围)no
tools.profile_minimal_overriddenwarn智能体覆盖绕过了全局最小 profileagents.list[].tools.profileno
plugins.tools_reachable_permissive_policywarn扩展工具在宽松上下文中可被访问tools.profile + 工具允许/拒绝no
models.legacywarn仍配置了遗留模型系列模型选择no
models.weak_tierwarn配置的模型低于当前推荐层级模型选择no
models.small_paramscritical/info小型模型 + 不安全工具表面提高了注入风险模型选择 + 沙箱/工具策略no
summary.attack_surfaceinfo认证、渠道、工具和暴露姿势的汇总摘要多个键(见详情)no

相关文档

常见问题

如何修复 fs.state_dir.perms_world_writable

修改 ~/.openclaw 目录权限,确保其他用户不可写。运行 openclaw security audit --fix 可自动修复该检查项。

gateway.bind_no_auth 怎么修复?

配置 gateway.bindgateway.auth.* 参数,确保远程绑定需要共享密钥认证。该检查项不支持自动修复,需要手动修改配置文件。

security.exposure.open_channels_with_exec 有什么风险?

任何能加入公共或共享渠道的用户都可以访问启用了 exec 工具的智能体,可能导致命令执行。应配置 dmPolicygroupPolicy 限制渠道访问,或通过 tools.exec.* 禁用敏感工具。