Skip to main content

用于自定义机密泄漏检测的操作指南

了解如何自定义 GitHub的机密泄漏检测工具。

为机密扫描定义自定义模式

使用正则表达式定义自定义模式来保护唯一的机密类型。

Generating regular expressions for custom patterns with AI

You can use the AI-powered 正则表达式生成器 to write regular expressions for custom patterns. The generator uses an AI model to generate expressions that match your input, and optionally example strings.

管理自定义模式

可以查看、编辑和移除自定义模式,以及为自定义模式启用推送保护。

从机密扫描中排除文件夹和文件

您可以通过在存储库中配置 secret_scanning.yml 文件,自定义 secret scanning 以自动关闭在特定目录或文件中发现的机密警报。

为存储库启用有效性检查

为存储库启用有效性检查有助于你确定警报修复的优先级,因为它会告知你机密是活跃的还是非活跃的。

Enabling extended metadata checks for your repository

Learn how to enable extended metadata checks for detected secrets so alerts detected by secret scanning include additional information that help you assess and remediate leaks faster.