feat(qualys-cve-enrichment): migrate connector to manager-supported mode (#7130) - #7341
Open
Hugo Dupras (jabesq) wants to merge 6 commits into
Open
feat(qualys-cve-enrichment): migrate connector to manager-supported mode (#7130)#7341Hugo Dupras (jabesq) wants to merge 6 commits into
Hugo Dupras (jabesq) wants to merge 6 commits into
Conversation
…ager-supported mode (#7130)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Qualys CVE Enrichment connector to manager-supported mode so it can be deployed via XTM Composer, while keeping the existing runtime wiring (settings → helper → connector) and regenerating the connector’s config artifacts.
Changes:
- Mark the connector as
manager_supported: trueand normalize sample configuration/dependencies (including explicitly declaringpydantic). - Add a
src/__init__.pyre-export to makeConnectorSettingsimportable by the config-schema generator, then regenerate the config schema and documentation (fixing secret handling forOPENCTI_TOKEN). - Add unit tests covering settings validation and the manager-supported wiring (including the default
connector.id).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal-enrichment/qualys-cve-enrichment/tests/test_main.py | Adds wiring tests for manager-supported settings → helper → connector flow. |
| internal-enrichment/qualys-cve-enrichment/tests/test_connector/test_settings.py | Adds settings-validation tests using explicit config dicts and default assertions. |
| internal-enrichment/qualys-cve-enrichment/src/requirements.txt | Declares pydantic explicitly for settings validation. |
| internal-enrichment/qualys-cve-enrichment/src/config.yml.sample | Normalizes sample config; required values use ChangeMe, optional keys are commented out. |
| internal-enrichment/qualys-cve-enrichment/src/init.py | Exposes ConnectorSettings for schema generation import path resolution. |
| internal-enrichment/qualys-cve-enrichment/metadata/connector_manifest.json | Sets manager_supported to true. |
| internal-enrichment/qualys-cve-enrichment/metadata/connector_config_schema.json | Regenerated schema; marks OPENCTI_TOKEN as a password/writeOnly secret. |
| internal-enrichment/qualys-cve-enrichment/metadata/CONNECTOR_CONFIG_DOC.md | Regenerated docs reflecting OPENCTI_TOKEN password formatting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| import os | ||
| import sys | ||
|
|
||
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
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
config.yml.sampleandsrc/requirements.txt(defaulted keys commented out, required keys asChangeMe; declarepydanticexplicitly)src/__init__.pyre-exportingConnectorSettingsso the config-schema generator can import the modelmanager_supported: truein the connector manifest__metadata__/connector_config_schema.jsonandCONNECTOR_CONFIG_DOC.mdconnector.iddefaultRelated issues
Checklist
Further comments
Structure-preserving ("lite") migration. This connector already had Pydantic settings
and already built the helper from
to_helper_config(), so no rewiring was needed. Itwas blocked from being manager-supported by two things: the manifest flag was
false,and config-schema regeneration failed because neither generator import path resolved.
Worth noting for review: the previously committed schema was therefore stale —
OPENCTI_TOKENwas missingformat: password/writeOnly: true, so the API tokenwas not being treated as a secret. Regeneration fixes that.
Validation: isort, black,
flake8 --ignore=E,Wand the custom STIX-ID pylint checker(10.00/10) all pass; 154 unit tests pass. Schema regeneration is idempotent.