For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/cloudformation-aws-iot-policy-allows-action-as-wildcard.md.
A documentation index is available at /llms.txt.
IoT policies that grant the wildcard action * with an Allow effect are overly permissive and can enable principals to perform any IoT operation. This increases the risk of device takeover, unauthorized message publishing or subscribing, and configuration changes.
In AWS CloudFormation, inspect AWS::IoT::Policy resources’ Properties.PolicyDocument.Statement entries. A Statement with Effect: Allow and Action equal to * (or containing * in an action array) is a misconfiguration. This rule flags those statements. Follow least privilege by enumerating only the specific iot:* actions required and scoping the Resource ARNs to the minimum necessary.
Example secure configuration restricting actions and resources: