{
  "Provider": "aws",
  "CheckID": "awslambda_function_no_secrets_in_code",
  "CheckTitle": "Find secrets in Lambda functions code.",
  "CheckType": [],
  "ServiceName": "lambda",
  "SubServiceName": "",
  "ResourceIdTemplate": "arn:partition:lambda:region:account-id:function/function-name",
  "Severity": "critical",
  "ResourceType": "AwsLambdaFunction",
  "Description": "Find secrets in Lambda functions code.",
  "Risk": "The use of a hard-coded password increases the possibility of password guessing.  If hard-coded passwords are used; it is possible that malicious users gain access through the account in question.",
  "RelatedUrl": "https://docs.aws.amazon.com/secretsmanager/latest/userguide/lambda-functions.html",
  "Remediation": {
    "Code": {
      "CLI": "",
      "NativeIaC": "",
      "Other": "",
      "Terraform": ""
    },
    "Recommendation": {
      "Text": "Use Secrets Manager to securely provide database credentials to Lambda functions and secure the databases as well as use the credentials to connect and query them without hardcoding the secrets in code or passing them through environmental variables.",
      "Url": "https://docs.aws.amazon.com/secretsmanager/latest/userguide/lambda-functions.html"
    }
  },
  "Categories": [
    "secrets"
  ],
  "DependsOn": [],
  "RelatedTo": [],
  "Notes": ""
}
