turbot / steampipe-mod-aws-insights

View dashboards and reports across all of your AWS accounts using Powerpipe and Steampipe.
https://hub.powerpipe.io/mods/turbot/aws_insights
Apache License 2.0
89 stars 23 forks source link

Incorrect SQS Queue Encryption status with Amazon Managed SQS Keys #243

Closed bananastalktome closed 1 year ago

bananastalktome commented 1 year ago

Describe the bug The 'AWS SQS Queue Detail' page shows my SQS queue encryption as 'Disabled' and in alert, despite it using Amazon SQS Keys. I believe the aws_sqs_queue_encryption query on that page does not check sqs_managed_sse_enabled when checking the queue encryption status or details.

Steampipe version (steampipe -v) steampipe version 0.17.3

Plugin version (steampipe plugin list) 0.86.0

To reproduce Load the "aws_insights.dashboard.aws_sqs_queue_detail" page for a queue with AWS SSE-SQS rather than a custom KMS key - encryption status shows 'Disabled' in the encryption status card as well as in the Encryption Details table.

Expected behavior Encryption should show as 'Enabled' with type 'ok' not 'alert'. Encryption Details table should maybe show "Amazon SQS key" rather than 'Disabled'.

Additional context The "AWS SQS Queue Dashboard" page correctly checks sqs_managed_sse_enabled to show the number of unencrypted queues.

misraved commented 1 year ago

Welcome to Steampipe @bananastalktome and thanks for raising this bug 👍.

While checking the query, I found out that https://github.com/turbot/steampipe-mod-aws-insights/blob/main/dashboards/sqs/sqs_queue_detail.sp#L137 is not checking for sqs_managed_sse_enabled parameter, however, it is getting checked in https://github.com/turbot/steampipe-mod-aws-insights/blob/main/dashboards/sqs/sqs_queue_dashboard.sp#L164 dashboard query.

We will fix it up and release a new version shortly 👍.