Skip to content

[Asset Inventory][AWS] Forward-port #7277 — EC2/ELB/RDS fields for InfoSec - #8229

Open
kubasobon wants to merge 1 commit into
mainfrom
asset-inventory/forward-port-7277
Open

[Asset Inventory][AWS] Forward-port #7277 — EC2/ELB/RDS fields for InfoSec#8229
kubasobon wants to merge 1 commit into
mainfrom
asset-inventory/forward-port-7277

Conversation

@kubasobon

Copy link
Copy Markdown
Member

Summary

PR #7277 was merged into the feature branch asset-inventory/fix-entity-attributes on Jul 30, then mergify backported it to 9.5 via #7482 on Aug 3. The feature branch was never merged forward, so main (9.6) is currently behind 9.5 on these fields.

This is a clean cherry-pick of commit 3bc1c9d0 from that feature branch onto main. It applies with no conflicts (the entity.attributesentity.Details rename from #7473 already landed on main on Jul 23).

Fields added

Resource Field
EC2 entity.Details.Role — reads the role instance tag
RDS entity.Details.DBInstanceStatus
ELB v1 entity.Details.State — hardcoded "active" (classic API has no state field)
ELB v1 entity.Details.IPAddresses — DNS-resolved from DNSName at fetch time via injectable hostResolver
ELB v2 entity.Details.IPAddresses — widened to also read PrivateIPv4Address and IPv6Address per AZ address

Related

…7277)

### Summary of your changes

> [!NOTE]
> **Stacked on #7473.** This PR is based on
`asset-inventory/fix-entity-attributes`, which renames the
`entity.attributes` (flattened) bag to `entity.Details` to fix the
Entity Store generic-extraction bug. All new fields below are therefore
emitted under **`entity.Details.*`** (not `entity.attributes.*`). Please
review/merge #7473 first; this PR's diff shows only the InfoSec fetcher
changes on top of it.

| Resource | Field | Change |
| -------------------- | --------------------------------- |
------------------------------------------------------------------------------------------------------------------------
|
| **EC2** | `entity.Details.Role` | Added `LookupTag(tags, "role")` in
`buildDetails` |
| **RDS** | `entity.Details.DBInstanceStatus` | Added `Status` field to
wrapper struct; mapped from `DBInstanceStatus` in provider; emitted in
fetcher |
| **ELB v2** (ALB/NLB) | `entity.Details.IPAddresses` |
`GetIPAddresses()` now also collects `PrivateIPv4Address` and
`IPv6Address` per AZ address (previously only `IpAddress`) |
| **ELB v1** (Classic) | `entity.Details.State` | `GetState()` returns
`"active"` (hardcoded as classic API exposes no state field) |
| **ELB v1** (Classic) | `entity.Details.IPAddresses` | DNS-resolves the
ELB `DNSName` at fetch time via injectable `hostResolver`; soft-fails to
empty on error |

### Related Issues

Closes elastic/security-team#18294

### Checklist
- [x] I have added tests that prove my fix is effective or that my
feature works
@kubasobon
kubasobon requested a review from a team as a code owner September 1, 2026 09:38
@mergify

mergify Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @kubasobon? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

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.

1 participant