Skip to content

feat(export-ttps-file-navigator): migrate connector to manager-supported mode (#7220) - #7319

Merged
Hugo Dupras (jabesq) merged 12 commits into
masterfrom
feat/7220-migrate-export-ttps-file-navigator
Sep 2, 2026
Merged

feat(export-ttps-file-navigator): migrate connector to manager-supported mode (#7220)#7319
Hugo Dupras (jabesq) merged 12 commits into
masterfrom
feat/7220-migrate-export-ttps-file-navigator

Conversation

@helene-nguyen

@helene-nguyen Helene Nguyen (helene-nguyen) commented Aug 19, 2026

Copy link
Copy Markdown
Member

Proposed changes

  • Replace the manual config.yml / os.environ loading with Pydantic settings (src/settings.py) built on connectors-sdk's BaseConnectorSettings and BaseInternalExportFileConnectorConfig, and feed OpenCTIConnectorHelper via to_helper_config().
  • Flag the connector as manager_supported in __metadata__/connector_manifest.json and generate __metadata__/connector_config_schema.json + CONNECTOR_CONFIG_DOC.md from the settings model.
  • Normalise config.yml.sample and docker-compose.yml: drop the removed confidence_level, comment out optional keys (type, log_level) and use ChangeMe placeholders.
  • Drop entrypoint.sh and run the connector directly through CMD in the Dockerfile, as required for manager-supported connectors.
  • Declare the scope default as application/vnd.mitre.navigator+json in the settings model instead of relying on the environment.

Related issues

Checklist

  • I consider the submitted work as finished
  • I have signed my commits using GPG key.
  • I tested the code for its functionality using different use cases
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

The file structure, module names and class names are unchanged on purpose: this is a structure-preserving migration limited to configuration handling, so the diff stays reviewable against the previous behaviour.

Risk — breaking config change. CONNECTOR_CONFIDENCE_LEVEL is no longer read, and entrypoint.sh is gone, so existing deployments that override the entrypoint must be updated. No data migration.

Testing. No automated tests: this connector has no test suite. black, isort and flake8 pass on the changed sources (run via pre-commit). Runtime behaviour has not been exercised against a live OpenCTI instance yet.

Point for reviewers. InternalExportFileConnectorConfig.id now carries a hardcoded default UUID. That means any deployment omitting CONNECTOR_ID will share the same connector identity in OpenCTI — please confirm this is the intended convention for manager-supported connectors.

Screenshots

Display on OpenCTI
image

Connector running
image

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

🔴 Connector Linter errors detected

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the internal-export-file/export-ttps-file-navigator connector to “manager-supported” mode by switching configuration loading to connectors-sdk Pydantic settings, updating container startup behavior, and adding generated configuration metadata for the connector catalog.

Changes:

  • Introduces a Pydantic settings model (ConnectorSettings) based on connectors-sdk and wires it into OpenCTIConnectorHelper via to_helper_config().
  • Updates container/runtime assets for manager-supported mode (remove entrypoint.sh, run via CMD, set manager_supported: true).
  • Normalizes sample deployment/config files and adds generated config schema + docs in __metadata__.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal-export-file/export-ttps-file-navigator/src/settings.py Adds connectors-sdk-based Pydantic settings model for OpenCTI + connector config.
internal-export-file/export-ttps-file-navigator/src/requirements.txt Adds pydantic and connectors-sdk dependency for the new settings approach.
internal-export-file/export-ttps-file-navigator/src/export-ttps-file-navigator.py Replaces manual config.yml parsing with ConnectorSettings().to_helper_config().
internal-export-file/export-ttps-file-navigator/src/config.yml.sample Updates sample config values/placeholders and removes deprecated keys.
internal-export-file/export-ttps-file-navigator/src/init.py Exposes ConnectorSettings for module-level import.
internal-export-file/export-ttps-file-navigator/entrypoint.sh Removes shell entrypoint in favor of manager-supported CMD execution.
internal-export-file/export-ttps-file-navigator/Dockerfile Switches startup to WORKDIR + CMD ["python3", "..."].
internal-export-file/export-ttps-file-navigator/docker-compose.yml Updates env var placeholders and removes deprecated config entries.
internal-export-file/export-ttps-file-navigator/metadata/connector_manifest.json Flags connector as manager_supported: true.
internal-export-file/export-ttps-file-navigator/metadata/connector_config_schema.json Adds generated connector configuration JSON schema for catalog/manager usage.
internal-export-file/export-ttps-file-navigator/metadata/CONNECTOR_CONFIG_DOC.md Adds generated human-readable configuration documentation.
Suppressed comments (1)

internal-export-file/export-ttps-file-navigator/src/settings.py:27

  • This connector exports data, but the scope field description says "importing". This text is propagated into the generated schema/docs, so it should be corrected at the source model.
    scope: ListFromString = Field(
        default=["application/vnd.mitre.navigator+json"],
        description="The scope or type of data the connector is importing, either a MIME type or Stix Object (for information only).",
    )

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal-export-file/export-ttps-file-navigator/src/settings.py
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7319       +/-   ##
===========================================
+ Coverage   35.64%   85.42%   +49.78%     
===========================================
  Files        2048        4     -2044     
  Lines      125310      652   -124658     
===========================================
- Hits        44672      557    -44115     
+ Misses      80638       95    -80543     

see 2042 files with indirect coverage changes

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (build.env doesn't need update as it already uses the right entrypoint file path)🌻

Comment thread internal-export-file/export-ttps-file-navigator/src/config.yml.sample Outdated
Comment thread internal-export-file/export-ttps-file-navigator/src/settings.py

@maximerafaillac Max (maximerafaillac) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good :)

@jabesq
Hugo Dupras (jabesq) force-pushed the feat/7220-migrate-export-ttps-file-navigator branch from 0d369bb to cb6b4a4 Compare September 2, 2026 10:12
@jabesq
Hugo Dupras (jabesq) merged commit 6fd2b03 into master Sep 2, 2026
19 checks passed
@jabesq
Hugo Dupras (jabesq) deleted the feat/7220-migrate-export-ttps-file-navigator branch September 2, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(export-ttps-file-navigator): migrate connector to the catalog

6 participants