{
  "Provider": "aws",
  "CheckID": "ec2_instance_secrets_user_data",
  "CheckTitle": "Find secrets in EC2 User Data.",
  "CheckType": [
    "IAM"
  ],
  "ServiceName": "ec2",
  "SubServiceName": "",
  "ResourceIdTemplate": "arn:partition:access-analyzer:region:account-id:analyzer/resource-id",
  "Severity": "critical",
  "ResourceType": "AwsEc2Instance",
  "Description": "Find secrets in EC2 User Data.",
  "Risk": "Secrets hardcoded into instance user data can be used by malware and bad actors to gain lateral access to other services.",
  "RelatedUrl": "",
  "Remediation": {
    "Code": {
      "CLI": "https://docs.bridgecrew.io/docs/bc_aws_secrets_1#cli-command",
      "NativeIaC": "https://docs.bridgecrew.io/docs/bc_aws_secrets_1#cloudformation",
      "Other": "",
      "Terraform": "https://docs.bridgecrew.io/docs/bc_aws_secrets_1#terraform"
    },
    "Recommendation": {
      "Text": "Implement automated detective control (e.g. using tools like Prowler) to scan accounts for passwords and secrets. Use secrets manager service to store and retrieve passwords and secrets.",
      "Url": "https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_basic.html"
    }
  },
  "Categories": [
    "secrets"
  ],
  "DependsOn": [],
  "RelatedTo": [],
  "Notes": ""
}
