You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crowdsec_tracker_api/models.py
+96-77Lines changed: 96 additions & 77 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# generated by datamodel-codegen:
2
2
# filename: <stdin>
3
-
# timestamp: 2026-01-29T17:02:55+00:00
3
+
# timestamp: 2026-02-06T10:14:41+00:00
4
4
5
5
from __future__ importannotations
6
6
@@ -144,73 +144,6 @@ class CvssScore(RootModelSdk[float]):
144
144
]
145
145
146
146
147
-
classCVEResponseBase(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
-
214
147
classCVEsubscription(BaseModelSdk):
215
148
id: Annotated[str, Field(title='Id')]
216
149
@@ -252,6 +185,19 @@ class EntityType(StrEnum):
252
185
LOG_PROCESSOR='log_processor'
253
186
254
187
188
+
classExploitationPhase(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
+
255
201
classGetCVEResponse(BaseModelSdk):
256
202
id: Annotated[str, Field(description='ID of the CVE', title='Id')]
257
203
name: Annotated[str, Field(description='Name of the CVE', title='Name')]
@@ -317,6 +263,9 @@ class GetCVEResponse(BaseModelSdk):
317
263
title='Rule Release Date',
318
264
),
319
265
] =None
266
+
exploitation_phase: Annotated[
267
+
ExploitationPhase, Field(description='Current exploitation phase of the CVE')
268
+
]
320
269
references: Annotated[
321
270
List[str],
322
271
Field(description='List of references for the CVE', title='References'),
@@ -342,15 +291,6 @@ class GetCVEsFilterBy(StrEnum):
@@ -923,6 +863,76 @@ class IntegrationUpdateResponse(BaseModelSdk):
923
863
] =None
924
864
925
865
866
+
classCVEResponseBase(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')
0 commit comments