Showing 74 of 82 total issues
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
mate_only = random.random() < Creature.p_mate_only
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
combine_by_average = random.random() < Genome.p_mate_average
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
random.random() < Genome.p_perturb:
- Exclude checks
A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code. Open
Open
app.run(host='0.0.0.0', debug=True)
- Exclude checks
Either merge this branch with the identical one on line "31" or change one of the implementations. Open
Open
fmt = '%dth'
- Read upRead up
- Exclude checks
Having two branches in the same if
structure with the same implementation is at best duplicate code, and at worst a coding error. If
the same logic is truly needed for both instances, then they should be combined.
Noncompliant Code Example
if 0 <= a < 10: do_the_thing() elif 10 <= a < 20: do_the_other_thing() elif 20 <= a < 50: do_the_thing() # Noncompliant; duplicates first condition else: do_the_rest() b = 4 if a > 12 else 4
Compliant Solution
if (0 <= a < 10) or (20 <= a < 50): do_the_thing() elif 10 <= a < 20: do_the_other_thing() else: do_the_rest() b = 4
or
if 0 <= a < 10: do_the_thing() elif 10 <= a < 20: do_the_other_thing() elif 20 <= a < 50: do_the_third_thing() else: do_the_rest() b = 8 if a > 12 else 4
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
connection_to_split = random.choice(enabled_connections)
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
noun = random.choice(self.nouns[key])
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
parent2 = random.choice(pool)
- Exclude checks
Possible binding to all interfaces. Open
Open
app.run(host='0.0.0.0', debug=True)
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
b = random.random()
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
self.representative = random.choice(self.members)
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
if random.random() < Genome.p_re_enable_connection:
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
genes = [gene1 if random.random() < 0.5 else gene2
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
parent2 = random.choice(population)
- Exclude checks