fix(secops-soar): improve error handling, marketplace imports, and packaging sync - #295
Open
dandye wants to merge 1 commit into
Open
fix(secops-soar): improve error handling, marketplace imports, and packaging sync#295dandye wants to merge 1 commit into
dandye wants to merge 1 commit into
Conversation
…ckaging sync - Add structured exception hierarchy (SoarError, SoarConnectionError, SoarSSLError, SoarAuthError, SoarHttpError) - Add TLS/SSL certificate verification diagnostics with actionable macOS certifi guidance - Fix dynamic marketplace tool import path to use secops_soar_mcp.marketplace - Add python-dotenv to setup.py install_requires to match pyproject.toml - Update test conftest so unit tests run hermetically without live credentials Fixes #293 Fixes #294
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses multiple stability, diagnostic, and packaging issues across
server/secops-soar:Structured Exception Hierarchy & Clean Error Propagation:
secops_soar_mcp/exceptions.py:SoarError,SoarConnectionError,SoarSSLError,SoarAuthError, andSoarHttpError.HttpClientdetects underlying SSL/TLS failures (walking the exception cause chain viais_ssl_cert_verification_error) and raisesSoarSSLError,SoarAuthError, orSoarConnectionErrordirectly.self.last_error) on the asynchronous client.Actionable macOS TLS / certifi Error Handling:
bindings._get_valid_scopes()catchesSoarSSLErrorduring startup and provides clear guidance for macOS python.org installer users (/Applications/Python 3.X/Install Certificates.commandorSSL_CERT_FILE=$(python -m certifi)).Dynamic Marketplace Module Import Resolution (Fixes [secops-soar] Dynamic marketplace tool import fails with ModuleNotFoundError when running installed package #293):
secops_soar_mcp/server.pyto resolve marketplace integration tools viasecops_soar_mcp.marketplace.{module_stem}with fallback tomarketplace.{module_stem}, preventingModuleNotFoundErrorwhen the server is installed as a package.Synchronize
python-dotenvinsetup.py(Fixes [secops-soar] setup.py is missing python-dotenv dependency from install_requires #294):"python-dotenv>=1.0.0"toinstall_requiresinserver/secops-soar/setup.pyto matchpyproject.toml.Hermetic Unit Tests:
tests/test_soar_unit.pycovering SSL error detection, auth error translation, diagnostic message formatting, and marketplace path resolution.autouse=Truefromtests/conftest.pyso unit tests can run hermetically without requiring live credentials inconfig.json.Fixes #293
Fixes #294
Tests Run
uv run --with "mcp<2" --with pytest --with pytest-asyncio --with aiohttp --with python-dotenv pytest tests/test_soar_unit.py(6 passed)