Skip to content

Commit 77cdd79

Browse files
authored
fix(aws): cover SNS ResourceID in Quick Inventory output (#8763)
1 parent d13f3f0 commit 77cdd79

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

prowler/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
1717
- Update `moto` dependency from 5.0.28 to 5.1.11 [(#7100)](https://github.com/prowler-cloud/prowler/pull/7100)
1818

1919
### Fixed
20+
- Fix SNS topics showing empty AWS_ResourceID in Quick Inventory output [(#8762)](https://github.com/prowler-cloud/prowler/issues/8762)
2021

2122
## [v5.12.1] (Prowler v5.12.1)
2223

prowler/providers/aws/lib/quick_inventory/quick_inventory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ def create_output(resources: list, provider: AwsProvider, args):
267267
resource["AWS_ResourceID"] = "/".join(
268268
item["arn"].split(":")[-1].split("/")[1:]
269269
)
270+
# Cover SNS case
271+
if resource["AWS_Service"] == "sns":
272+
resource["AWS_ResourceID"] = item["arn"].split(":")[-1]
270273
resource["AWS_Tags"] = item["tags"]
271274
json_output.append(resource)
272275

0 commit comments

Comments
 (0)