bridgecrewio / checkov

Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.
https://www.checkov.io/
Apache License 2.0
6.71k stars 1.07k forks source link

CKV2_AWS_14 & CKV2_AWS_21 false positive #6392

Open HorizonNet opened 4 weeks ago

HorizonNet commented 4 weeks ago

Describe the issue Since the last few versions CKV2_AWS_14 and CKV2_AWS_21 started failing without changes to the Terraform configuration. There don't seem to be changes to the checks within the last 2 years too. That said, I don't know what changed. Based on the implementation of the checks I would assume that the configuration is valid as aws_iam_group_membership has a connection to aws_iam_group and defines the users property (see example below).

Examples

resource "aws_iam_group" "groupa" {
  name = "groupa"
}

resource "aws_iam_group_membership" "groupa" {
  name  = "groupa"
  group = aws_iam_group.groupa.name

  users = [
    "someuser",
    "anotheruser",
  ]
}

Version (please complete the following information):

Additional context The last version, where the problem was not present seems to be 3.2.108.