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": "sagemaker_notebook_instance_encryption_enabled",
"CheckTitle": "Check if Amazon SageMaker Notebook instances have data encryption enabled",
"CheckType": [],
"ServiceName": "sagemaker",
"SubServiceName": "",
"ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:notebook-instance",
"Severity": "medium",
"ResourceType": "AwsSageMakerNotebookInstance",
"Description": "Check if Amazon SageMaker Notebook instances have data encryption enabled",
"Risk": "Data exfiltration could happen if information is not protected. KMS keys provide additional security level to IAM policies.",
"RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/key-management.html",
"Remediation": {
"Code": {
"CLI": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-data-encrypted.html",
"NativeIaC": "",
"Other": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-data-encrypted.html",
"Terraform": "https://docs.bridgecrew.io/docs/bc_aws_general_40#fix---buildtime"
},
"Recommendation": {
"Text": "Specify AWS KMS keys to use for input and output from S3 and EBS.",
"Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/key-management.html"
}
"Provider": "aws",
"CheckID": "sagemaker_notebook_instance_encryption_enabled",
"CheckTitle": "Check if Amazon SageMaker Notebook instances have data encryption enabled",
"CheckType": [],
"ServiceName": "sagemaker",
"SubServiceName": "",
"ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:notebook-instance",
"Severity": "medium",
"ResourceType": "AwsSageMakerNotebookInstance",
"Description": "Check if Amazon SageMaker Notebook instances have data encryption enabled",
"Risk": "Data exfiltration could happen if information is not protected. KMS keys provide additional security level to IAM policies.",
"RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/key-management.html",
"Remediation": {
"Code": {
"CLI": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-data-encrypted.html",
"NativeIaC": "",
"Other": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-data-encrypted.html",
"Terraform": "https://docs.bridgecrew.io/docs/bc_aws_general_40#fix---buildtime"
},
"Categories": [],
"Tags": {
"Tag1Key": "value",
"Tag2Key": "value"
},
"DependsOn": [],
"RelatedTo": [],
"Notes": "",
"Compliance": []
}
"Recommendation": {
"Text": "Specify AWS KMS keys to use for input and output from S3 and EBS.",
"Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/key-management.html"
}
},
"Categories": [],
"Tags": {
"Tag1Key": "value",
"Tag2Key": "value"
},
"DependsOn": [],
"RelatedTo": [],
"Notes": ""
}

View File

@@ -6,7 +6,7 @@ class sagemaker_notebook_instance_encryption_enabled(Check):
def execute(self):
findings = []
for notebook_instance in sagemaker_client.sagemaker_notebook_instances:
report = Check_Report(self.metadata)
report = Check_Report(self.metadata())
report.region = notebook_instance.region
report.resource_id = notebook_instance.name
report.resource_arn = notebook_instance.arn