Triage and Remediation
Remediation
Using Console
Using Console
To enable Microsoft Defender for Cloud for Azure Containers, please follow the below steps:
- Go to the Azure portal and log in with your credentials.
- Navigate to the “Security Center” from the left-hand side menu.
- Click on “Security Center” and then select “Azure Defender” from the top menu.
- Click on “Container Security” and then select “On” to enable Microsoft Defender for Cloud for Azure Containers.
- Review the pricing tier options and select the one that suits your requirements.
- Click on “Save” to apply the changes.
- Once the changes are saved, you will see the status change to “Enabled” under the “Azure Defender” dashboard.
Using CLI
Using CLI
To enable Microsoft Defender for Cloud for Azure Containers using AZURE CLI, follow these steps:
- Open the Azure CLI command prompt and log in to your Azure account.
-
Run the following command to check if the Azure Defender for Container Registries is enabled:
Replace
<registry-id>
with the ID of the registry you want to enable Azure Defender for. -
If the Azure Defender for Container Registries is not enabled, run the following command to enable it:
Replace
<registry-id>
with the ID of the registry you want to enable Azure Defender for. -
Run the following command to check if the Azure Defender for Container Images is enabled:
Replace
<registry-id>
with the ID of the registry you want to enable Azure Defender for. -
If the Azure Defender for Container Images is not enabled, run the following command to enable it:
Replace
<registry-id>
with the ID of the registry you want to enable Azure Defender for. -
Finally, run the following command to check the status of the Azure Defender for Container Images:
Replace
<registry-id>
with the ID of the registry you want to check the status for.
Using Python
Using Python
To enable Microsoft Defender for Cloud for Azure Containers using Python, you can follow the below steps:Step 1: Install the Azure SDK for Python using the following command:Step 2: Authenticate with Azure using the following code:Step 3: Get the resource group and container registry where you want to enable Microsoft Defender for Cloud. You can use the following code to get the resource group and container registry:Step 4: Enable Microsoft Defender for Cloud for Azure Containers using the following code:After running the above code, Microsoft Defender for Cloud for Azure Containers will be enabled for the specified container registry.