Skip to main content

🧠 AWS EC2 Security Group allows public IPv6 (::/0) access to admin ports - prod.logic.yaml🟢

Uses

Test Results 🟢

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

ResultIdCondition IndexCondition TextRuntime Error
🟢test1✔️ 99✔️ isDisappeared(CA10__disappearanceTime__c)✔️ null
🟢test2✔️ 199✔️ CA10__AWS_EC2_Security_Group_Rules__r.has(INCOMPLIANT)✔️ null
🟢test3✔️ 199✔️ CA10__AWS_EC2_Security_Group_Rules__r.has(INCOMPLIANT)✔️ null
🟢test4✔️ 199✔️ CA10__AWS_EC2_Security_Group_Rules__r.has(INCOMPLIANT)✔️ null
🟢test5✔️ 200✔️ otherwise✔️ null
🟢test6✔️ 200✔️ otherwise✔️ null
🟢test7✔️ 200✔️ otherwise✔️ null
🟢test8✔️ 200✔️ otherwise✔️ null

Generation Bundle

FileMD5
Open/ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/policy.yamlB474F936C392B32D644A49FB0D5870AE
Open/ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/prod.logic.yaml2D2987565C3C87E410B7DDF6D05ED724
Open/ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/test-data.jsonDEC16A0F25C083E387BC5B0C43807634
Open/types/CA10__CaAwsSecurityGroupRule2__c/object.extracts.yaml58DC1872D7462985D50972C65C61C237

Available Commands

repo-manager policies generate FULL /ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/ec2/security-group-allows-public-ipv6-to-admin-ports/prod.logic.yaml

Content

Open File

---
inputType: "CA10__CaAwsSecurityGroup__c"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "This security group allows ingress from ::/0 to remote administration ports."
remediationMessage: "Change the security group source to a range other than ::/0 or delete the offending inbound rule."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__AWS_EC2_Security_Group_Rules__r"
otherwise:
status: "COMPLIANT"
currentStateMessage: "This security group does not allow ingress from ::/0."
relatedLists:
- relationshipName: "CA10__AWS_EC2_Security_Group_Rules__r"
importExtracts:
- file: "/types/CA10__CaAwsSecurityGroupRule2__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is an outbound security group rule."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__direction__c"
right:
TEXT: "Inbound"
- status: "INAPPLICABLE"
currentStateMessage: "This security group rule does not allow unrestricted access."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__sourceIpRange__c"
right:
TEXT: "::/0"
- status: "INAPPLICABLE"
currentStateMessage: "This security group rule protocol is not All, TCP, or UDP."
check:
# check that protocol is neither all, tcp, or udp
NOT:
arg:
OR:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10__protocol__c"
right:
TEXT: "All"
- IS_EQUAL:
left:
EXTRACT: "CA10__protocol__c"
right:
TEXT: "tcp"
- IS_EQUAL:
left:
EXTRACT: "CA10__protocol__c"
right:
TEXT: "udp"
- status: "INCOMPLIANT"
currentStateMessage: "This security group allows ingress from ::/0."
remediationMessage: "Change the source field to a range other than ::/0 or delete the offending inbound rule."
check:
# check that port range either includes port 22 or port 3389, or the range is empty (all ports)
OR:
args:
- AND:
args:
- LESS_THAN_EQUAL:
left:
EXTRACT: "CA10__fromPort__c"
right:
NUMBER: 22.0
- GREATER_THAN_EQUAL:
left:
EXTRACT: "CA10__toPort__c"
right:
NUMBER: 22.0
- AND:
args:
- LESS_THAN_EQUAL:
left:
EXTRACT: "CA10__fromPort__c"
right:
NUMBER: 3389.0
- GREATER_THAN_EQUAL:
left:
EXTRACT: "CA10__toPort__c"
right:
NUMBER: 3389.0
- IS_EMPTY:
arg:
EXTRACT: "CA10__fromPort__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10__toPort__c"
otherwise:
status: "COMPLIANT"
currentStateMessage: "This security group does not allow ingress from ::/0."