Skip to main content

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” for AWS using AWS console, follow these steps:
  1. Login to the AWS Management Console.
  2. Go to the CloudTrail service.
  3. Select the trail for which you want to enable file integrity validation.
  4. Click on the “Edit” button in the “Trail details” section.
  5. In the “Advanced” section, enable the “Enable log file integrity validation” option.
  6. Click on the “Save” button to save the changes.
Once you have enabled file integrity validation for the CloudTrail trail, it will start validating the integrity of log files to ensure that they have not been tampered with. This will help you maintain the integrity and security of your CloudTrail logs.

To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” for AWS using AWS CLI, follow the steps below:
  1. Open the AWS CLI on your local machine.
  2. Run the following command to enable the file integrity validation feature for trails:
Make sure to replace <trail-name> with the name of the trail you want to enable the feature for.
  1. Verify that the file integrity validation feature has been enabled by running the following command:
This will return a JSON object that includes the configuration settings for the specified trail. Look for the LogFileValidationEnabled property and make sure it is set to true.
  1. Repeat these steps for any other trails that need the file integrity validation feature enabled.
By following these steps, you will have successfully remediated the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” for AWS using AWS CLI.
To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” in AWS, you can follow these steps using Python:
  1. Import the required AWS SDK libraries:
  1. Create an AWS CloudTrail client object:
  1. Get a list of all the existing trails:
  1. For each trail, check if the “LogFileValidationEnabled” parameter is set to true:
  1. The script will loop through all the trails and enable file integrity validation for any trail where it is not already enabled.
Note: Before running this script, make sure you have the necessary AWS credentials configured on your machine.
This enables CloudTrail log file integrity validation, matching aws cloudtrail update-trail --enable-log-file-validation.This change does not force replacement of the trail; it updates it in place.To verify, terraform plan should show enable_log_file_validation changing from false (or null) to true on the aws_cloudtrail.THIS_TRAIL resource.