Skip to main content

🧠 AWS RDS Snapshot is publicly accessible - prod.logic.yaml🟢

Uses

Test Results 🟢

Generated at: 2026-02-10T22:33:14.434439983Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟢test1✔️ 99✔️ isDisappeared(CA10__disappearanceTime__c)✔️ null
🟢test2✔️ 199✔️ extract('CA10__encrypted__c') == true✔️ null
🟢test3✔️ 299✔️ extract('CA10__snapshotType__c') == 'automated' || extract('CA10__snapshotType__c') == 'awsbackup'✔️ null
🟢test4✔️ 399✔️ extract('CA10__snapshotType__c') == 'public'✔️ null
🟢test5✔️ 401✔️ CA10__attributesJson__c.delegatedTo(CA10__attributesJson__c).isEmpty()✔️ null
🟢test6✔️ 499✔️ extract('caJsonFrom__attributesJson__c').jsonQueryText('to_string(restore[0])') == 'all'✔️ null
🟢test7✔️ 500✔️ otherwise✔️ null
🟢test8✔️ 500✔️ otherwise✔️ null

Generation Bundle

FileMD5
Open/ce/ca/aws/rds/snapshot-publicly-accessible/policy.yamlBFCEB675F8AF97966D14960558EDBF00
Open/ce/ca/aws/rds/snapshot-publicly-accessible/prod.logic.yaml371AE704DF40F0BECEE3A66732C1E955
Open/ce/ca/aws/rds/snapshot-publicly-accessible/test-data.jsonF925F0C16F8C3C8D5244C998646C0A4E
Open/types/CA10__CaAwsDbSnapshot__c/object.extracts.yaml76C7D71A88222DC213DE94D7293929A3

Available Commands

repo-manager policies generate FULL /ce/ca/aws/rds/snapshot-publicly-accessible/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/rds/snapshot-publicly-accessible/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/rds/snapshot-publicly-accessible/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/rds/snapshot-publicly-accessible/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/rds/snapshot-publicly-accessible/prod.logic.yaml

Content

Open File

---
inputType: CA10__CaAwsDbSnapshot__c
importExtracts:
- file: "/types/CA10__CaAwsDbSnapshot__c/object.extracts.yaml"
testData:
- file: "test-data.json"
conditions:
- status: INAPPLICABLE
currentStateMessage: "Encrypted RDS snapshots cannot be public." # cannot be set to restore:all
check:
IS_EQUAL:
left:
EXTRACT: CA10__encrypted__c
right:
BOOLEAN: true
- status: INAPPLICABLE
currentStateMessage: "RDS snapshots created automatically or via AWS Backup cannot be public."
check:
OR:
args:
- IS_EQUAL:
left:
EXTRACT: CA10__snapshotType__c
right:
TEXT: automated
- IS_EQUAL:
left:
EXTRACT: CA10__snapshotType__c
right:
TEXT: awsbackup
- status: INCOMPLIANT
currentStateMessage: "The RDS snapshot is publicly accessible."
remediationMessage: "Make the snapshot private or restrict access to specific AWS accounts."
check:
IS_EQUAL:
left:
EXTRACT: CA10__snapshotType__c
right:
TEXT: public
# TODO: modify the INCOMPLIANT status logic to use map ops when released.
- status: INCOMPLIANT
currentStateMessage: "The RDS snapshot is publicly accessible."
remediationMessage: "Make the snapshot private or restrict access to specific AWS accounts."
check:
IS_EQUAL:
left:
JSON_QUERY_TEXT:
arg:
EXTRACT: caJsonFrom__attributesJson__c
expression: "to_string(restore[0])"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return text type."
right:
TEXT: "all"
otherwise:
status: COMPLIANT
currentStateMessage: "The RDS snapshot is not publicly accessible."