Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.97.0
v3.98.0
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ Class | Method | HTTP request | Description
- [AnalysisBulkAddTagsResponse](docs/AnalysisBulkAddTagsResponse.md)
- [AnalysisBulkAddTagsResponseItem](docs/AnalysisBulkAddTagsResponseItem.md)
- [AnalysisConfig](docs/AnalysisConfig.md)
- [AnalysisConfigSnapshot](docs/AnalysisConfigSnapshot.md)
- [AnalysisCreateRequest](docs/AnalysisCreateRequest.md)
- [AnalysisCreateResponse](docs/AnalysisCreateResponse.md)
- [AnalysisDetailResponse](docs/AnalysisDetailResponse.md)
Expand Down
1 change: 1 addition & 0 deletions docs/AnalysisConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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]
**analyse_functions** | **bool** | When enabled (default), runs the static AI analysis pipeline. | [optional] [default to True]
**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]
Expand Down
34 changes: 34 additions & 0 deletions docs/AnalysisConfigSnapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# AnalysisConfigSnapshot

Point-in-time record of which features an analysis was submitted with.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**functions** | **bool** | |
**sandbox** | **bool** | |
**scrape** | **bool** | |
**capabilities** | **bool** | |
**triage** | **bool** | |

## Example

```python
from revengai.models.analysis_config_snapshot import AnalysisConfigSnapshot

# TODO update the JSON string below
json = "{}"
# create an instance of AnalysisConfigSnapshot from a JSON string
analysis_config_snapshot_instance = AnalysisConfigSnapshot.from_json(json)
# print the JSON string representation of the object
print(AnalysisConfigSnapshot.to_json())

# convert the object into a dict
analysis_config_snapshot_dict = analysis_config_snapshot_instance.to_dict()
# create an instance of AnalysisConfigSnapshot from a dict
analysis_config_snapshot_from_dict = AnalysisConfigSnapshot.from_dict(analysis_config_snapshot_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)


1 change: 1 addition & 0 deletions docs/AnalysisDetailResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Name | Type | Description | Notes
**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. |

## Example

Expand Down
4 changes: 3 additions & 1 deletion revengai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
""" # noqa: E501


__version__ = "v3.97.0"
__version__ = "v3.98.0"

# Define package exports
__all__ = [
Expand Down Expand Up @@ -66,6 +66,7 @@
"AnalysisBulkAddTagsResponse",
"AnalysisBulkAddTagsResponseItem",
"AnalysisConfig",
"AnalysisConfigSnapshot",
"AnalysisCreateRequest",
"AnalysisCreateResponse",
"AnalysisDetailResponse",
Expand Down Expand Up @@ -596,6 +597,7 @@
from revengai.models.analysis_bulk_add_tags_response import AnalysisBulkAddTagsResponse as AnalysisBulkAddTagsResponse
from revengai.models.analysis_bulk_add_tags_response_item import AnalysisBulkAddTagsResponseItem as AnalysisBulkAddTagsResponseItem
from revengai.models.analysis_config import AnalysisConfig as AnalysisConfig
from revengai.models.analysis_config_snapshot import AnalysisConfigSnapshot as AnalysisConfigSnapshot
from revengai.models.analysis_create_request import AnalysisCreateRequest as AnalysisCreateRequest
from revengai.models.analysis_create_response import AnalysisCreateResponse as AnalysisCreateResponse
from revengai.models.analysis_detail_response import AnalysisDetailResponse as AnalysisDetailResponse
Expand Down
2 changes: 1 addition & 1 deletion revengai/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.97.0/python'
self.user_agent = 'OpenAPI-Generator/v3.98.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
4 changes: 2 additions & 2 deletions revengai/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,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.97.0\n"\
"SDK Package Version: v3.97.0".\
"Version of the API: v3.98.0\n"\
"SDK Package Version: v3.98.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
1 change: 1 addition & 0 deletions revengai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from revengai.models.analysis_bulk_add_tags_response import AnalysisBulkAddTagsResponse
from revengai.models.analysis_bulk_add_tags_response_item import AnalysisBulkAddTagsResponseItem
from revengai.models.analysis_config import AnalysisConfig
from revengai.models.analysis_config_snapshot import AnalysisConfigSnapshot
from revengai.models.analysis_create_request import AnalysisCreateRequest
from revengai.models.analysis_create_response import AnalysisCreateResponse
from revengai.models.analysis_detail_response import AnalysisDetailResponse
Expand Down
4 changes: 3 additions & 1 deletion revengai/models/analysis_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ class AnalysisConfig(BaseModel):
""" # 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.")
analyse_functions: Optional[StrictBool] = Field(default=True, description="When enabled (default), runs the static AI analysis pipeline.")
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_cves", "analyse_functions", "generate_sbom", "generate_capabilities", "no_cache", "advanced_analysis", "sandbox_config"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -95,6 +96,7 @@ 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,
"analyse_functions": obj.get("analyse_functions") if obj.get("analyse_functions") is not None else True,
"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,
Expand Down
94 changes: 94 additions & 0 deletions revengai/models/analysis_config_snapshot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# 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
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self

class AnalysisConfigSnapshot(BaseModel):
"""
Point-in-time record of which features an analysis was submitted with.
""" # noqa: E501
functions: StrictBool
sandbox: StrictBool
scrape: StrictBool
capabilities: StrictBool
triage: StrictBool
__properties: ClassVar[List[str]] = ["functions", "sandbox", "scrape", "capabilities", "triage"]

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 AnalysisConfigSnapshot 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 AnalysisConfigSnapshot from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({
"functions": obj.get("functions"),
"sandbox": obj.get("sandbox"),
"scrape": obj.get("scrape"),
"capabilities": obj.get("capabilities"),
"triage": obj.get("triage")
})
return _obj


10 changes: 8 additions & 2 deletions revengai/models/analysis_detail_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from revengai.models.analysis_access_info import AnalysisAccessInfo
from revengai.models.analysis_config_snapshot import AnalysisConfigSnapshot
from revengai.models.auto_run_agents import AutoRunAgents
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -43,7 +44,8 @@ class AnalysisDetailResponse(BaseModel):
sbom: Optional[Dict[str, Any]] = None
sha_256_hash: StrictStr
auto_run_agents: AutoRunAgents
__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: 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"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -90,6 +92,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of auto_run_agents
if self.auto_run_agents:
_dict['auto_run_agents'] = self.auto_run_agents.to_dict()
# 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:
Expand Down Expand Up @@ -122,7 +127,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"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
"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
})
return _obj

Expand Down