π§ AWS Account Object-level CloudTrail Logging for Read Events for S3 Buckets is not enabled - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π AWS Account
- π AWS CloudTrail Trail - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2026-02-07T12:01:57.144155947Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | test1 | βοΈ 199 | βοΈ CA10__AWS_CloudTrail_Trails__r.has(COMPLIANT) | βοΈ null |
| π’ | test2 | βοΈ 199 | βοΈ CA10__AWS_CloudTrail_Trails__r.has(COMPLIANT) | βοΈ null |
| π’ | test3 | βοΈ 200 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/policy.yaml | DC41A388E2B170B645F780677C4C187B |
| Open | /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/prod.logic.yaml | 5CA18FF8FE098FB2BAC06033DAD177AD |
| Open | /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/test-data.json | 77E769B2E9E77902800977568B404441 |
| Open | /types/CA10__CaAwsCloudTrailTrail__c/object.extracts.yaml | E81F4D5C3A3DF3406D05985DF80BF9C5 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/account/object-level-cloudtrail-logging-for-read-events-for-buckets/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsAccount__c"
testData:
- file: "test-data.json"
conditions:
- status: "COMPLIANT"
currentStateMessage: "This AWS Account has a CloudTrail with object-level logging for read events for all S3 buckets."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__AWS_CloudTrail_Trails__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "This AWS Account doesn't have a CloudTrail with object-level logging for read events for all S3 buckets."
remediationMessage: "Consider creating a new CloudTrail or updating an existing one with object-level logging for read events for all S3 buckets."
relatedLists:
- relationshipName: "CA10__AWS_CloudTrail_Trails__r"
importExtracts:
- file: "/types/CA10__CaAwsCloudTrailTrail__c/object.extracts.yaml"
conditions:
- status: "COMPLIANT"
currentStateMessage: "CloudTrail with object-level logging for read events for all S3 buckets."
check:
AND:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10__multiRegionTrail__c"
right:
BOOLEAN: true
- IS_EQUAL:
left:
JSON_QUERY_TEXT:
arg:
EXTRACT: "caJsonFrom__eventSelectorsJson__c"
expression: "[].dataResources[?type=='AWS::S3::Object'].type[] | [0]"
undeterminedIf:
evaluationError: "The JSON text query has failed."
resultTypeMismatch: "The JSON query did not return a text type."
right:
TEXT: "AWS::S3::Object"
- IS_EQUAL:
left:
JSON_QUERY_BOOLEAN:
arg:
EXTRACT: "caJsonFrom__eventSelectorsJson__c"
expression: "contains([].dataResources[].values[], 'arn:aws:s3')"
undeterminedIf:
evaluationError: "The JSON boolean query has failed."
resultTypeMismatch: "The JSON query did not return a boolean type."
right:
BOOLEAN: true
- OR:
args:
- IS_EQUAL:
left:
EXTRACT: "caJsonText__eventSelectorsJsonReadWriteType__c"
right:
TEXT: "All"
- IS_EQUAL:
left:
EXTRACT: "caJsonText__eventSelectorsJsonReadWriteType__c"
right:
TEXT: "ReadOnly"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "Unrelated CloudTrail."