Skip to main content

🧠 AWS EBS Snapshot is publicly accessible - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“— AWS EBS SnapshotCA10__CaAwsSnapshot__c111

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-07-25T15:25:55.776654087Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ extract('CA10__publicAccessible__c') == 'Yes'βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ extract('CA10__publicAccessible__c') == 'No'βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ extract('CA10__publicAccessible__c').isEmpty()βœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/ec2/ebs-snapshot-public/policy.yaml9201B596962CAE4F4E2192B8459642A1
Open/ce/ca/aws/ec2/ebs-snapshot-public/prod.logic.yamlC1A756C418A88925591687F36C46ABB2
Open/ce/ca/aws/ec2/ebs-snapshot-public/test-data.jsonFD071E743B5093BD86D1CFFF40A9A122
Open/types/CA10__CaAwsSnapshot__c/object.extracts.yaml17D688BF2D9BF0843C50C311EC1C4C3B

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/ec2/ebs-snapshot-public/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/ec2/ebs-snapshot-public/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/ec2/ebs-snapshot-public/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/ec2/ebs-snapshot-public/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/ec2/ebs-snapshot-public/prod.logic.yaml

Content​

Open File

inputType: "CA10__CaAwsSnapshot__c"
testData:
- file: "test-data.json"
importExtracts:
- file: /types/CA10__CaAwsSnapshot__c/object.extracts.yaml
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "The EBS snapshot is publicly accessible."
remediationMessage: "Consider making the snapshot private or restricting access to specific AWS accounts."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__publicAccessible__c"
right:
TEXT: "Yes"
- status: "COMPLIANT"
currentStateMessage: "The EBS snapshot is not publicly accessible."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__publicAccessible__c"
right:
TEXT: "No"
- status: "COMPLIANT"
currentStateMessage: "The EBS snapshot is not publicly accessible."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__publicAccessible__c"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the field."