diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfe3294..62201f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: with: python-version: "3.10" - name: Install quality tools - run: python -m pip install ruff mypy Pillow pillow-avif-plugin matplotlib aiohttp==3.9.5 pytest pytest-xdist + run: python -m pip install ruff mypy Pillow pillow-avif-plugin matplotlib aiohttp==3.9.5 PyJWT cryptography pytest pytest-xdist - name: Ruff run: ruff check . # Typing is a separate phase. mypy still reports errors across both cogs, diff --git a/NHCogs/__init__.py b/NHCogs/__init__.py index f17ebe7..ca4d14e 100644 --- a/NHCogs/__init__.py +++ b/NHCogs/__init__.py @@ -131,6 +131,10 @@ async def setup(bot: Red) -> None: try: if consoledump := await _load_subcog(bot, ".consoledump", "ConsoleDump"): loaded.append(consoledump) + if operational_errors := await _load_subcog( + bot, ".operationalerrors", "OperationalErrors" + ): + loaded.append(operational_errors) nhmisc = await _load_subcog(bot, ".nhmisc", "NHMisc") if nhmisc is not None: loaded.append(nhmisc) diff --git a/NHCogs/consoledump/log_buffer.py b/NHCogs/consoledump/log_buffer.py index bb73d25..35add8c 100644 --- a/NHCogs/consoledump/log_buffer.py +++ b/NHCogs/consoledump/log_buffer.py @@ -29,9 +29,15 @@ r"[^&#\s]+" ) _NAMED_SECRET_PATTERN = re.compile( - r"(?i)\b((?:access[_-]?token|api[_-]?key|password|secret|token)\s*[:=]\s*)" + r"(?i)\b((?:access[_-]?token|api[_-]?key|client[_-]?secret|" + r"webhook[_-]?secret|private[_-]?key|password|secret|token)\s*[:=]\s*)" r"(?:['\"])?[^\s,'\";]+(?:['\"])?" ) +_PRIVATE_KEY_BLOCK_PATTERN = re.compile( + r"-----BEGIN (?P