IAM policy has a statement block with a wildcard action Affecting IAM service in AWS


Severity

0.0
high
0
10
    Severity Framework
    Snyk CCSS
    Rule category
    IAM / Least Privilege

Is your enviroment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
    Frameworks
    CIS-Controls CSA-CCM ISO-27001 SOC-2
  • Snyk ID SNYK-CC-00251
  • credit Snyk Research Team

Description

Policies with wildcard actions can perform all actions on the configured resources.

How to fix?

Set statement.action attribute to specific actions, e.g. s3:ListBucket.

Example Configuration

data "aws_iam_policy_document" "allowed_no_wildcard" {
  statement {
    effect = "Allow"
    actions = [
      "s3:ListBucket",
    ]
  }
}