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

elastic / cloudbeat / 28875485871
76%

Build:
DEFAULT BRANCH: main
Ran 07 Jul 2026 03:06PM 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

07 Jul 2026 02:30PM UTC coverage: 76.128% (+0.005%) from 76.123%
28875485871

push

github

web-flow
fix: prevent panic when RDS DB instance has a nil DBSubnetGroup (#7188)

## Summary
- AWS can return `DescribeDBInstances` results with a nil
`DBSubnetGroup` (e.g. for EC2-Classic instances or instances in certain
transitional states). `getDBInstanceSubnets` unconditionally
dereferenced `dbInstance.DBSubnetGroup.Subnets`, causing a nil pointer
dereference panic that crashed cloudbeat's CSPM/asset-inventory AWS
agent (observed as `likely-elastic-agent-integration-oom` alerts).
- Added a nil guard that returns an empty subnet list for instances
without a `DBSubnetGroup`, matching existing behavior for instances with
an empty subnet list.

Fixes elastic/seceng#14066

## Test plan
- [x] Added a regression test (`Should not panic when a DB instance has
no DBSubnetGroup`) in `provider_test.go` covering a `DBInstance` with
`DBSubnetGroup: nil`.
- [x] Verified the regression test reproduces the original panic when
the fix is reverted (identical stack trace shape to the one in the
issue).
- [x] `go test ./internal/resources/providers/awslib/...` passes.
- [x] `go build`, `go vet`, and `gofmt -l` clean on changed files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

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

2 existing lines in 1 file now uncovered.

10208 of 13409 relevant lines covered (76.13%)

15.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
84.04
0.0% internal/resources/providers/gcplib/inventory/provider.go
Jobs
ID Job ID Ran Files Coverage
1 28875485871.1 07 Jul 2026 03:06PM UTC 245
76.13
GitHub Action Run
Source Files on build 28875485871
  • Tree
  • List 245
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f57ec2bb on github
  • Prev Build on gh-readonly-queue/main/pr-7228-578d5af86d2f29ff54af2ccca341c4c5b09012c4 (#28865590864)
  • Next Build on main (#28915001645)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc