Skip to content

Commit 52e68d3

Browse files
committed
Add warning comment for unpickling in test_template_registry.py to emphasize security concerns
1 parent ec1e5e5 commit 52e68d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unit/v1/templates/test_template_registry.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ def test_template_is_pickleable(self) -> None:
325325

326326
# Pickle and unpickle it
327327
pickled = pickle.dumps(retrieved)
328-
unpickled = pickle.loads(pickled)
328+
# You should only ever unpickle with trusted data!
329+
unpickled = pickle.loads(pickled) # noqa: S301
329330

330331
# Should be different objects
331332
assert unpickled is not retrieved

0 commit comments

Comments
 (0)