About types of alerts
有两种类型的 机密扫描警报:
- 机密扫描警报:在存储库中检测到支持的机密时,在存储库的安全选项卡中向用户报告。
- 推送保护警报:当参与者绕过推送保护时,在存储库的安全选项卡中向用户报告。
About 机密扫描警报
When GitHub detects a supported secret in a repository that has secret scanning enabled, a secret scanning alert is generated and displayed in the Security tab of the repository.
Secret scanning alerts can be of the following types:
- Default alerts, which relate to supported patterns and specified custom patterns.
- Experimental alerts, which can have a higher ratio of false positives or secrets used in tests.
GitHub displays experimental alerts in a different list to default alerts, making triaging a better experience for users. For more information, see 查看和筛选机密扫描警报.
如果访问资源需要配对的凭据,则只有在同一文件中检测到该配对的两个凭据时,机密扫描才会创建警报。 这可确保最关键的泄漏不会隐藏在有关部分泄漏的信息后面。 对匹配还有助于减少误报,因为对的两个元素必须一起使用才能访问提供商的资源。
About push protection alerts
Push protection scans pushes for supported secrets. If push protection detects a supported secret, it will block the push. When a contributor bypasses push protection to push a secret to the repository, a push protection alert is generated and displayed in the Security tab of the repository. To see all push protection alerts for a repository, you must filter by bypassed: true on the alerts page. For more information, see 查看和筛选机密扫描警报.
如果访问资源需要配对的凭据,则只有在同一文件中检测到该配对的两个凭据时,机密扫描才会创建警报。 这可确保最关键的泄漏不会隐藏在有关部分泄漏的信息后面。 对匹配还有助于减少误报,因为对的两个元素必须一起使用才能访问提供商的资源。
注意
推送保护可能不支持某些旧版令牌,因为这些令牌生成的误报数可能高于其最新版本。 推送保护也可能不适用于旧令牌。 对于 Azure 存储密钥等令牌,GitHub 仅支持“最近创建”令牌,不支持与旧模式匹配的令牌。 For more information about push protection limitations, see 排查机密扫描问题.