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
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?
optionaldedupeKey:DedupeKey
Deduplication key for findings. If a finding with the same dedupe key already exists, it will not be created.
description?
optionaldescription: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
| Parameter | Type |
|---|---|
spec | FindingSpec |
Returns
Promise<Finding>
Throws
If the request cannot be saved.
Example
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
| Parameter | Type |
|---|---|
input | GetFindingInput |
Returns
Promise<boolean>
Example
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
| Parameter | Type |
|---|---|
input | GetFindingInput |
Returns
Promise<Finding | undefined>
Example
await sdk.findings.get({
reporter: "Reporter",
request,
});GetFindingInput
GetFindingInput =
DedupeKey| {reporter?:string;request:Request; }
Input to get a Finding.
Type Declaration
{ reporter?: string; request: Request; }
reporter?
optionalreporter:string
The name of the reporter.
request
request:
Request
The associated Request.
