Commit d5eed80
Pravali Uppugunduri
fix: Remove hardcoded secret key from Triton ONNX export path
The ONNX export path in _prepare_for_triton() set self.secret_key to a
hardcoded value 'dummy secret key for onnx backend'. This key was then
passed as SAGEMAKER_SERVE_SECRET_KEY into container environment variables
and exposed in plaintext via DescribeModel/DescribeEndpointConfig APIs.
The ONNX path does not use pickle serialization — models are exported to
.onnx format and loaded natively by Triton's ONNX Runtime backend. There
is no serve.pkl, no metadata.json, and no integrity check to perform.
The secret key was dead code that also constituted a hardcoded credential
(CWE-798).
With this change, self.secret_key remains empty string (set by
_build_for_triton), and the existing cleanup in _build_for_transformers
removes empty SAGEMAKER_SERVE_SECRET_KEY from env_vars before CreateModel.
Addresses: P400136088 (Bug 2 - Hardcoded secret key)1 parent f8df0a7 commit d5eed80
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3075 | 3075 | | |
3076 | 3076 | | |
3077 | 3077 | | |
3078 | | - | |
| 3078 | + | |
| 3079 | + | |
3079 | 3080 | | |
3080 | 3081 | | |
3081 | 3082 | | |
| |||
0 commit comments