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-wildcard-resource.md.
A documentation index is available at /llms.txt.
IoT policies must not grant Allow permissions to all resources (*), because an Allow with Resource: '*' lets principals act across any IoT resource and can result in broad privilege escalation or unauthorized device and data access. In AWS CloudFormation, check AWS::IoT::Policy resources. Properties.PolicyDocument.Statement[].Effect must not be Allow with the corresponding Statement[].Resource equal to or containing the wildcard *. The rule flags statements where Resource is * or an array that includes *. Use least-privilege ARNs or condition keys to restrict actions to specific IoT resources.