feat(osint-industries): add manager-supported catalog config with max TLP gating (#7652) - #7704
Merged
Merged
Conversation
…or playbooks (#7652) Enrichment now stops before any call to the third-party API when the observable carries a TLP above OSINT_INDUSTRIES_MAX_TLP. The connector is also playbook-compatible: it declares playbook_compatible=True, reads the former bundle from data['stix_objects'], and hands it back untouched on every path that produces no enrichment (TLP refused, unsupported entity, no usable value, API failure, empty result, nothing converted, unexpected error) so the playbook pipeline is not interrupted. Bundles are now sent with cleanup_inconsistent_bundle=True. Linter VC304, VC312, VC319, VC320, VC321 and VC322 go from 1/6 to 6/6.
|
🔴 Connector Linter errors detected
|
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the OSINT Industries connector to SDK-based typed settings, catalog support, max-TLP enforcement, and playbook-compatible bundle handling.
Changes:
- Adds Pydantic settings and generated catalog metadata.
- Adds TLP gating and bundle forwarding behavior.
- Expands tests and normalizes deployment documentation.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal-enrichment/osint-industries/tests/tests_connector/test_settings.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/tests/test-requirements.txt | Updated as part of this pull request. |
| internal-enrichment/osint-industries/tests/test_main.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/tests/test_connector.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/tests/conftest.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/src/requirements.txt | Updated as part of this pull request. |
| internal-enrichment/osint-industries/src/osint_industries/settings.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/src/osint_industries/connector.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/src/osint_industries/init.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/src/init.py | Updated as part of this pull request. |
| internal-enrichment/osint-industries/README.md | Updated as part of this pull request. |
| internal-enrichment/osint-industries/docker-compose.yml | Updated as part of this pull request. |
| internal-enrichment/osint-industries/config.yml.sample | Updated as part of this pull request. |
| internal-enrichment/osint-industries/.env.sample | Updated as part of this pull request. |
| internal-enrichment/osint-industries/metadata/connector_manifest.json | Updated as part of this pull request. |
| internal-enrichment/osint-industries/metadata/connector_config_schema.json | Updated as part of this pull request. |
| internal-enrichment/osint-industries/metadata/CONNECTOR_CONFIG_DOC.md | Updated as part of this pull request. |
Suppressed comments (1)
internal-enrichment/osint-industries/src/osint_industries/connector.py:117
- The
and original_stix_objectsguard suppresses the forward whenever a playbook message contains an emptystix_objectslist. That silently terminates the playbook on a valid no-enrichment input, contrary to the advertised always-forward contract; do not skip the forwarding call for an empty incoming bundle (or handle that case explicitly).
if self._is_playbook_context(data) and original_stix_objects:
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| """ | ||
| original_stix_objects = self._former_bundle(data) | ||
| if self._is_playbook_context(data) and original_stix_objects: | ||
| self._send_bundle(original_stix_objects) |
Thibaut Rouxel (throuxel)
approved these changes
Sep 17, 2026
Helene Nguyen (helene-nguyen)
pushed a commit
to helene-nguyen/opencti-connectors
that referenced
this pull request
Sep 18, 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.
Proposed changes
.env.sample,config.yml.sample,docker-compose.yml,README.md) so every variable follows theOSINT_INDUSTRIES_*/osint_industriesconvention. This is the prerequisite for the config-schema generator to produce a correct catalog entry.pycti.get_config_variable+yaml.loadwith a Pydanticsettings.pybuilt on theconnectors-sdkbase classes (BaseConnectorSettings,BaseInternalEnrichmentConnectorConfig,BaseConfigModel). Configuration is now validated and typed at startup — a missing API key or a bogus TLP value fails immediately with a clear error instead of surfacing as an obscure runtime failure later.PyYAMLis dropped fromsrc/requirements.txtsince nothing parses YAML by hand anymore.ConnectorSettingsfromsrc/__init__.py. The config-schema generator resolves the settings class throughfrom src import ConnectorSettings; without this re-export the catalog schema cannot be generated for this connector.connector.ida repo-unique UUIDv4 default (cef186b0-…). Catalog-deployed connectors get a working identity out of the box, so operators no longer have to hand-craft aCONNECTOR_IDjust to start the container.manager_supported: truein__metadata__/connector_manifest.jsonand commit the generatedconnector_config_schema.json+CONNECTOR_CONFIG_DOC.md. This is what actually makes the connector deployable and configurable from the OpenCTI connector catalog UI.OSINT_INDUSTRIES_MAX_TLPsetting (defaultTLP:AMBER) enforced before any outbound call. OSINT Industries is a paid third-party source that processes personal data, so the gate deliberately runs at the very top of_process_message, before the client is touched: a selector marked above the maximum never leaves the platform. All TLP markings on the entity must pass, so the most restrictive one wins — an observable marked both TLP:GREEN and TLP:RED is treated as TLP:RED. Unmarked observables stay allowed, matchingcheck_max_tlp's ownNonebehaviour.playbook_compatible=True, bundle read fromdata["stix_objects"]). Every path that produces no enrichment — TLP refused, unsupported entity type, no usable value, API failure, empty result, nothing converted, unexpected error — now returns the incoming bundle untouched so the playbook pipeline continues instead of dead-ending at this step. Forwarding is gated onevent_typebeing absent, so manual/automatic enrichment runs don't pointlessly re-send a bundle the platform already has, and the forward itself is best-effort so it can never mask the original outcome or break the listener loop.cleanup_inconsistent_bundle=True, and append enriched objects to the original bundle rather than replacing it, so a playbook keeps the entities it was already carrying through the step.tests_connector/test_settings.py,test_main.py, expandedtest_connector.py), covering each no-enrichment branch to lock in the "always give the bundle back" contract.Related issues
Checklist
Further comments
The max-TLP check is intentionally the first thing
_process_messagedoes rather than a filter on the results: since this is a paid source handling personal data, the requirement is that a too-sensitive selector is never transmitted at all, not merely that its results are discarded. For the same reason the check is conjunctive over all markings (most restrictive wins) instead of looking at a single "the" TLP.On the playbook side, the guiding rule is that a step which cannot enrich must still be transparent: it hands the original bundle back rather than returning nothing, so inserting this connector into a playbook can never silently truncate the chain.
Scope note: this is a manager-supported pass, not a full "verified" one. The migration is deliberately structure-preserving — file layout, class names, the
__main__.pyentry point, logging and scheduling are all unchanged. Connector-linter checks VC304, VC312, VC319, VC320, VC321 and VC322 go from 1/6 to 6/6 against the pre-change baseline. Two known gaps remain out of scope here: VC308 (entry point issrc/__main__.py, notsrc/main.py) and VC309 (relative imports). Both would require restructuring the package and are better handled in a dedicated follow-up.