|
1 | 1 | { |
2 | 2 | "Provider": "aws", |
3 | 3 | "CheckID": "elasticbeanstalk_environment_cloudwatch_logging_enabled", |
4 | | - "CheckTitle": "Elastic Beanstalk environment should stream logs to CloudWatch", |
| 4 | + "CheckTitle": "Elastic Beanstalk environment streams logs to CloudWatch Logs", |
5 | 5 | "CheckType": [ |
6 | | - "Software and Configuration Checks/AWS Security Best Practices" |
| 6 | + "Software and Configuration Checks/AWS Security Best Practices/Runtime Behavior Analysis", |
| 7 | + "TTPs/Defense Evasion" |
7 | 8 | ], |
8 | 9 | "ServiceName": "elasticbeanstalk", |
9 | 10 | "SubServiceName": "", |
10 | | - "ResourceIdTemplate": "arn:aws:elasticbeanstalk:{region}:{account-id}:environment/{environment-id}", |
| 11 | + "ResourceIdTemplate": "", |
11 | 12 | "Severity": "high", |
12 | 13 | "ResourceType": "AwsElasticBeanstalkEnvironment", |
13 | | - "Description": "This control checks whether an Elastic Beanstalk environment is configured to send logs to CloudWatch Logs. The control fails if an Elastic Beanstalk environment isn't configured to send logs to CloudWatch Logs.", |
14 | | - "Risk": "Without log streaming to CloudWatch, it becomes difficult to monitor and troubleshoot your Elastic Beanstalk environments, which can lead to missed events or security incidents.", |
15 | | - "RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/elastic-beanstalk-logs-to-cloudwatch.html", |
| 14 | + "Description": "**Elastic Beanstalk environments** are configured to stream instance and proxy logs to **Amazon CloudWatch Logs** via the `StreamLogs` setting", |
| 15 | + "Risk": "Without **centralized logging** to CloudWatch, logs may be lost during rotation or instance termination, delaying detection and response. Attackers can delete local logs to evade audits, hiding evidence of web attacks or config tampering and undermining **confidentiality**, **integrity**, and **availability**.", |
| 16 | + "RelatedUrl": "", |
| 17 | + "AdditionalURLs": [ |
| 18 | + "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudwatchlogs.html", |
| 19 | + "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-logging.html", |
| 20 | + "https://docs.aws.amazon.com/securityhub/latest/userguide/elasticbeanstalk-controls.html#elasticbeanstalk-3" |
| 21 | + ], |
16 | 22 | "Remediation": { |
17 | 23 | "Code": { |
18 | | - "CLI": "aws elasticbeanstalk update-environment --environment-id <environment-id> --option-settings Namespace=aws:elasticbeanstalk:environment:proxy:logging,OptionName=StreamLogs,Value=true", |
19 | | - "NativeIaC": "", |
20 | | - "Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/elasticbeanstalk-controls.html#elasticbeanstalk-3", |
21 | | - "Terraform": "" |
| 24 | + "CLI": "aws elasticbeanstalk update-environment --environment-name <example_resource_name> --option-settings Namespace=aws:elasticbeanstalk:cloudwatch:logs,OptionName=StreamLogs,Value=true", |
| 25 | + "NativeIaC": "```yaml\nResources:\n <example_resource_name>:\n Type: AWS::ElasticBeanstalk::Environment\n Properties:\n ApplicationName: \"<example_resource_name>\"\n PlatformArn: \"<platform_arn>\"\n OptionSettings:\n - Namespace: aws:elasticbeanstalk:cloudwatch:logs\n OptionName: StreamLogs\n Value: \"true\" # Critical: Enables instance log streaming to CloudWatch Logs\n```", |
| 26 | + "Other": "1. Open the AWS Elastic Beanstalk console and select your environment\n2. Go to Configuration > Updates, monitoring, and logging > Edit\n3. Under \"Instance log streaming to CloudWatch Logs\", set Log streaming to Activated\n4. Click Apply to save", |
| 27 | + "Terraform": "```hcl\nresource \"aws_elastic_beanstalk_environment\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n application = \"<example_resource_name>\"\n platform_arn = \"<platform_arn>\"\n\n # Critical: Enables instance log streaming to CloudWatch Logs\n setting {\n namespace = \"aws:elasticbeanstalk:cloudwatch:logs\"\n name = \"StreamLogs\"\n value = \"true\"\n }\n}\n```" |
22 | 28 | }, |
23 | 29 | "Recommendation": { |
24 | | - "Text": "Enable log streaming to CloudWatch for your Elastic Beanstalk environment to monitor and retain logs.", |
25 | | - "Url": "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudwatchlogs.html#AWSHowTo.cloudwatchlogs.streaming" |
| 30 | + "Text": "Enable streaming to **CloudWatch Logs**. Set sensible retention, avoid deletion on termination, and restrict access with least-privilege IAM. Add metric filters and alerts for early detection, and retain archives to support **forensics**, **accountability**, and **defense in depth**.", |
| 31 | + "Url": "https://hub.prowler.com/check/elasticbeanstalk_environment_cloudwatch_logging_enabled" |
26 | 32 | } |
27 | 33 | }, |
28 | 34 | "Categories": [ |
|
0 commit comments