Skip to content

feat(export-file-txt): migrate connector to manager-supported mode (#7222) - #7322

Open
Helene Nguyen (helene-nguyen) wants to merge 10 commits into
masterfrom
feat/7222-migrate-export-file-txt
Open

feat(export-file-txt): migrate connector to manager-supported mode (#7222)#7322
Helene Nguyen (helene-nguyen) wants to merge 10 commits into
masterfrom
feat/7222-migrate-export-file-txt

Conversation

@helene-nguyen

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

Copy link
Copy Markdown
Member

Proposed changes

  • Migrate internal-export-file/export-file-txt to manager-supported mode: replace the config.yml / os.environ loading with a Pydantic ConnectorSettings built on connectors-sdk (BaseConnectorSettings, BaseInternalExportFileConnectorConfig), passed to OpenCTIConnectorHelper via to_helper_config().
  • Set connector-specific defaults (id, name: ExportFileTxt, scope: ["text/plain"]) so the connector is deployable from the manager without mandatory name/scope input.
  • Set manager_supported: true in __metadata__/connector_manifest.json and regenerate connector_config_schema.json / CONNECTOR_CONFIG_DOC.md.
  • Drop entrypoint.sh in favour of a direct CMD in Dockerfile and Dockerfile_fips; normalize docker-compose.yml and config.yml.sample (removed the obsolete confidence_level and the hardcoded connector.type).

The file structure, class names and processing logic are intentionally unchanged — this is a structure-preserving (lite) migration.

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

CONNECTOR_NAME and CONNECTOR_SCOPE move from required to defaulted in the config schema. This is not breaking for existing deployments — explicitly set values still override the defaults — but it does change the generated schema consumed by the platform.

Removing entrypoint.sh changes how the image starts. Any deployment overriding the entrypoint will need adjusting; the standard docker-compose.yml is unaffected.

Screenshots

Display on OpenCTI catalog
image

Usage when exporting
image

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

🔴 Connector Linter errors detected

@helene-nguyen Helene Nguyen (helene-nguyen) added connector: export-file-stix Connector: export-file-stix. filigran team Item from the Filigran team. labels Aug 19, 2026

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-file-txt connector to the connectors catalog / manager-supported configuration model by switching to connectors-sdk Pydantic settings and updating container/metadata artifacts accordingly, while keeping the connector’s processing logic intact.

Changes:

  • Replaced legacy config.yml/os.environ loading with connectors-sdk-based ConnectorSettings, passed to OpenCTIConnectorHelper via to_helper_config().
  • Marked the connector as manager-supported and regenerated catalog metadata artifacts (schema + config doc).
  • Simplified container startup by removing entrypoint.sh and using CMD in Dockerfile/Dockerfile_fips; normalized sample configs and compose env vars.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal-export-file/export-file-txt/src/settings.py Adds connectors-sdk Pydantic settings with connector defaults for manager-supported deployments.
internal-export-file/export-file-txt/src/requirements.txt Adds connectors-sdk (and explicit pydantic) dependency for the new settings model.
internal-export-file/export-file-txt/src/export-file-txt.py Switches helper initialization to use ConnectorSettings().to_helper_config().
internal-export-file/export-file-txt/src/config.yml.sample Updates the sample config to align with manager-supported settings and removes obsolete fields.
internal-export-file/export-file-txt/src/init.py Exposes ConnectorSettings at package level (consistent with other connectors using this pattern).
internal-export-file/export-file-txt/entrypoint.sh Removed in favor of container CMD.
internal-export-file/export-file-txt/Dockerfile Uses WORKDIR + CMD to start the connector directly.
internal-export-file/export-file-txt/Dockerfile_fips Mirrors the non-FIPS Dockerfile startup change.
internal-export-file/export-file-txt/docker-compose.yml Updates placeholders and removes obsolete environment variables.
internal-export-file/export-file-txt/metadata/connector_manifest.json Sets manager_supported: true for catalog deployment.
internal-export-file/export-file-txt/metadata/connector_config_schema.json Adds regenerated connector configuration schema for the platform/manager.
internal-export-file/export-file-txt/metadata/CONNECTOR_CONFIG_DOC.md Adds regenerated configuration documentation derived from the schema.
Suppressed comments (1)

internal-export-file/export-file-txt/src/settings.py:27

  • scope is described as what the connector is "importing", but this is an internal export connector. This description is surfaced in the generated schema/docs, so it should match the connector behavior.
    scope: ListFromString = Field(
        default=["text/plain"],
        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-file-txt/src/settings.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

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)🌻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connector: export-file-stix Connector: export-file-stix. filigran team Item from the Filigran team. needs-product-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants