From 2344eebfb7201e9a24a4cf38fa1cd3028cecfefd Mon Sep 17 00:00:00 2001 From: "aikido-autofix[bot]" <119856028+aikido-autofix[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 18:30:19 +0000 Subject: [PATCH] fix(security): autofix Dangerous use of assert --- src/vcon/vcon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vcon/vcon.py b/src/vcon/vcon.py index b43ed71..950a2d5 100644 --- a/src/vcon/vcon.py +++ b/src/vcon/vcon.py @@ -413,7 +413,8 @@ def uuid8_time(custom_c_62_bits: int) -> str: uuid_int |= custom_c_62_bits uuid_str = str(uuid6.UUID(int=uuid_int, version=7)) - assert uuid_str[14] == "7" + if uuid_str[14] != "7": + raise AssertionError("Expected '7' at position 14 in UUID string") uuid_str = uuid_str[:14] + "8" + uuid_str[15:] return uuid_str