Secret scanning 更新 — 2025年11月
Source: GitHub Changelog
GitHub Secret Scanning 在 11 月新增了对大量新密钥类型的支持,并对检测和验证进行了多项改进。
- 新提供商模式 – 来自 Azure、Databricks、Microsoft、Paddle、PostHog 等 24 种新密钥类型。
- 改进的私钥检测 – 新增对椭圆曲线(Elliptic Curve)和通用 PKCS#8 私钥的模式,并更好地处理转义换行符。
- 扩展元数据 – Discord
discord_bot_token现在包含扩展元数据检查。 - 有效性检查 – 对 AWS Access Key ID 的验证已得到细化。
- 未列出的 gist – 未列出的 GitHub gist 中的密钥现在会报告给 Secret Scanning 合作伙伴。
新增模式
Secret Scanning 会自动检测仓库中匹配以下模式的任何密钥。
| Provider | Secret type | Partner | User | Push protection |
|---|---|---|---|---|
| Azure | azure_immersive_reader_key | ✓ | ✓ | ✓ (configurable) |
| Azure | azure_logic_apps_url | ✓ | ✓ | ✓ (configurable) |
| crates.io | cratesio_api_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_account_session_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_federated_account_session_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_oauth_code | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_oauth_refresh_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_oauth_secret_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_oauth_single_use_refresh_token_child | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_oauth_single_use_refresh_token_parent | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_scoped_api_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_scoped_internal_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_token | ✓ | ✓ | ✓ (configurable) |
| Databricks | databricks_workspace_session_token | ✓ | ✓ | ✓ (configurable) |
| Microsoft | power_automate_webhook_sas | ✓ | ✓ | ✓ (configurable) |
| OneSignal | onesignal_rich_authentication_token | ✓ | ✓ | ✓ (configurable) |
| Paddle | paddle_api_key | ✓ | ✓ | ✓ (configurable) |
| Paddle | paddle_sandbox_api_key | ✓ | ✓ | ✓ (configurable) |
| Pineapple Technologies Limited | pineapple_technologies_incident_api_key | ✓ | ✓ | ✓ (configurable) |
| PostHog | posthog_feature_flags_secure_api_key | ✓ | ✓ (configurable) | |
| PostHog | posthog_personal_api_key | ✓ | ✓ (configurable) | |
| Rainforest Pay | rainforest_api_key | ✓ | ✓ | ✓ (configurable) |
| Rainforest Pay | rainforest_sandbox_api_key | ✓ | ✓ | ✓ (configurable) |
| Raycast | raycast_access_token | ✓ | ✓ | ✓ (configurable) |
新增私钥模式
正如在 11 月 12 日 所宣布的,Secret Scanning 现在能够检测额外的私钥格式:
| Provider | Secret type | Description |
|---|---|---|
| Generic | ec_private_key | 椭圆曲线私钥 |
| Generic | generic_private_key | 通用 PKCS#8 私钥 |
这两种类型均可用于推送保护,但默认未启用。
检测器升级与改进
-
以下私钥模式现在也能检测包含转义换行符(
\n)的密钥,这在配置文件和环境变量中很常见:ec_private_key、github_ssh_private_key、openssh_private_key、rsa_private_key。 -
Sentry 令牌重命名 – 令牌类型已重命名以匹配 Sentry 更新后的命名约定:
之前的名称 新的名称 sentry_organization_tokensentry_org_auth_tokensentry_personal_tokensentry_user_auth_token -
扩展元数据检查 – Discord
discord_bot_token密钥类型现在支持扩展元数据检查,提供所有者信息、创建日期和组织细节等额外上下文。 -
有效性检查升级 – 对 AWS Access Key ID 的验证改进意味着大多数客户将看到先前标记为 “unknown” 的警报转为 “valid” 或 “invalid”。
Provider Pattern Validity Amazon Web Services (AWS) aws_access_key_id✓
合作伙伴通知更新
正如在 11 月 25 日 所宣布的,未列出的 GitHub gist 中发现的密钥现在会报告给 Secret Scanning 合作伙伴。由于未列出的 gist 只要拥有链接即可访问,gist 中泄露的密钥应视为与其他公开暴露的凭证同等对待。
了解更多关于 secret scanning 的信息,并在产品文档中查看 完整的支持密钥列表。