Skip to content

Commit c39700d

Browse files
author
Brock Wade
committed
fix: security update -> use sha256 instead of md5 for file hashing
1 parent 9736cc0 commit c39700d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/unit/sagemaker/workflow/test_steps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def test_processing_step_normalizes_args_with_local_code(mock_normalize_args, sc
671671
mock_normalize_args.return_value = [step.inputs, step.outputs]
672672
step.to_request()
673673
mock_normalize_args.assert_called_with(
674-
job_name="MyProcessingStep-3e89f0c7e101c356cbedf27d9d27e9db",
674+
job_name="MyProcessingStep-a22fc59b38f13da26f6a40b18687ba598cf669f74104b793cefd9c63eddf4ac7",
675675
arguments=step.job_arguments,
676676
inputs=step.inputs,
677677
outputs=step.outputs,

tests/unit/sagemaker/workflow/test_utilities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ def test_hash_file():
3131
with tempfile.NamedTemporaryFile() as tmp:
3232
tmp.write("hashme".encode())
3333
hash = hash_file(tmp.name)
34-
assert hash == "d41d8cd98f00b204e9800998ecf8427e"
34+
assert hash == "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
3535

3636

3737
def test_hash_file_uri():
3838
with tempfile.NamedTemporaryFile() as tmp:
3939
tmp.write("hashme".encode())
4040
hash = hash_file(f"file:///{tmp.name}")
41-
assert hash == "d41d8cd98f00b204e9800998ecf8427e"
41+
assert hash == "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
4242

4343

4444
def test_hash_files_or_dirs_with_file():

tests/unit/sagemaker/workflow/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_repack_model_step(estimator):
8282
assert hyperparameters["sagemaker_program"] == f'"{REPACK_SCRIPT_LAUNCHER}"'
8383
assert (
8484
hyperparameters["sagemaker_submit_directory"]
85-
== '"s3://my-bucket/MyRepackModelStep-b5ea77f701b47a8d075605497462ccc2/source/sourcedir.tar.gz"'
85+
== '"s3://my-bucket/MyRepackModelStep-717d7bdd388168c27e9ad2938ff0314e35be50b3157cf2498688c7525ea27e1e/source/sourcedir.tar.gz"'
8686
)
8787

8888
del request_dict["Arguments"]["HyperParameters"]

0 commit comments

Comments
 (0)