注意:站点管理员必须为 你的 GitHub Enterprise Server 实例 启用 secret scanning,你才能使用这些功能。 有关详细信息,请参阅“为设备配置密码扫描”。
如果企业所有者在企业级别设置了策略,你可能无法启用或禁用 secret scanning。 有关详细信息,请参阅“强制实施企业的代码安全性和分析策略”。
关于secret scanning 警报
当 机密扫描 时,GitHub 会扫描存储库中多种服务提供商发布的机密,并生成 机密扫描警报。
可以在存储库的“安全性”选项卡上看到这些警报。
如果访问资源需要配对的凭据,则只有在同一文件中检测到该配对的两个凭据时,机密扫描才会创建警报。 这可确保最关键的泄漏不会隐藏在有关部分泄漏的信息后面。 对匹配还有助于减少误报,因为对的两个元素必须一起使用才能访问提供商的资源。
如果使用 REST API 进行机密扫描,可以使用 Secret type 报告来自特定颁发者的机密。 有关详细信息,请参阅“适用于机密扫描的 REST API 终结点”。
注意: 还可以为存储库、组织或企业定义自定义 secret scanning 模式。 有关详细信息,请参阅“为机密扫描定义自定义模式”。
关于推送保护警报
推送保护警报是推送保护报告的用户警报。 Secret scanning 作为推送保护,当前扫描存储库,查找部分服务提供商发布的机密。
如果访问资源需要配对的凭据,则只有在同一文件中检测到该配对的两个凭据时,机密扫描才会创建警报。 这可确保最关键的泄漏不会隐藏在有关部分泄漏的信息后面。 对匹配还有助于减少误报,因为对的两个元素必须一起使用才能访问提供商的资源。
推送保护可能不支持某些旧版令牌,因为这些令牌生成的误报数可能高于其最新版本。 推送保护也可能不适用于旧令牌。 对于 Azure 存储密钥等令牌,GitHub 仅支持“最近创建”令牌,不支持与旧模式匹配的令牌。 有关推送保护限制的详细信息,请参阅“排查机密扫描问题”。
支持的机密
下表列出了 secret scanning 支持的机密。 可以查看为每个令牌生成的警报类型。
-
提供商 - 令牌提供商的名称。
-
Secret scanning 警报 - 向 GitHub 上的用户报告泄漏的令牌。 适用于启用了 GitHub Advanced Security 和 secret scanning 的专用存储库。
-
推送保护 - 向 GitHub 上的用户报告泄漏的令牌。 适用于启用了 secret scanning 和推送保护的存储库。
**注意:**推送保护可能不支持某些旧版令牌,因为这些令牌生成的误报数可能高于其最新版本。 推送保护也可能不适用于旧令牌。 对于 Azure 存储密钥等令牌,GitHub 仅支持“最近创建”令牌,不支持与旧模式匹配的令牌。 有关推送保护限制的详细信息,请参阅“排查机密扫描问题”。
| 提供程序 | 标记 | Secret scanning 警报 | 推送保护 |
|---|---|---|---|
| Adafruit IO | adafruit_io_key | ||
| Adobe | adobe_device_token | ||
| Adobe | adobe_service_token | ||
| Adobe | adobe_short_lived_access_token | ||
| Alibaba Cloud | alibaba_cloud_access_key_id alibaba_cloud_access_key_secret | ||
| Login with Amazon | amazon_oauth_client_id amazon_oauth_client_secret | ||
| Amazon Web Services (AWS) | aws_access_key_id aws_secret_access_key | ||
| Amazon Web Services (AWS) | aws_session_token aws_temporary_access_key_id aws_secret_access_key | ||
| Asana | asana_personal_access_token | ||
| Atlassian | atlassian_api_token | ||
| Atlassian | atlassian_jwt | ||
| Atlassian | bitbucket_server_personal_access_token | ||
| Azure | azure_active_directory_application_secret | ||
| Azure | azure_cache_for_redis_access_key | ||
| Azure | azure_devops_personal_access_token | ||
| Azure | azure_function_key | ||
| Azure | azure_sas_token | ||
| Azure | azure_management_certificate | ||
| Azure | azure_sql_connection_string | ||
| Azure | azure_storage_account_key | ||
| Beamer | beamer_api_key | ||
| Checkout.com | checkout_production_secret_key | ||
| Checkout.com | checkout_test_secret_key | ||
| Chief Tools | chief_tools_token | ||
| Clojars | clojars_deploy_token | ||
| CloudBees CodeShip | codeship_credential | ||
| Contentful | contentful_personal_access_token | ||
| Databricks | databricks_access_token | ||
| DigitalOcean | digitalocean_oauth_token | ||
| DigitalOcean | digitalocean_personal_access_token | ||
| DigitalOcean | digitalocean_refresh_token | ||
| DigitalOcean | digitalocean_system_token | ||
| Discord | discord_api_token_v2 | ||
| Discord | discord_bot_token | ||
| Doppler | doppler_audit_token | ||
| Doppler | doppler_cli_token | ||
| Doppler | doppler_personal_token | ||
| Doppler | doppler_scim_token | ||
| Doppler | doppler_service_token | ||
| Dropbox | dropbox_access_token | ||
| Dropbox | dropbox_short_lived_access_token | ||
| Duffel | duffel_live_access_token | ||
| Duffel | duffel_test_access_token | ||
| Dynatrace | dynatrace_access_token | ||
| Dynatrace | dynatrace_internal_token | ||
| EasyPost | easypost_production_api_key | ||
| EasyPost | easypost_test_api_key | ||
| Fastly | fastly_api_token | ||
| Figma | figma_pat | ||
| Finicity | finicity_app_key | ||
| Flutterwave | flutterwave_live_api_secret_key | ||
| Flutterwave | flutterwave_test_api_secret_key | ||
| Frame.io | frameio_developer_token | ||
| Frame.io | frameio_jwt | ||
| FullStory | fullstory_api_key | ||
| GitHub | github_app_installation_access_token | ||
| GitHub | github_oauth_access_token | ||
| GitHub | github_personal_access_token | ||
| GitHub | github_refresh_token | ||
| GitHub | github_ssh_private_key | ||
| GitLab | gitlab_access_token | ||
| GoCardless | gocardless_live_access_token | ||
| GoCardless | gocardless_sandbox_access_token | ||
| firebase_cloud_messaging_server_key | |||
| google_cloud_storage_service_account_access_key_id google_cloud_storage_access_key_secret | |||
| google_cloud_storage_user_access_key_id google_cloud_storage_access_key_secret | |||
| google_oauth_access_token | |||
| google_oauth_client_id google_oauth_client_secret | |||
| google_oauth_refresh_token | |||
| Google Cloud | google_api_key | ||
| Google Cloud | google_cloud_private_key_id | ||
| Grafana | grafana_cloud_api_key | ||
| Grafana | grafana_cloud_api_token | ||
| Grafana | grafana_project_api_key | ||
| Grafana | grafana_project_service_account_token | ||
| Hashicorp Terraform | terraform_api_token | ||
| Hubspot | hubspot_api_key | ||
| Hubspot | hubspot_api_personal_access_key | ||
| Intercom | intercom_access_token | ||
| Ionic | ionic_personal_access_token | ||
| Ionic | ionic_refresh_token | ||
| JD Cloud | jd_cloud_access_key | ||
| JFrog | jfrog_platform_access_token | ||
| JFrog | jfrog_platform_api_key | ||
| Linear | linear_api_key | ||
| Linear | linear_oauth_access_token | ||
| Lob | lob_live_api_key | ||
| Lob | lob_test_api_key | ||
| LocalStack | localstack_api_key | ||
| Mailchimp | mailchimp_api_key | ||
| Mailgun | mailgun_api_key | ||
| Mapbox | mapbox_secret_access_token | ||
| MessageBird | messagebird_api_key | ||
| Meta | facebook_access_token | ||
| Midtrans | midtrans_production_server_key | ||
| Midtrans | midtrans_sandbox_server_key | ||
| New Relic | new_relic_insights_query_key | ||
| New Relic | new_relic_license_key | ||
| New Relic | new_relic_personal_api_key | ||
| New Relic | new_relic_rest_api_key | ||
| Notion | notion_integration_token | ||
| Notion | notion_oauth_client_secret | ||
| npm | npm_access_token | ||
| NuGet | nuget_api_key | ||
| Octopus Deploy | octopus_deploy_api_key | ||
| Onfido | onfido_live_api_token | ||
| Onfido | onfido_sandbox_api_token | ||
| OpenAI | openai_api_key | ||
| OpenAI | openai_api_key_v2 | ||
| Palantir | palantir_jwt | ||
| Persona | persona_production_api_key | ||
| Persona | persona_sandbox_api_key | ||
| PlanetScale | planetscale_database_password | ||
| PlanetScale | planetscale_oauth_token | ||
| PlanetScale | planetscale_service_token | ||
| Plivo | plivo_auth_id plivo_auth_token | ||
| Postman | postman_api_key | ||
| Prefect | prefect_server_api_key | ||
| Prefect | prefect_user_api_key | ||
| Proctorio | proctorio_consumer_key | ||
| Proctorio | proctorio_linkage_key | ||
| Proctorio | proctorio_registration_key | ||
| Proctorio | proctorio_secret_key | ||
| Pulumi | pulumi_access_token | ||
| PyPI | pypi_api_token | ||
| ReadMe | readmeio_api_access_token | ||
| redirect.pizza | redirect_pizza_api_token | ||
| RubyGems | rubygems_api_key | ||
| Samsara | samsara_api_token | ||
| Samsara | samsara_oauth_access_token | ||
| SendGrid | sendgrid_api_key | ||
| Sendinblue | sendinblue_api_key | ||
| Sendinblue | sendinblue_smtp_key | ||
| Shippo | shippo_live_api_token | ||
| Shippo | shippo_test_api_token | ||
| Shopify | shopify_access_token | ||
| Shopify | shopify_app_client_credentials | ||
| Shopify | shopify_app_client_secret | ||
| Shopify | shopify_app_shared_secret | ||
| Shopify | shopify_custom_app_access_token | ||
| Shopify | shopify_marketplace_token | ||
| Shopify | shopify_merchant_token | ||
| Shopify | shopify_partner_api_token | ||
| Shopify | shopify_private_app_password | ||
| Slack | slack_api_token | ||
| Slack | slack_incoming_webhook_url | ||
| Slack | slack_workflow_webhook_url | ||
| Square | square_access_token | ||
| Square | square_production_application_secret | ||
| Square | square_sandbox_application_secret | ||
| SSLMate | sslmate_api_key | ||
| SSLMate | sslmate_cluster_secret | ||
| Stripe | stripe_live_restricted_key | ||
| Stripe | stripe_api_key | ||
| Stripe | stripe_legacy_api_key | ||
| Stripe | stripe_test_restricted_key | ||
| Stripe | stripe_test_secret_key | ||
| Stripe | stripe_webhook_signing_secret | ||
| Supabase | supabase_service_key | ||
| Tableau | tableau_personal_access_token | ||
| Telegram | telegram_bot_token | ||
| Telnyx | telnyx_api_v2_key | ||
| Tencent Cloud | tencent_cloud_secret_id | ||
| Tencent WeChat | tencent_wechat_api_app_id | ||
| Twilio | twilio_access_token | ||
| Twilio | twilio_account_sid | ||
| Twilio | twilio_api_key | ||
| Typeform | typeform_personal_access_token | ||
| Uniwise | wiseflow_api_key | ||
| Yandex | yandex_iam_access_secret | ||
| Yandex | yandex_cloud_api_key | ||
| Yandex | yandex_cloud_iam_cookie | ||
| Yandex | yandex_cloud_iam_token | ||
| Yandex | yandex_dictionary_api_key | ||
| Yandex | yandex_predictor_api_key | ||
| Yandex | yandex_translate_api_key | ||
| Zuplo | zuplo_consumer_api_key |
延伸阅读
- "保护您的仓库"
- “保护帐户和数据安全”
- "密码扫描合作伙伴计划" 在 GitHub Enterprise Cloud 文档中的