feat(python): use secrets module

Open
#97 2 comments 0 reactions 0 assignees View on GitHub

@Rotzbua is already working on this.

Since Nov 11, 2026.

  • #98 by @Rotzbua — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
54/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

The issue names os.urandom(n) and secrets.token_bytes(n) but gives no file or test path. Search the Python code for os.urandom and check where it generates secure random bytes. Replace the usage with the secrets API and run the relevant tests to confirm behavior is preserved.

Written by the indexing model from the issue text.

Description

os.urandom(n) is low-level to generate secure random bytes. For modern usage use the secrets module by secrets.token_bytes(n) which is more explicit way.

Dominant language
JavaScript
Stars
36
Forks
26
Avg merge
15m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-push-libs/encrypted-content-encoding

All issues in web-push-libs/encrypted-content-encoding

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.