We are running sonarqube developer 10.5 (same issue was in 10.4) on terraform code.
This statement of a KMS key policy gives a security hotspot item on rule terraform:S6270 ( Policies authorizing public access to resources are security-sensitive):
{ Effect : "Allow", Principal = "*", Action : [ "kms:Decrypt", "kms:GenerateDataKey" ], Resource : "*", Condition : { StringLike : { "aws:PrincipalArn" : [ "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/aws-reserved/sso.amazonaws.com/eu-west-1/AWSReservedSSO_ssss_*", "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/tf-iam-role-k8s-*" ] } }
Why doesn’t SQ recognize the Condition in this statement?