Skip to main content
compliance · azure

Cosmos DB accounts on Periodic backup with retention proven below 24 hours

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

Cosmos DB accounts on a Periodic backup policy with retention positively reported below 24 hours are flagged by rule RC-1336. That is less than one day of recoverable history and no point-in-time restore. Continuous-mode accounts never fire, and a missing retention value abstains, because Resource Graph often omits the nested periodic properties.

Signal and threshold

How ZopNight evaluates Cosmos DB accounts on Periodic backup with retention proven below 24 hours.
Field Value
Rule IDsRC-1336
Categorycompliance
Severitymedium
Metricnone — pure configuration read
Sourcecosmos_backup.go

Less than a day of recoverable history

Azure’s default Periodic backup for Cosmos DB keeps two copies taken four hours apart, roughly 8 hours of recoverable history. Delete the wrong documents on Friday evening and discover it Monday morning, and there is nothing left to restore: every surviving backup already contains the mistake. That is the exposure this rule describes: not a missing backup system, but a retention window shorter than the time it typically takes a human to notice data damage.

What provably weak means here

Two metadata values drive the verdict, both stamped by the discoverer from the account’s live ARM backupPolicy (a read under the built-in Reader role). backup_policy_type distinguishes Periodic from Continuous; Continuous means point-in-time restore is available and the rule never fires on it. For Periodic accounts, backup_retention_hours must be positively surfaced and parse to a number strictly below the 24-hour floor before the finding is raised. Only that combination fires, at medium severity: Periodic, with retention known and under one day.

Read the backup policy on an account

Terminal window
az cosmosdb show -n <account> -g <rg> \
--query "{mode: backupPolicy.type, retentionHours: backupPolicy.periodicModeProperties.backupRetentionIntervalInHours, intervalMinutes: backupPolicy.periodicModeProperties.backupIntervalInMinutes}"

Output showing Periodic with retentionHours under 24 reproduces the finding exactly.

Why a missing value never fires

Azure Resource Graph frequently declines to project the nested periodicModeProperties, so a healthy Periodic account with a generous retention window can reach the recommender with no retention value at all. Absence therefore means “not surfaced”, never “not configured”, and the rule abstains on it, as it does on an unparseable value or a missing policy type. The practical consequence: some genuinely under-protected accounts will not be flagged. The rule trades that miss for never accusing a correctly configured account, so treat its findings as proven and its silence as unverified.

Choosing Continuous

For production data, the durable fix is switching the account to Continuous mode, which replaces the snapshot-copy model with point-in-time restore across the retention period. Where Periodic must stay (Continuous has feature and cost implications that not every account tolerates), raise the retention interval well past a day so the recovery window outlives a weekend. Both changes live under the account’s Backup and Restore settings.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

417 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

417 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·