Quickstart: Connect your GitHub repositories to Microsoft Defender for Cloud
With cloud workloads commonly spanning multiple cloud platforms, cloud security services must do the same. Microsoft Defender for Cloud protects workloads in Azure, Amazon Web Services (AWS), Google Cloud Platform (GCP), GitHub, and Azure DevOps (ADO).
To protect your GitHub-based resources, you can connect your GitHub organizations on the environment settings page in Microsoft Defender for Cloud. This page provides a simple onboarding experience (including auto discovery).
By connecting your GitHub repositories to Defender for Cloud, you'll extend Defender for Cloud's enhanced security features to your GitHub resources. These features include:
Defender for Cloud's Cloud Security Posture Management (CSPM) features - Assesses your GitHub resources according to GitHub-specific security recommendations. You can also learn about all of the recommendations for DevOps resources. Resources are assessed for compliance with built-in standards that are specific to DevOps. Defender for Cloud's asset inventory page is a multicloud enabled feature that helps you manage your GitHub resources alongside your Azure resources.
Defender for Cloud's Cloud Workload Protection features - Extends Defender for Cloud's threat detection capabilities and advanced defenses to your GitHub resources.
- An Azure account with Defender for Cloud onboarded. If you don't already have an Azure account Create an account for free.
The Azure Preview Supplemental Terms include other legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
|Pricing:||For pricing please see the Defender for Cloud pricing page.|
|Required permissions:||- Azure account: with permissions to sign into Azure portal
- Contributor: on the Azure subscription where the connector will be created
- Security Admin Role: in Defender for Cloud
- Organization Administrator: in GitHub
National (Azure Government, Azure China 21Vianet)
Connect your GitHub account
To connect your GitHub account to Microsoft Defender for Cloud:
Sign in to the Azure portal.
Navigate to Microsoft Defender for Cloud > Environment Settings.
Select Add environment.
Enter a name (limit of 20 characters), select your subscription, resource group, and region.
The subscription will be the location where Defender for DevOps will create and store the GitHub connection.
Select Next: Select plans.
Select Next: Authorize connection.
Select Authorize to grant your Azure subscription access to your GitHub repositories. Sign in, if necessary, with an account that has permissions to the repositories you want to protect.
The authorization will auto-login using the session from your browser tab. After you select Authorize, if you do not see the GitHub organizations you expect to see, check whether you are logged in to MDC in one browser tab and logged in to GitHub in another browser tab. After authorization, if you wait too long to install the DevOps application, the session will time out and you will receive an error message.
Select the repositories to install the GitHub application.
This will grant Defender for DevOps access to the selected repositories.
Select Next: Review and create.
When the process completes, the GitHub connector appears on your Environment settings page.
The Defender for DevOps service automatically discovers the repositories you selected and analyzes them for any security issues. Initial repository discovery can take up to 10 minutes during the onboarding process.
When auto-discovery is selected during the onboarding process, it can take up to 4 hours for repositories to appear after onboarding is completed. The auto-discovery process detects any new repositories and connects them to Defender for Cloud.
The Inventory page populates with your selected repositories, and the Recommendations page shows any security issues related to a selected repository. This can take up to 3 hours or more.
You can learn more about how Azure and GitHub integrate.
Learn about security hardening practices for GitHub Actions.
Learn more about Defender for DevOps.
Learn how to configure the MSDO GitHub action.
Learn how to configure pull request annotations in Defender for Cloud.
Submit and view feedback for