Skip to content

Findings

DedupeKey

DedupeKey = string & object

A deduplication key.

Type Declaration

__dedupeKey?

optional __dedupeKey: never


Finding

Finding = object

A saved immutable Finding.

Methods

getDedupeKey()

getDedupeKey(): DedupeKey | undefined

The deduplication key of the finding.

Returns

DedupeKey | undefined

getDescription()

getDescription(): string | undefined

The description of the finding.

Returns

string | undefined

getId()

getId(): ID

The unique Caido ID of the finding.

Returns

ID

getReporter()

getReporter(): string

The name of the reporter.

Returns

string

getRequestId()

getRequestId(): string

The ID of the associated Request.

Returns

string

getTitle()

getTitle(): string

The title of the finding.

Returns

string


FindingSpec

FindingSpec = object

A mutable Finding not yet created.

Properties

dedupeKey?

optional dedupeKey: DedupeKey

Deduplication key for findings. If a finding with the same dedupe key already exists, it will not be created.

description?

optional description: string

The description of the finding.

reporter

reporter: string

The name of the reporter. It will be used to group findings.

request

request: Request

The associated Request.

title

title: string

The title of the finding.


FindingsSDK

FindingsSDK = object

The SDK for the Findings service.

Methods

create()

create(spec: FindingSpec): Promise<Finding>

Creates a new Finding.

Parameters
ParameterType
specFindingSpec
Returns

Promise<Finding>

Throws

If the request cannot be saved.

Example
js
await sdk.findings.create({
  title: "Title",
  description: "Description",
  reporter: "Reporter",
  dedupeKey: `${request.getHost()}-${request.getPath()}`,
  request,
});
exists()

exists(input: GetFindingInput): Promise<boolean>

Check if a Finding exists. Similar to get, but returns a boolean.

Parameters
ParameterType
inputGetFindingInput
Returns

Promise<boolean>

Example
js
await sdk.findings.exists("my-dedupe-key");
get()

get(input: GetFindingInput): Promise<Finding | undefined>

Try to get a Finding for a request.

Since a request can have multiple findings, this will return the first one found. You can also filter by reporter to get a specific finding.

Finally, you can use a deduplication key to get a specific finding.

Parameters
ParameterType
inputGetFindingInput
Returns

Promise<Finding | undefined>

Example
js
await sdk.findings.get({
 reporter: "Reporter",
 request,
});

GetFindingInput

GetFindingInput = DedupeKey | { reporter?: string; request: Request; }

Input to get a Finding.

Type Declaration

DedupeKey

{ reporter?: string; request: Request; }

reporter?

optional reporter: string

The name of the reporter.

request

request: Request

The associated Request.