#7700·checkov

CKV_AWS_159 false positive for Athena managed query results with default AWS-owned encryption

Author: Paul-Eccleston-i2Created Sep 24, 2026Updated Sep 24, 2026

Describe the issue

CKV_AWS_159 ("Ensure that Athena Workgroup is encrypted") reports a false positive for an Athena workgroup using managed query results with the default AWS-owned encryption key.

AWS documentation states that "Encrypt using an AWS owned key" is the default option when using managed query results. Omitting a customer-managed encryption configuration in this mode does not mean results are unencrypted.

The check only inspects the legacy S3-results configuration path:

configuration/[0]/result_configuration/[0]/encryption_configuration/[0]/encryption_option

It does not account for configuration.managed_query_results_configuration.enabled = true.

Examples

Save this generic, standalone example as main.tf:

hcl
resource "aws_athena_workgroup" "example" {
  name = "managed-results-example"

  configuration {
    enforce_workgroup_configuration = true

    managed_query_results_configuration {
      enabled = true
    }
  }
}

Run:

bash
checkov --file main.tf --framework terraform --check CKV_AWS_159 --compact --quiet

Actual result, reproduced with Checkov 3.3.8:

terraform scan results:

Passed checks: 0, Failed checks: 1, Skipped checks: 0

Check: CKV_AWS_159: "Ensure that Athena Workgroup is encrypted"
        FAILED for resource: aws_athena_workgroup.example
        File: /main.tf:1-11

The command exits with status 1. No AWS credentials or deployment are required to reproduce.

Expected result: CKV_AWS_159 passes when managed query results are explicitly enabled, including when the optional customer-managed key configuration is omitted, because AWS-owned encryption applies by default. The existing legacy-results encryption checks should remain in place when managed results are disabled or absent.

Version

  • Executed reproduction: Checkov 3.3.8 on Linux.
  • Also inspected the rule source in release 3.3.19 (latest release at the time of reporting) and the default branch. Both still inspect only the legacy path above. I have not executed this reproduction using 3.3.19.
  • Rule source in 3.3.19.

Additional context

Please add managed-results support and regression coverage for explicitly enabled managed results with default AWS-owned encryption, while retaining coverage for encrypted and unencrypted legacy configurations. This report concerns encryption detection, not a requirement to use a customer-managed key.