diff --git a/bin/security.sh b/bin/security.sh index c9f8367..0b9478b 100755 --- a/bin/security.sh +++ b/bin/security.sh @@ -6,4 +6,4 @@ export FREENIT_ENV="test" setup no no -bandit `find freenit -type f -name '*.py' | grep -v 'freenit/cli\.py'` +bandit `find freenit -type f -name '*.py' | grep -v -E 'freenit/(cli|local_config)\.py'` diff --git a/freenit/api/sieve.py b/freenit/api/sieve.py index 08574f1..6028a9b 100644 --- a/freenit/api/sieve.py +++ b/freenit/api/sieve.py @@ -74,8 +74,8 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): self._writer.close() try: await self._writer.wait_closed() - except Exception: - pass + except Exception as e: + log.warning("ManageSieve wait_closed error: %s", e) async def _read_response(self) -> tuple[bool, list[str]]: """Read lines until a terminal line (OK / NO / BYE). diff --git a/freenit/app.py b/freenit/app.py index ce5bd0e..bea7a66 100644 --- a/freenit/app.py +++ b/freenit/app.py @@ -1,6 +1,6 @@ import asyncio import os -import subprocess +import subprocess # nosec: B404 from contextlib import asynccontextmanager from fastapi import FastAPI @@ -14,7 +14,7 @@ def _run_migrations() -> None: env = os.environ.copy() env.setdefault("FREENIT_ENV", "prod") - subprocess.run(["oxyde", "migrate"], check=True, env=env) + subprocess.run(["oxyde", "migrate"], check=True, env=env) # nosec @asynccontextmanager diff --git a/freenit/base_config.py b/freenit/base_config.py index 9bfe8dc..f6f854d 100644 --- a/freenit/base_config.py +++ b/freenit/base_config.py @@ -148,7 +148,7 @@ class BaseConfig: xmpp = XMPP() stalwart_url = "http://stalwart.example.com" stalwart_admin = "%admin" - stalwart_admin_pass = "" + stalwart_admin_pass = "" # nosec: B105 def __init__(self): dburl = self.dburl diff --git a/freenit/project/project/base_config.py b/freenit/project/project/base_config.py index d8a5098..51814df 100644 --- a/freenit/project/project/base_config.py +++ b/freenit/project/project/base_config.py @@ -6,7 +6,7 @@ class BaseConfig(FreenitBaseConfig): version = "0.0.1" stalwart_url = "http://stalwart.example.com" stalwart_admin = "%admin" - stalwart_admin_pass = "" + stalwart_admin_pass = "" # nosec: B105 class DevConfig(BaseConfig):