Skip to content

Commit 85bc177

Browse files
committed
Remove the dependency on PyNaCl due to CVE-2025-69277
1 parent 501235f commit 85bc177

File tree

3 files changed

+22
-49
lines changed

3 files changed

+22
-49
lines changed

atr/log.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,26 @@ def python_repr(object_name: str) -> str:
133133
return f"<{object_name}>"
134134

135135

136-
def secret(msg: str, data: bytes) -> None:
137-
import base64
138-
139-
import nacl.encoding as encoding
140-
import nacl.public as public
141-
142-
import atr.config as config
143-
144-
conf = config.get()
145-
public_key_b64 = conf.LOG_PUBLIC_KEY
146-
if public_key_b64 is None:
147-
raise ValueError("LOG_PUBLIC_KEY is not set")
148-
149-
recipient_pk = public.PublicKey(
150-
public_key_b64.encode("ascii"),
151-
encoder=encoding.Base64Encoder,
152-
)
153-
ciphertext = public.SealedBox(recipient_pk).encrypt(data)
154-
encoded_ciphertext = base64.b64encode(ciphertext).decode("ascii")
155-
_event(logging.INFO, f"{msg} {encoded_ciphertext}")
136+
# def secret(msg: str, data: bytes) -> None:
137+
# import base64
138+
139+
# import nacl.encoding as encoding
140+
# import nacl.public as public
141+
142+
# import atr.config as config
143+
144+
# conf = config.get()
145+
# public_key_b64 = conf.LOG_PUBLIC_KEY
146+
# if public_key_b64 is None:
147+
# raise ValueError("LOG_PUBLIC_KEY is not set")
148+
149+
# recipient_pk = public.PublicKey(
150+
# public_key_b64.encode("ascii"),
151+
# encoder=encoding.Base64Encoder,
152+
# )
153+
# ciphertext = public.SealedBox(recipient_pk).encrypt(data)
154+
# encoded_ciphertext = base64.b64encode(ciphertext).decode("ascii")
155+
# _event(logging.INFO, f"{msg} {encoded_ciphertext}")
156156

157157

158158
def warning(msg: str) -> None:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies = [
3939
"puremagic>=1.30",
4040
"pydantic-xml (>=2.17.2,<3.0.0)",
4141
"pyjwt (>=2.10.1,<3.0.0)",
42-
"pynacl>=1.5.0",
42+
# "pynacl>=1.5.0",
4343
"python-decouple~=3.8",
4444
"python-gnupg~=0.5",
4545
"quart-schema[pydantic]~=0.21",

uv.lock

Lines changed: 1 addition & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)