プロジェクトを外部サービスと通信させる場合、認証にトークンまたは秘密鍵を使用できます。 トークンや秘密鍵は、サービスプロバイダが発行できるシークレットです。 リポジトリにシークレットをチェックインする場合、リポジトリへの読み取りアクセスを持つすべてのユーザがシークレットを使用して、自分の権限で外部サービスにアクセスできます。 シークレットは、プロジェクトのリポジトリの外の、安全な専用の場所に保存することをお勧めします。
Secret scanning will scan your entire Git history on all branches present in your GitHub repository for any secrets. Service providers can partner with GitHub to provide their secret formats for scanning. For more information, see "Secret scanning partner program."
GitHub上のパブリックもしくはプライベートリポジトリに既知のパターンを持つシークレットを誰かがチェックインすると、secret scanningはチェックインの時点でそのシークレットを捕捉し、漏洩のインパクトを緩和する手助けをします。 リポジトリ管理者は、シークレットを含むコミットについて通知され、リポジトリのセキュリティタブですべての検出されたシークレットを素早く見ることができます。
パブリックリポジトリの secret scanning について
パブリックリポジトリでは、Secret scanningは自動的に有効になります。 パブリックリポジトリにプッシュすると、GitHub がコミットの内容をスキャンしてシークレットを探します。 プライベートリポジトリをパブリックに切り替えると、GitHub はリポジトリ全体をスキャンしてシークレットを探します。
secret scanning が認証情報一式を検出すると、弊社はそのシークレットを発行したサービスプロバイダに通知します。 サービスプロバイダは認証情報を検証し、シークレットを取り消すか、新しいシークレットを発行するか、または直接連絡する必要があるかを決定します。これは、ユーザまたはサービスプロバイダに関連するリスクに依存します。 For an overview of how we work with token-issuing partners, see "Secret scanning partner program."
現在 GitHub は、パブリックリポジトリをスキャンして、次のサービスプロバイダが発行したシークレットを探します。
| パートナー | サポートされているシークレット |
|---|---|
| Adafruit IO | Adafruit IO Key |
| Adobe | Adobe Device Token |
| Adobe | Adobe Service Token |
| Adobe | Adobe Short-Lived Access Token |
| Adobe | Adobe JSON Web Token |
| Alibaba Cloud | Alibaba Cloud Access Key ID及びAccess Key Secret pair |
| Amazon Web Services (AWS) | Amazon AWS Access Key ID及びSecret Access Key pair |
| Atlassian | Atlassian API Token |
| Atlassian | Atlassian JSON Web Token |
| Azure | Azure DevOps Personal Access Token |
| Azure | Azure SAS Token |
| Azure | Azure Service Management Certificate |
| Azure | Azure SQL Connection String |
| Azure | Azure Storage Account Key |
| Clojars | Clojars Deploy Token |
| CloudBees CodeShip | CloudBees CodeShip Credential |
| Databricks | Databricks Access Token |
| Datadog | Datadog API Key |
| Discord | Discord Bot Token |
| Doppler | Doppler Personal Token |
| Doppler | Doppler Service Token |
| Doppler | Doppler CLI Token |
| Doppler | Doppler SCIM Token |
| Dropbox | Dropbox Access Token |
| Dropbox | Dropbox Short Lived Access Token |
| Dynatrace | Dynatrace Access Token |
| Dynatrace | Dynatrace Internal Token |
| Finicity | Finicity App Key |
| Frame.io | Frame.io JSON Web Token |
| Frame.io | Frame.io Developer Token |
| GitHub | GitHub個人アクセストークン |
| GitHub | GitHub OAuthアクセストークン |
| GitHub | GitHub Refreshトークン |
| GitHub | GitHubアプリケーションインストールアクセストークン |
| GitHub | GitHub SSH秘密鍵 |
| GoCardless | GoCardless Live Access Token |
| GoCardless | GoCardless Sandbox Access Token |
| Google Cloud | Google API Key |
| Google Cloud | Google Cloud Private Key ID |
| Hashicorp Terraform | Terraform Cloud / Enterprise API Token |
| Hubspot | Hubspot API Key |
| Mailchimp | Mailchimp API Key |
| Mailchimp | Mandrill API Key |
| Mailgun | Mailgun API Key |
| MessageBird | MessageBird API Key |
| npm | npm Access Token |
| NuGet | NuGet API Key |
| OpenAI | OpenAI API Key |
| Palantir | Palantir JSON Web Token |
| Plivo | Plivo Auth Token |
| Postman | Postman 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 |
| RubyGems | RubyGems API Key |
| Samsara | Samsara API Token |
| Samsara | Samsara OAuth Access Token |
| SendGrid | SendGrid API Key |
| Shopify | Shopify App Shared Secret |
| Shopify | Shopify Access Token |
| Shopify | Shopify Custom App Access Token |
| Shopify | Shopify Private App Password |
| Slack | Slack API Token |
| Slack | Slack Incoming Webhook URL |
| Slack | Slack Workflow Webhook URL |
| SSLMate | SSLMate API Key |
| SSLMate | SSLMate Cluster Secret |
| Stripe | Stripe Live API Secret Key |
| Stripe | Stripe Test API Secret Key |
| Stripe | Stripe Live API Restricted Key |
| Stripe | Stripe Test API Restricted Key |
| Tencent Cloud | Tencent Cloud Secret ID |
| Twilio | Twilio Account String Identifier |
| Twilio | Twilio API Key |
| Valour | Valour Access Token |
プライベートリポジトリの secret scanning について
リポジトリの管理者または Organization のオーナーは、Organization が所有するプライベートなリポジトリで secret scanning を有効化できます。 You can enable secret scanning for all your repositories, or for all new repositories within your organization. Secret scanning is not available for user-owned private repositories. For more information, see "Managing security and analysis settings for your repository" and "Managing security and analysis settings for your organization."
You can also define custom secret scanning patterns that only apply to your repository or organization. For more information, see "Defining custom patterns for secret scanning."
secret scanningが有効化されているプライベートリポジトリにコミットをプッシュすると、GitHub はコミットの内容をスキャンしてシークレットを探します。
secret scanning が プライベートリポジトリでシークレットを検出した場合、GitHub はアラートを生成します。
-
GitHub は、リポジトリ管理者と Organizationのオーナーにメールアラートを送信します。
-
GitHub は、シークレットをリポジトリにコミットしたコントリビューターに、関連する secret scanning アラートのリンクを記載したメールアラートを送信します。 コミット作者は、リポジトリでこのアラートを表示して、アラートを解決できます。
-
GitHub は、リポジトリのアラートを表示します。
For more information about viewing and resolving secret scanning alerts, see "Managing alerts from secret scanning."
リポジトリ管理者と Organization のオーナーは、ユーザおよび Team に secret scanning アラートへのアクセスを許可できます。 詳しい情報については「リポジトリのセキュリティ及び分析の設定の管理」を参照してください。
To monitor results from secret scanning across your private repositories or your organization, you can use the secret scanning API. API に関する詳しい情報については、「Secret scanning」を参照してください。
現在 GitHub は、 プライベート リポジトリをスキャンして、次のサービスプロバイダーが発行したシークレットを探します。
| パートナー | サポートされているシークレット | APIスラッグ |
|---|---|---|
| Adafruit IO | Adafruit IO Key | adafruit_io_key |
| Adobe | Adobe Device Token | adobe_device_token |
| Adobe | Adobe Service Token | adobe_service_token |
| Adobe | Adobe Short-Lived Access Token | adobe_short_lived_access_token |
| Adobe | Adobe JSON Web Token | adobe_jwt |
| Alibaba Cloud | Alibaba Cloud Access Key ID | alibaba_cloud_access_key_id |
| Alibaba Cloud | Alibaba Cloud Access Key Secret | alibaba_cloud_access_key_secret |
| Amazon Web Services (AWS) | Amazon AWS Access Key ID | aws_access_key_id |
| Amazon Web Services (AWS) | Amazon AWS Secret Access Key | aws_secret_access_key |
| Asana | Asana Personal Access Token | asana_personal_access_token |
| Atlassian | Atlassian API Token | atlassian_api_token |
| Atlassian | Atlassian JSON Web Token | atlassian_jwt |
| Atlassian | Bitbucket Server Personal Access Token | bitbucket_server_personal_access_token |
| Azure | Azure DevOps Personal Access Token | azure_devops_personal_access_token |
| Azure | Azure SAS Token | azure_sas_token |
| Azure | Azure Service Management Certificate | azure_management_certificate |
| Azure | Azure SQL Connection String | azure_sql_connection_string |
| Azure | Azure Storage Account Key | azure_storage_account_key |
| Clojars | Clojars Deploy Token | clojars_deploy_token |
| CloudBees CodeShip | CloudBees CodeShip Credential | codeship_credential |
| Databricks | Databricks Access Token | databricks_access_token |
| Discord | Discord Bot Token | discord_bot_token |
| Doppler | Doppler Personal Token | doppler_personal_token |
| Doppler | Doppler Service Token | doppler_service_token |
| Doppler | Doppler CLI Token | doppler_cli_token |
| Doppler | Doppler SCIM Token | doppler_scim_token |
| Dropbox | Dropbox Access Token | dropbox_access_token |
| Dropbox | Dropbox Short Lived Access Token | dropbox_short_lived_access_token |
| Dynatrace | Dynatrace Access Token | dynatrace_access_token |
| Dynatrace | Dynatrace Internal Token | dynatrace_internal_token |
| EasyPost | EasyPost Production API Key | easypost_production_api_key |
| EasyPost | EasyPost Test API Key | easypost_test_api_key |
| Facebook Access Token | facebook_access_token | |
| Fastly | Fastly API Token | fastly_api_token |
| Finicity | Finicity App Key | finicity_app_key |
| Frame.io | Frame.io JSON Web Token | frameio_jwt |
| Frame.io | Frame.io Developer Token | frameio_developer_token |
| GitHub | GitHub個人アクセストークン | github_personal_access_token |
| GitHub | GitHub OAuthアクセストークン | github_oauth_access_token |
| GitHub | GitHubリフレッシュトークン | github_refresh_token |
| GitHub | GitHub Appインストールアクセストークン | github_app_installation_access_token |
| GitHub | GitHub SSH秘密鍵 | github_ssh_private_key |
| GoCardless | GoCardless Live Access Token | gocardless_live_access_token |
| GoCardless | GoCardless Sandbox Access Token | gocardless_sandbox_access_token |
| Google Cloud | Google API Key | google_api_key |
| Google Cloud | Google Cloud Private Key ID | google_cloud_private_key_id |
| Grafana | Grafana API Key | grafana_api_key |
| Hashicorp Terraform | Terraform Cloud / Enterprise API Token | terraform_api_token |
| Hubspot | Hubspot API Key | hubspot_api_key |
| Intercom | Intercom Access Token | intercom_access_token |
| Lob | Lob Live API Key | lob_live_api_key |
| Lob | Lob Test API Key | lob_test_api_key |
| Mailchimp | Mailchimp API Key | mailchimp_api_key |
| Mailgun | Mailgun API Key | mailgun_api_key |
| MessageBird | MessageBird API Key | messagebird_api_key |
| npm | npm Access Token | npm_access_token |
| NuGet | NuGet API Key | nuget_api_key |
| Onfido | Onfido Live API Token | onfido_live_api_token |
| Onfido | Onfido Sandbox API Token | onfido_sandbox_api_token |
| OpenAI | OpenAI API Key | openai_api_key |
| Palantir | Palantir JSON Web Token | palantir_jwt |
| Postman | Postman API Key | postman_api_key |
| Proctorio | Proctorio Consumer Key | proctorio_consumer_key |
| Proctorio | Proctorio Linkage Key | proctorio_linkage_key |
| Proctorio | Proctorio Registration Key | proctorio_registration_key |
| Proctorio | Proctorio Secret Key | proctorio_secret_key |
| Pulumi | Pulumi Access Token | pulumi_access_token |
| PyPI | PyPI API Token | pypi_api_token |
| RubyGems | RubyGems API Key | rubygems_api_key |
| Samsara | Samsara API Token | samsara_api_token |
| Samsara | Samsara OAuth Access Token | samsara_oauth_access_token |
| SendGrid | SendGrid API Key | sendgrid_api_key |
| Shippo | Shippo Live API Token | shippo_live_api_token |
| Shippo | Shippo Test API Token | shippo_test_api_token |
| Shopify | Shopify App Shared Secret | shopify_app_shared_secret |
| Shopify | Shopify Access Token | shopify_access_token |
| Shopify | Shopify Custom App Access Token | shopify_custom_app_access_token |
| Shopify | Shopify Private App Password | shopify_private_app_password |
| Slack | Slack API Token | slack_api_token |
| Slack | Slack Incoming Webhook URL | slack_incoming_webhook_url |
| Slack | Slack Workflow Webhook URL | slack_workflow_webhook_url |
| SSLMate | SSLMate API Key | sslmate_api_key |
| SSLMate | SSLMate Cluster Secret | sslmate_cluster_secret |
| Stripe | Stripe API Key | stripe_api_key |
| Stripe | Stripe Live API Secret Key | stripe_live_secret_key |
| Stripe | Stripe Test API Secret Key | stripe_test_secret_key |
| Stripe | Stripe Live API Restricted Key | stripe_live_restricted_key |
| Stripe | Stripe Test API Restricted Key | stripe_test_restricted_key |
| Stripe | Stripe Webhook Signing Secret | stripe_webhook_signing_secret |
| Tableau | Tableau Personal Access Token | tableau_personal_access_token |
| Telegram | Telegram Bot Token | telegram_bot_token |
| Tencent Cloud | Tencent Cloud Secret ID | tencent_cloud_secret_id |
| Twilio | Twilio Account String Identifier | twilio_account_sid |
| Twilio | Twilio API Key | twilio_api_key |

