Skip to content

Commit eb30530

Browse files
AlteredCodergithub-actions[bot]
authored andcommitted
Update python SDK 1.102.4
1 parent 50a0587 commit eb30530

File tree

11 files changed

+117
-83
lines changed

11 files changed

+117
-83
lines changed

crowdsec_tracker_api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class Server(Enum):
3838
'Classification',
3939
'Classifications',
4040
'EntityType',
41+
'ExploitationPhase',
4142
'GetCVEIPsResponsePage',
4243
'GetCVEResponse',
4344
'GetCVESubscribedIntegrationsResponsePage',
-2 Bytes
Binary file not shown.
-2 Bytes
Binary file not shown.

crowdsec_tracker_api/models.py

Lines changed: 96 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: <stdin>
3-
# timestamp: 2026-01-29T17:02:55+00:00
3+
# timestamp: 2026-02-06T10:14:41+00:00
44

55
from __future__ import annotations
66

@@ -144,73 +144,6 @@ class CvssScore(RootModelSdk[float]):
144144
]
145145

146146

147-
class CVEResponseBase(BaseModelSdk):
148-
id: Annotated[str, Field(description='ID of the CVE', title='Id')]
149-
name: Annotated[str, Field(description='Name of the CVE', title='Name')]
150-
title: Annotated[str, Field(description='Title of the CVE', title='Title')]
151-
affected_components: Annotated[
152-
List[AffectedComponent],
153-
Field(description='List of affected components', title='Affected Components'),
154-
]
155-
crowdsec_score: Annotated[
156-
int,
157-
Field(
158-
description='Live Exploit Tracker score of the CVE',
159-
ge=0,
160-
le=10,
161-
title='Crowdsec Score',
162-
),
163-
]
164-
opportunity_score: Annotated[
165-
Optional[int],
166-
Field(
167-
description="Opportunity score indicating if it's an opportunistic(0) or targeted(5) attack (between 0-5)",
168-
ge=0,
169-
le=5,
170-
title='Opportunity Score',
171-
),
172-
] = 0
173-
momentum_score: Annotated[
174-
Optional[int],
175-
Field(
176-
description="Momentum score indicating the vulnerability's trendiness based on signal comparison with the previous month. Higher scores (4-5) indicate significantly more signals this month than last month's average, while lower scores (0-1) indicate declining activity (between 0-5)",
177-
ge=0,
178-
le=5,
179-
title='Momentum Score',
180-
),
181-
] = 0
182-
first_seen: Annotated[
183-
Optional[datetime], Field(description='First seen date', title='First Seen')
184-
] = None
185-
last_seen: Annotated[
186-
Optional[datetime], Field(description='Last seen date', title='Last Seen')
187-
] = None
188-
nb_ips: Annotated[
189-
int, Field(description='Number of unique IPs affected', ge=0, title='Nb Ips')
190-
]
191-
published_date: Annotated[
192-
datetime, Field(description='Published date of the CVE', title='Published Date')
193-
]
194-
cvss_score: Annotated[
195-
Optional[CvssScore],
196-
Field(description='CVSS score of the CVE', title='Cvss Score'),
197-
] = None
198-
has_public_exploit: Annotated[
199-
bool,
200-
Field(
201-
description='Indicates if there is a public exploit for the CVE',
202-
title='Has Public Exploit',
203-
),
204-
]
205-
rule_release_date: Annotated[
206-
Optional[datetime],
207-
Field(
208-
description='Release date of the associated detection rule',
209-
title='Rule Release Date',
210-
),
211-
] = None
212-
213-
214147
class CVEsubscription(BaseModelSdk):
215148
id: Annotated[str, Field(title='Id')]
216149

@@ -252,6 +185,19 @@ class EntityType(StrEnum):
252185
LOG_PROCESSOR = 'log_processor'
253186

254187

188+
class ExploitationPhase(BaseModelSdk):
189+
name: Annotated[
190+
str, Field(description='Name of the exploitation phase', title='Name')
191+
]
192+
label: Annotated[
193+
str, Field(description='Label of the exploitation phase', title='Label')
194+
]
195+
description: Annotated[
196+
str,
197+
Field(description='Description of the exploitation phase', title='Description'),
198+
]
199+
200+
255201
class GetCVEResponse(BaseModelSdk):
256202
id: Annotated[str, Field(description='ID of the CVE', title='Id')]
257203
name: Annotated[str, Field(description='Name of the CVE', title='Name')]
@@ -317,6 +263,9 @@ class GetCVEResponse(BaseModelSdk):
317263
title='Rule Release Date',
318264
),
319265
] = None
266+
exploitation_phase: Annotated[
267+
ExploitationPhase, Field(description='Current exploitation phase of the CVE')
268+
]
320269
references: Annotated[
321270
List[str],
322271
Field(description='List of references for the CVE', title='References'),
@@ -342,15 +291,6 @@ class GetCVEsFilterBy(StrEnum):
342291
IS_PUBLIC = 'is_public'
343292

344293

345-
class GetCVEsResponsePage(BaseModelSdk):
346-
items: Annotated[List[CVEResponseBase], Field(title='Items')]
347-
total: Annotated[int, Field(ge=0, title='Total')]
348-
page: Annotated[int, Field(ge=1, title='Page')]
349-
size: Annotated[int, Field(ge=1, title='Size')]
350-
pages: Annotated[int, Field(ge=0, title='Pages')]
351-
links: Links
352-
353-
354294
class GetCVEsSortBy(StrEnum):
355295
RULE_RELEASE_DATE = 'rule_release_date'
356296
TRENDING = 'trending'
@@ -923,6 +863,76 @@ class IntegrationUpdateResponse(BaseModelSdk):
923863
] = None
924864

925865

866+
class CVEResponseBase(BaseModelSdk):
867+
id: Annotated[str, Field(description='ID of the CVE', title='Id')]
868+
name: Annotated[str, Field(description='Name of the CVE', title='Name')]
869+
title: Annotated[str, Field(description='Title of the CVE', title='Title')]
870+
affected_components: Annotated[
871+
List[AffectedComponent],
872+
Field(description='List of affected components', title='Affected Components'),
873+
]
874+
crowdsec_score: Annotated[
875+
int,
876+
Field(
877+
description='Live Exploit Tracker score of the CVE',
878+
ge=0,
879+
le=10,
880+
title='Crowdsec Score',
881+
),
882+
]
883+
opportunity_score: Annotated[
884+
Optional[int],
885+
Field(
886+
description="Opportunity score indicating if it's an opportunistic(0) or targeted(5) attack (between 0-5)",
887+
ge=0,
888+
le=5,
889+
title='Opportunity Score',
890+
),
891+
] = 0
892+
momentum_score: Annotated[
893+
Optional[int],
894+
Field(
895+
description="Momentum score indicating the vulnerability's trendiness based on signal comparison with the previous month. Higher scores (4-5) indicate significantly more signals this month than last month's average, while lower scores (0-1) indicate declining activity (between 0-5)",
896+
ge=0,
897+
le=5,
898+
title='Momentum Score',
899+
),
900+
] = 0
901+
first_seen: Annotated[
902+
Optional[datetime], Field(description='First seen date', title='First Seen')
903+
] = None
904+
last_seen: Annotated[
905+
Optional[datetime], Field(description='Last seen date', title='Last Seen')
906+
] = None
907+
nb_ips: Annotated[
908+
int, Field(description='Number of unique IPs affected', ge=0, title='Nb Ips')
909+
]
910+
published_date: Annotated[
911+
datetime, Field(description='Published date of the CVE', title='Published Date')
912+
]
913+
cvss_score: Annotated[
914+
Optional[CvssScore],
915+
Field(description='CVSS score of the CVE', title='Cvss Score'),
916+
] = None
917+
has_public_exploit: Annotated[
918+
bool,
919+
Field(
920+
description='Indicates if there is a public exploit for the CVE',
921+
title='Has Public Exploit',
922+
),
923+
]
924+
rule_release_date: Annotated[
925+
Optional[datetime],
926+
Field(
927+
description='Release date of the associated detection rule',
928+
title='Rule Release Date',
929+
),
930+
] = None
931+
exploitation_phase: Annotated[
932+
ExploitationPhase, Field(description='Current exploitation phase of the CVE')
933+
]
934+
935+
926936
class GetCVESubscribedIntegrationsResponsePage(BaseModelSdk):
927937
items: Annotated[List[IntegrationResponse], Field(title='Items')]
928938
total: Annotated[int, Field(ge=0, title='Total')]
@@ -932,6 +942,15 @@ class GetCVESubscribedIntegrationsResponsePage(BaseModelSdk):
932942
links: Links
933943

934944

945+
class GetCVEsResponsePage(BaseModelSdk):
946+
items: Annotated[List[CVEResponseBase], Field(title='Items')]
947+
total: Annotated[int, Field(ge=0, title='Total')]
948+
page: Annotated[int, Field(ge=1, title='Page')]
949+
size: Annotated[int, Field(ge=1, title='Size')]
950+
pages: Annotated[int, Field(ge=0, title='Pages')]
951+
links: Links
952+
953+
935954
class IPItem(BaseModelSdk):
936955
ip: Annotated[str, Field(description='IP address', title='Ip')]
937956
reputation: Annotated[
-2 Bytes
Binary file not shown.

crowdsec_tracker_api/services/cves.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class Cves(Service):
1313
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
14-
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.102.3")
14+
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.102.4")
1515

1616
def get_cves(
1717
self,

crowdsec_tracker_api/services/integrations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class Integrations(Service):
1313
def __init__(self, auth: Auth, base_url: str = "https://admin.api.crowdsec.net/v1") -> None:
14-
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.102.3")
14+
super().__init__(base_url=base_url, auth=auth, user_agent="crowdsec_tracker_api/1.102.4")
1515

1616
def get_integrations(
1717
self,

doc/Models.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ date, description, label, name
223223

224224
# **CVEResponseBase**
225225
## Required:
226-
id, name, title, affected_components, crowdsec_score, nb_ips, published_date, has_public_exploit
226+
id, name, title, affected_components, crowdsec_score, nb_ips, published_date, has_public_exploit, exploitation_phase
227227
## Properties
228228
| Property | Type | Description | Example |
229229
|----------|------|-------------|---------|
@@ -241,6 +241,7 @@ id, name, title, affected_components, crowdsec_score, nb_ips, published_date, ha
241241
| cvss_score | Optional[float] | CVSS score of the CVE ||
242242
| has_public_exploit | bool | Indicates if there is a public exploit for the CVE ||
243243
| rule_release_date | Optional[str] | Release date of the associated detection rule ||
244+
| exploitation_phase | ExploitationPhase | None ||
244245

245246
# **CVEsubscription**
246247
## Required:
@@ -281,6 +282,16 @@ name, label, description
281282
## Enum:
282283
ORG, TAG, ENGINE, FIREWALL_INTEGRATION, REMEDIATION_COMPONENT_INTEGRATION, REMEDIATION_COMPONENT, LOG_PROCESSOR
283284

285+
# **ExploitationPhase**
286+
## Required:
287+
name, label, description
288+
## Properties
289+
| Property | Type | Description | Example |
290+
|----------|------|-------------|---------|
291+
| name | str | Name of the exploitation phase ||
292+
| label | str | Label of the exploitation phase ||
293+
| description | str | Description of the exploitation phase ||
294+
284295
# **GetCVEIPsResponsePage**
285296
## Required:
286297
items, total, page, size, pages, links
@@ -296,7 +307,7 @@ items, total, page, size, pages, links
296307

297308
# **GetCVEResponse**
298309
## Required:
299-
id, name, title, affected_components, crowdsec_score, nb_ips, published_date, has_public_exploit, references, description, crowdsec_analysis, cwes
310+
id, name, title, affected_components, crowdsec_score, nb_ips, published_date, has_public_exploit, exploitation_phase, references, description, crowdsec_analysis, cwes
300311
## Properties
301312
| Property | Type | Description | Example |
302313
|----------|------|-------------|---------|
@@ -314,6 +325,7 @@ id, name, title, affected_components, crowdsec_score, nb_ips, published_date, ha
314325
| cvss_score | Optional[float] | CVSS score of the CVE ||
315326
| has_public_exploit | bool | Indicates if there is a public exploit for the CVE ||
316327
| rule_release_date | Optional[str] | Release date of the associated detection rule ||
328+
| exploitation_phase | ExploitationPhase | None ||
317329
| references | list[str] | List of references for the CVE ||
318330
| description | str | Description of the CVE ||
319331
| crowdsec_analysis | Optional[str] | CrowdSec analysis of the CVE ||

doc/README.md

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

7272
[EntityType](./Models.md#entitytype)
7373

74+
[ExploitationPhase](./Models.md#exploitationphase)
75+
7476
[GetCVEIPsResponsePage](./Models.md#getcveipsresponsepage)
7577

7678
[GetCVEResponse](./Models.md#getcveresponse)

let-openapi.json

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

0 commit comments

Comments
 (0)