Skip to content

Commit f15ef0d

Browse files
puchy22danibarranquerooMrCloudSec
authored
chore(aws): enhance metadata for elasticbeanstalk service (#8934)
Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com> Co-authored-by: Sergio Garcia <hello@mistercloudsec.com>
1 parent c42ce62 commit f15ef0d

File tree

4 files changed

+59
-41
lines changed

4 files changed

+59
-41
lines changed

prowler/CHANGELOG.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ All notable changes to the **Prowler SDK** are documented in this file.
1919
- Update AWS CloudWatch service metadata to new format [(#8848)](https://github.com/prowler-cloud/prowler/pull/8848)
2020
- Update AWS EMR service metadata to new format [(#9002)](https://github.com/prowler-cloud/prowler/pull/9002)
2121
- Update AWS EKS service metadata to new format [(#8890)](https://github.com/prowler-cloud/prowler/pull/8890)
22+
- Update AWS Elastic Beanstalk service metadata to new format [(#8934)](https://github.com/prowler-cloud/prowler/pull/8934)
2223
- Update AWS ElastiCache service metadata to new format [(#8933)](https://github.com/prowler-cloud/prowler/pull/8933)
24+
- Update AWS EFS service metadata to new format [(#8889)](https://github.com/prowler-cloud/prowler/pull/8889)
25+
- Update AWS EventBridge service metadata to new format [(#9003)](https://github.com/prowler-cloud/prowler/pull/9003)
26+
- Update AWS Firehose service metadata to new format [(#9004)](https://github.com/prowler-cloud/prowler/pull/9004)
27+
- Update AWS FMS service metadata to new format [(#9005)](https://github.com/prowler-cloud/prowler/pull/9005)
28+
- Update AWS FSx service metadata to new format [(#9006)](https://github.com/prowler-cloud/prowler/pull/9006)
29+
- Update AWS Glacier service metadata to new format [(#9007)](https://github.com/prowler-cloud/prowler/pull/9007)
2330

2431
---
2532

@@ -75,12 +82,6 @@ All notable changes to the **Prowler SDK** are documented in this file.
7582
- Update AWS Directory Service service metadata to new format [(#8859)](https://github.com/prowler-cloud/prowler/pull/8859)
7683
- Update AWS CloudFront service metadata to new format [(#8829)](https://github.com/prowler-cloud/prowler/pull/8829)
7784
- Deprecate user authentication for M365 provider [(#8865)](https://github.com/prowler-cloud/prowler/pull/8865)
78-
- Update AWS EFS service metadata to new format [(#8889)](https://github.com/prowler-cloud/prowler/pull/8889)
79-
- Update AWS EventBridge service metadata to new format [(#9003)](https://github.com/prowler-cloud/prowler/pull/9003)
80-
- Update AWS Firehose service metadata to new format [(#9004)](https://github.com/prowler-cloud/prowler/pull/9004)
81-
- Update AWS FMS service metadata to new format [(#9005)](https://github.com/prowler-cloud/prowler/pull/9005)
82-
- Update AWS FSx service metadata to new format [(#9006)](https://github.com/prowler-cloud/prowler/pull/9006)
83-
- Update AWS Glacier service metadata to new format [(#9007)](https://github.com/prowler-cloud/prowler/pull/9007)
8485

8586

8687
### Fixed

prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_cloudwatch_logging_enabled/elasticbeanstalk_environment_cloudwatch_logging_enabled.metadata.json

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
{
22
"Provider": "aws",
33
"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",
55
"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"
78
],
89
"ServiceName": "elasticbeanstalk",
910
"SubServiceName": "",
10-
"ResourceIdTemplate": "arn:aws:elasticbeanstalk:{region}:{account-id}:environment/{environment-id}",
11+
"ResourceIdTemplate": "",
1112
"Severity": "high",
1213
"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+
],
1622
"Remediation": {
1723
"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```"
2228
},
2329
"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"
2632
}
2733
},
2834
"Categories": [

prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_enhanced_health_reporting/elasticbeanstalk_environment_enhanced_health_reporting.metadata.json

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
{
22
"Provider": "aws",
33
"CheckID": "elasticbeanstalk_environment_enhanced_health_reporting",
4-
"CheckTitle": "Elastic Beanstalk environments should have enhanced health reporting enabled",
4+
"CheckTitle": "Elastic Beanstalk environment has enhanced health reporting enabled",
55
"CheckType": [
6-
"Software and Configuration Checks/AWS Security Best Practices"
6+
"Software and Configuration Checks/AWS Security Best Practices",
7+
"Software and Configuration Checks/AWS Security Best Practices/Runtime Behavior Analysis"
78
],
89
"ServiceName": "elasticbeanstalk",
910
"SubServiceName": "",
10-
"ResourceIdTemplate": "arn:aws:elasticbeanstalk:{region}:{account-id}:environment/{environment-id}",
11+
"ResourceIdTemplate": "",
1112
"Severity": "low",
1213
"ResourceType": "AwsElasticBeanstalkEnvironment",
13-
"Description": "This control checks whether enhanced health reporting is enabled for your AWS Elastic Beanstalk environments.",
14-
"Risk": "Without enhanced health reporting, you may face delays in detecting and responding to issues in your Elastic Beanstalk environment, affecting application availability and performance.",
15-
"RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/beanstalk-enhanced-health-reporting-enabled.html",
14+
"Description": "**Elastic Beanstalk environments** have health reporting set to `enhanced` instead of basic.",
15+
"Risk": "Without **enhanced health**, issues are detected late, raising MTTR and enabling **service outages**. Hidden instance failures or bad deployments can create uneven fleets, degrading **availability** and potentially **integrity** (serving stale versions), while error spikes and thrash increase operational cost.",
16+
"RelatedUrl": "",
17+
"AdditionalURLs": [
18+
"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-enable.html#health-enhanced-enable-console",
19+
"https://docs.aws.amazon.com/securityhub/latest/userguide/elasticbeanstalk-controls.html#elasticbeanstalk-1"
20+
],
1621
"Remediation": {
1722
"Code": {
18-
"CLI": "aws elasticbeanstalk update-environment --environment-id <environment-id> --option-settings Namespace=aws:elasticbeanstalk:healthreporting:system,OptionName=EnhancedHealthReporting,Value=enabled",
19-
"NativeIaC": "",
20-
"Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/elasticbeanstalk-controls.html#elasticbeanstalk-1",
21-
"Terraform": ""
23+
"CLI": "aws elasticbeanstalk update-environment --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:healthreporting:system,OptionName=SystemType,Value=enhanced",
24+
"NativeIaC": "```yaml\n# CloudFormation: enable enhanced health reporting for an Elastic Beanstalk environment\nResources:\n <example_resource_name>:\n Type: AWS::ElasticBeanstalk::Environment\n Properties:\n ApplicationName: <example_resource_name>\n EnvironmentName: <example_resource_name>\n SolutionStackName: <example_solution_stack>\n OptionSettings:\n - Namespace: aws:elasticbeanstalk:healthreporting:system\n OptionName: SystemType # Critical: selects the enhanced health reporting system\n Value: enhanced # Critical: sets health reporting to enhanced\n```",
25+
"Other": "1. Open the AWS Elastic Beanstalk console and select your Region\n2. Go to Environments and choose your environment\n3. Select Configuration > Monitoring > Edit\n4. Under Health reporting, set System to Enhanced\n5. Click Apply to save the change",
26+
"Terraform": "```hcl\n# Terraform: enable enhanced health reporting for an Elastic Beanstalk environment\nresource \"aws_elastic_beanstalk_environment\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n application = \"<example_resource_name>\"\n solution_stack_name = \"<example_solution_stack>\"\n\n setting {\n namespace = \"aws:elasticbeanstalk:healthreporting:system\"\n name = \"SystemType\" # Critical: selects the enhanced health reporting system\n value = \"enhanced\" # Critical: sets health reporting to enhanced\n }\n}\n```"
2227
},
2328
"Recommendation": {
24-
"Text": "Enable enhanced health reporting in your Elastic Beanstalk environments for better monitoring and faster issue detection.",
25-
"Url": "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-enable.html#health-enhanced-enable-console"
29+
"Text": "Set health reporting to `enhanced` for all environments and make it a security baseline. Connect health signals to alerts for rapid response. Apply **least privilege** to required roles and use **defense in depth** with auto-healing, alarms, and runbooks to prevent prolonged degradation.",
30+
"Url": "https://hub.prowler.com/check/elasticbeanstalk_environment_enhanced_health_reporting"
2631
}
2732
},
2833
"Categories": [

prowler/providers/aws/services/elasticbeanstalk/elasticbeanstalk_environment_managed_updates_enabled/elasticbeanstalk_environment_managed_updates_enabled.metadata.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
{
22
"Provider": "aws",
33
"CheckID": "elasticbeanstalk_environment_managed_updates_enabled",
4-
"CheckTitle": "Elastic Beanstalk managed platform updates should be enabled",
4+
"CheckTitle": "Elastic Beanstalk environment has managed platform updates enabled",
55
"CheckType": [
6+
"Software and Configuration Checks/Patch Management",
67
"Software and Configuration Checks/AWS Security Best Practices"
78
],
89
"ServiceName": "elasticbeanstalk",
910
"SubServiceName": "",
10-
"ResourceIdTemplate": "arn:aws:elasticbeanstalk:{region}:{account-id}:environment/{environment-id}",
11+
"ResourceIdTemplate": "",
1112
"Severity": "high",
1213
"ResourceType": "AwsElasticBeanstalkEnvironment",
13-
"Description": "This control checks whether managed platform updates are enabled for an Elastic Beanstalk environment. The control fails if no managed platform updates are enabled.",
14-
"Risk": "If managed platform updates are not enabled, the environment might miss critical security patches and updates, which can expose it to vulnerabilities.",
15-
"RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/elastic-beanstalk-managed-updates-enabled.html",
14+
"Description": "**Elastic Beanstalk environments** with **managed platform updates** enabled (`ManagedActionsEnabled: true`) automatically apply platform patch/minor updates during a scheduled maintenance window.",
15+
"Risk": "Without automatic platform updates, environments may run **vulnerable OS/runtime versions**, enabling exploitation of known CVEs, RCE, or privilege escalation.\n\nPatch drift also increases instability, harming **availability** and undermining application **integrity**.",
16+
"RelatedUrl": "",
17+
"AdditionalURLs": [
18+
"https://docs.aws.amazon.com/securityhub/latest/userguide/elasticbeanstalk-controls.html#elasticbeanstalk-2",
19+
"https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/ElasticBeanstalk/managed-platform-updates.html",
20+
"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-platform-update-managed.html"
21+
],
1622
"Remediation": {
1723
"Code": {
18-
"CLI": "aws elasticbeanstalk update-environment --environment-id <environment-id> --option-settings Namespace=aws:elasticbeanstalk:environment:ManagedActions,OptionName=ManagedActionsEnabled,Value=true",
19-
"NativeIaC": "",
20-
"Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/elasticbeanstalk-controls.html#elasticbeanstalk-2",
21-
"Terraform": ""
24+
"CLI": "aws elasticbeanstalk update-environment --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled,Value=true",
25+
"NativeIaC": "```yaml\nResources:\n <example_resource_name>:\n Type: AWS::ElasticBeanstalk::Environment\n Properties:\n ApplicationName: <example_resource_name>\n SolutionStackName: <example_resource_name>\n OptionSettings:\n - Namespace: aws:elasticbeanstalk:managedactions\n OptionName: ManagedActionsEnabled # Critical: enables managed platform updates\n Value: \"true\" # Critical: set to true to pass the check\n```",
26+
"Other": "1. Open the AWS Management Console and go to Elastic Beanstalk\n2. Select your environment\n3. Choose Configuration\n4. In Managed updates, click Edit\n5. Turn Managed updates to Enabled\n6. Click Apply/Save",
27+
"Terraform": "```hcl\nresource \"aws_elastic_beanstalk_environment\" \"<example_resource_name>\" {\n name = \"<example_resource_name>\"\n application = \"<example_resource_name>\"\n solution_stack_name = \"<example_resource_name>\"\n\n setting {\n namespace = \"aws:elasticbeanstalk:managedactions\"\n name = \"ManagedActionsEnabled\" # Critical: enables managed platform updates\n value = \"true\" # Critical: set to true to pass the check\n }\n}\n```"
2228
},
2329
"Recommendation": {
24-
"Text": "Enable managed platform updates for your Elastic Beanstalk environment to ensure the latest security patches and updates are applied.",
25-
"Url": "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-platform-update-managed.html"
30+
"Text": "Enable **managed platform updates** with a set maintenance window and choose an update level (`patch` or `minor`). Ensure **enhanced health** is on and the update role follows **least privilege**. Validate in staging, roll out gradually, and stagger windows across environments to strengthen **defense in depth** and resilience.",
31+
"Url": "https://hub.prowler.com/check/elasticbeanstalk_environment_managed_updates_enabled"
2632
}
2733
},
2834
"Categories": [

0 commit comments

Comments
 (0)