๐ง AWS Account Root User credentials were used is the last 30 days - prod.logic.yaml๐ข
- Contextual name: ๐ง prod.logic.yaml๐ข
- ID:
/ce/ca/aws/iam/root-account-used-recently/prod.logic.yaml - Tags:
- ๐ข Logic test success
- ๐ข Logic with extracts
- ๐ข Logic with test data
Usesโ
- ๐ AWS IAM User
- ๐ AWS IAM User - credReport.extracts.yaml
- ๐ AWS IAM User - object.extracts.yaml
- ๐งช test-data.json
Test Results ๐ขโ
Generated at: 2026-02-10T22:32:59.868830481Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| ๐ข | test1 | โ๏ธ 99 | โ๏ธ isDisappeared(CA10__disappearanceTime__c) | โ๏ธ null |
| ๐ข | test2 | โ๏ธ 199 | โ๏ธ extract('CA10__userName__c') != 'root' | โ๏ธ null |
| ๐ข | test3 | โ๏ธ 201 | โ๏ธ CA10__credReportAttributesJson__c.isEmpty() | โ๏ธ null |
| ๐ข | test4 | โ๏ธ 499 | โ๏ธ extract('CA10__credReportPasswordLastUsed__c').withinLastDays(30) | โ๏ธ null |
| ๐ข | test5 | โ๏ธ 500 | โ๏ธ otherwise | โ๏ธ null |
| ๐ข | test6 | โ๏ธ 201 | โ๏ธ CA10__credReportAttributesJson__c.isEmpty() | โ๏ธ null |
| ๐ข | test7 | โ๏ธ 299 | โ๏ธ extract('CA10__credReportAccessKey1LastUsed__c').withinLastDays(30) | โ๏ธ null |
| ๐ข | test8 | โ๏ธ 399 | โ๏ธ extract('CA10__credReportAccessKey2LastUsed__c').withinLastDays(30) | โ๏ธ null |
Generation Bundleโ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/iam/root-account-used-recently/policy.yaml | BF76054D2A590F0C1F9D27C7F763AA37 |
| Open | /ce/ca/aws/iam/root-account-used-recently/prod.logic.yaml | 25F2458A6F66C54C9C5EDE6756406D72 |
| Open | /ce/ca/aws/iam/root-account-used-recently/test-data.json | 680CA632B238A20081F22987E9BD98B6 |
| Open | /types/CA10__CaAwsUser__c/credReport.extracts.yaml | F6D383D933A0B64268B39ADE7012508C |
| Open | /types/CA10__CaAwsUser__c/object.extracts.yaml | 131CCD980BE5290B2C296CE093A686DC |
Available Commandsโ
repo-manager policies generate FULL /ce/ca/aws/iam/root-account-used-recently/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/iam/root-account-used-recently/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/iam/root-account-used-recently/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/iam/root-account-used-recently/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/iam/root-account-used-recently/prod.logic.yaml
Contentโ
---
inputType: CA10__CaAwsUser__c
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsUser__c/credReport.extracts.yaml"
- file: "/types/CA10__CaAwsUser__c/object.extracts.yaml"
conditions:
- status: INAPPLICABLE
currentStateMessage: "This is not a root user."
check:
NOT_EQUAL:
left:
EXTRACT: CA10__userName__c
right:
TEXT: root
- status: INCOMPLIANT
currentStateMessage: "The root user's access key was used within the last 30 days."
remediationMessage: "Delete the access key for the root user."
check:
IS_WITHIN_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: CA10__credReportAccessKey1LastUsed__c
- status: INCOMPLIANT
currentStateMessage: "The root user's access key was used within the last 30 days."
remediationMessage: "Delete the access key for the root user."
check:
IS_WITHIN_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: CA10__credReportAccessKey2LastUsed__c
- status: INCOMPLIANT
currentStateMessage: "The root user's password was used within the last 30 days."
remediationMessage: "Avoid logging in as the root user."
check:
IS_WITHIN_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: CA10__credReportPasswordLastUsed__c
otherwise:
status: COMPLIANT
currentStateMessage: "The root user's password has not been used within the last 30 days."