@zksecurity/zkao-sdk 0.20.0-next.15 → 0.25.0-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +41 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -145,18 +145,18 @@ interface paths {
|
|
|
145
145
|
cookie?: never;
|
|
146
146
|
};
|
|
147
147
|
/**
|
|
148
|
-
* Get a repository's Continuous
|
|
149
|
-
* @description Requires scope: `read`. Continuous
|
|
148
|
+
* Get a repository's Continuous Security schedule
|
|
149
|
+
* @description Requires scope: `read`. Continuous Security scans one branch on a schedule paid from a monthly budget. With no schedule on the branch, `enabled` is false and the schedule fields are null. The recommended monthly budget supports ongoing analysis. The minimum funds one useful analysis step. Scheduling adapts to the available allocation.
|
|
150
150
|
*/
|
|
151
151
|
get: operations["getContinuousTesting"];
|
|
152
152
|
/**
|
|
153
|
-
* Turn Continuous
|
|
153
|
+
* Turn Continuous Security on, change it, or pause it
|
|
154
154
|
* @description Requires scope: `automations:write`. Every field is optional. With no schedule on the branch, the request creates one at the recommended monthly budget unless `monthlyBudgetCredits` is given; `enabled: false` then changes nothing. The budget sets the interval smoothly from once a week to twice a day. The recommended budget funds a run about every three days. A budget outside the returned minimum and maximum is refused with `400`. Administrators can raise the maximum monthly budget. `areaKeys` replaces the audit areas runs rotate through, one per run. `enabled: false` pauses the schedule and keeps it. A change re-arms a schedule that had stopped. Each run still needs spendable credits when it launches.
|
|
155
155
|
*/
|
|
156
156
|
put: operations["setContinuousTesting"];
|
|
157
157
|
post?: never;
|
|
158
158
|
/**
|
|
159
|
-
* Remove a repository's Continuous
|
|
159
|
+
* Remove a repository's Continuous Security schedule
|
|
160
160
|
* @description Requires scope: `automations:write`. Scans the schedule already ran stay. Responds `404` when the branch has no schedule.
|
|
161
161
|
*/
|
|
162
162
|
delete: operations["removeContinuousTesting"];
|
|
@@ -196,6 +196,16 @@ interface paths {
|
|
|
196
196
|
* it. A malformed, unknown, or misplaced base is a `400` with code
|
|
197
197
|
* `diff_base_required`, `diff_base_not_allowed`, or `diff_base_invalid`.
|
|
198
198
|
* A diff scan also needs a change to audit (otherwise `422`).
|
|
199
|
+
*
|
|
200
|
+
* The builtin presets come in two tiers. Flash runs fewer techniques on
|
|
201
|
+
* a flash model. Max runs every technique on flagship models. Each tier
|
|
202
|
+
* has a preset for the code (`builtin:Flash`, `builtin:Max`), a change
|
|
203
|
+
* (`builtin:Flash Diff`, `builtin:Max Diff`), open findings
|
|
204
|
+
* (`builtin:Flash Retriage`, `builtin:Max Retriage`) and resolved
|
|
205
|
+
* findings (`builtin:Flash Regression Check`,
|
|
206
|
+
* `builtin:Max Regression Check`). Earlier names, such as
|
|
207
|
+
* `builtin:Rapid Review`, `builtin:Deep Audit` and `builtin:Diff Scan`,
|
|
208
|
+
* still resolve.
|
|
199
209
|
*/
|
|
200
210
|
post: operations["launchScan"];
|
|
201
211
|
delete?: never;
|
|
@@ -528,6 +538,8 @@ interface paths {
|
|
|
528
538
|
/**
|
|
529
539
|
* Change a finding's resolution status
|
|
530
540
|
* @description Requires scope: `findings:write`.
|
|
541
|
+
*
|
|
542
|
+
* 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.
|
|
531
543
|
*/
|
|
532
544
|
patch: operations["updateFindingResolution"];
|
|
533
545
|
trace?: never;
|
|
@@ -837,6 +849,14 @@ interface components {
|
|
|
837
849
|
confirmationEvidence?: "POC" | "ANALYSIS" | null;
|
|
838
850
|
resolutionStatus: components["schemas"]["ResolutionStatus"];
|
|
839
851
|
notesCount: number;
|
|
852
|
+
/** @description Why triage dismissed the finding as a false positive. Null when triage did not dismiss it or gave no reason. */
|
|
853
|
+
dismissalReason: string | null;
|
|
854
|
+
/** @description The triage verdict a member replaced, kept from the first override. Null when nobody overrode triage. */
|
|
855
|
+
triageOverriddenFrom: components["schemas"]["TriageStatus"] | null;
|
|
856
|
+
/** Format: date-time */
|
|
857
|
+
triageOverriddenAt: string | null;
|
|
858
|
+
/** @description Name, or email when there is no name, of the member who overrode triage. */
|
|
859
|
+
triageOverriddenByName: string | null;
|
|
840
860
|
};
|
|
841
861
|
FindingNote: {
|
|
842
862
|
id: string;
|
|
@@ -1024,7 +1044,7 @@ interface components {
|
|
|
1024
1044
|
};
|
|
1025
1045
|
LaunchScanRequest: {
|
|
1026
1046
|
repositoryId: string;
|
|
1027
|
-
/** @description Max budget for the scan, in credits. Reserved at launch. Omit it to launch at the budget zkao recommends for this scan type and scope on this repository. That is the last such scan's budget, or half again when that scan ran short of it, never above twice the scan type's minimum. A first scan starts at twice the minimum. */
|
|
1047
|
+
/** @description Max budget for the scan, in credits. Reserved at launch. Omit it to launch at the budget zkao recommends for this scan type and scope on this repository. That is the last such scan's budget, or half again when that scan ran short of it, never above twice the scan type's minimum. A first scan starts at twice the minimum. A diff scan is sized from its change instead: the minimum for up to 500 changed lines, then in proportion, up to three times the minimum. */
|
|
1028
1048
|
creditBudget?: number;
|
|
1029
1049
|
/** @description A preset ref from /scan-presets. Defaults to the first active preset. */
|
|
1030
1050
|
presetRef?: string;
|
|
@@ -1035,10 +1055,21 @@ interface components {
|
|
|
1035
1055
|
commitMessage?: string | null;
|
|
1036
1056
|
/** @description What a diff scan's change is measured from: a commit SHA, branch, or tag. Required by a diff scan preset and refused by every other. The scan records the merge base of this and the scanned commit. */
|
|
1037
1057
|
baseCommit?: string | null;
|
|
1058
|
+
/** @description Options for Recheck open findings. Omit to reassess eligible Not started findings on the selected branch. Fresh rechecks require the branch's latest commit and reject a pinned commit or audit scope. */
|
|
1059
|
+
backlogRecheck?: {
|
|
1060
|
+
/** @description Also include In progress findings. Defaults to false. */
|
|
1061
|
+
includeInProgress?: boolean;
|
|
1062
|
+
/** @description Restrict the recheck to these findings. Eligibility is still checked against the selected repository and branch. Omit to include all eligible findings. Cannot be combined with resumeScanId. */
|
|
1063
|
+
findingIds?: string[];
|
|
1064
|
+
/** @description Continue a finished recheck's unassessed findings on the same repository. Uses that scan's branch, commit, and status selection. */
|
|
1065
|
+
resumeScanId?: string;
|
|
1066
|
+
};
|
|
1038
1067
|
/** @description Where this launch came from, shown on the scan page. Optional, and display only: nothing in the pipeline reads it. */
|
|
1039
1068
|
trigger?: components["schemas"]["ScanTrigger"] | null;
|
|
1040
1069
|
/** @description Area keys from /audit-areas to scope this scan to. Omit or send an empty array to scan the whole repository. A key the repository's current map no longer names fails the launch rather than being dropped, so a scan budgeted for one subsystem never silently runs against everything. */
|
|
1041
1070
|
auditAreaKeys?: string[];
|
|
1071
|
+
/** @description The code to audit, described in your own words, instead of `auditAreaKeys`. Send one or the other, not both. */
|
|
1072
|
+
auditScope?: string | null;
|
|
1042
1073
|
/** @description Guidance for this scan only, replacing the repository's configured guidance layer (it is still layered over any committed zkao.md). Omit the field to inherit the repository's guidance; send null to scan with no guidance layer. */
|
|
1043
1074
|
guidance?: string | null;
|
|
1044
1075
|
};
|
|
@@ -1111,7 +1142,7 @@ interface components {
|
|
|
1111
1142
|
};
|
|
1112
1143
|
ContinuousTesting: {
|
|
1113
1144
|
repositoryId: string;
|
|
1114
|
-
/** @description False when Continuous
|
|
1145
|
+
/** @description False when Continuous Security is not offered. */
|
|
1115
1146
|
available: boolean;
|
|
1116
1147
|
/** @description False when there is no schedule or it is paused. */
|
|
1117
1148
|
enabled: boolean;
|
|
@@ -1144,9 +1175,9 @@ interface components {
|
|
|
1144
1175
|
* @description When the next run becomes due. A past time means within the hour. Null when paused or stopped.
|
|
1145
1176
|
*/
|
|
1146
1177
|
nextRunAt: string | null;
|
|
1147
|
-
/** @description A
|
|
1178
|
+
/** @description A suggested allocation for ongoing work, based on the repository's estimated analysis budget. */
|
|
1148
1179
|
recommendedMonthlyCredits: number | null;
|
|
1149
|
-
/** @description
|
|
1180
|
+
/** @description The smallest month that funds one analysis step. Less is refused. */
|
|
1150
1181
|
minimumMonthlyCredits: number | null;
|
|
1151
1182
|
/** @description The largest monthly budget currently allowed for the repository. Administrators can raise it. */
|
|
1152
1183
|
maximumMonthlyCredits: number | null;
|
|
@@ -1203,6 +1234,8 @@ interface components {
|
|
|
1203
1234
|
FindingResolutionResult: {
|
|
1204
1235
|
findingId: string;
|
|
1205
1236
|
resolutionStatus: components["schemas"]["ResolutionStatus"];
|
|
1237
|
+
/** @description The triage status after the change. It moves when the change reopens a finding triage dismissed, or undoes that reopen. */
|
|
1238
|
+
triageStatus: components["schemas"]["TriageStatus"];
|
|
1206
1239
|
};
|
|
1207
1240
|
/**
|
|
1208
1241
|
* @description 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.
|