Skip to content

[sdk] Add created in common properties#6448

Merged
throuxel merged 1 commit into
masterfrom
feat/6445-sdk-add-common-properties
May 21, 2026
Merged

[sdk] Add created in common properties#6448
throuxel merged 1 commit into
masterfrom
feat/6445-sdk-add-common-properties

Conversation

@throuxel
Copy link
Copy Markdown
Member

@throuxel throuxel commented May 20, 2026

Proposed changes

  • Add created in common properties for base identified entity
  • Add tests

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

@throuxel throuxel requested a review from Copilot May 20, 2026 12:16
@throuxel throuxel self-assigned this May 20, 2026
@throuxel throuxel added filigran team use to identify PR from the Filigran team connectors-sdk labels May 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 connectors SDK model layer to support additional STIX2.1 “common” properties (created, modified, confidence) on BaseIdentifiedEntity, enabling entities like Vulnerability to be instantiated/exported with these fields.

Changes:

  • Add created, modified, and confidence fields to BaseIdentifiedEntity and include them in _common_stix2_properties() when set.
  • Update Incident.to_stix2_object() to rely on _common_stix2_properties() for the created STIX property (removing the explicit created= argument).
  • Add unit tests validating inclusion/omission behavior for these new common properties.

Reviewed changes

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

File Description
connectors-sdk/connectors_sdk/models/base_identified_entity.py Introduces new common STIX properties and injects them into _common_stix2_properties() when provided.
connectors-sdk/connectors_sdk/models/incident.py Removes explicit created= argument so STIX created is supplied via common properties.
connectors-sdk/tests/test_models/test_base_identified_entity.py Adds tests covering presence/absence of created/modified/confidence in common properties.

Comment thread connectors-sdk/connectors_sdk/models/base_identified_entity.py Outdated
@throuxel throuxel requested a review from Powlinett May 20, 2026 12:25
@throuxel throuxel force-pushed the feat/6445-sdk-add-common-properties branch from f52c7c7 to d02cd91 Compare May 20, 2026 15:15
@throuxel throuxel changed the title [sdk] Add created, modified and confidence in common properties [sdk] Add created in common properties May 20, 2026
@throuxel throuxel requested a review from Copilot May 20, 2026 15:15
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

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

❗ There is a different number of reports uploaded between BASE (5eb2555) and HEAD (f20db62). Click for more details.

HEAD has 31 uploads less than BASE
Flag BASE (5eb2555) HEAD (f20db62)
connectors 97 66
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6448      +/-   ##
==========================================
- Coverage   26.75%   20.91%   -5.85%     
==========================================
  Files        1801     1800       -1     
  Lines      106940   106894      -46     
==========================================
- Hits        28614    22352    -6262     
- Misses      78326    84542    +6216     
Files with missing lines Coverage Δ
...dk/connectors_sdk/models/base_identified_entity.py 100.00% <100.00%> (ø)
connectors-sdk/connectors_sdk/models/incident.py 100.00% <ø> (ø)
connectors-sdk/connectors_sdk/models/note.py 100.00% <100.00%> (ø)

... and 171 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
Contributor

Copilot AI left a comment

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 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread connectors-sdk/connectors_sdk/models/note.py
Comment thread connectors-sdk/connectors_sdk/models/incident.py
Comment thread connectors-sdk/tests/test_models/test_incident.py
@throuxel throuxel force-pushed the feat/6445-sdk-add-common-properties branch from d02cd91 to 3f81a93 Compare May 20, 2026 15:49
@throuxel throuxel force-pushed the feat/6445-sdk-add-common-properties branch from 3f81a93 to f20db62 Compare May 20, 2026 15:49
Copy link
Copy Markdown
Member

@Powlinett Powlinett left a comment

Choose a reason for hiding this comment

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

Perfect 👌

@throuxel throuxel merged commit 28dd928 into master May 21, 2026
86 checks passed
@throuxel throuxel deleted the feat/6445-sdk-add-common-properties branch May 21, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connectors-sdk filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sdk] Add created in commom properties for base identified entity

4 participants