DedupeKey =
string&object
A deduplication key.
optional__dedupeKey:never
Finding =
object
A saved immutable Finding.
getDedupeKey():
DedupeKey|undefined
The deduplication key of the finding.
DedupeKey | undefined
getDescription():
string|undefined
The description of the finding.
string | undefined
getId():
ID
The unique Caido ID of the finding.
getReporter():
string
The name of the reporter.
string
getRequestId():
string
The ID of the associated Request.
string
getTitle():
string
The title of the finding.
string
FindingSpec =
object
A mutable Finding not yet created.
optionaldedupeKey:DedupeKey
Deduplication key for findings. If a finding with the same dedupe key already exists, it will not be created.
optionaldescription:string
The description of the finding.
reporter:
string
The name of the reporter. It will be used to group findings.
request:
Request
The associated Request.
title:
string
The title of the finding.
FindingsSDK =
object
The SDK for the Findings service.
create(
spec:FindingSpec):Promise<Finding>
Creates a new Finding.
| Parameter | Type |
|---|---|
spec |
FindingSpec |
Promise<Finding>
If the request cannot be saved.
await sdk.findings.create({
title: "Title",
description: "Description",
reporter: "Reporter",
dedupeKey: `${request.getHost()}-${request.getPath()}`,
request,
});exists(
input:GetFindingInput):Promise<boolean>
Check if a Finding exists.
Similar to get, but returns a boolean.
| Parameter | Type |
|---|---|
input |
GetFindingInput |
Promise<boolean>
await sdk.findings.exists("my-dedupe-key");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.
| Parameter | Type |
|---|---|
input |
GetFindingInput |
Promise<Finding | undefined>
await sdk.findings.get({
reporter: "Reporter",
request,
});GetFindingInput =
DedupeKey| {reporter?:string;request:Request; }
Input to get a Finding.
{ reporter?: string; request: Request; }
optionalreporter:string
The name of the reporter.
request:
Request
The associated Request.