Appearance
openclaw security audit 输出的所有 checkId 含义、严重等级和修复路径参考。通过此表快速定位配置或文件权限漏洞,并查看哪些检查项可通过 --fix 自动修复。适用于安全审计后逐项排查和加固。
OpenClaw 安全审计检查项参考
openclaw security audit 输出的检查结果以 checkId 为标识。下表列出实际部署中最常遇到的 checkId(非完全枚举),包含严重等级、影响原因及主要修复键/路径。
| 检查ID | 严重等级 | 影响原因 | 主要修复键/路径 | 自动修复 |
|---|---|---|---|---|
fs.state_dir.perms_world_writable | critical | 其他用户/进程可修改整个 OpenClaw 状态目录 | 文件权限 ~/.openclaw | yes |
fs.state_dir.perms_group_writable | warn | 组用户可修改整个 OpenClaw 状态目录 | 文件权限 ~/.openclaw | yes |
fs.state_dir.perms_readable | warn | 状态目录可被其他用户读取 | 文件权限 ~/.openclaw | yes |
fs.state_dir.symlink | warn | 状态目录目标成为另一个信任边界 | 状态目录文件系统布局 | no |
fs.config.perms_writable | critical | 其他人可更改认证/工具策略/配置 | 文件权限 ~/.openclaw/openclaw.json | yes |
fs.config.symlink | warn | 符号链接的配置文件不支持写入且引入额外信任边界 | 替换为常规配置文件或设置 OPENCLAW_CONFIG_PATH 指向真实文件 | no |
fs.config.perms_group_readable | warn | 组用户可读取配置中的令牌/设置 | 配置文件权限 | yes |
fs.config.perms_world_readable | critical | 配置可能暴露令牌/设置 | 配置文件权限 | yes |
fs.config_include.perms_writable | critical | 配置文件包含文件可被其他人修改 | openclaw.json 引用的 include 文件权限 | yes |
fs.config_include.perms_group_readable | warn | 组用户可读取包含的机密/设置 | openclaw.json 引用的 include 文件权限 | yes |
fs.config_include.perms_world_readable | critical | 包含的机密/设置世界可读 | openclaw.json 引用的 include 文件权限 | yes |
fs.auth_profiles.perms_writable | critical | 其他人可注入或替换存储的模型凭证 | agents/<agentId>/agent/auth-profiles.json 权限 | yes |
fs.auth_profiles.perms_readable | warn | 其他人可读取 API 密钥和 OAuth 令牌 | agents/<agentId>/agent/auth-profiles.json 权限 | yes |
fs.credentials_dir.perms_writable | critical | 其他人可修改渠道配对/凭证状态 | ~/.openclaw/credentials 文件权限 | yes |
fs.credentials_dir.perms_readable | warn | 其他人可读取渠道凭证状态 | ~/.openclaw/credentials 文件权限 | yes |
fs.sessions_store.perms_readable | warn | 其他人可读取会话记录/元数据 | 会话存储权限 | yes |
fs.log_file.perms_readable | warn | 其他人可读取已被脱敏但仍敏感的日志 | 网关日志文件权限 | yes |
fs.synced_dir | warn | 状态/配置位于 iCloud/Dropbox/Drive 中,扩大令牌/记录暴露范围 | 将配置/状态移出同步文件夹 | no |
gateway.bind_no_auth | critical | 远程绑定没有共享密钥 | gateway.bind, gateway.auth.* | no |
gateway.loopback_no_auth | critical | 反向代理的回环可能变为未认证 | gateway.auth.*, 代理设置 | no |
gateway.trusted_proxies_missing | warn | 存在反向代理头部但未信任 | gateway.trustedProxies | no |
gateway.http.no_auth | warn/critical | 网关 HTTP API 在 auth.mode="none" 时可访问 | gateway.auth.mode, gateway.http.endpoints.*, plugins.entries.admin-http-rpc | no |
gateway.http.session_key_override_enabled | info | HTTP API 调用者可以覆盖 sessionKey | gateway.http.allowSessionKeyOverride | no |
gateway.tools_invoke_http.dangerous_allow | warn/critical | 通过 HTTP API 重新启用危险工具 | gateway.tools.allow | no |
gateway.nodes.allow_commands_dangerous | warn/critical | 启用了高影响节点命令(摄像头/屏幕/联系人/日历/SMS) | gateway.nodes.allowCommands | no |
gateway.nodes.deny_commands_ineffective | warn | 模式匹配的拒绝项未匹配 shell 文本或组 | gateway.nodes.denyCommands | no |
gateway.tailscale_funnel | critical | 暴露到公共互联网 | gateway.tailscale.mode | no |
gateway.tailscale_serve | info | 通过 Serve 启用了 Tailnet 暴露 | gateway.tailscale.mode | no |
gateway.control_ui.allowed_origins_required | critical | 非回环 Control UI 未设置浏览器来源白名单 | gateway.controlUi.allowedOrigins | no |
gateway.control_ui.allowed_origins_wildcard | warn/critical | allowedOrigins=["*"] 禁用了浏览器来源白名单 | gateway.controlUi.allowedOrigins | no |
gateway.control_ui.host_header_origin_fallback | warn/critical | 启用了 Host 头来源回退(降低了 DNS 重绑定加固) | gateway.controlUi.dangerouslyAllowHostHeaderOriginFallback | no |
gateway.control_ui.insecure_auth | warn | 启用了不安全认证兼容开关 | gateway.controlUi.allowInsecureAuth | no |
gateway.control_ui.device_auth_disabled | critical | 禁用了设备身份检查 | gateway.controlUi.dangerouslyDisableDeviceAuth | no |
gateway.real_ip_fallback_enabled | warn/critical | 信任 X-Real-IP 回退可能因代理误配置导致源 IP 伪造 | gateway.allowRealIpFallback, gateway.trustedProxies | no |
gateway.token_too_short | warn | 共享令牌太短,更容易暴力破解 | gateway.auth.token | no |
gateway.auth_no_rate_limit | warn | 暴露的认证无速率限制增加暴力破解风险 | gateway.auth.rateLimit | no |
gateway.trusted_proxy_auth | critical | 代理身份成为认证边界 | gateway.auth.mode="trusted-proxy" | no |
gateway.trusted_proxy_no_proxies | critical | 使用受信任代理认证但未设置受信任代理 IP | gateway.trustedProxies | no |
gateway.trusted_proxy_no_user_header | critical | 受信任代理认证无法安全解析用户身份 | gateway.auth.trustedProxy.userHeader | no |
gateway.trusted_proxy_no_allowlist | warn | 受信任代理认证接受任何经过认证的上游用户 | gateway.auth.trustedProxy.allowUsers | no |
gateway.trusted_proxy_allow_loopback | warn | 受信任代理认证接受明确允许的回环代理来源 | gateway.auth.trustedProxy.allowLoopback | no |
gateway.probe_auth_secretref_unavailable | warn | 深度探测在此命令路径下无法解析认证 SecretRef | 深度探测认证源 / SecretRef 可用性 | no |
gateway.probe_failed | warn/critical | 实时网关探测失败 | 网关可达性/认证 | no |
discovery.mdns_full_mode | warn/critical | mDNS 全模式在本地网络上广播 cliPath/sshPort 元数据 | discovery.mdns.mode, gateway.bind | no |
config.insecure_or_dangerous_flags | warn | 启用了一个不安全的调试标志 | 查找详情中命中的键 | no |
security.audit.suppressions.active | info | 审计输出配置了抑制规则,结果可能被过滤 | security.audit.suppressions | no |
config.secrets.gateway_password_in_config | warn | 网关密码直接存储在配置中 | gateway.auth.password | no |
config.secrets.hooks_token_in_config | warn | Hook 承载令牌直接存储在配置中 | hooks.token | no |
hooks.token_reuse_gateway_token | critical | Hook 入口令牌也可用于网关认证 | hooks.token, gateway.auth.token | no |
hooks.token_too_short | warn | Hook 入口更容易被暴力破解 | hooks.token | no |
hooks.default_session_key_unset | warn | Hook 智能体扇形扩散到生成的每个请求会话 | hooks.defaultSessionKey | no |
hooks.allowed_agent_ids_unrestricted | warn/critical | 经过认证的 Hook 调用者可路由到任何已配置智能体 | hooks.allowedAgentIds | no |
hooks.request_session_key_enabled | warn/critical | 外部调用者可以选择 sessionKey | hooks.allowRequestSessionKey | no |
hooks.request_session_key_prefixes_missing | warn/critical | 未限制外部会话键形状 | hooks.allowedSessionKeyPrefixes | no |
hooks.path_root | critical | Hook 路径为 /,更容易冲突或错误路由 | hooks.path | no |
hooks.installs_unpinned_npm_specs | warn | Hook 安装记录未固定到不可变的 npm 规范 | hook 安装元数据 | no |
hooks.installs_missing_integrity | warn | Hook 安装记录缺少完整性元数据 | hook 安装元数据 | no |
hooks.installs_version_drift | warn | Hook 安装记录与已安装的包存在版本漂移 | hook 安装元数据 | no |
logging.redact_off | warn | 敏感值泄露到日志/状态中 | logging.redactSensitive | yes |
browser.control_invalid_config | warn | 浏览器控制配置在运行时前无效 | browser.* | no |
browser.control_no_auth | critical | 浏览器控制暴露未携带令牌/密码认证 | gateway.auth.* | no |
browser.remote_cdp_http | warn | 远程 CDP 通过明文 HTTP 缺少传输加密 | 浏览器配置文件 cdpUrl | no |
browser.remote_cdp_private_host | warn | 远程 CDP 定位到私有/内部主机 | 浏览器配置文件 cdpUrl, browser.ssrfPolicy.* | no |
sandbox.docker_config_mode_off | warn | 沙箱 Docker 配置存在但未激活 | agents.*.sandbox.mode | no |
sandbox.bind_mount_non_absolute | warn | 相对绑定挂载可能解析出问题 | agents.*.sandbox.docker.binds[] | no |
sandbox.dangerous_bind_mount | critical | 沙箱绑定挂载目标位于被阻止的系统、凭证或 Docker 套接字路径 | agents.*.sandbox.docker.binds[] | no |
sandbox.dangerous_network_mode | critical | 沙箱 Docker 网络使用 host 或 container:* 命名空间加入模式 | agents.*.sandbox.docker.network | no |
sandbox.dangerous_seccomp_profile | critical | 沙箱 seccomp 配置文件削弱容器隔离 | agents.*.sandbox.docker.securityOpt | no |
sandbox.dangerous_apparmor_profile | critical | 沙箱 AppArmor 配置文件削弱容器隔离 | agents.*.sandbox.docker.securityOpt | no |
sandbox.browser_cdp_bridge_unrestricted | warn | 沙箱浏览器桥暴露未限制来源范围 | sandbox.browser.cdpSourceRange | no |
sandbox.browser_container.non_loopback_publish | critical | 现有浏览器容器在非回环接口上发布 CDP | 浏览器沙箱容器发布配置 | no |
sandbox.browser_container.hash_label_missing | warn | 现有浏览器容器早于当前配置哈希标签 | openclaw sandbox recreate --browser --all | no |
sandbox.browser_container.hash_epoch_stale | warn | 现有浏览器容器早于当前浏览器配置纪元 | openclaw sandbox recreate --browser --all | no |
tools.exec.host_sandbox_no_sandbox_defaults | warn | exec host=sandbox 在沙箱关闭时失败关闭 | tools.exec.host, agents.defaults.sandbox.mode | no |
tools.exec.host_sandbox_no_sandbox_agents | warn | 每个智能体 exec host=sandbox 在沙箱关闭时失败关闭 | agents.list[].tools.exec.host, agents.list[].sandbox.mode | no |
tools.exec.security_full_configured | warn/critical | 主机 exec 以 security="full" 运行 | tools.exec.security, agents.list[].tools.exec.security | no |
tools.exec.fs_tools_disabled_but_exec_enabled | warn | 文件系统工具策略未使 shell 执行变为只读 | tools.deny, agents.list[].tools.deny, agents.*.sandbox.workspaceAccess | no |
tools.exec.auto_allow_skills_enabled | warn | Exec 批准隐式信任技能包 | ~/.openclaw/exec-approvals.json | no |
tools.exec.allowlist_interpreter_without_strict_inline_eval | warn | 解释器白名单允许内联求值而不强制重新批准 | tools.exec.strictInlineEval, agents.list[].tools.exec.strictInlineEval, exec 批准白名单 | no |
tools.exec.safe_bins_interpreter_unprofiled | warn | safeBins 中的解释器/运行时没有显式配置文件扩大了执行风险 | tools.exec.safeBins, tools.exec.safeBinProfiles, agents.list[].tools.exec.* | no |
tools.exec.safe_bins_broad_behavior | warn | safeBins 中宽行为工具削弱了低风险 stdin 过滤可信模型 | tools.exec.safeBins, agents.list[].tools.exec.safeBins | no |
tools.exec.safe_bin_trusted_dirs_risky | warn | safeBinTrustedDirs 包含可变或危险目录 | tools.exec.safeBinTrustedDirs, agents.list[].tools.exec.safeBinTrustedDirs | no |
skills.workspace.symlink_escape | warn | 工作区 skills/**/SKILL.md 解析到工作区根目录之外(符号链接链漂移) | 工作区 skills/** 文件系统状态 | no |
plugins.extensions_no_allowlist | warn | 安装插件时未设置显式插件白名单 | plugins.allowlist | no |
plugins.installs_unpinned_npm_specs | warn | 插件索引记录未固定到不可变的 npm 规范 | 插件安装元数据 | no |
plugins.installs_missing_integrity | warn | 插件索引记录缺少完整性元数据 | 插件安装元数据 | no |
plugins.installs_version_drift | warn | 插件索引记录与已安装包版本漂移 | 插件安装元数据 | no |
plugins.code_safety | warn/critical | 插件代码扫描发现可疑或危险模式 | 插件代码/安装源 | no |
plugins.code_safety.entry_path | warn | 插件入口路径指向隐藏或 node_modules 位置 | 插件 manifest entry | no |
plugins.code_safety.entry_escape | critical | 插件入口逃出插件目录 | 插件 manifest entry | no |
plugins.code_safety.scan_failed | warn | 插件代码扫描无法完成 | 插件路径/扫描环境 | no |
skills.code_safety | warn/critical | 技能安装元数据/代码包含可疑或危险模式 | 技能安装源 | no |
skills.code_safety.scan_failed | warn | 技能代码扫描无法完成 | 技能扫描环境 | no |
security.exposure.open_channels_with_exec | warn/critical | 共享/公开房间可访问已启用 exec 的智能体 | channels.*.dmPolicy, channels.*.groupPolicy, tools.exec.*, agents.list[].tools.exec.* | no |
security.exposure.open_groups_with_elevated | critical | 开放群组 + 高权限工具产生高影响提示注入路径 | channels.*.groupPolicy, tools.elevated.* | no |
security.exposure.open_groups_with_runtime_or_fs | critical/warn | 开放群组可访问命令/文件工具,缺少沙箱/工作区保护 | channels.*.groupPolicy, tools.profile/deny, tools.fs.workspaceOnly, agents.*.sandbox.mode | no |
security.trust_model.multi_user_heuristic | warn | 配置看起来是多用户,但网关信任模型是个人助手 | 拆分信任边界,或共享用户加固(sandbox.mode, 工具拒绝/工作区范围) | no |
tools.profile_minimal_overridden | warn | 智能体覆盖绕过了全局最小 profile | agents.list[].tools.profile | no |
plugins.tools_reachable_permissive_policy | warn | 扩展工具在宽松上下文中可被访问 | tools.profile + 工具允许/拒绝 | no |
models.legacy | warn | 仍配置了遗留模型系列 | 模型选择 | no |
models.weak_tier | warn | 配置的模型低于当前推荐层级 | 模型选择 | no |
models.small_params | critical/info | 小型模型 + 不安全工具表面提高了注入风险 | 模型选择 + 沙箱/工具策略 | no |
summary.attack_surface | info | 认证、渠道、工具和暴露姿势的汇总摘要 | 多个键(见详情) | no |
相关文档
常见问题
如何修复 fs.state_dir.perms_world_writable?
修改 ~/.openclaw 目录权限,确保其他用户不可写。运行 openclaw security audit --fix 可自动修复该检查项。
gateway.bind_no_auth 怎么修复?
配置 gateway.bind 和 gateway.auth.* 参数,确保远程绑定需要共享密钥认证。该检查项不支持自动修复,需要手动修改配置文件。
security.exposure.open_channels_with_exec 有什么风险?
任何能加入公共或共享渠道的用户都可以访问启用了 exec 工具的智能体,可能导致命令执行。应配置 dmPolicy 或 groupPolicy 限制渠道访问,或通过 tools.exec.* 禁用敏感工具。