AWS sagemaker medium security documentation change
Summary
Added explicit UTF-8 decoding in Python code snippet (json.loads(response['Body'].read().decode('utf-8'))
Security assessment
Explicit encoding specification prevents potential encoding-related vulnerabilities (e.g., when processing non-UTF8 data) which could lead to decoding errors or injection attacks.
Diff
diff --git a/sagemaker/latest/dg/kubernetes-sagemaker-components-tutorials.md b/sagemaker/latest/dg/kubernetes-sagemaker-components-tutorials.md index 9ffecd59b..b096efc13 100644 --- a//sagemaker/latest/dg/kubernetes-sagemaker-components-tutorials.md +++ b//sagemaker/latest/dg/kubernetes-sagemaker-components-tutorials.md @@ -226 +226 @@ Run the following command. Replace `<your-instance-IAM-role>` with the name of t - result = json.loads(response['Body'].read().decode()) + result = json.loads(response['Body'].read().decode('utf-8'))