Skip to main content

🧠 AWS IAM AWSCloudShellFullAccess Policy is attached - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS IAM PolicyCA10__CaAwsIamPolicy__c613

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:44:52.905257981Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ extract('CA10__name__c') != 'AWSCloudShellFullAccess'βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ CA10__AWS_IAM_Role_Policy_Attachments__r.has(INCOMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null
🟒test5βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null
🟒test6βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/policy.yaml0D521E78AB0752EF9203C8492679759F
Open/ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/prod.logic.yaml260A9C3BD1DA546E1F70D2E4B5523DFE
Open/types/CA10__CaAwsIamPolicy__c/object.extracts.yamlC48327B50CE4EB54B3C6B2B464134BB3
Open/ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/test-data.jsonEC23AD1C2566AEA6DAD8CD6295140BC6

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/iam/detach-aws-cloudshell-full-access-policy/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsIamPolicy__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsIamPolicy__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is not a AWSCloudShellFullAccess policy."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__name__c"
right:
TEXT: "AWSCloudShellFullAccess"
- status: "INCOMPLIANT"
currentStateMessage: "AWSCloudShellFullAccess policy is attached to a role."
remediationMessage: "Consider detaching the AWSCloudShellFullAccess policy."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__AWS_IAM_Role_Policy_Attachments__r"
otherwise:
status: "COMPLIANT"
currentStateMessage: "AWSCloudShellFullAccess policy is not attached."
relatedLists:
- relationshipName: "CA10__AWS_IAM_Role_Policy_Attachments__r"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "AWSCloudShellFullAccess policy is attached to a role."
remediationMessage: "Consider detaching the AWSCloudShellFullAccess policy."
check:
NOT_EMPTY_LOOKUP: "CA10__role__r"
otherwise:
status: "COMPLIANT"
currentStateMessage: "AWSCloudShellFullAccess policy is not attached."