diff --git a/crowdsec_tracker_api/__pycache__/base_model.cpython-311.pyc b/crowdsec_tracker_api/__pycache__/base_model.cpython-311.pyc index e9ad5ff..54f0963 100644 Binary files a/crowdsec_tracker_api/__pycache__/base_model.cpython-311.pyc and b/crowdsec_tracker_api/__pycache__/base_model.cpython-311.pyc differ diff --git a/crowdsec_tracker_api/__pycache__/http_client.cpython-311.pyc b/crowdsec_tracker_api/__pycache__/http_client.cpython-311.pyc index 4f2d36b..bb8710f 100644 Binary files a/crowdsec_tracker_api/__pycache__/http_client.cpython-311.pyc and b/crowdsec_tracker_api/__pycache__/http_client.cpython-311.pyc differ diff --git a/crowdsec_tracker_api/models.py b/crowdsec_tracker_api/models.py index 19def06..bf60531 100644 --- a/crowdsec_tracker_api/models.py +++ b/crowdsec_tracker_api/models.py @@ -1,12 +1,12 @@ # generated by datamodel-codegen: # filename: -# timestamp: 2025-12-17T10:47:38+00:00 +# timestamp: 2025-12-23T14:01:52+00:00 from __future__ import annotations from datetime import datetime from enum import StrEnum -from typing import Annotated, Dict, List, Optional, Union +from typing import Annotated from pydantic import AnyUrl, ConfigDict, Field, RootModel @@ -32,7 +32,7 @@ class BasicAuthCredentials(BaseModelSdk): class BlocklistSubscription(BaseModelSdk): id: Annotated[str, Field(title='Id')] - remediation: Annotated[Optional[str], Field(title='Remediation')] = None + remediation: Annotated[str | None, Field(title='Remediation')] = None class CVESubscription(BaseModelSdk): @@ -46,19 +46,19 @@ class IntegrationType(StrEnum): class Links(BaseModelSdk): first: Annotated[ - Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='First') + str | None, Field(examples=['/api/v1/users?limit=1&offset1'], title='First') ] = None last: Annotated[ - Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Last') + str | None, Field(examples=['/api/v1/users?limit=1&offset1'], title='Last') ] = None self: Annotated[ - Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Self') + str | None, Field(examples=['/api/v1/users?limit=1&offset1'], title='Self') ] = None next: Annotated[ - Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Next') + str | None, Field(examples=['/api/v1/users?limit=1&offset1'], title='Next') ] = None prev: Annotated[ - Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Prev') + str | None, Field(examples=['/api/v1/users?limit=1&offset1'], title='Prev') ] = None @@ -88,18 +88,18 @@ class Stats(BaseModelSdk): class ValidationError(BaseModelSdk): - loc: Annotated[List[Union[str, int]], Field(title='Location')] + loc: Annotated[list[str | int], Field(title='Location')] msg: Annotated[str, Field(title='Message')] type: Annotated[str, Field(title='Error Type')] class AffectedComponent(BaseModelSdk): vendor: Annotated[ - Optional[str], + str | None, Field(description='Vendor of the affected component', title='Vendor'), ] = None product: Annotated[ - Optional[str], + str | None, Field(description='Product name of the affected component', title='Product'), ] = None @@ -115,7 +115,7 @@ class AttackDetail(BaseModelSdk): str, Field(description='Attack detail description', title='Description') ] references: Annotated[ - Optional[List[str]], + list[str] | None, Field(description='Attack detail references', title='References'), ] = None @@ -149,7 +149,7 @@ class CVEResponseBase(BaseModelSdk): name: Annotated[str, Field(description='Name of the CVE', title='Name')] title: Annotated[str, Field(description='Title of the CVE', title='Title')] affected_components: Annotated[ - List[AffectedComponent], + list[AffectedComponent], Field(description='List of affected components', title='Affected Components'), ] crowdsec_score: Annotated[ @@ -162,10 +162,10 @@ class CVEResponseBase(BaseModelSdk): ), ] first_seen: Annotated[ - Optional[datetime], Field(description='First seen date', title='First Seen') + datetime | None, Field(description='First seen date', title='First Seen') ] = None last_seen: Annotated[ - Optional[datetime], Field(description='Last seen date', title='Last Seen') + datetime | None, Field(description='Last seen date', title='Last Seen') ] = None nb_ips: Annotated[ int, Field(description='Number of unique IPs affected', ge=0, title='Nb Ips') @@ -174,8 +174,7 @@ class CVEResponseBase(BaseModelSdk): datetime, Field(description='Published date of the CVE', title='Published Date') ] cvss_score: Annotated[ - Optional[CvssScore], - Field(description='CVSS score of the CVE', title='Cvss Score'), + CvssScore | None, Field(description='CVSS score of the CVE', title='Cvss Score') ] = None has_public_exploit: Annotated[ bool, @@ -185,7 +184,7 @@ class CVEResponseBase(BaseModelSdk): ), ] rule_release_date: Annotated[ - Optional[datetime], + datetime | None, Field( description='Release date of the associated detection rule', title='Rule Release Date', @@ -215,11 +214,11 @@ class Classification(BaseModelSdk): class Classifications(BaseModelSdk): false_positives: Annotated[ - Optional[List[Classification]], + list[Classification] | None, Field(description='False positive classifications', title='False Positives'), ] = None classifications: Annotated[ - Optional[List[Classification]], + list[Classification] | None, Field(description='Main classifications', title='Classifications'), ] = None @@ -239,7 +238,7 @@ class GetCVEResponse(BaseModelSdk): name: Annotated[str, Field(description='Name of the CVE', title='Name')] title: Annotated[str, Field(description='Title of the CVE', title='Title')] affected_components: Annotated[ - List[AffectedComponent], + list[AffectedComponent], Field(description='List of affected components', title='Affected Components'), ] crowdsec_score: Annotated[ @@ -252,10 +251,10 @@ class GetCVEResponse(BaseModelSdk): ), ] first_seen: Annotated[ - Optional[datetime], Field(description='First seen date', title='First Seen') + datetime | None, Field(description='First seen date', title='First Seen') ] = None last_seen: Annotated[ - Optional[datetime], Field(description='Last seen date', title='Last Seen') + datetime | None, Field(description='Last seen date', title='Last Seen') ] = None nb_ips: Annotated[ int, Field(description='Number of unique IPs affected', ge=0, title='Nb Ips') @@ -264,8 +263,7 @@ class GetCVEResponse(BaseModelSdk): datetime, Field(description='Published date of the CVE', title='Published Date') ] cvss_score: Annotated[ - Optional[CvssScore], - Field(description='CVSS score of the CVE', title='Cvss Score'), + CvssScore | None, Field(description='CVSS score of the CVE', title='Cvss Score') ] = None has_public_exploit: Annotated[ bool, @@ -275,35 +273,35 @@ class GetCVEResponse(BaseModelSdk): ), ] rule_release_date: Annotated[ - Optional[datetime], + datetime | None, Field( description='Release date of the associated detection rule', title='Rule Release Date', ), ] = None references: Annotated[ - List[str], + list[str], Field(description='List of references for the CVE', title='References'), ] description: Annotated[ str, Field(description='Description of the CVE', title='Description') ] crowdsec_analysis: Annotated[ - Optional[str], + str | None, Field(description='CrowdSec analysis of the CVE', title='Crowdsec Analysis'), - ] = None + ] cwes: Annotated[ - List[CWE], + list[CWE], Field(description='List of CWEs associated with the CVE', title='Cwes'), ] events: Annotated[ - Optional[List[CVEEvent]], + list[CVEEvent] | None, Field(description='List of events related to the CVE', title='Events'), ] = None class GetCVEsResponsePage(BaseModelSdk): - items: Annotated[List[CVEResponseBase], Field(title='Items')] + items: Annotated[list[CVEResponseBase], Field(title='Items')] total: Annotated[int, Field(ge=0, title='Total')] page: Annotated[int, Field(ge=1, title='Page')] size: Annotated[int, Field(ge=1, title='Size')] @@ -335,37 +333,41 @@ class History(BaseModelSdk): class IntegrationResponse(BaseModelSdk): - tags: Annotated[Optional[List[str]], Field(title='Tags')] = [] + tags: Annotated[list[str] | None, Field(title='Tags')] = [] organization_id: Annotated[str, Field(title='Organization Id')] created_at: Annotated[ - Optional[datetime], + datetime | None, Field(description='Time the integration was created', title='Created At'), ] = None entity_type: Annotated[EntityType, Field(description='Type of the integration')] id: Annotated[ - Optional[str], Field(description='ID of the integration', title='Id') + str | None, Field(description='ID of the integration', title='Id') ] = None blocklists: Annotated[ - Optional[List[BlocklistSubscription]], Field(title='Blocklists') - ] = [] + list[BlocklistSubscription] | None, + Field(default_factory=list, title='Blocklists'), + ] allowlists: Annotated[ - Optional[List[AllowlistSubscription]], Field(title='Allowlists') - ] = [] - cves: Annotated[Optional[List[CVEsubscription]], Field(title='Cves')] = [] + list[AllowlistSubscription] | None, + Field(default_factory=list, title='Allowlists'), + ] + cves: Annotated[ + list[CVEsubscription] | None, Field(default_factory=list, title='Cves') + ] name: Annotated[str, Field(description='Name of the integration', title='Name')] updated_at: Annotated[ - Optional[datetime], + datetime | None, Field(description='Last time the integration was updated', title='Updated At'), ] = None description: Annotated[ - Optional[str], + str | None, Field(description='Description of the integration', title='Description'), ] = None output_format: Annotated[ OutputFormat, Field(description='Output format of the integration') ] last_pull: Annotated[ - Optional[datetime], + datetime | None, Field( description='Last time the integration pulled blocklists', title='Last Pull' ), @@ -374,14 +376,14 @@ class IntegrationResponse(BaseModelSdk): class Location(BaseModelSdk): country: Annotated[ - Optional[str], Field(description='Country code', title='Country') + str | None, Field(description='Country code', title='Country') ] = None - city: Annotated[Optional[str], Field(description='City name', title='City')] = None + city: Annotated[str | None, Field(description='City name', title='City')] = None latitude: Annotated[ - Optional[float], Field(description='Latitude coordinate', title='Latitude') + float | None, Field(description='Latitude coordinate', title='Latitude') ] = None longitude: Annotated[ - Optional[float], Field(description='Longitude coordinate', title='Longitude') + float | None, Field(description='Longitude coordinate', title='Longitude') ] = None @@ -429,7 +431,7 @@ class SubscribeCVEIntegrationRequest(BaseModelSdk): class IntegrationsGetIntegrationsQueryParameters(BaseModelSdk): tag: Annotated[ - Optional[List[str]], + list[str] | None, Field( description='List of tags associated with the integrations (any of)', title='Tag', @@ -468,10 +470,10 @@ class PageSize(RootModelSdk[int]): class IntegrationsGetIntegrationContentQueryParameters(BaseModelSdk): page: Annotated[ - Optional[int], Field(description='Page number to return', ge=1, title='Page') + int | None, Field(description='Page number to return', ge=1, title='Page') ] = 1 page_size: Annotated[ - Optional[PageSize], + PageSize | None, Field( description='Maximum number of items to return, 0 means no limit (default), should be greater than 10000', title='Page Size', @@ -487,7 +489,7 @@ class IntegrationsGetIntegrationContentPathParameters(BaseModelSdk): class IntegrationsGetIntegrationContentStreamQueryParameters(BaseModelSdk): startup: Annotated[ - Optional[bool], + bool | None, Field( description="Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull.", title='Startup', @@ -503,20 +505,20 @@ class IntegrationsGetIntegrationContentStreamPathParameters(BaseModelSdk): class CvesGetCvesQueryParameters(BaseModelSdk): query: Annotated[ - Optional[str], Field(description='Search query for CVEs', title='Query') + str | None, Field(description='Search query for CVEs', title='Query') ] = None sort_by: Annotated[ - Optional[GetCVEsSortBy], Field(description='Field to sort by', title='Sort By') + GetCVEsSortBy | None, Field(description='Field to sort by', title='Sort By') ] = 'rule_release_date' sort_order: Annotated[ - Optional[GetCVEsSortOrder], + GetCVEsSortOrder | None, Field(description='Sort order: ascending or descending', title='Sort Order'), ] = 'desc' page: Annotated[ - Optional[int], Field(description='Page number', ge=1, title='Page') + int | None, Field(description='Page number', ge=1, title='Page') ] = 1 size: Annotated[ - Optional[int], Field(description='Page size', ge=1, le=100, title='Size') + int | None, Field(description='Page size', ge=1, le=100, title='Size') ] = 50 @@ -541,17 +543,18 @@ class Since(RootModelSdk[str]): class CvesGetCveIpsDetailsQueryParameters(BaseModelSdk): since: Annotated[ - Optional[Since], + Since | None, Field( + default_factory=lambda: Since('14d'), description='Filter IPs seen since this date, format duration (e.g., 7d, 24h), default to 14d', title='Since', ), - ] = Since('14d') + ] page: Annotated[ - Optional[int], Field(description='Page number', ge=1, title='Page') + int | None, Field(description='Page number', ge=1, title='Page') ] = 1 size: Annotated[ - Optional[int], Field(description='Page size', ge=1, le=100, title='Size') + int | None, Field(description='Page size', ge=1, le=100, title='Size') ] = 50 @@ -565,10 +568,10 @@ class CvesSubscribeIntegrationToCvePathParameters(BaseModelSdk): class CvesGetCveSubscribedIntegrationsQueryParameters(BaseModelSdk): page: Annotated[ - Optional[int], Field(description='Page number', ge=1, title='Page') + int | None, Field(description='Page number', ge=1, title='Page') ] = 1 size: Annotated[ - Optional[int], Field(description='Page size', ge=1, le=100, title='Size') + int | None, Field(description='Page size', ge=1, le=100, title='Size') ] = 50 @@ -582,7 +585,7 @@ class CvesUnsubscribeIntegrationFromCvePathParameters(BaseModelSdk): class HTTPValidationError(BaseModelSdk): - detail: Annotated[Optional[List[ValidationError]], Field(title='Detail')] = None + detail: Annotated[list[ValidationError] | None, Field(title='Detail')] = None class IntegrationCreateRequest(BaseModelSdk): @@ -593,7 +596,7 @@ class IntegrationCreateRequest(BaseModelSdk): str, Field(description='Name of the integration', min_length=1, title='Name') ] description: Annotated[ - Optional[str], + str | None, Field( description='Description of the integration', min_length=1, @@ -621,7 +624,7 @@ class IntegrationCreateResponse(BaseModelSdk): str, Field(description='ID of the owner organization', title='Organization Id') ] description: Annotated[ - Optional[str], + str | None, Field(description='Description of the integration', title='Description'), ] = None created_at: Annotated[ @@ -639,20 +642,20 @@ class IntegrationCreateResponse(BaseModelSdk): OutputFormat, Field(description='Output format of the integration') ] last_pull: Annotated[ - Optional[datetime], + datetime | None, Field( description='Last time the integration pulled blocklists', title='Last Pull' ), ] = None blocklists: Annotated[ - List[BlocklistSubscription], + list[BlocklistSubscription], Field( description='Blocklists that are subscribed by the integration', title='Blocklists', ), ] cves: Annotated[ - List[CVESubscription], + list[CVESubscription], Field(description='CVEs that are subscribed by the integration', title='Cves'), ] endpoint: Annotated[ @@ -663,18 +666,18 @@ class IntegrationCreateResponse(BaseModelSdk): ), ] stats: Annotated[ - Optional[Stats], + Stats | None, Field( default_factory=lambda: Stats.model_validate({'count': 0}), description='Stats of the integration', ), ] tags: Annotated[ - Optional[List[str]], + list[str] | None, Field(description='Tags associated with the integration', title='Tags'), ] = [] credentials: Annotated[ - Union[ApiKeyCredentials, BasicAuthCredentials], + ApiKeyCredentials | BasicAuthCredentials, Field( description='Credentials that were generated for the integration', title='Credentials', @@ -695,7 +698,7 @@ class IntegrationGetResponse(BaseModelSdk): str, Field(description='ID of the owner organization', title='Organization Id') ] description: Annotated[ - Optional[str], + str | None, Field(description='Description of the integration', title='Description'), ] = None created_at: Annotated[ @@ -713,20 +716,20 @@ class IntegrationGetResponse(BaseModelSdk): OutputFormat, Field(description='Output format of the integration') ] last_pull: Annotated[ - Optional[datetime], + datetime | None, Field( description='Last time the integration pulled blocklists', title='Last Pull' ), ] = None blocklists: Annotated[ - List[BlocklistSubscription], + list[BlocklistSubscription], Field( description='Blocklists that are subscribed by the integration', title='Blocklists', ), ] cves: Annotated[ - List[CVESubscription], + list[CVESubscription], Field(description='CVEs that are subscribed by the integration', title='Cves'), ] endpoint: Annotated[ @@ -737,20 +740,20 @@ class IntegrationGetResponse(BaseModelSdk): ), ] stats: Annotated[ - Optional[Stats], + Stats | None, Field( default_factory=lambda: Stats.model_validate({'count': 0}), description='Stats of the integration', ), ] tags: Annotated[ - Optional[List[str]], + list[str] | None, Field(description='Tags associated with the integration', title='Tags'), ] = [] class IntegrationGetResponsePage(BaseModelSdk): - items: Annotated[List[IntegrationGetResponse], Field(title='Items')] + items: Annotated[list[IntegrationGetResponse], Field(title='Items')] total: Annotated[int, Field(ge=0, title='Total')] page: Annotated[int, Field(ge=1, title='Page')] size: Annotated[int, Field(ge=1, title='Size')] @@ -763,17 +766,17 @@ class IntegrationUpdateRequest(BaseModelSdk): extra='forbid', ) name: Annotated[ - Optional[str], Field(description='New name', min_length=1, title='Name') + str | None, Field(description='New name', min_length=1, title='Name') ] = None description: Annotated[ - Optional[str], + str | None, Field(description='New description', min_length=1, title='Description'), ] = None output_format: Annotated[ - Optional[OutputFormat], Field(description='New output format') + OutputFormat | None, Field(description='New output format') ] = None regenerate_credentials: Annotated[ - Optional[bool], + bool | None, Field( description='Regenerate credentials for the integration', title='Regenerate Credentials', @@ -794,7 +797,7 @@ class IntegrationUpdateResponse(BaseModelSdk): str, Field(description='ID of the owner organization', title='Organization Id') ] description: Annotated[ - Optional[str], + str | None, Field(description='Description of the integration', title='Description'), ] = None created_at: Annotated[ @@ -812,20 +815,20 @@ class IntegrationUpdateResponse(BaseModelSdk): OutputFormat, Field(description='Output format of the integration') ] last_pull: Annotated[ - Optional[datetime], + datetime | None, Field( description='Last time the integration pulled blocklists', title='Last Pull' ), ] = None blocklists: Annotated[ - List[BlocklistSubscription], + list[BlocklistSubscription], Field( description='Blocklists that are subscribed by the integration', title='Blocklists', ), ] cves: Annotated[ - List[CVESubscription], + list[CVESubscription], Field(description='CVEs that are subscribed by the integration', title='Cves'), ] endpoint: Annotated[ @@ -836,24 +839,24 @@ class IntegrationUpdateResponse(BaseModelSdk): ), ] stats: Annotated[ - Optional[Stats], + Stats | None, Field( default_factory=lambda: Stats.model_validate({'count': 0}), description='Stats of the integration', ), ] tags: Annotated[ - Optional[List[str]], + list[str] | None, Field(description='Tags associated with the integration', title='Tags'), ] = [] credentials: Annotated[ - Optional[Union[ApiKeyCredentials, BasicAuthCredentials]], + ApiKeyCredentials | BasicAuthCredentials | None, Field(description='Credentials for the integration', title='Credentials'), ] = None class GetCVESubscribedIntegrationsResponsePage(BaseModelSdk): - items: Annotated[List[IntegrationResponse], Field(title='Items')] + items: Annotated[list[IntegrationResponse], Field(title='Items')] total: Annotated[int, Field(ge=0, title='Total')] page: Annotated[int, Field(ge=1, title='Page')] size: Annotated[int, Field(ge=1, title='Size')] @@ -864,80 +867,74 @@ class GetCVESubscribedIntegrationsResponsePage(BaseModelSdk): class IPItem(BaseModelSdk): ip: Annotated[str, Field(description='IP address', title='Ip')] reputation: Annotated[ - Optional[str], Field(description='Reputation of the IP', title='Reputation') - ] = None - ip_range: Annotated[ - Optional[str], Field(description='IP range', title='Ip Range') + str | None, Field(description='Reputation of the IP', title='Reputation') ] = None + ip_range: Annotated[str | None, Field(description='IP range', title='Ip Range')] = ( + None + ) ip_range_score: Annotated[ - Optional[int], Field(description='IP range score', title='Ip Range Score') + int | None, Field(description='IP range score', title='Ip Range Score') ] = None ip_range_24: Annotated[ - Optional[str], Field(description='IP range /24', title='Ip Range 24') + str | None, Field(description='IP range /24', title='Ip Range 24') ] = None ip_range_24_reputation: Annotated[ - Optional[str], + str | None, Field(description='IP range /24 reputation', title='Ip Range 24 Reputation'), ] = None ip_range_24_score: Annotated[ - Optional[int], - Field(description='IP range /24 score', title='Ip Range 24 Score'), + int | None, Field(description='IP range /24 score', title='Ip Range 24 Score') ] = None - as_name: Annotated[Optional[str], Field(description='AS name', title='As Name')] = ( - None - ) - as_num: Annotated[Optional[int], Field(description='AS number', title='As Num')] = ( - None - ) + as_name: Annotated[str | None, Field(description='AS name', title='As Name')] = None + as_num: Annotated[int | None, Field(description='AS number', title='As Num')] = None background_noise_score: Annotated[ - Optional[int], + int | None, Field(description='Background noise score', title='Background Noise Score'), ] = None background_noise: Annotated[ - Optional[str], + str | None, Field(description='Background noise level', title='Background Noise'), ] = None confidence: Annotated[ - Optional[str], Field(description='Confidence level', title='Confidence') + str | None, Field(description='Confidence level', title='Confidence') ] = None location: Annotated[ - Optional[Location], Field(description='IP location information') + Location | None, Field(description='IP location information') ] = None reverse_dns: Annotated[ - Optional[str], Field(description='Reverse DNS', title='Reverse Dns') + str | None, Field(description='Reverse DNS', title='Reverse Dns') ] = None behaviors: Annotated[ - Optional[List[Behavior]], - Field(description='List of behaviors', title='Behaviors'), + list[Behavior] | None, Field(description='List of behaviors', title='Behaviors') ] = None references: Annotated[ - Optional[List[Reference]], + list[Reference] | None, Field(description='List of references', title='References'), ] = None - history: Annotated[Optional[History], Field(description='Historical data')] = None + history: Annotated[History | None, Field(description='Historical data')] = None classifications: Annotated[ - Optional[Classifications], Field(description='Classification data') + Classifications | None, Field(description='Classification data') ] = None mitre_techniques: Annotated[ - Optional[List[MitreTechnique]], + list[MitreTechnique] | None, Field(description='MITRE techniques', title='Mitre Techniques'), ] = None cves: Annotated[ - Optional[List[str]], Field(description='List of CVEs', title='Cves') + list[str] | None, Field(description='List of CVEs', title='Cves') ] = None attack_details: Annotated[ - Optional[List[AttackDetail]], + list[AttackDetail] | None, Field(description='Attack details', title='Attack Details'), ] = None target_countries: Annotated[ - Optional[Dict[str, int]], + dict[str, int] | None, Field(description='Target countries', title='Target Countries'), ] = None - scores: Annotated[Optional[Scores], Field(description='Scoring information')] = None + scores: Annotated[Scores | None, Field(description='Scoring information')] = None class GetCVEIPsResponsePage(BaseModelSdk): - items: Annotated[List[IPItem], Field(title='Items')] + items: Annotated[list[IPItem], Field(title='Items')] total: Annotated[int, Field(ge=0, title='Total')] page: Annotated[int, Field(ge=1, title='Page')] size: Annotated[int, Field(ge=1, title='Size')] diff --git a/crowdsec_tracker_api/services/__pycache__/__init__.cpython-311.pyc b/crowdsec_tracker_api/services/__pycache__/__init__.cpython-311.pyc index 06673ef..1fcaac6 100644 Binary files a/crowdsec_tracker_api/services/__pycache__/__init__.cpython-311.pyc and b/crowdsec_tracker_api/services/__pycache__/__init__.cpython-311.pyc differ diff --git a/let-openapi.json b/let-openapi.json index 41dc5ee..3a08e62 100644 --- a/let-openapi.json +++ b/let-openapi.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "LET API", "description": "This is the API to manage Crowdsec Live Exploit Tracker service", "contact": {"name": "CrowdSec", "url": "https://crowdsec.net/", "email": "info@crowdsec.net"}, "version": "1.92.0"}, "paths": {"/integrations": {"post": {"tags": ["Integrations"], "summary": "Create Integration", "description": "Create an integration to a firewall or remediation component, owned by your organization. The name should be unique within the organization. This operation is submitted to quotas.", "operationId": "createIntegration", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integrations", "description": "Get integrations owned by your organization", "operationId": "getIntegrations", "parameters": [{"name": "tag", "in": "query", "required": false, "schema": {"anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], "description": "List of tags associated with the integrations (any of)", "title": "Tag"}, "description": "List of tags associated with the integrations (any of)"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationGetResponsePage"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}": {"get": {"tags": ["Integrations"], "summary": "Get Integration", "description": "Get an integration by ID", "operationId": "getIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationGetResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Integrations"], "summary": "Update Integration", "description": "Update the integration details", "operationId": "updateIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Integrations"], "summary": "Delete Integration", "description": "Delete the integration by ID", "operationId": "deleteIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/content": {"head": {"tags": ["Integrations"], "summary": "Head Integration Content", "description": "Check if the integration has content", "operationId": "headIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integration Content", "description": "Get the ips associated to the integration in plain text format. The content can be paginated to accomodate limits in firewalls.", "operationId": "getIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number to return", "default": 1, "title": "Page"}, "description": "Page number to return"}, {"name": "page_size", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer", "minimum": 10000}, {"type": "null"}], "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000", "title": "Page Size"}, "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/v1/decisions/stream": {"get": {"tags": ["Integrations"], "summary": "Get Integration Content Stream", "description": "Get the ips associated to the integration in a format compatible with a remediation component. As for the remediation components, you can fetch the full content with startup=true or only the changes since the last pull", "operationId": "getIntegrationContentStream", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "startup", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull.", "default": false, "title": "Startup"}, "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull."}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/": {"get": {"tags": ["Cves"], "summary": "Get list of CVEs CrowdSec is tracking", "description": "Get a paginated list of CVEs that CrowdSec is tracking", "operationId": "getCves", "parameters": [{"name": "query", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Search query for CVEs", "title": "Query"}, "description": "Search query for CVEs"}, {"name": "sort_by", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/GetCVEsSortBy"}, {"type": "null"}], "description": "Field to sort by", "default": "rule_release_date", "title": "Sort By"}, "description": "Field to sort by"}, {"name": "sort_order", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/GetCVEsSortOrder"}, {"type": "null"}], "description": "Sort order: ascending or descending", "default": "desc", "title": "Sort Order"}, "description": "Sort order: ascending or descending"}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVEsResponsePage"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}": {"get": {"tags": ["Cves"], "summary": "Get CVE ID informations", "description": "Get information about a specific CVE ID", "operationId": "getCve", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVEResponse"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/ips-download": {"get": {"tags": ["Cves"], "summary": "Download IPs exploiting a CVE ID (raw)", "description": "Download the list of IPs exploiting a specific CVE ID in raw format", "operationId": "downloadCveIps", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"text/plain": {"schema": {"type": "string"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/ips-details": {"get": {"tags": ["Cves"], "summary": "Get IPs details exploiting a CVE ID", "description": "Get detailed information about IPs exploiting a specific CVE ID", "operationId": "getCveIpsDetails", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}, {"name": "since", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "pattern": "^\\d+[hd]$"}, {"type": "null"}], "description": "Filter IPs seen since this date, format duration (e.g., 7d, 24h), default to 14d", "default": "14d", "title": "Since"}, "description": "Filter IPs seen since this date, format duration (e.g., 7d, 24h), default to 14d"}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVEIPsResponsePage"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/integrations": {"post": {"tags": ["Cves"], "summary": "Subscribe an integration to a CVE ID", "description": "Subscribe an integration to receive threats related to a specific CVE ID", "operationId": "subscribeIntegrationToCve", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscribeCVEIntegrationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration Not Found"}, "400": {"description": "CVE Already Subscribed"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Cves"], "summary": "Get subscribed integrations for a CVE ID", "description": "Get the list of integrations subscribed to a specific CVE ID", "operationId": "getCveSubscribedIntegrations", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVESubscribedIntegrationsResponsePage"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/integrations/{integration_name}": {"delete": {"tags": ["Cves"], "summary": "Unsubscribe an integration from a CVE ID", "description": "Unsubscribe an integration from receiving threats related to a specific CVE ID", "operationId": "unsubscribeIntegrationFromCve", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}, {"name": "integration_name", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration Not Found"}, "400": {"description": "CVE Already Unsubscribed"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"ApiKeyCredentials": {"properties": {"api_key": {"type": "string", "title": "Api Key", "description": "API key for the integration"}}, "type": "object", "required": ["api_key"], "title": "ApiKeyCredentials"}, "BasicAuthCredentials": {"properties": {"username": {"type": "string", "title": "Username", "description": "Basic auth username for the integration"}, "password": {"type": "string", "title": "Password", "description": "Basic auth password for the integration"}}, "type": "object", "required": ["username", "password"], "title": "BasicAuthCredentials"}, "BlocklistSubscription": {"properties": {"id": {"type": "string", "title": "Id"}, "remediation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Remediation"}}, "type": "object", "required": ["id"], "title": "BlocklistSubscription"}, "CVESubscription": {"properties": {"id": {"type": "string", "title": "Id", "description": "CVE ID"}}, "type": "object", "required": ["id"], "title": "CVESubscription"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IntegrationCreateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "Name of the integration"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "Description of the integration"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}}, "additionalProperties": false, "type": "object", "required": ["name", "entity_type", "output_format"], "title": "IntegrationCreateRequest"}, "IntegrationCreateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "cves": {"items": {"$ref": "#/components/schemas/CVESubscription"}, "type": "array", "title": "Cves", "description": "CVEs that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"$ref": "#/components/schemas/Stats", "description": "Stats of the integration", "default": {"count": 0}}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Tags associated with the integration", "default": []}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}], "title": "Credentials", "description": "Credentials that were generated for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "cves", "endpoint", "credentials"], "title": "IntegrationCreateResponse"}, "IntegrationGetResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "cves": {"items": {"$ref": "#/components/schemas/CVESubscription"}, "type": "array", "title": "Cves", "description": "CVEs that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"$ref": "#/components/schemas/Stats", "description": "Stats of the integration", "default": {"count": 0}}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Tags associated with the integration", "default": []}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "cves", "endpoint"], "title": "IntegrationGetResponse"}, "IntegrationGetResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IntegrationGetResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "IntegrationGetResponsePage"}, "IntegrationType": {"type": "string", "enum": ["firewall_integration", "remediation_component_integration"], "title": "IntegrationType"}, "IntegrationUpdateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "New name"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "New description"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "New output format"}, "regenerate_credentials": {"type": "boolean", "title": "Regenerate Credentials", "description": "Regenerate credentials for the integration"}}, "additionalProperties": false, "type": "object", "title": "IntegrationUpdateRequest"}, "IntegrationUpdateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "cves": {"items": {"$ref": "#/components/schemas/CVESubscription"}, "type": "array", "title": "Cves", "description": "CVEs that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"$ref": "#/components/schemas/Stats", "description": "Stats of the integration", "default": {"count": 0}}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Tags associated with the integration", "default": []}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}, {"type": "null"}], "title": "Credentials", "description": "Credentials for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "cves", "endpoint"], "title": "IntegrationUpdateResponse"}, "Links": {"properties": {"first": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First", "examples": ["/api/v1/users?limit=1&offset1"]}, "last": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last", "examples": ["/api/v1/users?limit=1&offset1"]}, "self": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Self", "examples": ["/api/v1/users?limit=1&offset1"]}, "next": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next", "examples": ["/api/v1/users?limit=1&offset1"]}, "prev": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prev", "examples": ["/api/v1/users?limit=1&offset1"]}}, "type": "object", "title": "Links"}, "OutputFormat": {"type": "string", "enum": ["plain_text", "f5", "remediation_component", "fortigate", "paloalto", "checkpoint", "cisco", "juniper", "mikrotik", "pfsense", "opnsense", "sophos"], "title": "OutputFormat"}, "Stats": {"properties": {"count": {"type": "integer", "title": "Count", "description": "Number of total blocklists items the integration will pull"}}, "type": "object", "required": ["count"], "title": "Stats"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "AffectedComponent": {"properties": {"vendor": {"type": "string", "title": "Vendor", "description": "Vendor of the affected component"}, "product": {"type": "string", "title": "Product", "description": "Product name of the affected component"}}, "type": "object", "title": "AffectedComponent", "description": "Affected Component in a CVE"}, "AllowlistSubscription": {"properties": {"id": {"type": "string", "title": "Id"}}, "type": "object", "required": ["id"], "title": "AllowlistSubscription"}, "AttackDetail": {"properties": {"name": {"type": "string", "title": "Name", "description": "Attack detail name"}, "label": {"type": "string", "title": "Label", "description": "Attack detail label"}, "description": {"type": "string", "title": "Description", "description": "Attack detail description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Attack detail references"}}, "type": "object", "required": ["name", "label", "description"], "title": "AttackDetail"}, "Behavior": {"properties": {"name": {"type": "string", "title": "Name", "description": "Behavior name"}, "label": {"type": "string", "title": "Label", "description": "Behavior label"}, "description": {"type": "string", "title": "Description", "description": "Behavior description"}}, "type": "object", "required": ["name", "label", "description"], "title": "Behavior"}, "CVEEvent": {"properties": {"date": {"type": "string", "format": "date-time", "title": "Date", "description": "Date of the event"}, "description": {"type": "string", "title": "Description", "description": "Description of the event"}, "label": {"type": "string", "title": "Label", "description": "Label of the event"}, "name": {"type": "string", "title": "Name", "description": "Name of the event"}}, "type": "object", "required": ["date", "description", "label", "name"], "title": "CVEEvent", "description": "CVE Event Information"}, "CVEResponseBase": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the CVE"}, "name": {"type": "string", "title": "Name", "description": "Name of the CVE"}, "title": {"type": "string", "title": "Title", "description": "Title of the CVE"}, "affected_components": {"items": {"$ref": "#/components/schemas/AffectedComponent"}, "type": "array", "title": "Affected Components", "description": "List of affected components"}, "crowdsec_score": {"type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Crowdsec Score", "description": "Live Exploit Tracker score of the CVE"}, "first_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "First Seen", "description": "First seen date"}, "last_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Seen", "description": "Last seen date"}, "nb_ips": {"type": "integer", "minimum": 0.0, "title": "Nb Ips", "description": "Number of unique IPs affected"}, "published_date": {"type": "string", "format": "date-time", "title": "Published Date", "description": "Published date of the CVE"}, "cvss_score": {"anyOf": [{"type": "number", "maximum": 10.0, "minimum": 0.0}, {"type": "null"}], "title": "Cvss Score", "description": "CVSS score of the CVE"}, "has_public_exploit": {"type": "boolean", "title": "Has Public Exploit", "description": "Indicates if there is a public exploit for the CVE"}, "rule_release_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Rule Release Date", "description": "Release date of the associated detection rule"}}, "type": "object", "required": ["id", "name", "title", "affected_components", "crowdsec_score", "nb_ips", "published_date", "has_public_exploit"], "title": "CVEResponseBase", "description": "GET CVE ID Response"}, "CVEsubscription": {"properties": {"id": {"type": "string", "title": "Id"}}, "type": "object", "required": ["id"], "title": "CVEsubscription"}, "CWE": {"properties": {"name": {"type": "string", "title": "Name", "description": "Name of the CWE"}, "label": {"type": "string", "title": "Label", "description": "Label of the CWE"}, "description": {"type": "string", "title": "Description", "description": "Description of the CWE"}}, "type": "object", "required": ["name", "label", "description"], "title": "CWE", "description": "CWE Information"}, "Classification": {"properties": {"name": {"type": "string", "title": "Name", "description": "Classification name"}, "label": {"type": "string", "title": "Label", "description": "Classification label"}, "description": {"type": "string", "title": "Description", "description": "Classification description"}}, "type": "object", "required": ["name", "label", "description"], "title": "Classification"}, "Classifications": {"properties": {"false_positives": {"items": {"$ref": "#/components/schemas/Classification"}, "type": "array", "title": "False Positives", "description": "False positive classifications"}, "classifications": {"items": {"$ref": "#/components/schemas/Classification"}, "type": "array", "title": "Classifications", "description": "Main classifications"}}, "type": "object", "title": "Classifications"}, "EntityType": {"type": "string", "enum": ["org", "tag", "engine", "firewall_integration", "remediation_component_integration", "remediation_component", "log_processor"], "title": "EntityType"}, "GetCVEIPsResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IPItem"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "GetCVEIPsResponsePage"}, "GetCVEResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the CVE"}, "name": {"type": "string", "title": "Name", "description": "Name of the CVE"}, "title": {"type": "string", "title": "Title", "description": "Title of the CVE"}, "affected_components": {"items": {"$ref": "#/components/schemas/AffectedComponent"}, "type": "array", "title": "Affected Components", "description": "List of affected components"}, "crowdsec_score": {"type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Crowdsec Score", "description": "Live Exploit Tracker score of the CVE"}, "first_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "First Seen", "description": "First seen date"}, "last_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Seen", "description": "Last seen date"}, "nb_ips": {"type": "integer", "minimum": 0.0, "title": "Nb Ips", "description": "Number of unique IPs affected"}, "published_date": {"type": "string", "format": "date-time", "title": "Published Date", "description": "Published date of the CVE"}, "cvss_score": {"anyOf": [{"type": "number", "maximum": 10.0, "minimum": 0.0}, {"type": "null"}], "title": "Cvss Score", "description": "CVSS score of the CVE"}, "has_public_exploit": {"type": "boolean", "title": "Has Public Exploit", "description": "Indicates if there is a public exploit for the CVE"}, "rule_release_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Rule Release Date", "description": "Release date of the associated detection rule"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "List of references for the CVE"}, "description": {"type": "string", "title": "Description", "description": "Description of the CVE"}, "crowdsec_analysis": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Crowdsec Analysis", "description": "CrowdSec analysis of the CVE"}, "cwes": {"items": {"$ref": "#/components/schemas/CWE"}, "type": "array", "title": "Cwes", "description": "List of CWEs associated with the CVE"}, "events": {"items": {"$ref": "#/components/schemas/CVEEvent"}, "type": "array", "title": "Events", "description": "List of events related to the CVE"}}, "type": "object", "required": ["id", "name", "title", "affected_components", "crowdsec_score", "nb_ips", "published_date", "has_public_exploit", "references", "description", "crowdsec_analysis", "cwes"], "title": "GetCVEResponse"}, "GetCVESubscribedIntegrationsResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IntegrationResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "GetCVESubscribedIntegrationsResponsePage"}, "GetCVEsResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CVEResponseBase"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "GetCVEsResponsePage"}, "GetCVEsSortBy": {"type": "string", "enum": ["rule_release_date", "trending", "nb_ips", "name"], "title": "GetCVEsSortBy"}, "GetCVEsSortOrder": {"type": "string", "enum": ["asc", "desc"], "title": "GetCVEsSortOrder"}, "History": {"properties": {"first_seen": {"type": "string", "format": "date-time", "title": "First Seen", "description": "First seen timestamp"}, "last_seen": {"type": "string", "format": "date-time", "title": "Last Seen", "description": "Last seen timestamp"}, "full_age": {"type": "integer", "title": "Full Age", "description": "Full age in days"}, "days_age": {"type": "integer", "title": "Days Age", "description": "Days age"}}, "type": "object", "required": ["first_seen", "last_seen", "full_age", "days_age"], "title": "History"}, "IPItem": {"properties": {"ip": {"type": "string", "title": "Ip", "description": "IP address"}, "reputation": {"type": "string", "title": "Reputation", "description": "Reputation of the IP"}, "ip_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Range", "description": "IP range"}, "ip_range_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Range Score", "description": "IP range score"}, "ip_range_24": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Range 24", "description": "IP range /24"}, "ip_range_24_reputation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Range 24 Reputation", "description": "IP range /24 reputation"}, "ip_range_24_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Range 24 Score", "description": "IP range /24 score"}, "as_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Name", "description": "AS name"}, "as_num": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "As Num", "description": "AS number"}, "background_noise_score": {"type": "integer", "title": "Background Noise Score", "description": "Background noise score"}, "background_noise": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Background Noise", "description": "Background noise level"}, "confidence": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Confidence", "description": "Confidence level"}, "location": {"anyOf": [{"$ref": "#/components/schemas/Location"}, {"type": "null"}], "description": "IP location information"}, "reverse_dns": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reverse Dns", "description": "Reverse DNS"}, "behaviors": {"items": {"$ref": "#/components/schemas/Behavior"}, "type": "array", "title": "Behaviors", "description": "List of behaviors"}, "references": {"items": {"$ref": "#/components/schemas/Reference"}, "type": "array", "title": "References", "description": "List of references"}, "history": {"$ref": "#/components/schemas/History", "description": "Historical data"}, "classifications": {"$ref": "#/components/schemas/Classifications", "description": "Classification data"}, "mitre_techniques": {"items": {"$ref": "#/components/schemas/MitreTechnique"}, "type": "array", "title": "Mitre Techniques", "description": "MITRE techniques"}, "cves": {"items": {"type": "string"}, "type": "array", "title": "Cves", "description": "List of CVEs"}, "attack_details": {"items": {"$ref": "#/components/schemas/AttackDetail"}, "type": "array", "title": "Attack Details", "description": "Attack details"}, "target_countries": {"additionalProperties": {"type": "integer"}, "type": "object", "title": "Target Countries", "description": "Target countries"}, "scores": {"$ref": "#/components/schemas/Scores", "description": "Scoring information"}}, "type": "object", "required": ["ip"], "title": "IPItem"}, "IntegrationResponse": {"properties": {"tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "default": []}, "organization_id": {"type": "string", "title": "Organization Id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "entity_type": {"$ref": "#/components/schemas/EntityType", "description": "Type of the integration"}, "id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "default": []}, "allowlists": {"items": {"$ref": "#/components/schemas/AllowlistSubscription"}, "type": "array", "title": "Allowlists", "default": []}, "cves": {"items": {"$ref": "#/components/schemas/CVEsubscription"}, "type": "array", "title": "Cves", "default": []}, "name": {"type": "string", "title": "Name", "description": "Name of the integration"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description", "description": "Description of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}}, "type": "object", "required": ["organization_id", "entity_type", "name", "output_format"], "title": "IntegrationResponse"}, "Location": {"properties": {"country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country", "description": "Country code"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City", "description": "City name"}, "latitude": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Latitude", "description": "Latitude coordinate"}, "longitude": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Longitude", "description": "Longitude coordinate"}}, "type": "object", "title": "Location"}, "MitreTechnique": {"properties": {"name": {"type": "string", "title": "Name", "description": "MITRE technique ID"}, "label": {"type": "string", "title": "Label", "description": "MITRE technique label"}, "description": {"type": "string", "title": "Description", "description": "MITRE technique description"}}, "type": "object", "required": ["name", "label", "description"], "title": "MitreTechnique"}, "Reference": {"properties": {"name": {"type": "string", "title": "Name", "description": "Reference name"}, "label": {"type": "string", "title": "Label", "description": "Reference label"}, "description": {"type": "string", "title": "Description", "description": "Reference description"}}, "type": "object", "required": ["name", "label", "description"], "title": "Reference"}, "ScoreBreakdown": {"properties": {"aggressiveness": {"type": "integer", "title": "Aggressiveness", "description": "Aggressiveness score"}, "threat": {"type": "integer", "title": "Threat", "description": "Threat score"}, "trust": {"type": "integer", "title": "Trust", "description": "Trust score"}, "anomaly": {"type": "integer", "title": "Anomaly", "description": "Anomaly score"}, "total": {"type": "integer", "title": "Total", "description": "Total score"}}, "type": "object", "required": ["aggressiveness", "threat", "trust", "anomaly", "total"], "title": "ScoreBreakdown"}, "Scores": {"properties": {"overall": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Overall scores"}, "last_day": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Last day scores"}, "last_week": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Last week scores"}, "last_month": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Last month scores"}}, "type": "object", "required": ["overall", "last_day", "last_week", "last_month"], "title": "Scores"}, "SubscribeCVEIntegrationRequest": {"properties": {"name": {"type": "string", "title": "Name", "description": "Name of the integration to subscribe"}}, "additionalProperties": false, "type": "object", "required": ["name"], "title": "SubscribeCVEIntegrationRequest"}}, "securitySchemes": {"ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "x-api-key", "description": "If integration key is provided, can also work to get integration content"}, "BasicAuth": {"type": "http", "scheme": "basic", "description": "Basic Auth for integration content endpoint only"}}}, "security": [{"ApiKeyAuth": []}, {"BasicAuth": []}], "servers": [{"url": "https://admin.api.crowdsec.net/v1", "description": "Production server"}]} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "LET API", "description": "This is the API to manage Crowdsec Live Exploit Tracker service", "contact": {"name": "CrowdSec", "url": "https://crowdsec.net/", "email": "info@crowdsec.net"}, "version": "1.94.0"}, "paths": {"/integrations": {"post": {"tags": ["Integrations"], "summary": "Create Integration", "description": "Create an integration to a firewall or remediation component, owned by your organization. The name should be unique within the organization. This operation is submitted to quotas.", "operationId": "createIntegration", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationCreateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integrations", "description": "Get integrations owned by your organization", "operationId": "getIntegrations", "parameters": [{"name": "tag", "in": "query", "required": false, "schema": {"anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], "description": "List of tags associated with the integrations (any of)", "title": "Tag"}, "description": "List of tags associated with the integrations (any of)"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationGetResponsePage"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}": {"get": {"tags": ["Integrations"], "summary": "Get Integration", "description": "Get an integration by ID", "operationId": "getIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationGetResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Integrations"], "summary": "Update Integration", "description": "Update the integration details", "operationId": "updateIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IntegrationUpdateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Integrations"], "summary": "Delete Integration", "description": "Delete the integration by ID", "operationId": "deleteIntegration", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/content": {"head": {"tags": ["Integrations"], "summary": "Head Integration Content", "description": "Check if the integration has content", "operationId": "headIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Integrations"], "summary": "Get Integration Content", "description": "Get the ips associated to the integration in plain text format. The content can be paginated to accomodate limits in firewalls.", "operationId": "getIntegrationContent", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number to return", "default": 1, "title": "Page"}, "description": "Page number to return"}, {"name": "page_size", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer", "minimum": 10000}, {"type": "null"}], "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000", "title": "Page Size"}, "description": "Maximum number of items to return, 0 means no limit (default), should be greater than 10000"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/integrations/{integration_id}/v1/decisions/stream": {"get": {"tags": ["Integrations"], "summary": "Get Integration Content Stream", "description": "Get the ips associated to the integration in a format compatible with a remediation component. As for the remediation components, you can fetch the full content with startup=true or only the changes since the last pull", "operationId": "getIntegrationContentStream", "parameters": [{"name": "integration_id", "in": "path", "required": true, "schema": {"type": "string", "format": "ObjectId", "examples": ["5f9d88b9e5c4f5b9a3d3e8b1"], "title": "Integration Id"}}, {"name": "startup", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull.", "default": false, "title": "Startup"}, "description": "Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull."}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration not found"}, "204": {"description": "Integration has no subscribed blocklists or no content available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/": {"get": {"tags": ["Cves"], "summary": "Get list of CVEs CrowdSec is tracking", "description": "Get a paginated list of CVEs that CrowdSec is tracking", "operationId": "getCves", "parameters": [{"name": "query", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Search query for CVEs", "title": "Query"}, "description": "Search query for CVEs"}, {"name": "sort_by", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/GetCVEsSortBy"}, {"type": "null"}], "description": "Field to sort by", "default": "rule_release_date", "title": "Sort By"}, "description": "Field to sort by"}, {"name": "sort_order", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/GetCVEsSortOrder"}, {"type": "null"}], "description": "Sort order: ascending or descending", "default": "desc", "title": "Sort Order"}, "description": "Sort order: ascending or descending"}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVEsResponsePage"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}": {"get": {"tags": ["Cves"], "summary": "Get CVE ID informations", "description": "Get information about a specific CVE ID", "operationId": "getCve", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVEResponse"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/ips-download": {"get": {"tags": ["Cves"], "summary": "Download IPs exploiting a CVE ID (raw)", "description": "Download the list of IPs exploiting a specific CVE ID in raw format", "operationId": "downloadCveIps", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"text/plain": {"schema": {"type": "string"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/ips-details": {"get": {"tags": ["Cves"], "summary": "Get IPs details exploiting a CVE ID", "description": "Get detailed information about IPs exploiting a specific CVE ID", "operationId": "getCveIpsDetails", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}, {"name": "since", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "pattern": "^\\d+[hd]$"}, {"type": "null"}], "description": "Filter IPs seen since this date, format duration (e.g., 7d, 24h), default to 14d", "default": "14d", "title": "Since"}, "description": "Filter IPs seen since this date, format duration (e.g., 7d, 24h), default to 14d"}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVEIPsResponsePage"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/integrations": {"post": {"tags": ["Cves"], "summary": "Subscribe an integration to a CVE ID", "description": "Subscribe an integration to receive threats related to a specific CVE ID", "operationId": "subscribeIntegrationToCve", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscribeCVEIntegrationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration Not Found"}, "400": {"description": "CVE Already Subscribed"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Cves"], "summary": "Get subscribed integrations for a CVE ID", "description": "Get the list of integrations subscribed to a specific CVE ID", "operationId": "getCveSubscribedIntegrations", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 50, "title": "Size"}, "description": "Page size"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetCVESubscribedIntegrationsResponsePage"}}}}, "404": {"description": "CVE Not Found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/cves/{cve_id}/integrations/{integration_name}": {"delete": {"tags": ["Cves"], "summary": "Unsubscribe an integration from a CVE ID", "description": "Unsubscribe an integration from receiving threats related to a specific CVE ID", "operationId": "unsubscribeIntegrationFromCve", "parameters": [{"name": "cve_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Cve Id"}}, {"name": "integration_name", "in": "path", "required": true, "schema": {"type": "string", "title": "Integration Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Integration Not Found"}, "400": {"description": "CVE Already Unsubscribed"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"ApiKeyCredentials": {"properties": {"api_key": {"type": "string", "title": "Api Key", "description": "API key for the integration"}}, "type": "object", "required": ["api_key"], "title": "ApiKeyCredentials"}, "BasicAuthCredentials": {"properties": {"username": {"type": "string", "title": "Username", "description": "Basic auth username for the integration"}, "password": {"type": "string", "title": "Password", "description": "Basic auth password for the integration"}}, "type": "object", "required": ["username", "password"], "title": "BasicAuthCredentials"}, "BlocklistSubscription": {"properties": {"id": {"type": "string", "title": "Id"}, "remediation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Remediation"}}, "type": "object", "required": ["id"], "title": "BlocklistSubscription"}, "CVESubscription": {"properties": {"id": {"type": "string", "title": "Id", "description": "CVE ID"}}, "type": "object", "required": ["id"], "title": "CVESubscription"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IntegrationCreateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "Name of the integration"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "Description of the integration"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}}, "additionalProperties": false, "type": "object", "required": ["name", "entity_type", "output_format"], "title": "IntegrationCreateRequest"}, "IntegrationCreateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "cves": {"items": {"$ref": "#/components/schemas/CVESubscription"}, "type": "array", "title": "Cves", "description": "CVEs that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"$ref": "#/components/schemas/Stats", "description": "Stats of the integration", "default": {"count": 0}}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Tags associated with the integration", "default": []}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}], "title": "Credentials", "description": "Credentials that were generated for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "cves", "endpoint", "credentials"], "title": "IntegrationCreateResponse"}, "IntegrationGetResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "cves": {"items": {"$ref": "#/components/schemas/CVESubscription"}, "type": "array", "title": "Cves", "description": "CVEs that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"$ref": "#/components/schemas/Stats", "description": "Stats of the integration", "default": {"count": 0}}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Tags associated with the integration", "default": []}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "cves", "endpoint"], "title": "IntegrationGetResponse"}, "IntegrationGetResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IntegrationGetResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "IntegrationGetResponsePage"}, "IntegrationType": {"type": "string", "enum": ["firewall_integration", "remediation_component_integration"], "title": "IntegrationType"}, "IntegrationUpdateRequest": {"properties": {"name": {"type": "string", "minLength": 1, "title": "Name", "description": "New name"}, "description": {"type": "string", "minLength": 1, "title": "Description", "description": "New description"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "New output format"}, "regenerate_credentials": {"type": "boolean", "title": "Regenerate Credentials", "description": "Regenerate credentials for the integration"}}, "additionalProperties": false, "type": "object", "title": "IntegrationUpdateRequest"}, "IntegrationUpdateResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "name": {"type": "string", "title": "Name", "description": "Name of the integration. Should be unique within the organization"}, "organization_id": {"type": "string", "title": "Organization Id", "description": "ID of the owner organization"}, "description": {"type": "string", "title": "Description", "description": "Description of the integration"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "entity_type": {"$ref": "#/components/schemas/IntegrationType", "description": "Type of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "description": "Blocklists that are subscribed by the integration"}, "cves": {"items": {"$ref": "#/components/schemas/CVESubscription"}, "type": "array", "title": "Cves", "description": "CVEs that are subscribed by the integration"}, "endpoint": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Endpoint", "description": "Url that should be used by the firewall or the remediation component to fetch the integration's content"}, "stats": {"$ref": "#/components/schemas/Stats", "description": "Stats of the integration", "default": {"count": 0}}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "Tags associated with the integration", "default": []}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/ApiKeyCredentials"}, {"$ref": "#/components/schemas/BasicAuthCredentials"}, {"type": "null"}], "title": "Credentials", "description": "Credentials for the integration"}}, "type": "object", "required": ["id", "name", "organization_id", "created_at", "updated_at", "entity_type", "output_format", "blocklists", "cves", "endpoint"], "title": "IntegrationUpdateResponse"}, "Links": {"properties": {"first": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First", "examples": ["/api/v1/users?limit=1&offset1"]}, "last": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last", "examples": ["/api/v1/users?limit=1&offset1"]}, "self": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Self", "examples": ["/api/v1/users?limit=1&offset1"]}, "next": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next", "examples": ["/api/v1/users?limit=1&offset1"]}, "prev": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prev", "examples": ["/api/v1/users?limit=1&offset1"]}}, "type": "object", "title": "Links"}, "OutputFormat": {"type": "string", "enum": ["plain_text", "f5", "remediation_component", "fortigate", "paloalto", "checkpoint", "cisco", "juniper", "mikrotik", "pfsense", "opnsense", "sophos"], "title": "OutputFormat"}, "Stats": {"properties": {"count": {"type": "integer", "title": "Count", "description": "Number of total blocklists items the integration will pull"}}, "type": "object", "required": ["count"], "title": "Stats"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "AffectedComponent": {"properties": {"vendor": {"type": "string", "title": "Vendor", "description": "Vendor of the affected component"}, "product": {"type": "string", "title": "Product", "description": "Product name of the affected component"}}, "type": "object", "title": "AffectedComponent", "description": "Affected Component in a CVE"}, "AllowlistSubscription": {"properties": {"id": {"type": "string", "title": "Id"}}, "type": "object", "required": ["id"], "title": "AllowlistSubscription"}, "AttackDetail": {"properties": {"name": {"type": "string", "title": "Name", "description": "Attack detail name"}, "label": {"type": "string", "title": "Label", "description": "Attack detail label"}, "description": {"type": "string", "title": "Description", "description": "Attack detail description"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "Attack detail references"}}, "type": "object", "required": ["name", "label", "description"], "title": "AttackDetail"}, "Behavior": {"properties": {"name": {"type": "string", "title": "Name", "description": "Behavior name"}, "label": {"type": "string", "title": "Label", "description": "Behavior label"}, "description": {"type": "string", "title": "Description", "description": "Behavior description"}}, "type": "object", "required": ["name", "label", "description"], "title": "Behavior"}, "CVEEvent": {"properties": {"date": {"type": "string", "format": "date-time", "title": "Date", "description": "Date of the event"}, "description": {"type": "string", "title": "Description", "description": "Description of the event"}, "label": {"type": "string", "title": "Label", "description": "Label of the event"}, "name": {"type": "string", "title": "Name", "description": "Name of the event"}}, "type": "object", "required": ["date", "description", "label", "name"], "title": "CVEEvent", "description": "CVE Event Information"}, "CVEResponseBase": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the CVE"}, "name": {"type": "string", "title": "Name", "description": "Name of the CVE"}, "title": {"type": "string", "title": "Title", "description": "Title of the CVE"}, "affected_components": {"items": {"$ref": "#/components/schemas/AffectedComponent"}, "type": "array", "title": "Affected Components", "description": "List of affected components"}, "crowdsec_score": {"type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Crowdsec Score", "description": "Live Exploit Tracker score of the CVE"}, "first_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "First Seen", "description": "First seen date"}, "last_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Seen", "description": "Last seen date"}, "nb_ips": {"type": "integer", "minimum": 0.0, "title": "Nb Ips", "description": "Number of unique IPs affected"}, "published_date": {"type": "string", "format": "date-time", "title": "Published Date", "description": "Published date of the CVE"}, "cvss_score": {"anyOf": [{"type": "number", "maximum": 10.0, "minimum": 0.0}, {"type": "null"}], "title": "Cvss Score", "description": "CVSS score of the CVE"}, "has_public_exploit": {"type": "boolean", "title": "Has Public Exploit", "description": "Indicates if there is a public exploit for the CVE"}, "rule_release_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Rule Release Date", "description": "Release date of the associated detection rule"}}, "type": "object", "required": ["id", "name", "title", "affected_components", "crowdsec_score", "nb_ips", "published_date", "has_public_exploit"], "title": "CVEResponseBase", "description": "GET CVE ID Response"}, "CVEsubscription": {"properties": {"id": {"type": "string", "title": "Id"}}, "type": "object", "required": ["id"], "title": "CVEsubscription"}, "CWE": {"properties": {"name": {"type": "string", "title": "Name", "description": "Name of the CWE"}, "label": {"type": "string", "title": "Label", "description": "Label of the CWE"}, "description": {"type": "string", "title": "Description", "description": "Description of the CWE"}}, "type": "object", "required": ["name", "label", "description"], "title": "CWE", "description": "CWE Information"}, "Classification": {"properties": {"name": {"type": "string", "title": "Name", "description": "Classification name"}, "label": {"type": "string", "title": "Label", "description": "Classification label"}, "description": {"type": "string", "title": "Description", "description": "Classification description"}}, "type": "object", "required": ["name", "label", "description"], "title": "Classification"}, "Classifications": {"properties": {"false_positives": {"items": {"$ref": "#/components/schemas/Classification"}, "type": "array", "title": "False Positives", "description": "False positive classifications"}, "classifications": {"items": {"$ref": "#/components/schemas/Classification"}, "type": "array", "title": "Classifications", "description": "Main classifications"}}, "type": "object", "title": "Classifications"}, "EntityType": {"type": "string", "enum": ["org", "tag", "engine", "firewall_integration", "remediation_component_integration", "remediation_component", "log_processor"], "title": "EntityType"}, "GetCVEIPsResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IPItem"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "GetCVEIPsResponsePage"}, "GetCVEResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "ID of the CVE"}, "name": {"type": "string", "title": "Name", "description": "Name of the CVE"}, "title": {"type": "string", "title": "Title", "description": "Title of the CVE"}, "affected_components": {"items": {"$ref": "#/components/schemas/AffectedComponent"}, "type": "array", "title": "Affected Components", "description": "List of affected components"}, "crowdsec_score": {"type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Crowdsec Score", "description": "Live Exploit Tracker score of the CVE"}, "first_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "First Seen", "description": "First seen date"}, "last_seen": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Seen", "description": "Last seen date"}, "nb_ips": {"type": "integer", "minimum": 0.0, "title": "Nb Ips", "description": "Number of unique IPs affected"}, "published_date": {"type": "string", "format": "date-time", "title": "Published Date", "description": "Published date of the CVE"}, "cvss_score": {"anyOf": [{"type": "number", "maximum": 10.0, "minimum": 0.0}, {"type": "null"}], "title": "Cvss Score", "description": "CVSS score of the CVE"}, "has_public_exploit": {"type": "boolean", "title": "Has Public Exploit", "description": "Indicates if there is a public exploit for the CVE"}, "rule_release_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Rule Release Date", "description": "Release date of the associated detection rule"}, "references": {"items": {"type": "string"}, "type": "array", "title": "References", "description": "List of references for the CVE"}, "description": {"type": "string", "title": "Description", "description": "Description of the CVE"}, "crowdsec_analysis": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Crowdsec Analysis", "description": "CrowdSec analysis of the CVE"}, "cwes": {"items": {"$ref": "#/components/schemas/CWE"}, "type": "array", "title": "Cwes", "description": "List of CWEs associated with the CVE"}, "events": {"items": {"$ref": "#/components/schemas/CVEEvent"}, "type": "array", "title": "Events", "description": "List of events related to the CVE"}}, "type": "object", "required": ["id", "name", "title", "affected_components", "crowdsec_score", "nb_ips", "published_date", "has_public_exploit", "references", "description", "crowdsec_analysis", "cwes"], "title": "GetCVEResponse"}, "GetCVESubscribedIntegrationsResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/IntegrationResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "GetCVESubscribedIntegrationsResponsePage"}, "GetCVEsResponsePage": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CVEResponseBase"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "minimum": 0.0, "title": "Total"}, "page": {"type": "integer", "minimum": 1.0, "title": "Page"}, "size": {"type": "integer", "minimum": 1.0, "title": "Size"}, "pages": {"type": "integer", "minimum": 0.0, "title": "Pages"}, "links": {"$ref": "#/components/schemas/Links", "readOnly": true}}, "type": "object", "required": ["items", "total", "page", "size", "pages", "links"], "title": "GetCVEsResponsePage"}, "GetCVEsSortBy": {"type": "string", "enum": ["rule_release_date", "trending", "nb_ips", "name"], "title": "GetCVEsSortBy"}, "GetCVEsSortOrder": {"type": "string", "enum": ["asc", "desc"], "title": "GetCVEsSortOrder"}, "History": {"properties": {"first_seen": {"type": "string", "format": "date-time", "title": "First Seen", "description": "First seen timestamp"}, "last_seen": {"type": "string", "format": "date-time", "title": "Last Seen", "description": "Last seen timestamp"}, "full_age": {"type": "integer", "title": "Full Age", "description": "Full age in days"}, "days_age": {"type": "integer", "title": "Days Age", "description": "Days age"}}, "type": "object", "required": ["first_seen", "last_seen", "full_age", "days_age"], "title": "History"}, "IPItem": {"properties": {"ip": {"type": "string", "title": "Ip", "description": "IP address"}, "reputation": {"type": "string", "title": "Reputation", "description": "Reputation of the IP"}, "ip_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Range", "description": "IP range"}, "ip_range_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Range Score", "description": "IP range score"}, "ip_range_24": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Range 24", "description": "IP range /24"}, "ip_range_24_reputation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Range 24 Reputation", "description": "IP range /24 reputation"}, "ip_range_24_score": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Range 24 Score", "description": "IP range /24 score"}, "as_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Name", "description": "AS name"}, "as_num": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "As Num", "description": "AS number"}, "background_noise_score": {"type": "integer", "title": "Background Noise Score", "description": "Background noise score"}, "background_noise": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Background Noise", "description": "Background noise level"}, "confidence": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Confidence", "description": "Confidence level"}, "location": {"anyOf": [{"$ref": "#/components/schemas/Location"}, {"type": "null"}], "description": "IP location information"}, "reverse_dns": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reverse Dns", "description": "Reverse DNS"}, "behaviors": {"items": {"$ref": "#/components/schemas/Behavior"}, "type": "array", "title": "Behaviors", "description": "List of behaviors"}, "references": {"items": {"$ref": "#/components/schemas/Reference"}, "type": "array", "title": "References", "description": "List of references"}, "history": {"$ref": "#/components/schemas/History", "description": "Historical data"}, "classifications": {"$ref": "#/components/schemas/Classifications", "description": "Classification data"}, "mitre_techniques": {"items": {"$ref": "#/components/schemas/MitreTechnique"}, "type": "array", "title": "Mitre Techniques", "description": "MITRE techniques"}, "cves": {"items": {"type": "string"}, "type": "array", "title": "Cves", "description": "List of CVEs"}, "attack_details": {"items": {"$ref": "#/components/schemas/AttackDetail"}, "type": "array", "title": "Attack Details", "description": "Attack details"}, "target_countries": {"additionalProperties": {"type": "integer"}, "type": "object", "title": "Target Countries", "description": "Target countries"}, "scores": {"$ref": "#/components/schemas/Scores", "description": "Scoring information"}}, "type": "object", "required": ["ip"], "title": "IPItem"}, "IntegrationResponse": {"properties": {"tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "default": []}, "organization_id": {"type": "string", "title": "Organization Id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At", "description": "Time the integration was created"}, "entity_type": {"$ref": "#/components/schemas/EntityType", "description": "Type of the integration"}, "id": {"type": "string", "title": "Id", "description": "ID of the integration"}, "blocklists": {"items": {"$ref": "#/components/schemas/BlocklistSubscription"}, "type": "array", "title": "Blocklists", "default": []}, "allowlists": {"items": {"$ref": "#/components/schemas/AllowlistSubscription"}, "type": "array", "title": "Allowlists", "default": []}, "cves": {"items": {"$ref": "#/components/schemas/CVEsubscription"}, "type": "array", "title": "Cves", "default": []}, "name": {"type": "string", "title": "Name", "description": "Name of the integration"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At", "description": "Last time the integration was updated"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description", "description": "Description of the integration"}, "output_format": {"$ref": "#/components/schemas/OutputFormat", "description": "Output format of the integration"}, "last_pull": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Pull", "description": "Last time the integration pulled blocklists"}}, "type": "object", "required": ["organization_id", "entity_type", "name", "output_format"], "title": "IntegrationResponse"}, "Location": {"properties": {"country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Country", "description": "Country code"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City", "description": "City name"}, "latitude": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Latitude", "description": "Latitude coordinate"}, "longitude": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Longitude", "description": "Longitude coordinate"}}, "type": "object", "title": "Location"}, "MitreTechnique": {"properties": {"name": {"type": "string", "title": "Name", "description": "MITRE technique ID"}, "label": {"type": "string", "title": "Label", "description": "MITRE technique label"}, "description": {"type": "string", "title": "Description", "description": "MITRE technique description"}}, "type": "object", "required": ["name", "label", "description"], "title": "MitreTechnique"}, "Reference": {"properties": {"name": {"type": "string", "title": "Name", "description": "Reference name"}, "label": {"type": "string", "title": "Label", "description": "Reference label"}, "description": {"type": "string", "title": "Description", "description": "Reference description"}}, "type": "object", "required": ["name", "label", "description"], "title": "Reference"}, "ScoreBreakdown": {"properties": {"aggressiveness": {"type": "integer", "title": "Aggressiveness", "description": "Aggressiveness score"}, "threat": {"type": "integer", "title": "Threat", "description": "Threat score"}, "trust": {"type": "integer", "title": "Trust", "description": "Trust score"}, "anomaly": {"type": "integer", "title": "Anomaly", "description": "Anomaly score"}, "total": {"type": "integer", "title": "Total", "description": "Total score"}}, "type": "object", "required": ["aggressiveness", "threat", "trust", "anomaly", "total"], "title": "ScoreBreakdown"}, "Scores": {"properties": {"overall": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Overall scores"}, "last_day": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Last day scores"}, "last_week": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Last week scores"}, "last_month": {"$ref": "#/components/schemas/ScoreBreakdown", "description": "Last month scores"}}, "type": "object", "required": ["overall", "last_day", "last_week", "last_month"], "title": "Scores"}, "SubscribeCVEIntegrationRequest": {"properties": {"name": {"type": "string", "title": "Name", "description": "Name of the integration to subscribe"}}, "additionalProperties": false, "type": "object", "required": ["name"], "title": "SubscribeCVEIntegrationRequest"}}, "securitySchemes": {"ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "x-api-key", "description": "If integration key is provided, can also work to get integration content"}, "BasicAuth": {"type": "http", "scheme": "basic", "description": "Basic Auth for integration content endpoint only"}}}, "security": [{"ApiKeyAuth": []}, {"BasicAuth": []}], "servers": [{"url": "https://admin.api.crowdsec.net/v1", "description": "Production server"}]} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 299a9a0..ca0c4c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "crowdsec_tracker_api" -version = "1.92.0" +version = "1.94.0" license = { text = "MIT" } authors = [ { name="crowdsec", email="info@crowdsec.net" }