Skip to content

Commit 625a058

Browse files
authored
Merge pull request #3 from crowdsecurity/$main-675c40a
Add CVEs subscriptions to integrations
2 parents 675c40a + 12e8b01 commit 625a058

File tree

9 files changed

+36
-6
lines changed

9 files changed

+36
-6
lines changed

crowdsec_tracker_api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Server(Enum):
1414
'ApiKeyCredentials',
1515
'BasicAuthCredentials',
1616
'BlocklistSubscription',
17+
'CVESubscription',
1718
'HTTPValidationError',
1819
'IntegrationCreateRequest',
1920
'IntegrationCreateResponse',
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

crowdsec_tracker_api/models.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: <stdin>
3-
# timestamp: 2025-12-11T15:02:14+00:00
3+
# timestamp: 2025-12-15T11:06:13+00:00
44

55
from __future__ import annotations
66

@@ -35,6 +35,10 @@ class BlocklistSubscription(BaseModelSdk):
3535
remediation: Annotated[Optional[str], Field(title='Remediation')] = None
3636

3737

38+
class CVESubscription(BaseModelSdk):
39+
id: Annotated[str, Field(description='CVE ID', title='Id')]
40+
41+
3842
class IntegrationType(StrEnum):
3943
FIREWALL_INTEGRATION = 'firewall_integration'
4044
REMEDIATION_COMPONENT_INTEGRATION = 'remediation_component_integration'
@@ -624,6 +628,10 @@ class IntegrationCreateResponse(BaseModelSdk):
624628
title='Blocklists',
625629
),
626630
]
631+
cves: Annotated[
632+
List[CVESubscription],
633+
Field(description='CVEs that are subscribed by the integration', title='Cves'),
634+
]
627635
endpoint: Annotated[
628636
AnyUrl,
629637
Field(
@@ -694,6 +702,10 @@ class IntegrationGetResponse(BaseModelSdk):
694702
title='Blocklists',
695703
),
696704
]
705+
cves: Annotated[
706+
List[CVESubscription],
707+
Field(description='CVEs that are subscribed by the integration', title='Cves'),
708+
]
697709
endpoint: Annotated[
698710
AnyUrl,
699711
Field(
@@ -789,6 +801,10 @@ class IntegrationUpdateResponse(BaseModelSdk):
789801
title='Blocklists',
790802
),
791803
]
804+
cves: Annotated[
805+
List[CVESubscription],
806+
Field(description='CVEs that are subscribed by the integration', title='Cves'),
807+
]
792808
endpoint: Annotated[
793809
AnyUrl,
794810
Field(
Binary file not shown.

doc/Models.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ id
2626
| id | str | None ||
2727
| remediation | Optional[str] | None ||
2828

29+
# **CVESubscription**
30+
## Required:
31+
id
32+
## Properties
33+
| Property | Type | Description | Example |
34+
|----------|------|-------------|---------|
35+
| id | str | CVE ID ||
36+
2937
# **HTTPValidationError**
3038
## Properties
3139
| Property | Type | Description | Example |
@@ -45,7 +53,7 @@ name, entity_type, output_format
4553

4654
# **IntegrationCreateResponse**
4755
## Required:
48-
id, name, organization_id, created_at, updated_at, entity_type, output_format, blocklists, endpoint, credentials
56+
id, name, organization_id, created_at, updated_at, entity_type, output_format, blocklists, cves, endpoint, credentials
4957
## Properties
5058
| Property | Type | Description | Example |
5159
|----------|------|-------------|---------|
@@ -59,14 +67,15 @@ id, name, organization_id, created_at, updated_at, entity_type, output_format, b
5967
| output_format | str | None ||
6068
| last_pull | Optional[str] | Last time the integration pulled blocklists ||
6169
| blocklists | list[BlocklistSubscription] | Blocklists that are subscribed by the integration ||
70+
| cves | list[CVESubscription] | CVEs that are subscribed by the integration ||
6271
| endpoint | str | Url that should be used by the firewall or the remediation component to fetch the integration's content ||
6372
| stats | Stats | None ||
6473
| tags | list[str] | Tags associated with the integration ||
6574
| credentials | Union[ApiKeyCredentials, BasicAuthCredentials] | Credentials that were generated for the integration ||
6675

6776
# **IntegrationGetResponse**
6877
## Required:
69-
id, name, organization_id, created_at, updated_at, entity_type, output_format, blocklists, endpoint
78+
id, name, organization_id, created_at, updated_at, entity_type, output_format, blocklists, cves, endpoint
7079
## Properties
7180
| Property | Type | Description | Example |
7281
|----------|------|-------------|---------|
@@ -80,6 +89,7 @@ id, name, organization_id, created_at, updated_at, entity_type, output_format, b
8089
| output_format | str | None ||
8190
| last_pull | Optional[str] | Last time the integration pulled blocklists ||
8291
| blocklists | list[BlocklistSubscription] | Blocklists that are subscribed by the integration ||
92+
| cves | list[CVESubscription] | CVEs that are subscribed by the integration ||
8393
| endpoint | str | Url that should be used by the firewall or the remediation component to fetch the integration's content ||
8494
| stats | Stats | None ||
8595
| tags | list[str] | Tags associated with the integration ||
@@ -112,7 +122,7 @@ FIREWALL_INTEGRATION, REMEDIATION_COMPONENT_INTEGRATION
112122

113123
# **IntegrationUpdateResponse**
114124
## Required:
115-
id, name, organization_id, created_at, updated_at, entity_type, output_format, blocklists, endpoint
125+
id, name, organization_id, created_at, updated_at, entity_type, output_format, blocklists, cves, endpoint
116126
## Properties
117127
| Property | Type | Description | Example |
118128
|----------|------|-------------|---------|
@@ -126,6 +136,7 @@ id, name, organization_id, created_at, updated_at, entity_type, output_format, b
126136
| output_format | str | None ||
127137
| last_pull | Optional[str] | Last time the integration pulled blocklists ||
128138
| blocklists | list[BlocklistSubscription] | Blocklists that are subscribed by the integration ||
139+
| cves | list[CVESubscription] | CVEs that are subscribed by the integration ||
129140
| endpoint | str | Url that should be used by the firewall or the remediation component to fetch the integration's content ||
130141
| stats | Stats | None ||
131142
| tags | list[str] | Tags associated with the integration ||

doc/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ You can find a Quickstart about this SDK, following this [documentation](https:/
2323

2424
[BlocklistSubscription](./Models.md#blocklistsubscription)
2525

26+
[CVESubscription](./Models.md#cvesubscription)
27+
2628
[HTTPValidationError](./Models.md#httpvalidationerror)
2729

2830
[IntegrationCreateRequest](./Models.md#integrationcreaterequest)

let-openapi.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "crowdsec_tracker_api"
7-
version = "1.0.1"
7+
version = "1.91.0"
88
license = { text = "MIT" }
99
authors = [
1010
{ name="crowdsec", email="[email protected]" }

0 commit comments

Comments
 (0)