From 82aff5780e143b7109aa89ea7b39a1eeb607e159 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Aug 2026 07:01:47 +0000 Subject: [PATCH] Update SDK to version v3.131.1 - Generated from OpenAPI spec version v3.131.1 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 8 - docs/AnalysesResultsMetadataApi.md | 170 ------ docs/AnalysisConfig.md | 2 - docs/AnalysisDetailResponse.md | 1 - docs/BaseResponseListSBOM.md | 33 -- docs/BaseResponseVulnerabilities.md | 33 -- docs/ReAnalysisForm.md | 2 +- docs/SBOM.md | 30 - docs/SBOMPackage.md | 30 - docs/Vulnerabilities.md | 29 - docs/Vulnerability.md | 39 -- revengai/__init__.py | 14 +- revengai/api/analyses_results_metadata_api.py | 526 ------------------ revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 6 - revengai/models/analysis_config.py | 6 +- revengai/models/analysis_detail_response.py | 11 +- revengai/models/base_response_list_sbom.py | 129 ----- .../models/base_response_vulnerabilities.py | 125 ----- revengai/models/re_analysis_form.py | 2 +- revengai/models/sbom.py | 96 ---- revengai/models/sbom_package.py | 88 --- revengai/models/vulnerabilities.py | 94 ---- revengai/models/vulnerability.py | 113 ---- 26 files changed, 10 insertions(+), 1585 deletions(-) delete mode 100644 docs/BaseResponseListSBOM.md delete mode 100644 docs/BaseResponseVulnerabilities.md delete mode 100644 docs/SBOM.md delete mode 100644 docs/SBOMPackage.md delete mode 100644 docs/Vulnerabilities.md delete mode 100644 docs/Vulnerability.md delete mode 100644 revengai/models/base_response_list_sbom.py delete mode 100644 revengai/models/base_response_vulnerabilities.py delete mode 100644 revengai/models/sbom.py delete mode 100644 revengai/models/sbom_package.py delete mode 100644 revengai/models/vulnerabilities.py delete mode 100644 revengai/models/vulnerability.py diff --git a/.sdk-version b/.sdk-version index 3afcf993..bb761d25 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.131.0 +v3.131.1 diff --git a/README.md b/README.md index 829b1978..ee36dfab 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,7 @@ Class | Method | HTTP request | Description *AnalysesResultsMetadataApi* | [**get_analysis_functions_paginated**](docs/AnalysesResultsMetadataApi.md#get_analysis_functions_paginated) | **GET** /v2/analyses/{analysis_id}/functions | Get functions from analysis *AnalysesResultsMetadataApi* | [**get_capabilities**](docs/AnalysesResultsMetadataApi.md#get_capabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis *AnalysesResultsMetadataApi* | [**get_functions_list**](docs/AnalysesResultsMetadataApi.md#get_functions_list) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis -*AnalysesResultsMetadataApi* | [**get_sbom**](docs/AnalysesResultsMetadataApi.md#get_sbom) | **GET** /v2/analyses/{analysis_id}/sbom | Gets the software-bill-of-materials (SBOM) found in the analysis *AnalysesResultsMetadataApi* | [**get_tags**](docs/AnalysesResultsMetadataApi.md#get_tags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score -*AnalysesResultsMetadataApi* | [**get_vulnerabilities**](docs/AnalysesResultsMetadataApi.md#get_vulnerabilities) | **GET** /v2/analyses/{analysis_id}/vulnerabilities | Gets the vulnerabilities found in the analysis *AnalysesXRefsApi* | [**get_xref_by_vaddr**](docs/AnalysesXRefsApi.md#get_xref_by_vaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up xrefs by virtual address *AuthenticationUsersApi* | [**get_user**](docs/AuthenticationUsersApi.md#get_user) | **GET** /v2/users/{user_id} | Get a user's public information *AuthenticationUsersApi* | [**get_user_activity**](docs/AuthenticationUsersApi.md#get_user_activity) | **GET** /v2/users/activity | Get auth user activity @@ -311,7 +309,6 @@ Class | Method | HTTP request | Description - [BaseResponseListCommentResponse](docs/BaseResponseListCommentResponse.md) - [BaseResponseListDieMatch](docs/BaseResponseListDieMatch.md) - [BaseResponseListFunctionNameHistory](docs/BaseResponseListFunctionNameHistory.md) - - [BaseResponseListSBOM](docs/BaseResponseListSBOM.md) - [BaseResponseListUserActivityResponse](docs/BaseResponseListUserActivityResponse.md) - [BaseResponseLogs](docs/BaseResponseLogs.md) - [BaseResponseModelsResponse](docs/BaseResponseModelsResponse.md) @@ -328,7 +325,6 @@ Class | Method | HTTP request | Description - [BaseResponseTriageReportResponse](docs/BaseResponseTriageReportResponse.md) - [BaseResponseUnionGetAiDecompilationRatingResponseNoneType](docs/BaseResponseUnionGetAiDecompilationRatingResponseNoneType.md) - [BaseResponseUploadResponse](docs/BaseResponseUploadResponse.md) - - [BaseResponseVulnerabilities](docs/BaseResponseVulnerabilities.md) - [BaseResponseXrefResponse](docs/BaseResponseXrefResponse.md) - [Basic](docs/Basic.md) - [BatchBinaryMatchResult](docs/BatchBinaryMatchResult.md) @@ -609,8 +605,6 @@ Class | Method | HTTP request | Description - [ReportInfo](docs/ReportInfo.md) - [ReportOptions](docs/ReportOptions.md) - [RevokeBody](docs/RevokeBody.md) - - [SBOM](docs/SBOM.md) - - [SBOMPackage](docs/SBOMPackage.md) - [SSOProvider](docs/SSOProvider.md) - [SSOProvidersOutputBody](docs/SSOProvidersOutputBody.md) - [SandboxOptions](docs/SandboxOptions.md) @@ -709,8 +703,6 @@ Class | Method | HTTP request | Description - [V2FunctionInfo](docs/V2FunctionInfo.md) - [V2FunctionInfoFuncDepsInner](docs/V2FunctionInfoFuncDepsInner.md) - [V2FunctionType](docs/V2FunctionType.md) - - [Vulnerabilities](docs/Vulnerabilities.md) - - [Vulnerability](docs/Vulnerability.md) - [WarningEvent](docs/WarningEvent.md) - [WorkflowProgress](docs/WorkflowProgress.md) - [Workspace](docs/Workspace.md) diff --git a/docs/AnalysesResultsMetadataApi.md b/docs/AnalysesResultsMetadataApi.md index 0366ef4e..d72975e7 100644 --- a/docs/AnalysesResultsMetadataApi.md +++ b/docs/AnalysesResultsMetadataApi.md @@ -7,9 +7,7 @@ Method | HTTP request | Description [**get_analysis_functions_paginated**](AnalysesResultsMetadataApi.md#get_analysis_functions_paginated) | **GET** /v2/analyses/{analysis_id}/functions | Get functions from analysis [**get_capabilities**](AnalysesResultsMetadataApi.md#get_capabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis [**get_functions_list**](AnalysesResultsMetadataApi.md#get_functions_list) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis -[**get_sbom**](AnalysesResultsMetadataApi.md#get_sbom) | **GET** /v2/analyses/{analysis_id}/sbom | Gets the software-bill-of-materials (SBOM) found in the analysis [**get_tags**](AnalysesResultsMetadataApi.md#get_tags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score -[**get_vulnerabilities**](AnalysesResultsMetadataApi.md#get_vulnerabilities) | **GET** /v2/analyses/{analysis_id}/vulnerabilities | Gets the vulnerabilities found in the analysis # **get_analysis_functions_paginated** @@ -284,90 +282,6 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_sbom** -> BaseResponseListSBOM get_sbom(analysis_id) - -Gets the software-bill-of-materials (SBOM) found in the analysis - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.base_response_list_sbom import BaseResponseListSBOM -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AnalysesResultsMetadataApi(api_client) - analysis_id = 56 # int | - - try: - # Gets the software-bill-of-materials (SBOM) found in the analysis - api_response = api_instance.get_sbom(analysis_id) - print("The response of AnalysesResultsMetadataApi->get_sbom:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesResultsMetadataApi->get_sbom: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | - -### Return type - -[**BaseResponseListSBOM**](BaseResponseListSBOM.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **get_tags** > BaseResponseAnalysisTags get_tags(analysis_id) @@ -452,87 +366,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_vulnerabilities** -> BaseResponseVulnerabilities get_vulnerabilities(analysis_id) - -Gets the vulnerabilities found in the analysis - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AnalysesResultsMetadataApi(api_client) - analysis_id = 56 # int | - - try: - # Gets the vulnerabilities found in the analysis - api_response = api_instance.get_vulnerabilities(analysis_id) - print("The response of AnalysesResultsMetadataApi->get_vulnerabilities:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesResultsMetadataApi->get_vulnerabilities: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | - -### Return type - -[**BaseResponseVulnerabilities**](BaseResponseVulnerabilities.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/AnalysisConfig.md b/docs/AnalysisConfig.md index 540f94cf..3ebeb06b 100644 --- a/docs/AnalysisConfig.md +++ b/docs/AnalysisConfig.md @@ -6,8 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **scrape_third_party_config** | [**ScrapeThirdPartyConfig**](ScrapeThirdPartyConfig.md) | Settings to scrape third party sources | [optional] -**generate_cves** | **bool** | A configuration option for fetching CVEs data. | [optional] [default to False] -**generate_sbom** | **bool** | A configuration option for generating software bill of materials data. | [optional] [default to False] **generate_capabilities** | **bool** | A configuration option for generating capabilities of a binary | [optional] [default to False] **no_cache** | **bool** | When enabled, skips using cached data within the processing. | [optional] [default to False] **advanced_analysis** | **bool** | Enables an advanced security analysis. | [optional] [default to False] diff --git a/docs/AnalysisDetailResponse.md b/docs/AnalysisDetailResponse.md index 94a92de1..3f7d1cbf 100644 --- a/docs/AnalysisDetailResponse.md +++ b/docs/AnalysisDetailResponse.md @@ -18,7 +18,6 @@ Name | Type | Description | Notes **dashboard_url** | **str** | URL to view this analysis in the dashboard | **debug** | **bool** | | **model_name** | **str** | | -**sbom** | **Dict[str, object]** | | [optional] **sha_256_hash** | **str** | | **auto_run_agents** | [**AutoRunAgents**](AutoRunAgents.md) | | **requested_config** | [**AnalysisConfigSnapshot**](AnalysisConfigSnapshot.md) | Snapshot of the configuration the analysis was submitted with. | diff --git a/docs/BaseResponseListSBOM.md b/docs/BaseResponseListSBOM.md deleted file mode 100644 index d210c5e2..00000000 --- a/docs/BaseResponseListSBOM.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseListSBOM - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**List[SBOM]**](SBOM.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_list_sbom import BaseResponseListSBOM - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseListSBOM from a JSON string -base_response_list_sbom_instance = BaseResponseListSBOM.from_json(json) -# print the JSON string representation of the object -print(BaseResponseListSBOM.to_json()) - -# convert the object into a dict -base_response_list_sbom_dict = base_response_list_sbom_instance.to_dict() -# create an instance of BaseResponseListSBOM from a dict -base_response_list_sbom_from_dict = BaseResponseListSBOM.from_dict(base_response_list_sbom_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BaseResponseVulnerabilities.md b/docs/BaseResponseVulnerabilities.md deleted file mode 100644 index 2461c0c3..00000000 --- a/docs/BaseResponseVulnerabilities.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseVulnerabilities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**Vulnerabilities**](Vulnerabilities.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseVulnerabilities from a JSON string -base_response_vulnerabilities_instance = BaseResponseVulnerabilities.from_json(json) -# print the JSON string representation of the object -print(BaseResponseVulnerabilities.to_json()) - -# convert the object into a dict -base_response_vulnerabilities_dict = base_response_vulnerabilities_instance.to_dict() -# create an instance of BaseResponseVulnerabilities from a dict -base_response_vulnerabilities_from_dict = BaseResponseVulnerabilities.from_dict(base_response_vulnerabilities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ReAnalysisForm.md b/docs/ReAnalysisForm.md index e6999f19..e1ccf1c3 100644 --- a/docs/ReAnalysisForm.md +++ b/docs/ReAnalysisForm.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Tags associated with the analysis | [optional] [default to []] **command_line_args** | **str** | Command line arguments for dynamic execution | [optional] [default to ''] **priority** | **int** | Priority of the analysis | [optional] [default to 0] -**essential** | **bool** | Only runs essential parts of the analysis, skips tags/sbom/cves etc. | [optional] [default to True] +**essential** | **bool** | Only runs essential parts of the analysis, skips tags etc. | [optional] [default to True] **model_name** | **str** | | [optional] **no_cache** | **bool** | When enabled, skips using cached data within the processing. | [optional] [default to False] diff --git a/docs/SBOM.md b/docs/SBOM.md deleted file mode 100644 index 0bb79a39..00000000 --- a/docs/SBOM.md +++ /dev/null @@ -1,30 +0,0 @@ -# SBOM - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**packages** | [**List[SBOMPackage]**](SBOMPackage.md) | The packages found | -**imported_libs** | **List[str]** | The import libraries found | - -## Example - -```python -from revengai.models.sbom import SBOM - -# TODO update the JSON string below -json = "{}" -# create an instance of SBOM from a JSON string -sbom_instance = SBOM.from_json(json) -# print the JSON string representation of the object -print(SBOM.to_json()) - -# convert the object into a dict -sbom_dict = sbom_instance.to_dict() -# create an instance of SBOM from a dict -sbom_from_dict = SBOM.from_dict(sbom_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SBOMPackage.md b/docs/SBOMPackage.md deleted file mode 100644 index e3404740..00000000 --- a/docs/SBOMPackage.md +++ /dev/null @@ -1,30 +0,0 @@ -# SBOMPackage - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the package | -**version** | **str** | The version of the package | - -## Example - -```python -from revengai.models.sbom_package import SBOMPackage - -# TODO update the JSON string below -json = "{}" -# create an instance of SBOMPackage from a JSON string -sbom_package_instance = SBOMPackage.from_json(json) -# print the JSON string representation of the object -print(SBOMPackage.to_json()) - -# convert the object into a dict -sbom_package_dict = sbom_package_instance.to_dict() -# create an instance of SBOMPackage from a dict -sbom_package_from_dict = SBOMPackage.from_dict(sbom_package_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Vulnerabilities.md b/docs/Vulnerabilities.md deleted file mode 100644 index cb439f46..00000000 --- a/docs/Vulnerabilities.md +++ /dev/null @@ -1,29 +0,0 @@ -# Vulnerabilities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vulnerabilities** | [**List[Vulnerability]**](Vulnerability.md) | | - -## Example - -```python -from revengai.models.vulnerabilities import Vulnerabilities - -# TODO update the JSON string below -json = "{}" -# create an instance of Vulnerabilities from a JSON string -vulnerabilities_instance = Vulnerabilities.from_json(json) -# print the JSON string representation of the object -print(Vulnerabilities.to_json()) - -# convert the object into a dict -vulnerabilities_dict = vulnerabilities_instance.to_dict() -# create an instance of Vulnerabilities from a dict -vulnerabilities_from_dict = Vulnerabilities.from_dict(vulnerabilities_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Vulnerability.md b/docs/Vulnerability.md deleted file mode 100644 index c7cab317..00000000 --- a/docs/Vulnerability.md +++ /dev/null @@ -1,39 +0,0 @@ -# Vulnerability - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vendor** | **str** | | -**product** | **str** | | -**version** | **str** | | -**cve_number** | **str** | | -**severity** | **str** | | -**source** | **str** | | -**cvss_version** | **str** | | -**cvss_vector** | **str** | | -**remarks** | **str** | | -**score** | **float** | | -**is_unknown** | **bool** | | [optional] [default to False] - -## Example - -```python -from revengai.models.vulnerability import Vulnerability - -# TODO update the JSON string below -json = "{}" -# create an instance of Vulnerability from a JSON string -vulnerability_instance = Vulnerability.from_json(json) -# print the JSON string representation of the object -print(Vulnerability.to_json()) - -# convert the object into a dict -vulnerability_dict = vulnerability_instance.to_dict() -# create an instance of Vulnerability from a dict -vulnerability_from_dict = Vulnerability.from_dict(vulnerability_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/revengai/__init__.py b/revengai/__init__.py index e0d3b1b9..9d4a1956 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.131.0" +__version__ = "v3.131.1" # Define package exports __all__ = [ @@ -151,7 +151,6 @@ "BaseResponseListCommentResponse", "BaseResponseListDieMatch", "BaseResponseListFunctionNameHistory", - "BaseResponseListSBOM", "BaseResponseListUserActivityResponse", "BaseResponseLogs", "BaseResponseModelsResponse", @@ -168,7 +167,6 @@ "BaseResponseTriageReportResponse", "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", "BaseResponseUploadResponse", - "BaseResponseVulnerabilities", "BaseResponseXrefResponse", "Basic", "BatchBinaryMatchResult", @@ -449,8 +447,6 @@ "ReportInfo", "ReportOptions", "RevokeBody", - "SBOM", - "SBOMPackage", "SSOProvider", "SSOProvidersOutputBody", "SandboxOptions", @@ -549,8 +545,6 @@ "V2FunctionInfo", "V2FunctionInfoFuncDepsInner", "V2FunctionType", - "Vulnerabilities", - "Vulnerability", "WarningEvent", "WorkflowProgress", "Workspace", @@ -698,7 +692,6 @@ from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse as BaseResponseListCommentResponse from revengai.models.base_response_list_die_match import BaseResponseListDieMatch as BaseResponseListDieMatch from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory as BaseResponseListFunctionNameHistory -from revengai.models.base_response_list_sbom import BaseResponseListSBOM as BaseResponseListSBOM from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse as BaseResponseListUserActivityResponse from revengai.models.base_response_logs import BaseResponseLogs as BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse as BaseResponseModelsResponse @@ -715,7 +708,6 @@ from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse as BaseResponseTriageReportResponse from revengai.models.base_response_union_get_ai_decompilation_rating_response_none_type import BaseResponseUnionGetAiDecompilationRatingResponseNoneType as BaseResponseUnionGetAiDecompilationRatingResponseNoneType from revengai.models.base_response_upload_response import BaseResponseUploadResponse as BaseResponseUploadResponse -from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities as BaseResponseVulnerabilities from revengai.models.base_response_xref_response import BaseResponseXrefResponse as BaseResponseXrefResponse from revengai.models.basic import Basic as Basic from revengai.models.batch_binary_match_result import BatchBinaryMatchResult as BatchBinaryMatchResult @@ -996,8 +988,6 @@ from revengai.models.report_info import ReportInfo as ReportInfo from revengai.models.report_options import ReportOptions as ReportOptions from revengai.models.revoke_body import RevokeBody as RevokeBody -from revengai.models.sbom import SBOM as SBOM -from revengai.models.sbom_package import SBOMPackage as SBOMPackage from revengai.models.sso_provider import SSOProvider as SSOProvider from revengai.models.sso_providers_output_body import SSOProvidersOutputBody as SSOProvidersOutputBody from revengai.models.sandbox_options import SandboxOptions as SandboxOptions @@ -1096,8 +1086,6 @@ from revengai.models.v2_function_info import V2FunctionInfo as V2FunctionInfo from revengai.models.v2_function_info_func_deps_inner import V2FunctionInfoFuncDepsInner as V2FunctionInfoFuncDepsInner from revengai.models.v2_function_type import V2FunctionType as V2FunctionType -from revengai.models.vulnerabilities import Vulnerabilities as Vulnerabilities -from revengai.models.vulnerability import Vulnerability as Vulnerability from revengai.models.warning_event import WarningEvent as WarningEvent from revengai.models.workflow_progress import WorkflowProgress as WorkflowProgress from revengai.models.workspace import Workspace as Workspace diff --git a/revengai/api/analyses_results_metadata_api.py b/revengai/api/analyses_results_metadata_api.py index 4f2098bd..52aede7e 100644 --- a/revengai/api/analyses_results_metadata_api.py +++ b/revengai/api/analyses_results_metadata_api.py @@ -22,8 +22,6 @@ from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags from revengai.models.base_response_capabilities import BaseResponseCapabilities -from revengai.models.base_response_list_sbom import BaseResponseListSBOM -from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities from revengai.api_client import ApiClient, RequestSerialized from revengai.api_response import ApiResponse @@ -977,268 +975,6 @@ def _get_functions_list_serialize( - @validate_call - def get_sbom( - self, - analysis_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListSBOM: - """Gets the software-bill-of-materials (SBOM) found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_sbom_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListSBOM", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_sbom_with_http_info( - self, - analysis_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListSBOM]: - """Gets the software-bill-of-materials (SBOM) found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_sbom_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListSBOM", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_sbom_without_preload_content( - self, - analysis_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Gets the software-bill-of-materials (SBOM) found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_sbom_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListSBOM", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_sbom_serialize( - self, - analysis_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey', - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/analyses/{analysis_id}/sbom', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def get_tags( self, @@ -1499,265 +1235,3 @@ def _get_tags_serialize( ) - - - @validate_call - def get_vulnerabilities( - self, - analysis_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseVulnerabilities: - """Gets the vulnerabilities found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_vulnerabilities_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseVulnerabilities", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_vulnerabilities_with_http_info( - self, - analysis_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseVulnerabilities]: - """Gets the vulnerabilities found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_vulnerabilities_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseVulnerabilities", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_vulnerabilities_without_preload_content( - self, - analysis_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Gets the vulnerabilities found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_vulnerabilities_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseVulnerabilities", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_vulnerabilities_serialize( - self, - analysis_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey', - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/analyses/{analysis_id}/vulnerabilities', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/revengai/api_client.py b/revengai/api_client.py index 08fc2301..58559708 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v3.131.0/python' + self.user_agent = 'OpenAPI-Generator/v3.131.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index ceff4825..bf50c505 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -541,8 +541,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v3.131.0\n"\ - "SDK Package Version: v3.131.0".\ + "Version of the API: v3.131.1\n"\ + "SDK Package Version: v3.131.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/__init__.py b/revengai/models/__init__.py index 0e2dce61..8a56575e 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -116,7 +116,6 @@ from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse from revengai.models.base_response_list_die_match import BaseResponseListDieMatch from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory -from revengai.models.base_response_list_sbom import BaseResponseListSBOM from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse from revengai.models.base_response_logs import BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse @@ -133,7 +132,6 @@ from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse from revengai.models.base_response_union_get_ai_decompilation_rating_response_none_type import BaseResponseUnionGetAiDecompilationRatingResponseNoneType from revengai.models.base_response_upload_response import BaseResponseUploadResponse -from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities from revengai.models.base_response_xref_response import BaseResponseXrefResponse from revengai.models.basic import Basic from revengai.models.batch_binary_match_result import BatchBinaryMatchResult @@ -414,8 +412,6 @@ from revengai.models.report_info import ReportInfo from revengai.models.report_options import ReportOptions from revengai.models.revoke_body import RevokeBody -from revengai.models.sbom import SBOM -from revengai.models.sbom_package import SBOMPackage from revengai.models.sso_provider import SSOProvider from revengai.models.sso_providers_output_body import SSOProvidersOutputBody from revengai.models.sandbox_options import SandboxOptions @@ -514,8 +510,6 @@ from revengai.models.v2_function_info import V2FunctionInfo from revengai.models.v2_function_info_func_deps_inner import V2FunctionInfoFuncDepsInner from revengai.models.v2_function_type import V2FunctionType -from revengai.models.vulnerabilities import Vulnerabilities -from revengai.models.vulnerability import Vulnerability from revengai.models.warning_event import WarningEvent from revengai.models.workflow_progress import WorkflowProgress from revengai.models.workspace import Workspace diff --git a/revengai/models/analysis_config.py b/revengai/models/analysis_config.py index dafd4a1d..77fd755f 100644 --- a/revengai/models/analysis_config.py +++ b/revengai/models/analysis_config.py @@ -28,13 +28,11 @@ class AnalysisConfig(BaseModel): AnalysisConfig """ # noqa: E501 scrape_third_party_config: Optional[ScrapeThirdPartyConfig] = Field(default=None, description="Settings to scrape third party sources") - generate_cves: Optional[StrictBool] = Field(default=False, description="A configuration option for fetching CVEs data.") - generate_sbom: Optional[StrictBool] = Field(default=False, description="A configuration option for generating software bill of materials data.") generate_capabilities: Optional[StrictBool] = Field(default=False, description="A configuration option for generating capabilities of a binary") no_cache: Optional[StrictBool] = Field(default=False, description="When enabled, skips using cached data within the processing.") advanced_analysis: Optional[StrictBool] = Field(default=False, description="Enables an advanced security analysis.") sandbox_config: Optional[SandboxOptions] = Field(default=None, description="Including a sandbox config enables the dynamic execution sandbox") - __properties: ClassVar[List[str]] = ["scrape_third_party_config", "generate_cves", "generate_sbom", "generate_capabilities", "no_cache", "advanced_analysis", "sandbox_config"] + __properties: ClassVar[List[str]] = ["scrape_third_party_config", "generate_capabilities", "no_cache", "advanced_analysis", "sandbox_config"] model_config = ConfigDict( populate_by_name=True, @@ -94,8 +92,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "scrape_third_party_config": ScrapeThirdPartyConfig.from_dict(obj["scrape_third_party_config"]) if obj.get("scrape_third_party_config") is not None else None, - "generate_cves": obj.get("generate_cves") if obj.get("generate_cves") is not None else False, - "generate_sbom": obj.get("generate_sbom") if obj.get("generate_sbom") is not None else False, "generate_capabilities": obj.get("generate_capabilities") if obj.get("generate_capabilities") is not None else False, "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False, "advanced_analysis": obj.get("advanced_analysis") if obj.get("advanced_analysis") is not None else False, diff --git a/revengai/models/analysis_detail_response.py b/revengai/models/analysis_detail_response.py index f6ae72c4..96962d4a 100644 --- a/revengai/models/analysis_detail_response.py +++ b/revengai/models/analysis_detail_response.py @@ -17,7 +17,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from revengai.models.analysis_access_info import AnalysisAccessInfo from revengai.models.analysis_config_snapshot import AnalysisConfigSnapshot from revengai.models.auto_run_agents import AutoRunAgents @@ -41,11 +41,10 @@ class AnalysisDetailResponse(BaseModel): dashboard_url: StrictStr = Field(description="URL to view this analysis in the dashboard") debug: StrictBool model_name: StrictStr - sbom: Optional[Dict[str, Any]] = None sha_256_hash: StrictStr auto_run_agents: AutoRunAgents requested_config: AnalysisConfigSnapshot = Field(description="Snapshot of the configuration the analysis was submitted with.") - __properties: ClassVar[List[str]] = ["access", "analysis_id", "analysis_scope", "architecture", "binary_dynamic", "binary_format", "binary_name", "binary_size", "binary_type", "creation", "dashboard_url", "debug", "model_name", "sbom", "sha_256_hash", "auto_run_agents", "requested_config"] + __properties: ClassVar[List[str]] = ["access", "analysis_id", "analysis_scope", "architecture", "binary_dynamic", "binary_format", "binary_name", "binary_size", "binary_type", "creation", "dashboard_url", "debug", "model_name", "sha_256_hash", "auto_run_agents", "requested_config"] model_config = ConfigDict( populate_by_name=True, @@ -95,11 +94,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of requested_config if self.requested_config: _dict['requested_config'] = self.requested_config.to_dict() - # set to None if sbom (nullable) is None - # and model_fields_set contains the field - if self.sbom is None and "sbom" in self.model_fields_set: - _dict['sbom'] = None - return _dict @classmethod @@ -125,7 +119,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dashboard_url": obj.get("dashboard_url"), "debug": obj.get("debug"), "model_name": obj.get("model_name"), - "sbom": obj.get("sbom"), "sha_256_hash": obj.get("sha_256_hash"), "auto_run_agents": AutoRunAgents.from_dict(obj["auto_run_agents"]) if obj.get("auto_run_agents") is not None else None, "requested_config": AnalysisConfigSnapshot.from_dict(obj["requested_config"]) if obj.get("requested_config") is not None else None diff --git a/revengai/models/base_response_list_sbom.py b/revengai/models/base_response_list_sbom.py deleted file mode 100644 index 52040b81..00000000 --- a/revengai/models/base_response_list_sbom.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel -from revengai.models.sbom import SBOM -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseListSBOM(BaseModel): - """ - BaseResponseListSBOM - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[List[SBOM]] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BaseResponseListSBOM from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item_data in self.data: - if _item_data: - _items.append(_item_data.to_dict()) - _dict['data'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseListSBOM from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": [SBOM.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/base_response_vulnerabilities.py b/revengai/models/base_response_vulnerabilities.py deleted file mode 100644 index 3c1b7bcb..00000000 --- a/revengai/models/base_response_vulnerabilities.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel -from revengai.models.vulnerabilities import Vulnerabilities -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseVulnerabilities(BaseModel): - """ - BaseResponseVulnerabilities - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[Vulnerabilities] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BaseResponseVulnerabilities from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseVulnerabilities from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": Vulnerabilities.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/re_analysis_form.py b/revengai/models/re_analysis_form.py index 39f53b6f..353f95d9 100644 --- a/revengai/models/re_analysis_form.py +++ b/revengai/models/re_analysis_form.py @@ -28,7 +28,7 @@ class ReAnalysisForm(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Tags associated with the analysis") command_line_args: Optional[StrictStr] = Field(default='', description="Command line arguments for dynamic execution") priority: Optional[StrictInt] = Field(default=0, description="Priority of the analysis") - essential: Optional[StrictBool] = Field(default=True, description="Only runs essential parts of the analysis, skips tags/sbom/cves etc.") + essential: Optional[StrictBool] = Field(default=True, description="Only runs essential parts of the analysis, skips tags etc.") model_name: Optional[StrictStr] = None no_cache: Optional[StrictBool] = Field(default=False, description="When enabled, skips using cached data within the processing.") __properties: ClassVar[List[str]] = ["tags", "command_line_args", "priority", "essential", "model_name", "no_cache"] diff --git a/revengai/models/sbom.py b/revengai/models/sbom.py deleted file mode 100644 index 2b12c608..00000000 --- a/revengai/models/sbom.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from revengai.models.sbom_package import SBOMPackage -from typing import Optional, Set -from typing_extensions import Self - -class SBOM(BaseModel): - """ - SBOM - """ # noqa: E501 - packages: List[SBOMPackage] = Field(description="The packages found") - imported_libs: List[StrictStr] = Field(description="The import libraries found") - __properties: ClassVar[List[str]] = ["packages", "imported_libs"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SBOM from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in packages (list) - _items = [] - if self.packages: - for _item_packages in self.packages: - if _item_packages: - _items.append(_item_packages.to_dict()) - _dict['packages'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SBOM from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "packages": [SBOMPackage.from_dict(_item) for _item in obj["packages"]] if obj.get("packages") is not None else None, - "imported_libs": obj.get("imported_libs") - }) - return _obj - - diff --git a/revengai/models/sbom_package.py b/revengai/models/sbom_package.py deleted file mode 100644 index 0cb8a8aa..00000000 --- a/revengai/models/sbom_package.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class SBOMPackage(BaseModel): - """ - SBOMPackage - """ # noqa: E501 - name: StrictStr = Field(description="The name of the package") - version: StrictStr = Field(description="The version of the package") - __properties: ClassVar[List[str]] = ["name", "version"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SBOMPackage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SBOMPackage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "version": obj.get("version") - }) - return _obj - - diff --git a/revengai/models/vulnerabilities.py b/revengai/models/vulnerabilities.py deleted file mode 100644 index 5fbc1abb..00000000 --- a/revengai/models/vulnerabilities.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from revengai.models.vulnerability import Vulnerability -from typing import Optional, Set -from typing_extensions import Self - -class Vulnerabilities(BaseModel): - """ - Vulnerabilities - """ # noqa: E501 - vulnerabilities: List[Vulnerability] - __properties: ClassVar[List[str]] = ["vulnerabilities"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Vulnerabilities from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in vulnerabilities (list) - _items = [] - if self.vulnerabilities: - for _item_vulnerabilities in self.vulnerabilities: - if _item_vulnerabilities: - _items.append(_item_vulnerabilities.to_dict()) - _dict['vulnerabilities'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Vulnerabilities from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "vulnerabilities": [Vulnerability.from_dict(_item) for _item in obj["vulnerabilities"]] if obj.get("vulnerabilities") is not None else None - }) - return _obj - - diff --git a/revengai/models/vulnerability.py b/revengai/models/vulnerability.py deleted file mode 100644 index 4ec4d761..00000000 --- a/revengai/models/vulnerability.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class Vulnerability(BaseModel): - """ - Vulnerability - """ # noqa: E501 - vendor: StrictStr - product: StrictStr - version: StrictStr - cve_number: StrictStr - severity: StrictStr - source: StrictStr - cvss_version: StrictStr - cvss_vector: StrictStr - remarks: StrictStr - score: Union[StrictFloat, StrictInt] - is_unknown: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["vendor", "product", "version", "cve_number", "severity", "source", "cvss_version", "cvss_vector", "remarks", "score", "is_unknown"] - - @field_validator('severity') - def severity_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'UNKNOWN', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'UNKNOWN', 'unknown_default_open_api')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Vulnerability from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Vulnerability from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "vendor": obj.get("vendor"), - "product": obj.get("product"), - "version": obj.get("version"), - "cve_number": obj.get("cve_number"), - "severity": obj.get("severity"), - "source": obj.get("source"), - "cvss_version": obj.get("cvss_version"), - "cvss_vector": obj.get("cvss_vector"), - "remarks": obj.get("remarks"), - "score": obj.get("score"), - "is_unknown": obj.get("is_unknown") if obj.get("is_unknown") is not None else False - }) - return _obj - -