Skip to main content

๐Ÿง  AWS IAM Access Key is unused - prod.logic.yaml๐ŸŸข

Usesโ€‹

Test Results ๐ŸŸขโ€‹

Generated at: 2025-12-27T12:02:01.272434745Z Open

ResultIdCondition IndexCondition TextRuntime Error
๐ŸŸขtest1โœ”๏ธ 99โœ”๏ธ isDisappeared(CA10__disappearanceTime__c)โœ”๏ธ null
๐ŸŸขtest2โœ”๏ธ 199โœ”๏ธ CA10__status__c != 'Active'โœ”๏ธ null
๐ŸŸขtest3โœ”๏ธ 299โœ”๏ธ CA10__lastUsedDate__c.isNotEmpty() && CA10__lastUsedDate__c.beyondLastDays(90)โœ”๏ธ null
๐ŸŸขtest4โœ”๏ธ 399โœ”๏ธ CA10__lastUsedDate__c.isEmpty() && CA10__createDate__c.beyondLastDays(90)โœ”๏ธ null
๐ŸŸขtest5โœ”๏ธ 400โœ”๏ธ otherwiseโœ”๏ธ null

Generation Bundleโ€‹

FileMD5
Open/ce/ca/aws/iam/access-key-unused/policy.yamlF8AA6A1593E4DF95675C29EB1C02DF41
Open/ce/ca/aws/iam/access-key-unused/prod.logic.yaml6E83BB8DAC44B3D0D9F8996862744493
Open/ce/ca/aws/iam/access-key-unused/test-data.jsonE0E76674D24F2914CAF556C2DDF9515D
Open/types/CA10__CaAwsAccessKey__c/object.extracts.yaml40ECF1BF559EC81799BEDCBB6DEAAC0B

Available Commandsโ€‹

repo-manager policies generate FULL /ce/ca/aws/iam/access-key-unused/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/iam/access-key-unused/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/iam/access-key-unused/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/iam/access-key-unused/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/iam/access-key-unused/prod.logic.yaml

Contentโ€‹

Open File

---
inputType: CA10__CaAwsAccessKey__c
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsAccessKey__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The access key is currently Inactive."
check:
NOT_EQUAL:
left:
FIELD:
path: "CA10__status__c"
right:
TEXT: "Active"
- status: "INCOMPLIANT"
currentStateMessage: "The access key is active but has not been used in over 90 days."
remediationMessage: "Deactivate the unused access key."
check:
AND:
args:
- NOT_EMPTY:
arg:
FIELD:
path: "CA10__lastUsedDate__c"
- IS_BEYOND_LAST_DAYS:
offsetDays: 90
arg:
FIELD:
path: "CA10__lastUsedDate__c"
- status: "INCOMPLIANT"
currentStateMessage: "The access key is active, has never been used, and was created over 90 days ago."
remediationMessage: "Deactivate the unused access key."
check:
AND:
args:
- IS_EMPTY:
arg:
FIELD:
path: "CA10__lastUsedDate__c"
- IS_BEYOND_LAST_DAYS:
offsetDays: 90
arg:
FIELD:
path: "CA10__createDate__c"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The access key is active and has been used within the last 90 days (or is recently created)."