Fix a security recommendation
In this task you'll fix a Defender for Cloud recommendation.
Each recommendation explains what's wrong, why it matters, which resources are affected and how to fix it. Some have a Fix button that does it for you; others list manual steps.
A good first one on a new subscription is making sure Defender for Cloud knows who to email about security problems. It's free and takes two minutes.
Example. Larkfield Group's subscriptions had no security contact, so Microsoft's alerts about a suspicious sign-in went nowhere. Adding the security team's address, security@larkfield.example, fixed that.
Before you start
You need: Security Admin or Contributor on the subscription. Time: 10 minutes.
Where to look
- Microsoft Defender for Cloud
- Recommendations
Steps
- Open Microsoft Defender for Cloud and select Recommendations.
- Search the list for contact email and open the recommendation about a security contact for the subscription, if it's listed.If it isn't, your subscription already has one. Pick any other recommendation and read it the same way.
- Read the description, the affected resources and the remediation steps.
- To fix it, open Environment settings, select Expand all, then your subscription, then Email notifications.
- Under Email recipients, choose Owner in All users with the following roles, or type your address in Additional email addresses. Tick Notify about alerts with the following severity (or higher), leave it on High, and select Save.The page also offers emails about attack paths. Leave that off unless you use Defender CSPM.
- Come back to Recommendations tomorrow: the item should be gone and the secure score slightly higher.
Commands
# Names of the recommendations your resources currently fail
az security assessment list \
--query "[?status.code=='Unhealthy'].displayName" --output tsv
Watch out for
- Cost
- Fixing recommendations is usually free, but some fixes switch on paid features, such as a Defender plan or a firewall. Read what a Fix button does before selecting it.
- Security
- Fix high-severity items first. Use exemptions sparingly and always record why, so the next person knows it was a decision, not an oversight.
- Common mistakes
- Using Fix on many resources at once without reading the change. Exempting a recommendation just to raise the score.
Clean up
Keep the security contact: it's useful for real alerts. Nothing else to clean up.
Words to know
- Remediation
- The steps that fix a recommendation.
- Quick fix
- A Fix button that applies the change to the selected resources for you.
- Exemption
- Marking a recommendation as not applying to a resource, with a reason, so it no longer lowers the score.
Tick off each step and track your progress in the guide.
Open this task in Azure Portal, Hands On