Replace randrange with secrets.randbelow when generating nonce
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
When generating the nonce random randrange is used, it would be better to swap this out to use the secrets module randbelow function instead
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the nonce-generation code and the use of random randrange in the repository. Replace that usage with the secrets module's randbelow function, then run the existing test suite and verify nonce generation still behaves as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, security
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100