Skip to content

Commit 159817b

Browse files
committed
fix: Mask private key output for security when loading from arguments
1 parent 49551f9 commit 159817b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
print("Please provide the path to the private key file as an argument.")
1212
sys.exit(1)
1313
else:
14-
print(f"Private key path: {APP_PRIVATE_KEY}")
14+
# Print only the first few characters as confirmation, not the entire key
15+
masked_key = APP_PRIVATE_KEY[:5] + "..." if len(APP_PRIVATE_KEY) > 5 else "..."
16+
print(f"Private key loaded successfully (begins with: {masked_key})")

0 commit comments

Comments
 (0)