🛡️ Azure Virtual Network Flow Logs retention period is less than 90 days🟢
- Contextual name: 🛡️ Virtual Network Flow Logs retention period is less than 90 days🟢
- ID:
/ce/ca/azure/virtual-network/virtual-network-flow-logs-retention-period-over-90-days - Tags:
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY,RELIABILITY
Logic
Description
Description
Ensure that virtual network flow logs are retained for greater than or equal to 90 days.
Rationale
Virtual network flow logs provide critical visibility into traffic patterns. Logs can be used to check for anomalies and give insight into suspected breaches.
Impact
- Virtual network flow logs are charged per gigabyte of network flow logs collected and come with a free tier of 5 GB/month per subscription.
- If traffic analytics is enabled with virtual network flow logs, traffic analytics pricing applies at per gigabyte processing rates.
- The storage of logs is charged separately, and the cost will depend on the amount of logs and the retention period.
Audit
This policy flags an Azure Network Watcher Flow Log for Virtual Networks as
INCOMPLIANTif any of these conditions are true:
Retention Policy Statusis not set to Enabled.Retention Policy Daysis less than 90 days and not equal to 0 (unlimited).A Flow Log is marked as
INAPPLICABLEif either:
Log Statusis not set to Enabled.... see more
Remediation
Remediation
From Azure Portal
- Navigate to
Network Watcher.- Under
Logs, selectFlow logs.- Click
Add filter.- From the
Filterdrop-down menu, selectFlow log type.- From the
Valuedrop-down menu, checkVirtual networkonly.- Click
Apply.- Click the name of a virtual network flow log.
- Under
Storage Account, setRetention daysto0,90, or a number greater than 90. IfRetention daysis set to0, the logs are retained indefinitely with no retention policy.- Repeat steps 7 and 8 for each virtual network flow log requiring remediation.
From Azure CLI
Run the following command update the retention policy for a flow log in a network watcher, setting
retentionto0,90, or a number greater than 90:az network watcher flow-log update --location <location> --name <flow-log> --retention <number-of-days>Repeat for each virtual network flow log requiring remediation.
policy.yaml
Linked Framework Sections
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| 💼 CIS Azure v4.0.0 → 💼 8.8 Ensure that virtual network flow log retention days is set to greater than or equal to 90 (Automated) | 1 | no data | |||
| 💼 Cloudaware Framework → 💼 Logging and Monitoring Configuration | 65 | no data |