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 environment 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-ControlsCSA-CCMISO-27001SOC-2
  • Snyk IDSNYK-CC-00251
  • creditSnyk 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",
    ]
  }
}