
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
17 lines
280 B
Python
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()
|