-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/secure random value generation #63
Feature/secure random value generation #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @BavyaMittal 👋,
Everything looks great, the test using hypothesis is not yet fully validated and may cause problems, so don't bother
I would just ask you to remove venv
because it got into the commit, either by accident or by my bad instructions in CONTRIBUTING.md. And thank you, for your work, many thanks!
Hi @Veinar Sure! I have deleted the required files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it is perfect 🙌
Merged, and it will be used within next release! |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
|
Title: Replaced
os.urandom
withsecrets.token_bytes
for secure random value generation.Summary:
This pull request replaces all occurrences of os.urandom with the secrets package to improve the security and readability of random value generation. The secrets package is specifically designed for cryptographic purposes, making it a more suitable choice for these use cases. All required imports for secrets have been added.
Testing:
Ran pytest tests/ to verify functionality. All existing tests pass except one, which fails due to exceeding the Hypothesis deadline. The failure is unrelated to these changes and can be addressed by increasing the Hypothesis deadline from 200ms to 500ms.
Error Details for Test: