Skip to content
These docs describe staging.zkao.io and the @zksecurity/zkao-cli@next release. For production, see docs.zkao.io.

Change a finding's resolution status

View .md
PATCH
/projects/{projectId}/findings/{findingId}/resolution
curl --request PATCH \
--url https://zkao.io/api/v1/projects/example/findings/example/resolution \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "resolutionStatus": "NOT_STARTED", "note": { "content": "example", "existingNoteId": "example" }, "reason": "fixed_in_code" }'

Requires scope: findings:write.

On a finding triage dismissed (triageStatus FALSE_POSITIVE), any status other than FALSE_POSITIVE or DUPLICATE reopens it: its triageStatus becomes CONFIRMED and the override fields record who did it. NOT_STARTED reopens it even when that is already its resolution. Setting FALSE_POSITIVE on a reopened finding undoes the reopen: the triage verdict comes back, the override is cleared, and the resolution returns to NOT_STARTED. The response carries the stored statuses.

projectId
required
string
findingId
required
string

The finding id, or the ZK- label shown on the finding page (the id’s last eight characters, prefix optional). A label that matches more than one finding in the project is refused with 409 conflict; use the full id.

Media typeapplication/json
object
resolutionStatus
required
string
Allowed values: NOT_STARTED IN_PROGRESS RESOLVED WONT_FIX MITIGATED FALSE_POSITIVE DUPLICATE
note

Optionally attach or reuse a note alongside a resolution change.

object
content

Create a new note with this body.

string
existingNoteId

Reuse an existing note by id.

string
reason

Short code for why a finding is being closed, chosen from the set offered for the resolutionStatus it is sent with; a code belonging to a different status is rejected with 400. Ignored for the open statuses (NOT_STARTED, IN_PROGRESS) and when note is also given. It is not stored as a field: it is recorded as a comment on the finding stating what was chosen, which is returned by the notes endpoints.

Codes per status. RESOLVED: fixed_in_code, fixed_upstream, code_removed. MITIGATED: compensating_control, limited_exposure, monitored. FALSE_POSITIVE: not_reachable, guarded_elsewhere, intended_behavior, misread_code, bad_assumption. WONT_FIX: risk_accepted, out_of_scope, not_worth_fixing, code_being_removed. DUPLICATE: duplicate_of_finding, same_root_cause.

string
Allowed values: fixed_in_code fixed_upstream code_removed compensating_control limited_exposure monitored not_reachable guarded_elsewhere intended_behavior misread_code bad_assumption risk_accepted out_of_scope not_worth_fixing code_being_removed duplicate_of_finding same_root_cause
Example
not_reachable

OK

Media typeapplication/json
object
findingId
required
string
resolutionStatus
required
string
Allowed values: NOT_STARTED IN_PROGRESS RESOLVED WONT_FIX MITIGATED FALSE_POSITIVE DUPLICATE
triageStatus
required

The triage status after the change. It moves when the change reopens a finding triage dismissed, or undoes that reopen.

string
Allowed values: PENDING NEW DUPLICATE RECURRING CONFIRMED FALSE_POSITIVE INCONCLUSIVE
Example
{
"resolutionStatus": "NOT_STARTED",
"triageStatus": "PENDING"
}

Invalid request

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
minimumCredits

Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

integer
Example
{
"error": {
"code": "unauthorized"
}
}

Missing, malformed, expired, or revoked token

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
minimumCredits

Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

integer
Example
{
"error": {
"code": "unauthorized"
}
}

The token lacks the required scope

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
minimumCredits

Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

integer
Example
{
"error": {
"code": "unauthorized"
}
}

Resource not in this token’s project or repo allowlist

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
minimumCredits

Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

integer
Example
{
"error": {
"code": "unauthorized"
}
}

A compare-and-set (expectedContent) missed: the guidance changed since it was read. Re-read the current guidance and retry.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
minimumCredits

Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

integer
Example
{
"error": {
"code": "unauthorized"
}
}