Skip to content

Disk, Key Vault, storage and SQL Managed Instance fetchers: an unread list gives null counts, not 0 - #366

Merged
bruceweygandt merged 4 commits into
mainfrom
fde-1199
Nov 16, 2026
Merged

bruceweygandt merged 4 commits into
mainfrom
fde-1199

Conversation

@Controgon

Copy link
Copy Markdown
Contributor

Fixes FDE-1199
Part of FDE-1190

Summary

When a fetcher cannot read a list (403, throttling, timeout), every total, count and percentage built from it is now null, not 0. The run still fails as partial_failure. Same rule as #335, #336 and #339.

  • azure_disk_encryption_status 0.3.0: an unread disk list nulls every count and percentage, total_disks included (it read 0).
  • azure_key_vault_configuration 0.5.0: an unread vault list nulls every count (fix(azure): resource exclusions report no unmatched patterns when a resource list was not read #316 had already nulled the in-scope and excluded counts). Unread diagnostic settings for any vault null the diagnostic-settings and audit-logging counts and audit_logging_percentage; vaults_audit_logging_unknown still says how many.
  • azure_storage_encryption_status 0.5.0: an unread account list nulls every count. An unread container list for any account nulls the container counts, in_scope_containers and excluded_containers. An unread blob or file service properties read nulls blob_versioning_accounts, container_soft_delete_accounts and share_soft_delete_accounts (each account now records blob_properties_status and file_service_properties_status: collected, not_supported or failed). An unread replication status nulls geo_replication_live_accounts and geo_failover_ready_accounts.
  • azure_sql_managed_instance_encryption 0.4.0: an unread instance list nulls every count, total_managed_instances and in_scope_managed_instances included. Unread protectors null the key counts; unread database lists null the TDE counts.
  • azure_sql_managed_instance_backups 0.5.0: an unread instance list nulls every instance, database and failover group count. Unread database lists null the retention counts; unknown failover group membership nulls instances_in_failover_group.

The shared list_instances helper takes an optional unread value so the two SQL MI fetchers can tell an unread list from no instances; its default is unchanged, so azure_sql_managed_instance_configuration is unaffected.

The plain-text evidence set descriptions say each count is null when its list cannot be read. Minor version bumps, since the values change.

Tests

tests/test_azure_unread_lists_give_null_counts_data.py: each test refuses the top-level list (and each sub-list a count is built from) and asserts null for every count; the summary-documented checks still pass. All 12 refusal tests fail against the old fetchers. Ran the changed fetchers' tests plus the contract tests (1714 passed); no full suite.

Validator check

No validator on main reads these evidence sets. On added-validators, the ones that read a changed summary field are azure_kv_network_fields_present (total_key_vaults) and storage_accounts_all_geo_redundant (total_storage_accounts). Both already fail on an unread list (partial_failure true, and the total must be above 0); with null the regex no longer matches, which fails the same rule. Verdict unchanged. The other Key Vault, storage and SQL MI validators read per-resource fields, which this change leaves as they were.

🤖 Generated with Claude Code

Controgon and others added 3 commits November 13, 2026 14:53
… null counts, not 0

When a list could not be read (403, throttling, timeout), every total, count and
percentage built from it is now null instead of 0. Sub-lists a count is built
from (diagnostic settings, containers, replication status, protectors, databases,
failover groups) null their counts the same way. The runs still fail as
partial_failure. Descriptions say so; versions bumped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e counts; tests for empty lists

Each account records whether its blob and file service properties were collected,
not supported or failed; a failed read nulls the counts built from it. Key Vault
total_access_policies is documented as null when the vault list is unread.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@bruceweygandt bruceweygandt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Each unread list, and each failed per-item read, now gives null counts, not 0; a read empty list still gives 0. Text, versions and CHANGELOG match the code, and each failed read has a test.

@bruceweygandt
bruceweygandt merged commit b5f42ea into main Nov 16, 2026
18 checks passed
@bruceweygandt
bruceweygandt deleted the fde-1199 branch November 16, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants