Analysis versions

Python SDK reference for the analysis_versions resource

Warning

The SDKs are in research preview. Their interfaces may change between minor versions until 1.0.

Access this resource from client.analysis_versions. Both async and sync clients expose the same methods.

create_chat

POST /v1/chats

Start a chat about a version.

result = await client.analysis_versions.create_chat(
    version_id=version_id,
)

Arguments:

version_idstrbodyrequired

Returns: Chat

show properties (7)hide properties (7)
idstringrequired
created_atstringrequired
code_idstringrequired
version_idOptional[string]
titleOptional[string]
chat_typeChatTyperequired
total_messagesintegerrequired

get

GET /v1/analysis-versions/{version_id}

A version, with the analysis it belongs to.

result = await client.analysis_versions.get(
    version_id=version_id,
)

Arguments:

version_idstrpathrequired

Returns: AnalysisVersionDirect

show properties (18)hide properties (18)
idstringrequired
created_atstringrequired
triggerAnalysisTriggerrequired

How this version was created.

n_findingsintegerrequired

Findings on this version, including staged changes.

n_remediationsintegerrequired

Findings from the parent version dropped because their code changed.

is_headbooleanrequired

Whether this is the analysis's HEAD.

n_pipeline_processingintegerrequired

Number of entrypoints currently being processed by Bevor internal pipeline.

n_pipeline_failedintegerrequired

Number of entrypoints that have failed the Bevor internal pipeline

n_pipeline_succeededintegerrequired

Number of entrypoints that have successfully ran the Bevor internal pipeline

code_versionCodeVersionrequired

The code this version analyzes.

show properties (8)hide properties (8)
idstringrequired
chain_idOptional[integer]

The chain the contract is deployed on.

version_methodCodeVersionMethodrequired

How the code was sourced.

version_fingerprintstringrequired

Uniquely identifies this code.

statusCodeVersionStatusrequired

Processing status of the code.

branchOptional[string]
commitOptional[GithubCommit]
show properties (4)hide properties (4)
shastringrequired
authorstringrequired
messagestringrequired
timestampstringrequired
repositoryOptional[GithubRepository]
show properties (4)hide properties (4)
idintegerrequired
namestringrequired
is_privatebooleanrequired
accountGithubAccountrequired
show properties (4)hide properties (4)
idintegerrequired
loginstringrequired
typestringrequired
avatar_urlstringrequired
merged_from_versionOptional[AnalysisVersionRef]

The version merged into this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_from_versionOptional[AnalysisVersionRef]

The version this one was forked from.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
parent_versionOptional[AnalysisVersionRef]

The previous version in this analysis.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
child_versionsarray of AnalysisVersionRef

Versions built on this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
merged_versionsarray of AnalysisVersionRef

Versions this one was merged into.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_versionsarray of AnalysisVersionRef

Forks of this version.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsAnalysisActionsrequired
show properties (8)hide properties (8)
forkActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

create_childActionDetailsrequired

Add a version for new code on top of this one.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

run_pipelineActionDetailsrequired

Run Bevor internal pipeline. Can be used to retry failures as well.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

merge_toActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

merge_fromActionDetailsrequired

Add, edit, or delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

alter_findingsActionDetailsrequired

Edit, add, delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

set_as_headActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

analysis_metaAnalysisMetadatarequired

The analysis this version belongs to.

show properties (5)hide properties (5)
idstringrequired
namestringrequired
created_atstringrequired
userUserrequired

The analysis owner.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
is_ownerbooleanrequired

Whether the caller owns this analysis.

list

GET /v1/analysis-versions

Versions across the project.

result = await client.analysis_versions.list()

Arguments:

paramsAnalysisVersionListParams | Nonequery
default:None
pageinteger
page_sizeinteger
analysis_idstring
user_idstring
is_ownerboolean
forked_from_version_idstring
merged_from_version_idstring
parent_version_idstring
triggerAnalysisTrigger
code_idstring
order'desc' | 'asc'
with_paginationboolquery
default:False

Return type by call:

  • with_pagination=True → PaginatedResource[AnalysisVersionDirect]
  • with_pagination=False → Pagination[AnalysisVersionDirect]
show properties (6)hide properties (6)
resultsarray of AnalysisVersionDirect
show properties (18)hide properties (18)
idstringrequired
created_atstringrequired
triggerAnalysisTriggerrequired

How this version was created.

n_findingsintegerrequired

Findings on this version, including staged changes.

n_remediationsintegerrequired

Findings from the parent version dropped because their code changed.

is_headbooleanrequired

Whether this is the analysis's HEAD.

n_pipeline_processingintegerrequired

Number of entrypoints currently being processed by Bevor internal pipeline.

n_pipeline_failedintegerrequired

Number of entrypoints that have failed the Bevor internal pipeline

n_pipeline_succeededintegerrequired

Number of entrypoints that have successfully ran the Bevor internal pipeline

code_versionCodeVersionrequired

The code this version analyzes.

show properties (8)hide properties (8)
idstringrequired
chain_idOptional[integer]

The chain the contract is deployed on.

version_methodCodeVersionMethodrequired

How the code was sourced.

version_fingerprintstringrequired

Uniquely identifies this code.

statusCodeVersionStatusrequired

Processing status of the code.

branchOptional[string]
commitOptional[GithubCommit]
show properties (4)hide properties (4)
shastringrequired
authorstringrequired
messagestringrequired
timestampstringrequired
repositoryOptional[GithubRepository]
show properties (4)hide properties (4)
idintegerrequired
namestringrequired
is_privatebooleanrequired
accountGithubAccountrequired
show properties (4)hide properties (4)
idintegerrequired
loginstringrequired
typestringrequired
avatar_urlstringrequired
merged_from_versionOptional[AnalysisVersionRef]

The version merged into this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_from_versionOptional[AnalysisVersionRef]

The version this one was forked from.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
parent_versionOptional[AnalysisVersionRef]

The previous version in this analysis.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
child_versionsarray of AnalysisVersionRef

Versions built on this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
merged_versionsarray of AnalysisVersionRef

Versions this one was merged into.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_versionsarray of AnalysisVersionRef

Forks of this version.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsAnalysisActionsrequired
show properties (8)hide properties (8)
forkActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

create_childActionDetailsrequired

Add a version for new code on top of this one.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

run_pipelineActionDetailsrequired

Run Bevor internal pipeline. Can be used to retry failures as well.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

merge_toActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

merge_fromActionDetailsrequired

Add, edit, or delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

alter_findingsActionDetailsrequired

Edit, add, delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

set_as_headActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

analysis_metaAnalysisMetadatarequired

The analysis this version belongs to.

show properties (5)hide properties (5)
idstringrequired
namestringrequired
created_atstringrequired
userUserrequired

The analysis owner.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
is_ownerbooleanrequired

Whether the caller owns this analysis.

pageintegerrequired
page_sizeintegerrequired
morebooleanrequired

Whether more pages follow.

total_observationsintegerrequired

Total results across all pages.

total_pagesintegerrequired

delete

DELETE /v1/analysis-versions/{version_id}

Delete a version.

result = await client.analysis_versions.delete(
    version_id=version_id,
)

Arguments:

version_idstrpathrequired

Returns: Analysis

show properties (6)hide properties (6)
idstringrequired
namestringrequired
created_atstringrequired
userUserrequired

The analysis owner.

show properties (4)hide properties (4)
idstringrequired
is_selfbooleanrequired
created_atstringrequired
usernamestringrequired
is_ownerbooleanrequired

Whether the caller owns this analysis.

versionAnalysisVersionrequired

The requested version, HEAD by default.

show properties (17)hide properties (17)
idstringrequired
created_atstringrequired
triggerAnalysisTriggerrequired

How this version was created.

n_findingsintegerrequired

Findings on this version, including staged changes.

n_remediationsintegerrequired

Findings from the parent version dropped because their code changed.

is_headbooleanrequired

Whether this is the analysis's HEAD.

n_pipeline_processingintegerrequired

Number of entrypoints currently being processed by Bevor internal pipeline.

n_pipeline_failedintegerrequired

Number of entrypoints that have failed the Bevor internal pipeline

n_pipeline_succeededintegerrequired

Number of entrypoints that have successfully ran the Bevor internal pipeline

code_versionCodeVersionrequired

The code this version analyzes.

show properties (8)hide properties (8)
idstringrequired
chain_idOptional[integer]

The chain the contract is deployed on.

version_methodCodeVersionMethodrequired

How the code was sourced.

version_fingerprintstringrequired

Uniquely identifies this code.

statusCodeVersionStatusrequired

Processing status of the code.

branchOptional[string]
commitOptional[GithubCommit]
show properties (4)hide properties (4)
shastringrequired
authorstringrequired
messagestringrequired
timestampstringrequired
repositoryOptional[GithubRepository]
show properties (4)hide properties (4)
idintegerrequired
namestringrequired
is_privatebooleanrequired
accountGithubAccountrequired
show properties (4)hide properties (4)
idintegerrequired
loginstringrequired
typestringrequired
avatar_urlstringrequired
merged_from_versionOptional[AnalysisVersionRef]

The version merged into this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_from_versionOptional[AnalysisVersionRef]

The version this one was forked from.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
parent_versionOptional[AnalysisVersionRef]

The previous version in this analysis.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
child_versionsarray of AnalysisVersionRef

Versions built on this one.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
merged_versionsarray of AnalysisVersionRef

Versions this one was merged into.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
forked_versionsarray of AnalysisVersionRef

Forks of this version.

show properties (2)hide properties (2)
idstringrequired
analysis_idstringrequired
actionsAnalysisActionsrequired
show properties (8)hide properties (8)
forkActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

create_childActionDetailsrequired

Add a version for new code on top of this one.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

deleteActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

run_pipelineActionDetailsrequired

Run Bevor internal pipeline. Can be used to retry failures as well.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

merge_toActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

merge_fromActionDetailsrequired

Add, edit, or delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

alter_findingsActionDetailsrequired

Edit, add, delete findings.

show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

set_as_headActionDetailsrequired
show properties (2)hide properties (2)
is_allowedbooleanrequired

Whether the caller can perform the action.

reasonsarray of string

reasons why action is not allowed, if applicable.

On this page