• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

elastic / cloudbeat / 29962583692
76%

Build:
DEFAULT BRANCH: main
Ran 22 Jul 2026 10:39PM UTC
Jobs 1
Files 245
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Jul 2026 10:03PM UTC coverage: 76.106%. Remained the same
29962583692

push

github

web-flow
fix(azure): drive Resource Graph pagination by SkipToken, not ResultTruncated (#7424)

## Summary

Most Azure subscriptions in CSPM scans were showing only
subscription-level findings, with zero resource-level findings (storage
accounts, VMs, key vaults, etc.). Root cause: cloudbeat's Azure Resource
Graph (ARG) pagination loop stopped after the first page of results on
every real-world query, silently dropping resources per scan cycle.

## Root cause

In
`internal/resources/providers/azurelib/inventory/resource_graph_provider.go`,
`runPaginatedQuery` broke out of its pagination loop whenever
`response.ResultTruncated == false`. That flag does not mean "no more
pages" — per Microsoft's Resource Graph pagination contract, `SkipToken`
presence/absence is the only reliable continuation signal. In practice,
ordinary paginated ARG responses report `ResultTruncated: false` even
when a valid `SkipToken` for the next page is present, so the loop
always exited after page 1.

## Fix

Pagination now continues based solely on whether `SkipToken` is empty,
matching Microsoft's reference pagination pattern, instead of trusting
`ResultTruncated`.

## Regression test

Added a test in
`internal/resources/providers/azurelib/inventory/resource_graph_provider_test.go`
that mocks a 3-page ARG response sequence where every page reports
`ResultTruncated: false` but carries a `SkipToken` until the final page.
It fails against the pre-fix code (only page 1's asset is returned) and
passes with the fix.

3 of 3 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

10205 of 13409 relevant lines covered (76.11%)

15.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
83.06
0.0% internal/resources/providers/gcplib/inventory/provider.go
Jobs
ID Job ID Ran Files Coverage
1 29962583692.1 22 Jul 2026 10:38PM UTC 245
76.11
GitHub Action Run
Source Files on build 29962583692
  • Tree
  • List 245
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 100ef561 on github
  • Prev Build on gh-readonly-queue/main/pr-7372-9293393e2ed944a68ac7e64287040483abb5d7b9 (#29789934952)
  • Next Build on main (#29966422366)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc