Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 2509ec7

Browse files
authored
Merge branch 'master' into renovate/opentelemetry-python-monorepo
2 parents a4388bc + 705b72e commit 2509ec7

File tree

7 files changed

+60
-8
lines changed

7 files changed

+60
-8
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check signed commits in PR
2+
on: [pull_request,pull_request_target]
3+
jobs:
4+
check-signed-commits:
5+
name: Check signed commits in PR
6+
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
steps:
11+
- name: Information about how to sign commits see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
12+
# "with comment" below does not work for forks.
13+
run: |
14+
echo "If you need to sign commits, Please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
15+
- name: Check signed commits in PR on fail see above information.
16+
uses: 1Password/check-signed-commits-action@v1
17+
with:
18+
comment: |
19+
Thank you for your contribution, but we need you to sign your commits. Please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

pycti/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = "6.7.4"
2+
__version__ = "6.7.7"
33

44
from .api.opencti_api_client import OpenCTIApiClient
55
from .api.opencti_api_connector import OpenCTIApiConnector

pycti/entities/opencti_stix_cyber_observable.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,18 @@ def create(self, **kwargs):
809809
),
810810
}
811811
elif type == "Software":
812+
if (
813+
"x_opencti_product" not in observable_data
814+
and self.opencti.get_attribute_in_extension(
815+
"x_opencti_product", observable_data
816+
)
817+
is not None
818+
):
819+
observable_data["x_opencti_product"] = (
820+
self.opencti.get_attribute_in_extension(
821+
"x_opencti_product", observable_data
822+
)
823+
)
812824
input_variables["Software"] = {
813825
"name": (
814826
observable_data["name"] if "name" in observable_data else None
@@ -832,6 +844,11 @@ def create(self, **kwargs):
832844
if "version" in observable_data
833845
else None
834846
),
847+
"x_opencti_product": (
848+
observable_data["x_opencti_product"]
849+
if "x_opencti_product" in observable_data
850+
else None
851+
),
835852
}
836853
elif type == "Url":
837854
input_variables["Url"] = {

pycti/entities/opencti_vulnerability.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def __init__(self, opencti):
150150
x_opencti_cvss_v4_availability_impact_s
151151
x_opencti_cvss_v4_exploit_maturity
152152
x_opencti_cwe
153+
x_opencti_first_seen_active
153154
x_opencti_cisa_kev
154155
x_opencti_epss_score
155156
x_opencti_epss_percentile
@@ -452,6 +453,7 @@ def create(self, **kwargs):
452453
x_opencti_epss_score = kwargs.get("x_opencti_epss_score", None)
453454
x_opencti_epss_percentile = kwargs.get("x_opencti_epss_percentile", None)
454455
x_opencti_score = kwargs.get("x_opencti_score", None)
456+
x_opencti_first_seen_active = kwargs.get("x_opencti_first_seen_active", None)
455457
x_opencti_stix_ids = kwargs.get("x_opencti_stix_ids", None)
456458
granted_refs = kwargs.get("objectOrganization", None)
457459
x_opencti_workflow_id = kwargs.get("x_opencti_workflow_id", None)
@@ -538,6 +540,7 @@ def create(self, **kwargs):
538540
"x_opencti_epss_score": x_opencti_epss_score,
539541
"x_opencti_epss_percentile": x_opencti_epss_percentile,
540542
"x_opencti_score": x_opencti_score,
543+
"x_opencti_first_seen_active": x_opencti_first_seen_active,
541544
"x_opencti_stix_ids": x_opencti_stix_ids,
542545
"x_opencti_workflow_id": x_opencti_workflow_id,
543546
"update": update,
@@ -867,6 +870,12 @@ def import_from_stix2(self, **kwargs):
867870
stix_object["x_opencti_score"] = (
868871
self.opencti.get_attribute_in_extension("score", stix_object)
869872
)
873+
if "x_opencti_first_seen_active" not in stix_object:
874+
stix_object["x_opencti_first_seen_active"] = (
875+
self.opencti.get_attribute_in_extension(
876+
"first_seen_active", stix_object
877+
)
878+
)
870879

871880
return self.create(
872881
stix_id=stix_object["id"],
@@ -1158,6 +1167,11 @@ def import_from_stix2(self, **kwargs):
11581167
if "x_opencti_score" in stix_object
11591168
else None
11601169
),
1170+
x_opencti_first_seen_active=(
1171+
stix_object["x_opencti_first_seen_active"]
1172+
if "x_opencti_first_seen_active" in stix_object
1173+
else None
1174+
),
11611175
update=update,
11621176
)
11631177
else:

pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
languages
216216
vendor
217217
version
218+
x_opencti_product
218219
}
219220
... on Url {
220221
value
@@ -519,6 +520,7 @@
519520
languages
520521
vendor
521522
version
523+
x_opencti_product
522524
}
523525
... on Url {
524526
value

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ pydantic~=2.11.3
99
requests~=2.32.3
1010
setuptools~=80.9.0
1111
cachetools~=5.5.0
12-
prometheus-client~=0.21.1
12+
prometheus-client~=0.22.1
1313
opentelemetry-api~=1.35.0
1414
opentelemetry-sdk~=1.35.0
1515
deprecation~=2.1.0
16-
fastapi>=0.115.8,<0.116.0
17-
uvicorn[standard]>=0.33.0,<0.35.0
16+
fastapi>=0.116.1,<0.117.0
17+
uvicorn[standard]>=0.35.0,<0.36.0
1818
# OpenCTI
1919
filigran-sseclient>=1.0.2
2020
stix2~=3.0.1

setup.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ install_requires =
4545
requests~=2.32.3
4646
setuptools~=80.9.0
4747
cachetools~=5.5.0
48-
prometheus-client~=0.21.1
48+
prometheus-client~=0.22.1
4949
opentelemetry-api~=1.35.0
5050
opentelemetry-sdk~=1.35.0
5151
deprecation~=2.1.0
52-
fastapi>=0.115.8,<0.116.0
53-
uvicorn[standard]>=0.33.0,<0.35.0
52+
fastapi>=0.116.1,<0.117.0
53+
uvicorn[standard]>=0.35.0,<0.36.0
5454
# OpenCTI
5555
filigran-sseclient>=1.0.2
5656
stix2~=3.0.1
@@ -62,7 +62,7 @@ dev =
6262
isort~=6.0.0
6363
types-pytz~=2025.2.0.20250326
6464
pre-commit~=4.2.0
65-
pytest-cases~=3.8.0
65+
pytest-cases~=3.9.1
6666
pytest-cov~=6.2.1
6767
pytest_randomly~=3.16.0
6868
pytest~=8.4.1

0 commit comments

Comments
 (0)