Skip to content

Commit

Permalink
S311 - Standard pseudo-random generators are not suitable for cryptog…
Browse files Browse the repository at this point in the history
…raphic purposes
  • Loading branch information
fritzbrand committed Oct 16, 2024
1 parent 17fc24b commit 15d44f1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ignore = [
"PTH123", # TODO: Switch to pathlib
"B019", # TODO: Use of 'functools.lru_cache' or 'functools.cache' on methods can lead to memory leaks
"S101", # TODO: Use of 'assert' detected
"S311", # TODO: Standard pseudo-random generators are not suitable for cryptographic purposes


]

Expand Down
2 changes: 1 addition & 1 deletion vaccine/vaccine_reg_ussd.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ID_TYPES(Enum):
async def state_age_gate(self):
self.user.answers = {}

if random.random() < config.THROTTLE_PERCENTAGE / 100.0:
if random.random() < config.THROTTLE_PERCENTAGE / 100.0: # noqa: S311 - Not being used for crypto
return await self.go_to_state("state_throttle")

return MenuState(
Expand Down
2 changes: 1 addition & 1 deletion vaccine/vaccine_reg_whatsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async def state_exit(self):
async def state_language(self):
self.user.answers = {}

if random.random() < config.THROTTLE_PERCENTAGE / 100.0:
if random.random() < config.THROTTLE_PERCENTAGE / 100.0: # noqa: S311 - Not being used for crypto
return await self.go_to_state("state_throttle")

return LanguageState(
Expand Down
4 changes: 2 additions & 2 deletions yal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@


def get_generic_error():
return random.choice(GENERIC_ERRORS)
return random.choice(GENERIC_ERRORS) # noqa: S311 - Not being used for crypto


def get_today():
Expand Down Expand Up @@ -153,7 +153,7 @@ def is_integer(string: str) -> bool:


def get_generic_error_options():
return random.choice(GENERIC_ERROR_OPTIONS)
return random.choice(GENERIC_ERROR_OPTIONS) # noqa: S311 - Not being used for crypto


async def check_if_baseline_active():
Expand Down

0 comments on commit 15d44f1

Please sign in to comment.