Skip to content

Code quality

ALN** occurrences by order of importance

NOQA Number of occurrences
ALN069: You can't import models from other components, see: https://www.notion.so/alaninsurance/Modular-monolith-a9d84f1318d34115bbd08b3648e5a587 ⧉", 3
ALN036: URL or URI parameters can lead to Server Side Request Forgery (SSRF) attacks. Attackers could get the server to make requests to an unintended location, which could lead to unauthorized actions or access to data within the network. https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html ⧉ 2
ALN041: As the model '{node.name}' is in a component it must be part of specific schema that is declared in components/{self.component_name}/models/helpers.py", 1
ALN085: Enforces SQLAlchemy 2.0 query style by detecting deprecated patterns that will be removed in SQLAlchemy 2.0. This linter checks for: 1. Usage of session.query() which is deprecated in favor of session.scalar(), session.scalars(), or session.execute() Note: Other SQLAlchemy 2.0 deprecation warnings are already being turned into errors at runtime by the _turn_sql_alchemy_warning_into_errors function in backend/shared/models/orm/sqlalchemy.py. 6

Listing of files of the most critical ALN**

ALN069 occurs 3 times

File:line Content
components/growth/subcomponents/referral/internal/country_dependencies/fr/public/fr_referrals.py:3 ⧉ from components.fr.internal.models.contract import Contract # noqa: ALN069
components/growth/subcomponents/referral/internal/country_dependencies/fr/public/fr_referrals.py:4 ⧉ from components.fr.internal.models.discount import Discount # noqa: ALN069
components/growth/subcomponents/referral/internal/country_dependencies/fr/public/fr_referrals.py:5 ⧉ from components.fr.internal.models.user import User # noqa: ALN069