Your trails should have file integrity validation feature enabled in order to check the log files and detect whether these were modified or deleted after CloudTrail agent delivered them to the S3 bucket.
To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” for AWS using AWS console, follow these steps:
Login to the AWS Management Console.
Go to the CloudTrail service.
Select the trail for which you want to enable file integrity validation.
Click on the “Edit” button in the “Trail details” section.
In the “Advanced” section, enable the “Enable log file integrity validation” option.
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.
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.
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.
Using Python
To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” in AWS, you can follow these steps using Python: