Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6326 +/- ##
===========================================
- Coverage 41.08% 0.66% -40.43%
===========================================
Files 2151 1676 -475
Lines 129129 100739 -28390
===========================================
- Hits 53058 673 -52385
- Misses 76071 100066 +23995
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jabesq
left a comment
There was a problem hiding this comment.
Nothing is blocking, mostly code improvements.
a4f30b9 to
0ee1edf
Compare
0ee1edf to
3321c29
Compare
3321c29 to
7276140
Compare
There was a problem hiding this comment.
Pull request overview
Refactors the Sublime external-import connector to use the newer connectors-sdk configuration pattern, split API/STIX logic into dedicated modules, and mark the connector as verified/manager-supported in repository metadata.
Changes:
- Moves connector bootstrap/config handling to
ConnectorSettings+main.py, and extracts API and STIX conversion helpers. - Adds a new test suite covering settings, utils, API client, and STIX conversion behavior.
- Updates packaging, samples, docs, and metadata to support manager usage and verified status.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
external-import/sublime/tests/test-requirements.txt |
Adds Python test dependencies. |
external-import/sublime/tests/test_utils.py |
Adds utility-function tests. |
external-import/sublime/tests/test_settings.py |
Adds configuration validation tests. |
external-import/sublime/tests/test_converter_to_stix.py |
Adds STIX conversion tests. |
external-import/sublime/tests/test_api_client.py |
Adds API client tests. |
external-import/sublime/tests/conftest.py |
Adds shared pytest fixtures/mocks. |
external-import/sublime/tests/__init__.py |
Adds test package marker. |
external-import/sublime/src/sublime_client/api_client.py |
Introduces dedicated Sublime API client. |
external-import/sublime/src/sublime_client/__init__.py |
Exposes API client package exports. |
external-import/sublime/src/requirements.txt |
Adds connectors-sdk dependency. |
external-import/sublime/src/main.py |
Adds new connector entrypoint. |
external-import/sublime/src/connector/utils.py |
Extracts shared helper utilities. |
external-import/sublime/src/connector/sublime_connector.py |
Refactors main connector flow around new settings/client/converter modules. |
external-import/sublime/src/connector/settings.py |
Adds connectors-sdk based settings models. |
external-import/sublime/src/connector/converter_to_stix.py |
Adds centralized STIX object factory/conversion logic. |
external-import/sublime/src/connector/__init__.py |
Re-exports connector/settings classes. |
external-import/sublime/src/config.yml.sample |
Removes old sample config location. |
external-import/sublime/README.md |
Updates configuration/documentation links. |
external-import/sublime/entrypoint.sh |
Removes old shell entrypoint. |
external-import/sublime/Dockerfile |
Switches container startup to main.py. |
external-import/sublime/docker-compose.yml |
Cleans sample env vars for new config model. |
external-import/sublime/config.yml.sample |
Adds root-level sample config for new settings loader. |
external-import/sublime/__metadata__/connector_manifest.json |
Marks connector verified and manager-supported. |
external-import/sublime/__metadata__/connector_config_schema.json |
Adds generated connector config schema. |
external-import/sublime/__metadata__/CONNECTOR_CONFIG_DOC.md |
Adds generated config documentation. |
Comments suppressed due to low confidence (5)
external-import/sublime/src/connector/sublime_connector.py:375
- The primary
EmailMessageis now built withoutfrom_ref/to_refs, so the imported email no longer keeps any direct link to the sender and recipients you just created above. OpenCTI will ingest the addresses as unrelated observables instead of participants of the message.
external-import/sublime/src/connector/sublime_connector.py:1166 - After a bundle send fails, this code only logs the exception and still increments
processed_countbelow. The caller will then advance the connector state past this message, so failed imports are silently dropped instead of being retried.
external-import/sublime/src/connector/sublime_connector.py:1325 to_processed()is now called unconditionally infinally, even when theexceptpath above logged a batch-processing failure. That marks failed runs as successful in OpenCTI work tracking and hides operational problems.
external-import/sublime/src/connector/sublime_connector.py:50- This makes
amber+strictselectable, but the connector never adds the resulting customMarkingDefinitionto the bundle before callingsend_stix2_bundle(..., cleanup_inconsistent_bundle=True). WithSUBLIME_TLP_LEVEL=amber+strict, OpenCTI will drop or reject objects whoseobject_marking_refspoint to that missing definition.
external-import/sublime/src/connector/sublime_connector.py:968 create_ip_address()returnsNonefor malformed header values, but this loop appends thatNonedirectly intoobservables. The later indicator-generation/bundling paths assume every entry is a STIX object, so a single bad IP will still crash processing instead of being skipped.

Proposed changes
Related issues
Checklist
Further comments