mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 06:45:08 +00:00
feat(compliance): Loader and Execute (#1465)
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
"Provider": "aws",
|
||||
"CheckID": "acm_certificates_expiration_check",
|
||||
"CheckTitle": "Check if ACM Certificates are about to expire in specific days or less",
|
||||
"CheckType": ["Data Protection"],
|
||||
"CheckType": [
|
||||
"Data Protection"
|
||||
],
|
||||
"ServiceName": "acm",
|
||||
"SubServiceName": "",
|
||||
"ResourceIdTemplate": "arn:partition:acm:region:account-id:certificate/resource-id",
|
||||
@@ -30,6 +32,5 @@
|
||||
},
|
||||
"DependsOn": [],
|
||||
"RelatedTo": [],
|
||||
"Notes": "",
|
||||
"Compliance": []
|
||||
"Notes": ""
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ class acm_certificates_expiration_check(Check):
|
||||
def execute(self):
|
||||
findings = []
|
||||
for certificate in acm_client.certificates:
|
||||
report = Check_Report(self.metadata)
|
||||
report = Check_Report(self.metadata())
|
||||
report.region = certificate.region
|
||||
if certificate.expiration_days > DAYS_TO_EXPIRE_THRESHOLD:
|
||||
report.status = "PASS"
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
"Provider": "aws",
|
||||
"CheckID": "acm_certificates_transparency_logs_enabled",
|
||||
"CheckTitle": "Check if ACM certificates have Certificate Transparency logging enabled",
|
||||
"CheckType": ["Logging and Monitoring"],
|
||||
"CheckType": [
|
||||
"Logging and Monitoring"
|
||||
],
|
||||
"ServiceName": "acm",
|
||||
"SubServiceName": "",
|
||||
"ResourceIdTemplate": "arn:partition:acm:region:account-id:certificate/resource-id",
|
||||
@@ -30,6 +32,5 @@
|
||||
},
|
||||
"DependsOn": [],
|
||||
"RelatedTo": [],
|
||||
"Notes": "",
|
||||
"Compliance": []
|
||||
"Notes": ""
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ class acm_certificates_transparency_logs_enabled(Check):
|
||||
def execute(self):
|
||||
findings = []
|
||||
for certificate in acm_client.certificates:
|
||||
report = Check_Report(self.metadata)
|
||||
report = Check_Report(self.metadata())
|
||||
report.region = certificate.region
|
||||
if certificate.type == "IMPORTED":
|
||||
report.status = "PASS"
|
||||
|
||||
Reference in New Issue
Block a user