diff --git a/prowler/CHANGELOG.md b/prowler/CHANGELOG.md index f681387e3d..03789bc445 100644 --- a/prowler/CHANGELOG.md +++ b/prowler/CHANGELOG.md @@ -25,6 +25,7 @@ All notable changes to the **Prowler SDK** are documented in this file. - Update AWS SSM service metadata to new format [(#9430)](https://github.com/prowler-cloud/prowler/pull/9430) - Update AWS Organizations service metadata to new format [(#9384)](https://github.com/prowler-cloud/prowler/pull/9384) - Update AWS Resource Explorer v2 service metadata to new format [(#9386)](https://github.com/prowler-cloud/prowler/pull/9386) +- Update AWS SageMaker service metadata to new format [(#9407)](https://github.com/prowler-cloud/prowler/pull/9407) --- diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_endpoint_config_prod_variant_instances/sagemaker_endpoint_config_prod_variant_instances.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_endpoint_config_prod_variant_instances/sagemaker_endpoint_config_prod_variant_instances.metadata.json index f039aff090..620aea9d74 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_endpoint_config_prod_variant_instances/sagemaker_endpoint_config_prod_variant_instances.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_endpoint_config_prod_variant_instances/sagemaker_endpoint_config_prod_variant_instances.metadata.json @@ -1,33 +1,39 @@ { "Provider": "aws", "CheckID": "sagemaker_endpoint_config_prod_variant_instances", - "CheckTitle": "SageMaker endpoint production variants should have at least two initial instances", + "CheckTitle": "SageMaker endpoint configuration has all production variants with at least two initial instances", "CheckType": [ - "Software and Configuration Checks/AWS Security Best Practices" + "Software and Configuration Checks/AWS Security Best Practices", + "Effects/Denial of Service" ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:endpoint-config/resource-id", + "ResourceIdTemplate": "", "Severity": "medium", "ResourceType": "Other", "ResourceGroup": "ai_ml", - "Description": "This control checks whether production variants of an Amazon SageMaker endpoint have an initial instance count greater than 1. A single instance creates a single point of failure and reduces availability.", - "Risk": "Having only one instance for a SageMaker endpoint production variant can lead to reduced availability, single points of failure, and slow recovery during incidents, especially if the instance becomes unavailable due to failure or security incidents.", - "RelatedUrl": "https://docs.aws.amazon.com/config/latest/developerguide/sagemaker-endpoint-config-prod-instance-count.html", + "Description": "Amazon SageMaker endpoint configurations are evaluated to ensure each production variant uses an **initial instance count** of at least two. Variants with `InitialInstanceCount` less than two in instance-based endpoints are identified, indicating no built-in multi-AZ redundancy.", + "Risk": "A **single-instance variant** is a **single point of failure**. If the instance or its Availability Zone fails, inference becomes unavailable, leading to **service outages**, **SLA breaches**, and **cascading failures** in dependent systems. This primarily degrades **availability** and reliability.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/securityhub/latest/userguide/sagemaker-controls.html#sagemaker-4", + "https://docs.aws.amazon.com/config/latest/developerguide/sagemaker-endpoint-config-prod-instance-count.html", + "https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints-create.html#serverless-endpoints-create-config" + ], "Remediation": { "Code": { - "CLI": "aws sagemaker update-endpoint --endpoint-name --endpoint-config-name ", - "NativeIaC": "", - "Other": "https://docs.aws.amazon.com/securityhub/latest/userguide/sagemaker-controls.html#sagemaker-4", - "Terraform": "" + "CLI": "aws sagemaker delete-endpoint-config --endpoint-config-name ", + "NativeIaC": "```yaml\n# CloudFormation: EndpointConfig with InitialInstanceCount > 1\nResources:\n :\n Type: AWS::SageMaker::EndpointConfig\n Properties:\n ProductionVariants:\n - VariantName: \n ModelName: \n InstanceType: ml.m5.large\n InitialInstanceCount: 2 # Critical: set >=2 so all variants start with at least two instances\n```", + "Other": "1. In the AWS Console, go to SageMaker > Inference > Endpoint configurations\n2. Click Create endpoint configuration and add each Production variant with Initial instance count set to 2\n3. If any endpoints use the old configuration, go to SageMaker > Inference > Endpoints, select the endpoint, choose Update, and select the new endpoint configuration\n4. Return to Endpoint configurations and delete the noncompliant configuration", + "Terraform": "```hcl\n# SageMaker Endpoint Configuration with InitialInstanceCount > 1\nresource \"aws_sagemaker_endpoint_configuration\" \"\" {\n production_variants {\n variant_name = \"\"\n model_name = \"\"\n instance_type = \"ml.m5.large\"\n initial_instance_count = 2 # Critical: set >=2 so the variant passes the check\n }\n}\n```" }, "Recommendation": { - "Text": "To increase the initial instance count, configure your SageMaker endpoint to use more than 1 instance in the production variant for high availability.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints-create.html#serverless-endpoints-create-config" + "Text": "Apply the **resilience** principle:\n- Run each production variant with `InitialInstanceCount >= 2`\n- Spread capacity across AZs with health-based scaling\n- Use rolling/canary updates to avoid downtime\n- Right-size capacity to tolerate node loss\n\n*For bursty workloads, consider serverless or autoscaling for elasticity.*", + "Url": "https://hub.prowler.com/check/sagemaker_endpoint_config_prod_variant_instances" } }, "Categories": [ - "redundancy", + "resilience", "gen-ai" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_models_network_isolation_enabled/sagemaker_models_network_isolation_enabled.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_models_network_isolation_enabled/sagemaker_models_network_isolation_enabled.metadata.json index f0eeefb4c6..662c26dc19 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_models_network_isolation_enabled/sagemaker_models_network_isolation_enabled.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_models_network_isolation_enabled/sagemaker_models_network_isolation_enabled.metadata.json @@ -1,30 +1,39 @@ { "Provider": "aws", "CheckID": "sagemaker_models_network_isolation_enabled", - "CheckTitle": "Check if Amazon SageMaker Models have network isolation enabled", - "CheckType": [], + "CheckTitle": "Amazon SageMaker model has network isolation enabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices/Network Reachability", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Effects/Data Exfiltration" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:model", - "Severity": "medium", + "ResourceIdTemplate": "", + "Severity": "high", "ResourceType": "Other", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Models have network isolation enabled", - "Risk": "This could provide an avenue for unauthorized access to your data.", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html", + "Description": "**SageMaker models** are evaluated for **network isolation** status, indicating whether model containers are blocked from initiating network connections during hosting/inference, aside from required service control traffic.", + "Risk": "**Disabled network isolation** allows model containers to reach external networks, enabling exfiltration of inputs, outputs, or credentials, retrieval of untrusted code, and covert callbacks. This compromises confidentiality and integrity and can facilitate lateral movement from the hosting environment.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "", - "Terraform": "" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker Model with network isolation enabled\nResources:\n :\n Type: AWS::SageMaker::Model\n Properties:\n ExecutionRoleArn: \n PrimaryContainer:\n Image: \n EnableNetworkIsolation: true # Critical: ensures the model container has network isolation enabled\n```", + "Other": "1. In the AWS console, go to SageMaker > Inference > Models\n2. Click Create model\n3. Enter a name and select the execution role; set the container Image\n4. Check Enable network isolation\n5. Click Create model\n6. If used by an endpoint, create a new endpoint configuration with this model and update the endpoint, then remove the old non-isolated model", + "Terraform": "```hcl\n# SageMaker Model with network isolation enabled\nresource \"aws_sagemaker_model\" \"\" {\n name = \"\"\n execution_role_arn = \"\"\n\n primary_container {\n image = \"\"\n }\n\n enable_network_isolation = true # Critical: enables network isolation to pass the check\n}\n```" }, "Recommendation": { - "Text": "Restrict which traffic can access by launching Studio in a Virtual Private Cloud (VPC) of your choosing.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html" + "Text": "Enable **network isolation** for all hosted models. Run endpoints in a **private VPC**, restrict egress with tight **security groups** and **VPC endpoints**, and enforce **least privilege IAM**. Adopt **defense in depth**: avoid public routes, allow-list destinations, and monitor outbound traffic.", + "Url": "https://hub.prowler.com/check/sagemaker_models_network_isolation_enabled" } }, "Categories": [ + "trust-boundaries", + "container-security", "gen-ai" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_models_vpc_settings_configured/sagemaker_models_vpc_settings_configured.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_models_vpc_settings_configured/sagemaker_models_vpc_settings_configured.metadata.json index d43e9e31bb..355291570c 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_models_vpc_settings_configured/sagemaker_models_vpc_settings_configured.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_models_vpc_settings_configured/sagemaker_models_vpc_settings_configured.metadata.json @@ -1,30 +1,37 @@ { "Provider": "aws", "CheckID": "sagemaker_models_vpc_settings_configured", - "CheckTitle": "Check if Amazon SageMaker Models have VPC settings configured", - "CheckType": [], + "CheckTitle": "Amazon SageMaker model has VPC settings enabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices/Network Reachability", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:model", + "ResourceIdTemplate": "", "Severity": "medium", "ResourceType": "Other", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Models have VPC settings configured", - "Risk": "This could provide an avenue for unauthorized access to your data.", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html", + "Description": "**SageMaker models** use **VPC settings** (`VpcConfig` with subnets and security groups) so inference containers communicate through a selected VPC rather than the public internet.\n\nThis evaluates whether a model defines VPC subnets for its network path.", + "Risk": "Without **VPC isolation**, model traffic and data access can traverse public paths, weakening **confidentiality** and **integrity** through interception or misrouting.\n\nMissing security groups and private endpoints reduce **access control**, enabling excessive egress, data exfiltration, or command-and-control from compromised containers.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "", - "Terraform": "" + "NativeIaC": "```yaml\nResources:\n SageMakerModel:\n Type: AWS::SageMaker::Model\n Properties:\n ExecutionRoleArn: \"\"\n PrimaryContainer:\n Image: \"\"\n # Critical: VpcConfig enables VPC networking for the model so the check passes\n VpcConfig:\n SecurityGroupIds:\n - \"\" # Critical: security group in the VPC\n Subnets:\n - \"\" # Critical: at least one subnet in the VPC\n```", + "Other": "1. Open the AWS Console > Amazon SageMaker > Inference > Models\n2. Open the model and note its container image and execution role\n3. Delete the model (models cannot be updated to add VPC settings)\n4. Click Create model\n5. Enter the same Model name, set the Execution role, and the Container image\n6. Under Network, select a VPC, then choose at least one Subnet and one Security group\n7. Create the model\n8. Verify the model shows VPC settings enabled", + "Terraform": "```hcl\nresource \"aws_sagemaker_model\" \"model\" {\n name = \"\"\n execution_role_arn = \"\"\n\n primary_container {\n image = \"\"\n }\n\n # Critical: VPC config enables VPC networking for the model so the check passes\n vpc_config {\n subnets = [\"\"] # Critical\n security_group_ids = [\"\"] # Critical\n }\n}\n```" }, "Recommendation": { - "Text": "Restrict which traffic can access by launching Studio in a Virtual Private Cloud (VPC) of your choosing.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html" + "Text": "Enable **VPC-only networking** for models by defining `VpcConfig` with private subnets and restrictive security groups.\n\nApply **least privilege egress**, use **VPC endpoints** for S3 and SageMaker runtime, avoid public routes, and implement **defense in depth** with segmentation and traffic monitoring.", + "Url": "https://hub.prowler.com/check/sagemaker_models_vpc_settings_configured" } }, "Categories": [ + "trust-boundaries", "gen-ai" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_encryption_enabled/sagemaker_notebook_instance_encryption_enabled.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_encryption_enabled/sagemaker_notebook_instance_encryption_enabled.metadata.json index 88c9aa1f37..6f414e9ad5 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_encryption_enabled/sagemaker_notebook_instance_encryption_enabled.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_encryption_enabled/sagemaker_notebook_instance_encryption_enabled.metadata.json @@ -1,27 +1,35 @@ { "Provider": "aws", "CheckID": "sagemaker_notebook_instance_encryption_enabled", - "CheckTitle": "Check if Amazon SageMaker Notebook instances have data encryption enabled", - "CheckType": [], + "CheckTitle": "SageMaker notebook instance is encrypted with a KMS key", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Effects/Data Exposure" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:notebook-instance", - "Severity": "medium", + "ResourceIdTemplate": "", + "Severity": "high", "ResourceType": "AwsSageMakerNotebookInstance", "ResourceGroup": "ai_ml", - "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", + "Description": "**Amazon SageMaker notebook instances** are assessed for **at-rest encryption** using an AWS KMS key. The finding reflects whether a `KmsKeyId` is configured for the notebook's ML volume encryption.", + "Risk": "Without **at-rest encryption** using a customer-managed KMS key, data on notebook EBS volumes and snapshots can be exposed via storage access, copied backups, or host compromise, reducing **confidentiality** and limiting **key rotation** and **revocation** controls.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/sagemaker/latest/dg/key-management.html", + "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-data-encrypted.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-data-encrypted.html", - "Terraform": "https://docs.prowler.com/checks/aws/general-policies/bc_aws_general_40#fix---buildtime" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker notebook with KMS encryption\nResources:\n :\n Type: AWS::SageMaker::NotebookInstance\n Properties:\n InstanceType: ml.t3.medium\n RoleArn: \n KmsKeyId: # Critical: encrypts the notebook's EBS volume with the specified KMS key\n```", + "Other": "1. Open the AWS Console > Amazon SageMaker > Notebook instances\n2. Select the failing notebook instance and click Stop\n3. Click Create notebook instance\n4. Enter name, choose instance type and IAM role\n5. In Encryption key, select your KMS key\n6. Create the instance and verify it starts\n7. Migrate notebooks/data as needed (e.g., via S3)\n8. Delete the old unencrypted notebook instance", + "Terraform": "```hcl\n# SageMaker notebook with KMS encryption\nresource \"aws_sagemaker_notebook_instance\" \"\" {\n name = \"\"\n role_arn = \"\"\n instance_type = \"ml.t3.medium\"\n kms_key_id = \"\" # Critical: enables EBS encryption using this KMS key\n}\n```" }, "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" + "Text": "Use a **customer-managed KMS key** for notebook ML volumes by setting `KmsKeyId`, and apply KMS to related S3 inputs/outputs. Enforce **least privilege** on key usage, enable **rotation**, and align key access with **defense in depth** to protect data at rest.", + "Url": "https://hub.prowler.com/check/sagemaker_notebook_instance_encryption_enabled" } }, "Categories": [ diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_root_access_disabled/sagemaker_notebook_instance_root_access_disabled.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_root_access_disabled/sagemaker_notebook_instance_root_access_disabled.metadata.json index 049390dc21..ad04ce6fe3 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_root_access_disabled/sagemaker_notebook_instance_root_access_disabled.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_root_access_disabled/sagemaker_notebook_instance_root_access_disabled.metadata.json @@ -1,30 +1,38 @@ { "Provider": "aws", "CheckID": "sagemaker_notebook_instance_root_access_disabled", - "CheckTitle": "Check if Amazon SageMaker Notebook instances have root access disabled", - "CheckType": [], + "CheckTitle": "Amazon SageMaker notebook instance has root access disabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "TTPs/Privilege Escalation" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:notebook-instance", + "ResourceIdTemplate": "", "Severity": "medium", "ResourceType": "AwsSageMakerNotebookInstance", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Notebook instances have root access disabled", - "Risk": "Users with root access have administrator privileges, users can access and edit all files on a notebook instance with root access enabled", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-root-access.html", + "Description": "**Amazon SageMaker notebook instances** with user **root access disabled**. The evaluation checks whether interactive users can obtain root privileges on the instance, highlighting notebooks where `RootAccess` is not set to `Disabled`.", + "Risk": "Allowing user **root access** enables full system control, risking **integrity** (tampering with code, packages, and kernels), **confidentiality** (reading secrets, credentials, data copies), and **availability** (disabling agents or breaking environments). Compromise of a notebook can lead to lateral movement via the instance role.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-root-access.html" + ], "Remediation": { "Code": { - "CLI": "", - "NativeIaC": "", - "Other": "", - "Terraform": "" + "CLI": "aws sagemaker update-notebook-instance --notebook-instance-name --root-access Disabled", + "NativeIaC": "```yaml\n# CloudFormation: Disable root access on a SageMaker Notebook Instance\nResources:\n Notebook:\n Type: AWS::SageMaker::NotebookInstance\n Properties:\n InstanceType: ml.t3.medium\n RoleArn: \n RootAccess: Disabled # Critical: disables user root access to pass the check\n```", + "Other": "1. In the AWS Console, go to SageMaker > Notebook instances\n2. Select and click Stop if it is running\n3. After it stops, click Edit\n4. Set Root access to Disabled\n5. Save changes, then click Start", + "Terraform": "```hcl\n# Terraform: Disable root access on a SageMaker Notebook Instance\nresource \"aws_sagemaker_notebook_instance\" \"notebook\" {\n name = \"\"\n role_arn = \"\"\n instance_type = \"ml.t3.medium\"\n root_access = \"Disabled\" # Critical: disables user root access to pass the check\n}\n```" }, "Recommendation": { - "Text": "Set the RootAccess field to Disabled. You can also disable root access for users when you create or update a notebook instance in the Amazon SageMaker console.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-root-access.html" + "Text": "Apply **least privilege**: set `RootAccess` to `Disabled` for notebook users. Provide needed software via **managed images** or **lifecycle automation**, not ad-hoc root installs. Limit the notebook IAM role, enforce **defense in depth** (network isolation and monitoring), and require controlled admin workflows for privileged changes.", + "Url": "https://hub.prowler.com/check/sagemaker_notebook_instance_root_access_disabled" } }, "Categories": [ + "identity-access", "gen-ai" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_vpc_settings_configured/sagemaker_notebook_instance_vpc_settings_configured.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_vpc_settings_configured/sagemaker_notebook_instance_vpc_settings_configured.metadata.json index 7344312883..713cc5127c 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_vpc_settings_configured/sagemaker_notebook_instance_vpc_settings_configured.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_vpc_settings_configured/sagemaker_notebook_instance_vpc_settings_configured.metadata.json @@ -1,30 +1,38 @@ { "Provider": "aws", "CheckID": "sagemaker_notebook_instance_vpc_settings_configured", - "CheckTitle": "Check if Amazon SageMaker Notebook instances have VPC settings configured", - "CheckType": [], + "CheckTitle": "Amazon SageMaker notebook instance has VPC settings configured", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices/Network Reachability", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:notebook-instance", - "Severity": "medium", + "ResourceIdTemplate": "", + "Severity": "high", "ResourceType": "AwsSageMakerNotebookInstance", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Notebook instances have VPC settings configured", - "Risk": "This could provide an avenue for unauthorized access to your data.", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html", + "Description": "**SageMaker notebook instances** are evaluated for **VPC attachment**. Instances configured with a VPC (via a `subnet_id` and security groups) use private networking; those without VPC settings rely on public networking.", + "Risk": "Without a VPC, notebooks lose **network isolation**. Traffic to AWS services may traverse the public internet, limiting **egress control** and **private endpoints**, enabling data exfiltration and interception, and easing lateral movement-impacting **confidentiality** and **integrity**.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-instance-in-vpc.html", + "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-instance-in-vpc.html", - "Terraform": "" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker Notebook Instance with VPC settings\nResources:\n :\n Type: AWS::SageMaker::NotebookInstance\n Properties:\n InstanceType: ml.t3.medium\n RoleArn: \n SubnetId: # critical: places the notebook in a VPC subnet so the check passes\n```", + "Other": "1. In the AWS Console, go to SageMaker > Notebook instances\n2. Select the failing notebook instance, choose Stop, then Delete\n3. Click Create notebook instance and use the same name\n4. Under Network, select your VPC and a Subnet (select any required Security group)\n5. Create the notebook instance\n6. After it is InService, rerun the check", + "Terraform": "```hcl\nresource \"aws_sagemaker_notebook_instance\" \"\" {\n name = \"\"\n role_arn = \"\"\n instance_type = \"ml.t3.medium\"\n subnet_id = \"\" # critical: ensures the notebook is in a VPC subnet to pass the check\n}\n```" }, "Recommendation": { - "Text": "Restrict which traffic can access by launching Studio in a Virtual Private Cloud (VPC) of your choosing..", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-and-internet-access.html" + "Text": "Run notebooks in a **private VPC**, applying **least-privilege** security groups and **network segmentation**. Prefer **VPC endpoints** for AWS services and restrict outbound traffic to approved destinations to enforce **defense in depth**.", + "Url": "https://hub.prowler.com/check/sagemaker_notebook_instance_vpc_settings_configured" } }, "Categories": [ + "internet-exposed", "gen-ai" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_without_direct_internet_access_configured/sagemaker_notebook_instance_without_direct_internet_access_configured.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_without_direct_internet_access_configured/sagemaker_notebook_instance_without_direct_internet_access_configured.metadata.json index 25c21042b6..bc1b180e9f 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_without_direct_internet_access_configured/sagemaker_notebook_instance_without_direct_internet_access_configured.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_notebook_instance_without_direct_internet_access_configured/sagemaker_notebook_instance_without_direct_internet_access_configured.metadata.json @@ -1,31 +1,41 @@ { "Provider": "aws", "CheckID": "sagemaker_notebook_instance_without_direct_internet_access_configured", - "CheckTitle": "Check if Amazon SageMaker Notebook instances have direct internet access", - "CheckType": [], + "CheckTitle": "Amazon SageMaker notebook instance has direct internet access disabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices/Network Reachability", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Effects/Data Exposure", + "Effects/Data Exfiltration" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:notebook-instance", - "Severity": "medium", + "ResourceIdTemplate": "", + "Severity": "high", "ResourceType": "AwsSageMakerNotebookInstance", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Notebook instances have direct internet access", - "Risk": "This could provide an avenue for unauthorized access to your data.", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html", + "Description": "Amazon SageMaker notebook instances are evaluated for the `DirectInternetAccess` setting.\n\nInstances with it disabled use only VPC connectivity; instances with it enabled permit direct outbound internet access.", + "Risk": "Direct internet access from notebooks weakens **egress control**, risking **confidentiality** and **integrity**.\n\nAdversaries or unvetted code can exfiltrate data, download malware, or run command-and-control. Public package installs bypass inspection, enabling supply-chain tampering and **lateral movement** from compromised sessions.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-direct-internet-access.html", + "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/notebook-direct-internet-access.html", - "Terraform": "https://docs.prowler.com/checks/aws/networking-policies/ensure-that-direct-internet-access-is-disabled-for-an-amazon-sagemaker-notebook-instance#fix---buildtime" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker notebook with direct internet access disabled\nResources:\n :\n Type: AWS::SageMaker::NotebookInstance\n Properties:\n NotebookInstanceName: \n InstanceType: ml.t3.medium\n RoleArn: \n SubnetId: # Required when disabling direct internet access\n SecurityGroupIds: # Required when disabling direct internet access\n - \n DirectInternetAccess: \"Disabled\" # CRITICAL: disables direct internet access to pass the check\n```", + "Other": "1. In the AWS Console, go to SageMaker > Notebook instances\n2. Select the notebook instance, choose Stop, and wait until status is Stopped\n3. Click Edit\n4. Set Direct internet access to Disabled\n5. If prompted, select a Subnet and at least one Security group (VPC required when disabled)\n6. Click Update, then choose Start to bring the instance back online", + "Terraform": "```hcl\n# SageMaker notebook with direct internet access disabled\nresource \"aws_sagemaker_notebook_instance\" \"\" {\n name = \"\"\n role_arn = \"\"\n instance_type = \"ml.t3.medium\"\n subnet_id = \"\" # Required when disabling direct internet access\n security_groups = [\"\"] # Required when disabling direct internet access\n\n direct_internet_access = \"Disabled\" # CRITICAL: disables direct internet access to pass the check\n}\n```" }, "Recommendation": { - "Text": "Restrict which traffic can access by launching Studio in a Virtual Private Cloud (VPC) of your choosing.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + "Text": "Disable direct internet access (`DirectInternetAccess: Disabled`) and place notebooks in private subnets.\n\nUse **VPC endpoints/PrivateLink** for required services, restrict egress with allowlists and **least privilege** security groups, and apply **defense in depth** with network isolation and monitoring of outbound traffic.", + "Url": "https://hub.prowler.com/check/sagemaker_notebook_instance_without_direct_internet_access_configured" } }, "Categories": [ "internet-exposed", + "trust-boundaries", "gen-ai" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_intercontainer_encryption_enabled/sagemaker_training_jobs_intercontainer_encryption_enabled.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_intercontainer_encryption_enabled/sagemaker_training_jobs_intercontainer_encryption_enabled.metadata.json index 66fb9bfcd5..8425265b82 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_intercontainer_encryption_enabled/sagemaker_training_jobs_intercontainer_encryption_enabled.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_intercontainer_encryption_enabled/sagemaker_training_jobs_intercontainer_encryption_enabled.metadata.json @@ -1,27 +1,35 @@ { "Provider": "aws", "CheckID": "sagemaker_training_jobs_intercontainer_encryption_enabled", - "CheckTitle": "Check if Amazon SageMaker Training jobs have intercontainer encryption enabled", - "CheckType": [], + "CheckTitle": "Amazon SageMaker training job has inter-container traffic encryption enabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices/Network Security", + "Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Effects/Data Exposure" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:training-job", + "ResourceIdTemplate": "", "Severity": "medium", "ResourceType": "Other", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Training jobs have intercontainer encryption enabled", - "Risk": "If not restricted unintended access could happen.", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html", + "Description": "Amazon SageMaker training jobs have **inter-container traffic encryption** configured for container-to-container communications during training.\n\nThe evaluation inspects the `EnableInterContainerTrafficEncryption` setting on training jobs.", + "Risk": "Without inter-container encryption, in-node traffic may be plaintext, enabling capture by a compromised host or co-resident workload. This threatens **confidentiality** (training data, model parameters, credentials) and **integrity** (tampering with gradients/results), and can facilitate **lateral movement** via token or session theft.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/SageMaker/enable-inter-container-traffic-encryption.html", + "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "", - "Terraform": "" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker Training Job with inter-container traffic encryption enabled\nResources:\n SageMakerTrainingJob:\n Type: AWS::SageMaker::TrainingJob\n Properties:\n TrainingJobName: \n RoleArn: \n AlgorithmSpecification:\n TrainingImage: \n TrainingInputMode: File\n OutputDataConfig:\n S3OutputPath: s3:///\n ResourceConfig:\n InstanceCount: 1\n InstanceType: ml.m5.large\n VolumeSizeInGB: 10\n StoppingCondition:\n MaxRuntimeInSeconds: 3600\n EnableInterContainerTrafficEncryption: true # Critical: encrypts traffic between containers to pass the check\n```", + "Other": "1. In the AWS console, go to Amazon SageMaker > Training jobs\n2. Click Create training job\n3. Configure required fields (algorithm, role, inputs, output, resources)\n4. Enable the setting: Enable inter-container traffic encryption\n5. Click Create to start the new job (existing jobs cannot be modified)", + "Terraform": "```hcl\n# Terraform: SageMaker Training Job with inter-container traffic encryption enabled\nresource \"aws_sagemaker_training_job\" \"job\" {\n name = \"\"\n role_arn = \"\"\n\n algorithm_specification {\n training_image = \"\"\n training_input_mode = \"File\"\n }\n\n output_data_config {\n s3_output_path = \"s3:///\"\n }\n\n resource_config {\n instance_count = 1\n instance_type = \"ml.m5.large\"\n volume_size_gb = 10\n }\n\n stopping_condition {\n max_runtime_in_seconds = 3600\n }\n\n enable_inter_container_traffic_encryption = true # Critical: ensures inter-container traffic is encrypted\n}\n```" }, "Recommendation": { - "Text": "Internetwork communications support TLS 1.2 encryption between all components and clients.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + "Text": "Enable `EnableInterContainerTrafficEncryption` on all training jobs to enforce **encryption in transit**.\n\nApply **defense in depth**: combine with **network isolation**, limit roles and container privileges per **least privilege**, and standardize secure job templates or guardrails to prevent launching unencrypted jobs.", + "Url": "https://hub.prowler.com/check/sagemaker_training_jobs_intercontainer_encryption_enabled" } }, "Categories": [ diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_network_isolation_enabled/sagemaker_training_jobs_network_isolation_enabled.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_network_isolation_enabled/sagemaker_training_jobs_network_isolation_enabled.metadata.json index 92aaf173a5..097678546f 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_network_isolation_enabled/sagemaker_training_jobs_network_isolation_enabled.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_network_isolation_enabled/sagemaker_training_jobs_network_isolation_enabled.metadata.json @@ -1,30 +1,38 @@ { "Provider": "aws", "CheckID": "sagemaker_training_jobs_network_isolation_enabled", - "CheckTitle": "Check if Amazon SageMaker Training jobs have network isolation enabled", - "CheckType": [], + "CheckTitle": "Amazon SageMaker training job has network isolation enabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices/Network Reachability", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Effects/Data Exfiltration" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:training-job", - "Severity": "medium", + "ResourceIdTemplate": "", + "Severity": "high", "ResourceType": "Other", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Training jobs have network isolation enabled", - "Risk": "This could provide an avenue for unauthorized access to your data.", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html", + "Description": "**SageMaker training jobs** have **network isolation** enabled, preventing the training container from making any inbound or outbound network calls during execution", + "Risk": "Without `network isolation`, training code can reach the internet or internal services, enabling:\n- **Data exfiltration** of datasets and model artifacts\n- **Supply-chain compromise** via untrusted downloads\n- **C2 beacons** and resource abuse\nThis harms **confidentiality** and **integrity**, and may impact **availability**.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "", - "Terraform": "" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker Training Job with network isolation enabled\nResources:\n :\n Type: AWS::SageMaker::TrainingJob\n Properties:\n TrainingJobName: \n RoleArn: \n AlgorithmSpecification:\n TrainingImage: \n TrainingInputMode: File\n OutputDataConfig:\n S3OutputPath: s3:///\n ResourceConfig:\n InstanceType: ml.m5.large\n InstanceCount: 1\n VolumeSizeInGB: 10\n StoppingCondition:\n MaxRuntimeInSeconds: 3600\n InputDataConfig:\n - ChannelName: training\n DataSource:\n S3DataSource:\n S3DataType: S3Prefix\n S3Uri: s3:///input/\n EnableNetworkIsolation: true # Critical: blocks all network access from the training container\n```", + "Other": "1. In the AWS Console, open SageMaker > Training jobs\n2. Click Create training job\n3. Fill required fields (role, image, input/output, resources)\n4. Enable the setting: Enable network isolation\n5. Create the job\n\nNote: You cannot edit an existing training job to enable this; create a new job with network isolation and retire non-compliant jobs.", + "Terraform": "```hcl\n# SageMaker Training Job with network isolation enabled\nresource \"aws_sagemaker_training_job\" \"\" {\n name = \"\"\n role_arn = \"\"\n\n algorithm_specification {\n training_image = \"\"\n training_input_mode = \"File\"\n }\n\n output_data_config {\n s3_output_path = \"s3:///\"\n }\n\n resource_config {\n instance_type = \"ml.m5.large\"\n instance_count = 1\n volume_size_gb = 10\n }\n\n stopping_condition {\n max_runtime_in_seconds = 3600\n }\n\n input_data_config {\n channel_name = \"training\"\n data_source {\n s3_data_source {\n s3_data_type = \"S3Prefix\"\n s3_uri = \"s3:///input/\"\n }\n }\n }\n\n enable_network_isolation = true # Critical: blocks all network access from the training container\n}\n```" }, "Recommendation": { - "Text": "Restrict which traffic can access by launching Studio in a Virtual Private Cloud (VPC) of your choosing.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + "Text": "Enable **network isolation** for training jobs by default. If network access is required, enforce **least privilege** and **defense in depth**:\n- Use private networking and `VPC endpoints`\n- Restrict egress and narrow IAM permissions\n- Prepackage dependencies to avoid external downloads", + "Url": "https://hub.prowler.com/check/sagemaker_training_jobs_network_isolation_enabled" } }, "Categories": [ + "trust-boundaries", "gen-ai" ], "DependsOn": [], diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_volume_and_output_encryption_enabled/sagemaker_training_jobs_volume_and_output_encryption_enabled.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_volume_and_output_encryption_enabled/sagemaker_training_jobs_volume_and_output_encryption_enabled.metadata.json index 02d44e99e9..bccd007bb1 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_volume_and_output_encryption_enabled/sagemaker_training_jobs_volume_and_output_encryption_enabled.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_volume_and_output_encryption_enabled/sagemaker_training_jobs_volume_and_output_encryption_enabled.metadata.json @@ -1,27 +1,34 @@ { "Provider": "aws", "CheckID": "sagemaker_training_jobs_volume_and_output_encryption_enabled", - "CheckTitle": "Check if Amazon SageMaker Training jobs have volume and output with KMS encryption enabled", - "CheckType": [], + "CheckTitle": "Amazon SageMaker training job volume has KMS encryption enabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Effects/Data Exposure" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:training-job", - "Severity": "medium", + "ResourceIdTemplate": "", + "Severity": "high", "ResourceType": "Other", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Training jobs have volume and output with KMS 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", + "Description": "**Amazon SageMaker training jobs** use **KMS encryption** for their attached ML storage volumes via `VolumeKmsKeyId`.\n\nThe finding identifies training jobs where the volume encryption key is not configured.", + "Risk": "Missing **CMEK** leaves training data, checkpoints, and logs on the volume without tenant-controlled encryption. This reduces **confidentiality**, enables data exposure via snapshots or privileged access, and limits control over key policies, rotation, and emergency revocation.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/sagemaker/latest/dg/key-management.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "", - "Terraform": "" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker TrainingJob with EBS volume KMS encryption enabled\nResources:\n :\n Type: AWS::SageMaker::TrainingJob\n Properties:\n TrainingJobName: \n RoleArn: \n AlgorithmSpecification:\n TrainingImage: \n TrainingInputMode: File\n OutputDataConfig:\n S3OutputPath: s3://\n ResourceConfig:\n InstanceType: ml.m5.large\n InstanceCount: 1\n VolumeSizeInGB: 10\n VolumeKmsKeyId: # CRITICAL: Encrypts the training EBS volume with the specified KMS key\n StoppingCondition:\n MaxRuntimeInSeconds: 3600\n```", + "Other": "1. In the AWS console, go to SageMaker > Training > Training jobs\n2. Select the non-encrypted job and click Clone to create a new job\n3. In Resource configuration, set Volume encryption key to your KMS key (Customer managed key)\n4. Complete required fields and click Create training job\n5. Verify the new job shows the KMS key under Volume encryption", + "Terraform": "```hcl\n# SageMaker Training Job with EBS volume KMS encryption enabled\nresource \"aws_sagemaker_training_job\" \"\" {\n name = \"\"\n role_arn = \"\"\n\n algorithm_specification {\n training_image = \"\"\n training_input_mode = \"File\"\n }\n\n output_data_config {\n s3_output_path = \"s3://\"\n }\n\n resource_config {\n instance_type = \"ml.m5.large\"\n instance_count = 1\n volume_size_in_gb = 10\n volume_kms_key_id = \"\" # CRITICAL: Enables KMS encryption for the training EBS volume\n }\n\n stopping_condition {\n max_runtime_in_seconds = 3600\n }\n}\n```" }, "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" + "Text": "Encrypt training volumes with **customer-managed KMS keys** and apply the same to S3 input/output.\n\nUse **least privilege** on key policies, enable **rotation**, restrict grants, and prevent storage of unencrypted artifacts to achieve **defense in depth**.", + "Url": "https://hub.prowler.com/check/sagemaker_training_jobs_volume_and_output_encryption_enabled" } }, "Categories": [ diff --git a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_vpc_settings_configured/sagemaker_training_jobs_vpc_settings_configured.metadata.json b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_vpc_settings_configured/sagemaker_training_jobs_vpc_settings_configured.metadata.json index bf081580fa..ba6fa127f0 100644 --- a/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_vpc_settings_configured/sagemaker_training_jobs_vpc_settings_configured.metadata.json +++ b/prowler/providers/aws/services/sagemaker/sagemaker_training_jobs_vpc_settings_configured/sagemaker_training_jobs_vpc_settings_configured.metadata.json @@ -1,30 +1,38 @@ { "Provider": "aws", "CheckID": "sagemaker_training_jobs_vpc_settings_configured", - "CheckTitle": "Check if Amazon SageMaker Training job have VPC settings configured.", - "CheckType": [], + "CheckTitle": "Amazon SageMaker training job has VPC configuration enabled", + "CheckType": [ + "Software and Configuration Checks/AWS Security Best Practices/Network Reachability", + "Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices", + "Effects/Data Exposure" + ], "ServiceName": "sagemaker", "SubServiceName": "", - "ResourceIdTemplate": "arn:aws:sagemaker:region:account-id:training-job", - "Severity": "medium", + "ResourceIdTemplate": "", + "Severity": "high", "ResourceType": "Other", "ResourceGroup": "ai_ml", - "Description": "Check if Amazon SageMaker Training job have VPC settings configured.", - "Risk": "This could provide an avenue for unauthorized access to your data.", - "RelatedUrl": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html", + "Description": "**SageMaker training jobs** are evaluated for **VPC configuration** by detecting defined `subnets` in the job settings. With VPC settings, ENIs place the job in your VPC so traffic for training volumes and outputs uses private networking.", + "Risk": "Without VPC settings, training containers rely on public networking and broad egress. This weakens **confidentiality** and **integrity**, enabling data exfiltration of datasets or model artifacts, malware downloads, and bypass of granular security group controls and VPC-based monitoring.", + "RelatedUrl": "", + "AdditionalURLs": [ + "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + ], "Remediation": { "Code": { "CLI": "", - "NativeIaC": "", - "Other": "", - "Terraform": "" + "NativeIaC": "```yaml\n# CloudFormation: SageMaker TrainingJob with VPC enabled\nResources:\n :\n Type: AWS::SageMaker::TrainingJob\n Properties:\n TrainingJobName: \n RoleArn: \n AlgorithmSpecification:\n TrainingImage: \n TrainingInputMode: File\n OutputDataConfig:\n S3OutputPath: s3:///\n ResourceConfig:\n InstanceType: ml.m5.large\n InstanceCount: 1\n VolumeSizeInGB: 10\n StoppingCondition:\n MaxRuntimeInSeconds: 3600\n VpcConfig:\n Subnets:\n - # CRITICAL: adds VPC subnets so job has VPC config\n SecurityGroupIds:\n - # Required by SageMaker when using VPC\n```", + "Other": "1. In the AWS Console, go to SageMaker > Training > Training jobs\n2. Click Create training job (or select a job and choose Create copy)\n3. In Networking, select a VPC, then choose at least one Subnet and one Security group\n4. Complete required fields and Create the job\n5. Verify the new training job shows VPC subnets in its details", + "Terraform": "```hcl\n# SageMaker Training Job with VPC configuration\nresource \"aws_sagemaker_training_job\" \"\" {\n name = \"\"\n role_arn = \"\"\n\n algorithm_specification {\n training_image = \"\"\n training_input_mode = \"File\"\n }\n\n output_data_config {\n s3_output_path = \"s3:///\"\n }\n\n resource_config {\n instance_type = \"ml.m5.large\"\n instance_count = 1\n volume_size_gb = 10\n }\n\n stopping_condition {\n max_runtime_in_seconds = 3600\n }\n\n vpc_config {\n subnets = [\"\"] # CRITICAL: enables VPC on the training job\n security_group_ids = [\"\"] # Required with VPC\n }\n}\n```" }, "Recommendation": { - "Text": "Restrict which traffic can access by launching Studio in a Virtual Private Cloud (VPC) of your choosing.", - "Url": "https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html" + "Text": "Run training in a VPC using specific `subnets` and tightly scoped `security groups`.\n- Use `VPC endpoints` for S3, ECR, and SageMaker to keep traffic private\n- Block outbound Internet by default and allow only required destinations\n- Apply network segmentation and, when feasible, enable `network isolation`", + "Url": "https://hub.prowler.com/check/sagemaker_training_jobs_vpc_settings_configured" } }, "Categories": [ + "trust-boundaries", "gen-ai" ], "DependsOn": [],