安全审计(Security audit)#
你可以对 n8n 实例运行安全审计,以检测常见的安全问题。
🌐 You can run a security audit on your n8n instance, to detect common security issues.
运行审计(Run an audit)#
你可以使用 CLI、公共 API 或 n8n 节点运行审计。
🌐 You can run an audit using the CLI, the public API, or the n8n node.
命令行接口(CLI)#
运行 n8n audit。
🌐 Run n8n audit.
应用接口(API)#
对 /audit 端点发起 POST 调用。你必须以实例所有者身份进行身份验证。
🌐 Make a POST call to the /audit endpoint. You must authenticate as the instance owner.
n8n 节点(n8n node)#
将 n8n 节点 添加到你的工作流中。选择 资源 > 审计 和 操作 > 生成。
🌐 Add the n8n node to your workflow. Select Resource > Audit and Operation > Generate.
举报内容(Report contents)#
审计会生成五份风险报告:
🌐 The audit generates five risk reports:
凭据(Credentials)#
本报告显示:
🌐 This report shows:
- 未在工作流中使用的凭据。
- 未在活动工作流中使用的凭据。
- 最近未在活动工作流中使用的凭据。
数据库(Database)#
本报告显示:
🌐 This report shows:
- 用于 SQL 节点中 执行查询 字段的表达式。
- 用于 SQL 节点中 查询参数 字段的表达式。
- SQL 节点中未使用的 查询参数 字段。
文件系统(File system)#
此报告列出了与文件系统交互的节点。
🌐 This report lists nodes that interact with the file system.
节点(Nodes)#
本报告显示:
🌐 This report shows:
- 官方高风险节点。这些是 n8n 内置节点。你可以使用它们在主机系统上获取并运行任何代码,这会使实例暴露于漏洞风险中。你可以在 n8n 代码 | 审计常量 中查看列表,位于
OFFICIAL_RISKY_NODE_TYPES下。 - 社区节点。
- 自定义节点
实例(Instance)#
本报告显示:
🌐 This report shows:
- 实例中未受保护的 Webhook。
- 缺少安全设置
- 如果你的实例已过期。