Skip to content

Commit

Permalink
fix: bandit check fails
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Nov 6, 2021
1 parent e1acc92 commit 02de7e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bread/utils/inheritancemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,12 @@ def instance_of(self, *models):
+ ")"
)

return self.select_subclasses(*models).extra(where=[" OR ".join(where_queries)])
# the following line triggers a bandit SQL-injection error
# however, the generated SQL does not consider any user input
# and is generated soley from values from model._meta
return self.select_subclasses(*models).extra( # nosec
where=[" OR ".join(where_queries)]
)


class InheritanceManagerMixin:
Expand Down

0 comments on commit 02de7e1

Please sign in to comment.