Repository navigation
Conversation
… verification The file-information handler indexed six fields (fileName, fileSize, lastSeen, firstSeen, classification, classificationName) directly off the parsed JSON response after only checking the parent dict was truthy, so a response missing any one of those keys raised an uncaught KeyError and the enrichment crashed instead of returning a partial result or a clean error. All four outbound requests.post/get calls also hardcoded verify=False, so the module always accepted any TLS certificate presented by the configured Orion endpoint regardless of validity, silently defeating certificate validation for both the OAuth token exchange and the API queries. TLS verification now defaults on: verify_ssl is read from the module config (defaulting to true) and threaded through all four requests calls. This is a behaviour change beyond the KeyError fix — existing deployments pointed at an endpoint with a self-signed or otherwise unverifiable certificate will start failing requests until they add verify_ssl: false to their module config. That is the intended outcome of closing the finding; the config key gives operators an explicit, auditable opt-out instead of a silent default. Verified with flake8 (clean) and the full pytest suite against a local misp-modules server on port 6754: 161 passed, 4 skipped, 5 subtests passed, matching the documented baseline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018dfYpyaSZd1nxSRLr8suj8
This branch has not been deployed
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.
BLUF —
cytomic_oriondisables TLS verification on all four requests and crashes on partial API responses.requestscalls inmisp_modules/modules/expansion/cytomic_orion.pyhardcodeverify=False, including the OAuth token exchange, so any TLS certificate from the configuredapi_urlis accepted; the file-information handler also indexes six response fields directly, raisingKeyErroron a partial response.verify_sslconfig option defaulting to true and converts those six lookups to.get().verify_sslto false.The file-information handler in
cytomic_orion.pyindexed six response fields directly off the parsed JSON after only checking that the parent dict was truthy:If the Cytomic Orion API returns a file-information object that is missing any one of
fileName,fileSize,lastSeen,firstSeen,classification, orclassificationName, this raises an uncaughtKeyErrorand the whole enrichment crashes instead of returning a partial result.Separately, all four outbound
requests.post/requests.getcalls hardcodedverify=False:which means the module unconditionally accepted any TLS certificate presented by the configured Orion endpoint — including during the OAuth token exchange — regardless of validity, silently defeating certificate validation.
Impact on a MISP user/analyst: an analyst enriching an MD5 hash can have the enrichment fail outright on a well-formed-but-partial API response, instead of getting the fields that were actually returned. And because certificate validation was always off, credentials and the bearer token are exposed to interception/tampering by anyone able to man-in-the-middle the configured
api_url, with no way to opt back into verification.Fix
Changed the six direct-index lookups to
.get()so a missing key returnsNoneinstead of raising. Added averify_sslmodule config option (defaulting totrue, matching the convention already used byvmware_nsx.pyandreversinglabs_spectra_analyze.py) and threaded it through all fourrequestscalls in place of the hardcodedverify=False.Behaviour change
TLS verification now defaults to on. This is an intentional security-default flip, not incidental: any existing deployment pointed at an Orion endpoint with a self-signed or otherwise unverifiable certificate will start failing requests until the operator adds
verify_ssl: falseto the module config. That is the intended outcome of closing this finding — it turns a silent, unconditional bypass into an explicit, auditable opt-out.Verification
flake8 misp_modules/modules/expansion/cytomic_orion.py— clean, no output.python -m py_compile misp_modules/modules/expansion/cytomic_orion.py— succeeded, no output.161 passed, 4 skipped, 5 subtests passed in 36.83s.Found during a review of the repository; other findings are being submitted as separate PRs.
🤖 Generated with Claude Code