feat(compliance): Loader and Execute (#1465)

This commit is contained in:
Pepe Fagoaga
2022-11-23 15:53:53 +01:00
committed by GitHub
parent 1a70a45805
commit b3e57ca3e5
515 changed files with 6018 additions and 5614 deletions

View File

@@ -1,35 +1,34 @@
{
"Provider": "aws",
"CheckID": "redshift_cluster_audit_logging",
"CheckTitle": "Check if Redshift cluster has audit logging enabled",
"CheckType": [],
"ServiceName": "redshift",
"SubServiceName": "",
"ResourceIdTemplate": "arn:aws:redshift:region:account-id:cluster:cluster-name",
"Severity": "medium",
"ResourceType": "AwsRedshiftCluster",
"Description": "Check if Redshift cluster has audit logging enabled",
"Risk": "If logs are not enabled; monitoring of service use and threat analysis is not possible.",
"RelatedUrl": "https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html",
"Remediation": {
"Code": {
"CLI": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/Redshift/redshift-cluster-audit-logging-enabled.html",
"NativeIaC": "https://docs.bridgecrew.io/docs/bc_aws_logging_12#cloudformation",
"Other": "https://docs.bridgecrew.io/docs/bc_aws_logging_12#aws-console",
"Terraform": "https://docs.bridgecrew.io/docs/bc_aws_logging_12#terraform"
},
"Recommendation": {
"Text": "Enable logs. Create an S3 lifecycle policy. Define use cases, metrics and automated responses where applicable.",
"Url": "https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html"
}
"Provider": "aws",
"CheckID": "redshift_cluster_audit_logging",
"CheckTitle": "Check if Redshift cluster has audit logging enabled",
"CheckType": [],
"ServiceName": "redshift",
"SubServiceName": "",
"ResourceIdTemplate": "arn:aws:redshift:region:account-id:cluster:cluster-name",
"Severity": "medium",
"ResourceType": "AwsRedshiftCluster",
"Description": "Check if Redshift cluster has audit logging enabled",
"Risk": "If logs are not enabled; monitoring of service use and threat analysis is not possible.",
"RelatedUrl": "https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html",
"Remediation": {
"Code": {
"CLI": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/Redshift/redshift-cluster-audit-logging-enabled.html",
"NativeIaC": "https://docs.bridgecrew.io/docs/bc_aws_logging_12#cloudformation",
"Other": "https://docs.bridgecrew.io/docs/bc_aws_logging_12#aws-console",
"Terraform": "https://docs.bridgecrew.io/docs/bc_aws_logging_12#terraform"
},
"Categories": [],
"Tags": {
"Tag1Key": "value",
"Tag2Key": "value"
},
"DependsOn": [],
"RelatedTo": [],
"Notes": "",
"Compliance": []
}
"Recommendation": {
"Text": "Enable logs. Create an S3 lifecycle policy. Define use cases, metrics and automated responses where applicable.",
"Url": "https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html"
}
},
"Categories": [],
"Tags": {
"Tag1Key": "value",
"Tag2Key": "value"
},
"DependsOn": [],
"RelatedTo": [],
"Notes": ""
}

View File

@@ -6,7 +6,7 @@ class redshift_cluster_audit_logging(Check):
def execute(self):
findings = []
for cluster in redshift_client.clusters:
report = Check_Report(self.metadata)
report = Check_Report(self.metadata())
report.region = cluster.region
report.resource_id = cluster.id
report.resource_arn = cluster.arn