Skip to main content

🧠 AWS CloudTrail S3 Bucket Access Logging is not enabled. - prod.logic.yaml🟒

Uses​

Test Results πŸŸ’β€‹

Generated at: 2026-02-10T22:32:36.926329939Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ isEmptyLookup('CA10__bucket__r')βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ extract('CA10__bucket__r.CA10__loggingDestinationBucketName__c').isEmpty()βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ extract('CA10__bucket__r.CA10__arn__c') == extract('CA10__bucket__r.CA10__loggingDestinationBucketArn__c')βœ”οΈ null
🟒test5βœ”οΈ 499βœ”οΈ isEmptyLookup('CA10__bucket__r.CA10__loggingDestinationBucket__r')βœ”οΈ null
🟒test6βœ”οΈ 599βœ”οΈ notEmptyLookup('CA10__bucket__r.CA10__loggingDestinationBucket__r')βœ”οΈ null

Generation Bundle​

FileMD5
Open/ce/ca/aws/cloudtrail/s3-bucket-access-logging/policy.yaml102C4D7FA1C60A070459124C7C5F910A
Open/ce/ca/aws/cloudtrail/s3-bucket-access-logging/prod.logic.yaml0B9CF2F5AAE560A0BB5978FD3360FACE
Open/ce/ca/aws/cloudtrail/s3-bucket-access-logging/test-data.json92620BF0E6E7675C775FC2DDB9FC16CB
Open/types/CA10__CaAwsCloudTrailTrail__c/object.extracts.yamlE81F4D5C3A3DF3406D05985DF80BF9C5
Open/types/CA10__CaAwsBucket__c/object.extracts.yamlF56AFA293B0B19D4F39C1EBB70F4C56F

Available Commands​

repo-manager policies generate FULL /ce/ca/aws/cloudtrail/s3-bucket-access-logging/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/cloudtrail/s3-bucket-access-logging/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/cloudtrail/s3-bucket-access-logging/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/cloudtrail/s3-bucket-access-logging/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/cloudtrail/s3-bucket-access-logging/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsCloudTrailTrail__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsCloudTrailTrail__c/object.extracts.yaml"
- file: "/types/CA10__CaAwsBucket__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "AWS CloudTrail references a missing bucket."
remediationMessage: "Configure CloudTrail to reference an active S3 bucket."
check:
IS_EMPTY_LOOKUP: "CA10__bucket__r"
- status: "INCOMPLIANT"
currentStateMessage: "Server access logging is not enabled."
remediationMessage: "Enable server access logging."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__bucket__r.CA10__loggingDestinationBucketName__c"
# When source bucket is its own destination bucket,
# then ARNs will be the same but CA10__loggingDestinationBucket__c will be empty
- status: "COMPLIANT"
currentStateMessage: "Server access logging is enabled. The bucket uses itself as the logging destination."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__bucket__r.CA10__arn__c"
right:
EXTRACT: "CA10__bucket__r.CA10__loggingDestinationBucketArn__c"
- status: "INCOMPLIANT"
currentStateMessage: "The destination bucket is missing."
remediationMessage: "Configure bucket access logging to reference an active S3 bucket."
check:
IS_EMPTY_LOOKUP: "CA10__bucket__r.CA10__loggingDestinationBucket__r"
- status: "COMPLIANT"
currentStateMessage: "Server access logging is enabled."
check:
NOT_EMPTY_LOOKUP: "CA10__bucket__r.CA10__loggingDestinationBucket__r"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."