Skip to content

Commit

Permalink
ci: fix bandit
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Nov 21, 2024
1 parent d3466dc commit b72d1be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pyeudiw/sd_jwt/issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def _create_sd_claims_object(self, user_claims: Dict):

# Add decoy claims if requested
if self._add_decoy_claims:
sr = secrets.SystemRandom()
for _ in range(
random.randint(self.DECOY_MIN_ELEMENTS, self.DECOY_MAX_ELEMENTS)
sr.randint(self.DECOY_MIN_ELEMENTS, self.DECOY_MAX_ELEMENTS)
):
sd_claims[SD_DIGESTS_KEY].append(self._create_decoy_claim_entry())

Expand Down
4 changes: 2 additions & 2 deletions pyeudiw/sd_jwt/utils/yaml_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def from_yaml(cls, loader, node):
)
)

return yaml.load(f, Loader=yaml.FullLoader)
return yaml.load(f, Loader=yaml.FullLoader) # nosec

"""
Takes an object that has been parsed from a YAML file and removes the SDObj wrappers.
Expand All @@ -71,4 +71,4 @@ def remove_sdobj_wrappers(data):
elif isinstance(data, list):
return [remove_sdobj_wrappers(value) for value in data]
else:
return data
return data

0 comments on commit b72d1be

Please sign in to comment.