diff --git a/dojo/models.py b/dojo/models.py index aec1549d49..66b634fa79 100644 --- a/dojo/models.py +++ b/dojo/models.py @@ -3568,9 +3568,9 @@ class Check_List(models.Model): @staticmethod def get_status(pass_fail): - if pass_fail == "Pass": + if pass_fail == "Pass": # noqa: S105 return "success" - if pass_fail == "Fail": + if pass_fail == "Fail": # noqa: S105 return "danger" return "warning" diff --git a/dojo/tools/trivy/parser.py b/dojo/tools/trivy/parser.py index 2e79c2b7e2..b8f4ddb0a2 100644 --- a/dojo/tools/trivy/parser.py +++ b/dojo/tools/trivy/parser.py @@ -34,7 +34,7 @@ SECRET_DESCRIPTION_TEMPLATE = """{title} **Category:** {category} **Match:** {match} -""" +""" # noqa: S105 LICENSE_DESCRIPTION_TEMPLATE = """{title} **Category:** {category} diff --git a/dojo/tools/trivy_operator/secrets_handler.py b/dojo/tools/trivy_operator/secrets_handler.py index c5e767a1bc..738b52f7ac 100644 --- a/dojo/tools/trivy_operator/secrets_handler.py +++ b/dojo/tools/trivy_operator/secrets_handler.py @@ -11,7 +11,7 @@ SECRET_DESCRIPTION_TEMPLATE = """{title} **Category:** {category} **Match:** {match} -""" +""" # noqa: S105 class TrivySecretsHandler: diff --git a/ruff.toml b/ruff.toml index 9a34bf6e00..7ff9f010cc 100644 --- a/ruff.toml +++ b/ruff.toml @@ -41,7 +41,7 @@ select = [ "UP", "YTT", "ASYNC", - "S2", "S5", "S7", + "S105", "S2", "S5", "S7", "FBT001", "FBT003", "A003", "A004", "A006", "COM", @@ -100,7 +100,10 @@ fixable = ["ALL"] unfixable = [] preview = true -per-file-ignores = {} +[lint.per-file-ignores] +"unittests/**" = [ + "S105", # hardcoded passwords in tests are fine +] [lint.flake8-boolean-trap] extend-allowed-calls = ["dojo.utils.get_system_setting"]