bandit/examples/random_module.py
Tim Kelsey 782ca73271 Fixing up random to be less noisy
This just targets specific functions within random, rather than
the module itself. We use the blacklist calls stuff for this so
there is now no need for a special plugin.

Change-Id: Iecb4cd3d23040f2c4139f468109ddfbb209bbfa4
Closes-Bug: 1422897
2015-07-16 10:26:31 +01:00

17 lines
280 B
Python

import random
import os
import somelib
bad = random.random()
bad = random.randrange()
bad = random.randint()
bad = random.choice()
bad = random.uniform()
bad = random.triangular()
good = os.urandom()
good = random.SystemRandom()
unknown = random()
unknown = somelib.a.random()