Created
October 5, 2022 09:20
-
-
Save danifitz/3288d24e8d7446e3d722bc8c4eb1d024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
queryId: Custom_AWS_Config_ACM_ExpiringCertificate | |
queryText: |- | |
{ | |
source { | |
LW_CFG_AWS_ACM_DESCRIBE_CERTIFICATE | |
} | |
filter { | |
RESOURCE_CONFIG:Certificate.Status NOT IN ('EXPIRED') and | |
DIFF_DAYS(current_timestamp_sec()::timestamp, RESOURCE_CONFIG:Certificate.NotAfter::timestamp) <= 20 | |
} | |
return distinct { | |
ACCOUNT_ALIAS, | |
ACCOUNT_ID, | |
ARN as RESOURCE_KEY, | |
RESOURCE_REGION, | |
RESOURCE_TYPE, | |
SERVICE, | |
'CertificateExpiringIn20DaysOrLess' as COMPLIANCE_FAILURE_REASON | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment