-
Notifications
You must be signed in to change notification settings - Fork 3
[CC-002] Azure cost collection pagination incomplete #14
Copy link
Copy link
Open
Labels
Description
Description
Azure Cost Management API pagination may be incomplete. The code may not properly handle all pages of results for large date ranges or many subscriptions.
Location
- File:
cost_collect.py- Azure cost collection function
Impact
- Medium - Cost data may be truncated for large environments
- Incorrect cost totals reported
Suggested Fix
Ensure pagination follows Azure Cost Management API patterns:
results = []
skip_token = None
while True:
response = client.query(
scope=scope,
parameters=query_params,
skip_token=skip_token
)
results.extend(response.rows)
skip_token = getattr(response.properties, 'next_link', None)
if not skip_token:
breakPriority
Medium
Source
cost_collect.py code review - CC-002
Reactions are currently unavailable