Skip to content

fix(composer): allow null license_type and subscription_link in manifest schema (#7119) - #7388

Merged
Hugo Dupras (jabesq) merged 2 commits into
fix/7119-manifest-fragment-min-versionfrom
fix/7119-license_type_nullable
Aug 26, 2026
Merged

fix(composer): allow null license_type and subscription_link in manifest schema (#7119)#7388
Hugo Dupras (jabesq) merged 2 commits into
fix/7119-manifest-fragment-min-versionfrom
fix/7119-license_type_nullable

Conversation

@jabesq

@jabesq Hugo Dupras (jabesq) commented Aug 24, 2026

Copy link
Copy Markdown
Member

Proposed changes

  • Allow license_type and subscription_link to be null in the manifest fragment JSON schema, replacing the previous empty-string convention for "no value".
  • Update generate_manifest_fragment.py to emit null (instead of "") for license_type and subscription_link when the source manifest omits them.
  • Anchor the PYCTI_PIN_PATTERN regex (^...$ with re.MULTILINE) so it only matches a full pinned pycti==X.Y.Z line, preventing accidental partial/substring matches on lines with multiple dependency entries.
  • Regenerate the Spur connector manifest fragment to drop the redundant name field, reflecting the updated generator output.

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

license_type and subscription_link previously used an empty string ("") as the "no value" sentinel, which is ambiguous with an actual empty value and doesn't map cleanly to JSON Schema's null type. Switching to null makes the "not set" case explicit and consistent with how other optional fields (e.g. last_verified_date) are already handled in the schema and generator.

The PYCTI_PIN_PATTERN regex was previously unanchored, so it could match a pycti==X.Y.Z pin anywhere within a line — including inside a pyproject.toml dependencies array with multiple quoted entries on one line, or as a partial substring of a longer token. Anchoring the pattern with ^/$ and re.MULTILINE ensures it only matches when the entire line is a pinned pycti requirement, avoiding false positives from adjacent entries on the same line.

Copilot AI lite review requested due to automatic review settings August 24, 2026 15:19
@jabesq Hugo Dupras (jabesq) added the filigran team Item from the Filigran team. label Aug 24, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Unused dependencies detected

The following packages appear to be unused:

  • validators in external-import/spur/src/requirements.txt

How to fix: (1) if the package is used but under a different import name (e.g. PyYAMLyaml), add a mapping line to .github/deptry-package-map.txt. (2) if truly unused, remove it from the connector's requirements.txt.

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 updates the manifest-fragment generator and its JSON Schema to use explicit null values (instead of empty strings) for optional license_type and subscription_link, improving semantic clarity for downstream consumers (e.g., XTM Hub) as part of the manifest-fragment delivery work in #7119.

Changes:

  • Allow license_type and subscription_link to be null in the manifest fragment schema and emit null from the generator when those fields are absent.
  • Anchor the PYCTI_PIN_PATTERN used to extract the pinned pycti==... version for min_version computation.
  • Remove the redundant name field from the Spur connector manifest metadata.

Reviewed changes

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

File Description
shared/tools/composer/generate_manifest_fragment/generate_manifest_fragment.py Updates pycti pin parsing regex and emits null for optional manifest fragment fields.
shared/tools/composer/generate_manifest_fragment/connector_manifest_schema.json Allows null for license_type and subscription_link in the fragment schema.
external-import/spur/metadata/connector_manifest.json Drops redundant name field to align with generator expectations/output.

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

@jabesq
Hugo Dupras (jabesq) force-pushed the fix/7119-license_type_nullable branch from 2637b18 to 7a90f62 Compare August 24, 2026 15:32
@jabesq
Hugo Dupras (jabesq) force-pushed the fix/7119-license_type_nullable branch from 7a90f62 to 41b9ebc Compare August 25, 2026 08:45
@jabesq
Hugo Dupras (jabesq) force-pushed the fix/7119-license_type_nullable branch from 41b9ebc to 87bc9a9 Compare August 25, 2026 08:47
@jabesq
Hugo Dupras (jabesq) force-pushed the fix/7119-license_type_nullable branch 2 times, most recently from 199bbe1 to 07d661b Compare August 25, 2026 12:52
@jabesq
Hugo Dupras (jabesq) requested a lite review from Copilot August 25, 2026 12:52

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

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

Suppressed comments (1)

shared/tools/composer/generate_manifest_fragment/connector_manifest_schema.json:152

  • subscription_link is now allowed to be null (per the updated type), but the schema description and examples still document the old empty-string sentinel. This is inconsistent with the PR’s stated intent to replace "" with null for “not set” and may mislead schema consumers.
    "subscription_link": {
      "type": ["string", "null"],
      "description": "URL to the external service or subscription page for the data source. Empty string if none.",
      "examples": ["https://www.misp-project.org", ""]

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.

Hugo Dupras (@jabesq) Good for me 👍

@jabesq
Hugo Dupras (jabesq) merged commit 0bab6e1 into master Aug 26, 2026
229 of 239 checks passed
@jabesq
Hugo Dupras (jabesq) deleted the fix/7119-license_type_nullable branch August 26, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(decoupling): send manifest fragment

4 participants