Skip to content
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

Docs request: B311 random suggesting fixes #1023

Closed
jamesbraza opened this issue May 1, 2023 · 1 comment · Fixed by #1045
Closed

Docs request: B311 random suggesting fixes #1023

jamesbraza opened this issue May 1, 2023 · 1 comment · Fixed by #1045
Labels
enhancement New feature or request

Comments

@jamesbraza
Copy link

Is your feature request related to a problem? Please describe.

https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b311-random documents not to use pseudo-random generators. However, it doesn't document what to use instead.

As someone with limited security experience, I am not sure what to use instead of random.random().

Describe the solution you'd like

Provide 1+ suggestions for what to use instead of functions from the random library.

Describe alternatives you've considered

n/a

Additional context

n/a

@jamesbraza jamesbraza added the enhancement New feature or request label May 1, 2023
costaparas added a commit to costaparas/bandit that referenced this issue Aug 17, 2023
- Suggest `secrets` as an alternative to `random`
- Fix typo

Resolves PyCQA#1023
@costaparas
Copy link
Contributor

See #1045

ericwb pushed a commit that referenced this issue Aug 17, 2023
- Suggest `secrets` as an alternative to `random`
- Fix typo

Resolves #1023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants