Skip to main content

🧠 AWS CloudTrail is not encrypted with KMS CMK - prod.logic.yaml🟒

Uses​

Test Results πŸŸ’β€‹

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

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ isEmptyLookup('CA10__kmsKey__r')βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ extract('CA10__kmsKey__r.CA10__state__c') != 'Enabled'βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ extract('CA10__kmsKey__r.CA10__state__c') == 'Enabled'βœ”οΈ null

Generation Bundle​

FileMD5
Open/ce/ca/aws/cloudtrail/encryption-with-kms-cmk/policy.yaml041BDADEA81049BFE2B7A0DD7C443E6B
Open/ce/ca/aws/cloudtrail/encryption-with-kms-cmk/prod.logic.yaml9A522B16ACED76940486432B75C775D6
Open/ce/ca/aws/cloudtrail/encryption-with-kms-cmk/test-data.json3B4C1B029B3F41BFEB844B6BB9A8AC0D
Open/types/CA10__CaAwsKmsKey__c/object.extracts.yamlEC6D0EFD0BFEAB3447A84529724D4AFE
Open/types/CA10__CaAwsCloudTrailTrail__c/object.extracts.yamlE81F4D5C3A3DF3406D05985DF80BF9C5

Available Commands​

repo-manager policies generate FULL /ce/ca/aws/cloudtrail/encryption-with-kms-cmk/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/cloudtrail/encryption-with-kms-cmk/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/cloudtrail/encryption-with-kms-cmk/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/cloudtrail/encryption-with-kms-cmk/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/cloudtrail/encryption-with-kms-cmk/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__CaAwsKmsKey__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "CloudTrail is not encrypted with a KMS CMK."
remediationMessage: "Configure CloudTrail to use an active KMS CMK."
check:
IS_EMPTY_LOOKUP: "CA10__kmsKey__r"
- status: "INCOMPLIANT"
currentStateMessage: "The CloudTrail KMS CMK is not enabled."
remediationMessage: "Configure CloudTrail to use an enabled KMS CMK."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__kmsKey__r.CA10__state__c"
right:
TEXT: "Enabled"
- status: "COMPLIANT"
currentStateMessage: "CloudTrail is encrypted with a KMS CMK."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__kmsKey__r.CA10__state__c"
right:
TEXT: "Enabled"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."