azure-devops-extension-api 5.276.0 → 5.279.1
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/AdvancedSecurity.Reporting/Reporting.d.ts +81 -2
- package/AdvancedSecurity.Reporting/Reporting.js +4 -0
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/Alert/Alert.d.ts +161 -9
- package/Alert/Alert.js +73 -1
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +68 -12
- package/Alert/AlertClient.js +185 -23
- package/Alert/AlertClient.min.js +1 -1
- package/Build/Build.d.ts +29 -0
- package/Build/Build.js +19 -1
- package/Build/Build.min.js +1 -1
- package/Gallery/Gallery.d.ts +46 -0
- package/Gallery/Gallery.js +11 -1
- package/Gallery/Gallery.min.js +1 -1
- package/Gallery/GalleryClient.d.ts +14 -0
- package/Gallery/GalleryClient.js +48 -0
- package/Gallery/GalleryClient.min.js +1 -1
- package/Git/Git.d.ts +2 -22
- package/Management/Management.d.ts +25 -1
- package/Management/Management.js +4 -0
- package/Management/Management.min.js +1 -1
- package/ServiceHooks/ServiceHooks.d.ts +1 -1
- package/Test/Test.d.ts +76 -56
- package/TestResults/TestResultsClient.d.ts +51 -22
- package/TestResults/TestResultsClient.js +131 -57
- package/TestResults/TestResultsClient.min.js +1 -1
- package/Tfvc/Tfvc.d.ts +54 -0
- package/Tfvc/Tfvc.js +57 -1
- package/Tfvc/Tfvc.min.js +1 -1
- package/Wiki/Wiki.d.ts +17 -0
- package/Wiki/WikiClient.d.ts +8 -0
- package/Wiki/WikiClient.js +23 -0
- package/Wiki/WikiClient.min.js +1 -1
- package/WorkItemTracking/WorkItemTracking.d.ts +48 -0
- package/WorkItemTracking/WorkItemTracking.js +11 -1
- package/WorkItemTracking/WorkItemTracking.min.js +1 -1
- package/esm/AdvancedSecurity.Reporting/Reporting.js +4 -0
- package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/esm/Alert/Alert.js +72 -0
- package/esm/Alert/Alert.min.js +1 -1
- package/esm/Alert/AlertClient.js +172 -22
- package/esm/Alert/AlertClient.min.js +1 -1
- package/esm/Build/Build.js +18 -0
- package/esm/Build/Build.min.js +1 -1
- package/esm/Gallery/Gallery.js +10 -0
- package/esm/Gallery/Gallery.min.js +1 -1
- package/esm/Gallery/GalleryClient.js +42 -0
- package/esm/Gallery/GalleryClient.min.js +1 -1
- package/esm/Management/Management.js +4 -0
- package/esm/Management/Management.min.js +1 -1
- package/esm/TestResults/TestResultsClient.js +121 -51
- package/esm/TestResults/TestResultsClient.min.js +1 -1
- package/esm/Tfvc/Tfvc.js +56 -0
- package/esm/Tfvc/Tfvc.min.js +1 -1
- package/esm/Wiki/WikiClient.js +21 -0
- package/esm/Wiki/WikiClient.min.js +1 -1
- package/esm/WorkItemTracking/WorkItemTracking.js +10 -0
- package/esm/WorkItemTracking/WorkItemTracking.min.js +1 -1
- package/package.json +1 -1
|
@@ -128,7 +128,11 @@ export declare enum AlertType {
|
|
|
128
128
|
/**
|
|
129
129
|
* The code contains a weakness determined by AI-powered analysis.
|
|
130
130
|
*/
|
|
131
|
-
AICode = 5
|
|
131
|
+
AICode = 5,
|
|
132
|
+
/**
|
|
133
|
+
* The code uses a dependency flagged as malware by the GitHub Advisory Database.
|
|
134
|
+
*/
|
|
135
|
+
Malware = 6
|
|
132
136
|
}
|
|
133
137
|
export declare enum AlertValidityStatus {
|
|
134
138
|
/**
|
|
@@ -306,6 +310,15 @@ export declare enum ComponentType {
|
|
|
306
310
|
*/
|
|
307
311
|
Vcpkg = 16
|
|
308
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Repository count for a Security Overview Coverage metric.
|
|
315
|
+
*/
|
|
316
|
+
export interface CoverageSummaryMetric {
|
|
317
|
+
/**
|
|
318
|
+
* Number of repositories matching the metric.
|
|
319
|
+
*/
|
|
320
|
+
repositoryCount: number;
|
|
321
|
+
}
|
|
309
322
|
/**
|
|
310
323
|
* An alert entity used in the dashboard for combined alerts.
|
|
311
324
|
*/
|
|
@@ -343,7 +356,7 @@ export interface DashboardAlert {
|
|
|
343
356
|
*/
|
|
344
357
|
state: State;
|
|
345
358
|
/**
|
|
346
|
-
* Title will only be rendered as text and does not support markdown formatting. There is a maximum character limit of
|
|
359
|
+
* Title will only be rendered as text and does not support markdown formatting. There is a maximum character limit of 512.
|
|
347
360
|
*/
|
|
348
361
|
title: string;
|
|
349
362
|
/**
|
|
@@ -487,6 +500,39 @@ export interface OrgAlertSummary {
|
|
|
487
500
|
* A list of Project summary data.
|
|
488
501
|
*/
|
|
489
502
|
projects: ProjectAlertSummary[];
|
|
503
|
+
/**
|
|
504
|
+
* Summary metrics for the authorized repository scope.
|
|
505
|
+
*/
|
|
506
|
+
totals: OrgAlertSummaryTotals;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Aggregate Risk values for an organization Security Overview response.
|
|
510
|
+
*/
|
|
511
|
+
export interface OrgAlertSummaryTotals {
|
|
512
|
+
/**
|
|
513
|
+
* Alerts dismissed during the selected period.
|
|
514
|
+
*/
|
|
515
|
+
dismissedAlerts: number;
|
|
516
|
+
/**
|
|
517
|
+
* Alerts fixed during the selected period.
|
|
518
|
+
*/
|
|
519
|
+
fixedAlerts: number;
|
|
520
|
+
/**
|
|
521
|
+
* Distinct authorized repositories in the filtered response.
|
|
522
|
+
*/
|
|
523
|
+
matchingRepositoryCount: number;
|
|
524
|
+
/**
|
|
525
|
+
* Alerts introduced during the selected period that remain open.
|
|
526
|
+
*/
|
|
527
|
+
newAlerts: number;
|
|
528
|
+
/**
|
|
529
|
+
* Current open alerts.
|
|
530
|
+
*/
|
|
531
|
+
openAlerts: number;
|
|
532
|
+
/**
|
|
533
|
+
* Distinct authorized Advanced Security-enabled repositories.
|
|
534
|
+
*/
|
|
535
|
+
totalRepositoryCount: number;
|
|
490
536
|
}
|
|
491
537
|
/**
|
|
492
538
|
* Org Enablement Summary.
|
|
@@ -500,6 +546,39 @@ export interface OrgEnablementSummary {
|
|
|
500
546
|
* A list of Project Enablement data.
|
|
501
547
|
*/
|
|
502
548
|
projects: ProjectEnablementSummary[];
|
|
549
|
+
/**
|
|
550
|
+
* Summary metrics for the authorized repository scope.
|
|
551
|
+
*/
|
|
552
|
+
totals: OrgEnablementSummaryTotals;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Aggregate Coverage values for an organization Security Overview response.
|
|
556
|
+
*/
|
|
557
|
+
export interface OrgEnablementSummaryTotals {
|
|
558
|
+
/**
|
|
559
|
+
* Repositories with code alerts enabled.
|
|
560
|
+
*/
|
|
561
|
+
code: CoverageSummaryMetric;
|
|
562
|
+
/**
|
|
563
|
+
* Repositories with dependency alerts enabled.
|
|
564
|
+
*/
|
|
565
|
+
dependencies: CoverageSummaryMetric;
|
|
566
|
+
/**
|
|
567
|
+
* Distinct authorized repositories in the filtered response.
|
|
568
|
+
*/
|
|
569
|
+
matchingRepositoryCount: number;
|
|
570
|
+
/**
|
|
571
|
+
* Repositories with all Coverage settings disabled.
|
|
572
|
+
*/
|
|
573
|
+
noTooling: CoverageSummaryMetric;
|
|
574
|
+
/**
|
|
575
|
+
* Repositories with secret alerts enabled.
|
|
576
|
+
*/
|
|
577
|
+
secrets: CoverageSummaryMetric;
|
|
578
|
+
/**
|
|
579
|
+
* Distinct authorized Advanced Security-enabled repositories.
|
|
580
|
+
*/
|
|
581
|
+
totalRepositoryCount: number;
|
|
503
582
|
}
|
|
504
583
|
export interface Project {
|
|
505
584
|
id: string;
|
|
@@ -32,6 +32,10 @@ var AlertType;
|
|
|
32
32
|
* The code contains a weakness determined by AI-powered analysis.
|
|
33
33
|
*/
|
|
34
34
|
AlertType[AlertType["AICode"] = 5] = "AICode";
|
|
35
|
+
/**
|
|
36
|
+
* The code uses a dependency flagged as malware by the GitHub Advisory Database.
|
|
37
|
+
*/
|
|
38
|
+
AlertType[AlertType["Malware"] = 6] = "Malware";
|
|
35
39
|
})(AlertType || (exports.AlertType = AlertType = {}));
|
|
36
40
|
var AlertValidityStatus;
|
|
37
41
|
(function (AlertValidityStatus) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimePeriod=exports.State=exports.Severity=exports.DismissalType=exports.DashboardAlertState=exports.ComponentType=exports.AlertValidityStatus=exports.AlertType=void 0;var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(exports.ComponentType=ComponentType={}));var DashboardAlertState;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(DashboardAlertState||(exports.DashboardAlertState=DashboardAlertState={}));var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(exports.DismissalType=DismissalType={}));var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(exports.Severity=Severity={}));var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(exports.State=State={}));var TimePeriod;!function(e){e[e.Undefined=0]="Undefined",e[e.Last24Hours=5]="Last24Hours",e[e.Last7Days=6]="Last7Days",e[e.Last14Days=7]="Last14Days",e[e.Last30Days=8]="Last30Days",e[e.Last90Days=9]="Last90Days"}(TimePeriod||(exports.TimePeriod=TimePeriod={}));
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimePeriod=exports.State=exports.Severity=exports.DismissalType=exports.DashboardAlertState=exports.ComponentType=exports.AlertValidityStatus=exports.AlertType=void 0;var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode",e[e.Malware=6]="Malware"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(exports.ComponentType=ComponentType={}));var DashboardAlertState;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(DashboardAlertState||(exports.DashboardAlertState=DashboardAlertState={}));var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(exports.DismissalType=DismissalType={}));var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(exports.Severity=Severity={}));var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(exports.State=State={}));var TimePeriod;!function(e){e[e.Undefined=0]="Undefined",e[e.Last24Hours=5]="Last24Hours",e[e.Last7Days=6]="Last7Days",e[e.Last14Days=7]="Last14Days",e[e.Last30Days=8]="Last30Days",e[e.Last90Days=9]="Last90Days"}(TimePeriod||(exports.TimePeriod=TimePeriod={}));
|
package/Alert/Alert.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface Alert {
|
|
|
20
20
|
[key: string]: any;
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
|
-
* Reference to the AI metadata blob associated with the alert (AI code alerts only). Only returned on demand
|
|
23
|
+
* Reference to the AI metadata blob associated with the alert (AI code alerts only). Only returned on demand when the Expand parameter is set to AIMetadataBlobReference.
|
|
24
24
|
*/
|
|
25
25
|
aiMetadataBlobReference: AIMetadataBlobReference;
|
|
26
26
|
/**
|
|
@@ -60,7 +60,7 @@ export interface Alert {
|
|
|
60
60
|
*/
|
|
61
61
|
introducedDate: Date;
|
|
62
62
|
/**
|
|
63
|
-
* Value indicates whether
|
|
63
|
+
* Value indicates whether Copilot Autofix can currently be run on the alert. True when Copilot Autofix is available for the organization and enabled on the repository, the alert is a code scanning alert detected by CodeQL with a supported rule, and the alert's ref is eligible. Null when the value has not been computed for this code path.
|
|
64
64
|
*/
|
|
65
65
|
isAutoFixable: boolean;
|
|
66
66
|
/**
|
|
@@ -104,7 +104,7 @@ export interface Alert {
|
|
|
104
104
|
*/
|
|
105
105
|
state: State;
|
|
106
106
|
/**
|
|
107
|
-
* Title will only be rendered as text and does not support markdown formatting. There is a maximum character limit of
|
|
107
|
+
* Title will only be rendered as text and does not support markdown formatting. There is a maximum character limit of 512.
|
|
108
108
|
*/
|
|
109
109
|
title: string;
|
|
110
110
|
/**
|
|
@@ -179,6 +179,106 @@ export interface AlertBatchStateUpdateRequest {
|
|
|
179
179
|
*/
|
|
180
180
|
alertType: AlertType;
|
|
181
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Describes the last accepted snapshot of an external job.
|
|
184
|
+
*/
|
|
185
|
+
export interface AlertJob {
|
|
186
|
+
/**
|
|
187
|
+
* Gets or sets the alerts associated with the job.
|
|
188
|
+
*/
|
|
189
|
+
alertIds: number[];
|
|
190
|
+
/**
|
|
191
|
+
* Gets or sets the artifacts produced by the job.
|
|
192
|
+
*/
|
|
193
|
+
artifacts: AlertJobArtifact[];
|
|
194
|
+
/**
|
|
195
|
+
* Gets or sets the requested branch reference.
|
|
196
|
+
*/
|
|
197
|
+
branchRef: string;
|
|
198
|
+
/**
|
|
199
|
+
* Gets or sets the identity that created the job.
|
|
200
|
+
*/
|
|
201
|
+
createdBy: string;
|
|
202
|
+
/**
|
|
203
|
+
* Gets or sets the date the job was created.
|
|
204
|
+
*/
|
|
205
|
+
createdDate: Date;
|
|
206
|
+
/**
|
|
207
|
+
* Gets or sets the provider-assigned job identifier.
|
|
208
|
+
*/
|
|
209
|
+
jobId: string;
|
|
210
|
+
/**
|
|
211
|
+
* Gets or sets the provider-defined job state.
|
|
212
|
+
*/
|
|
213
|
+
jobState: string;
|
|
214
|
+
/**
|
|
215
|
+
* Gets or sets the job type.
|
|
216
|
+
*/
|
|
217
|
+
jobType: AlertJobType;
|
|
218
|
+
/**
|
|
219
|
+
* Gets or sets the identity that last updated the job.
|
|
220
|
+
*/
|
|
221
|
+
lastUpdatedBy: string;
|
|
222
|
+
/**
|
|
223
|
+
* Gets or sets the date the job was last updated.
|
|
224
|
+
*/
|
|
225
|
+
lastUpdatedDate: Date;
|
|
226
|
+
/**
|
|
227
|
+
* Gets or sets provider-specific properties.
|
|
228
|
+
*/
|
|
229
|
+
properties: any;
|
|
230
|
+
/**
|
|
231
|
+
* Gets or sets the external job provider.
|
|
232
|
+
*/
|
|
233
|
+
provider: string;
|
|
234
|
+
/**
|
|
235
|
+
* Gets or sets the storage revision used for optimistic concurrency.
|
|
236
|
+
*/
|
|
237
|
+
revision: number;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Describes a canonical artifact produced by an external job.
|
|
241
|
+
*/
|
|
242
|
+
export interface AlertJobArtifact {
|
|
243
|
+
/**
|
|
244
|
+
* Gets or sets the artifact type.
|
|
245
|
+
*/
|
|
246
|
+
type: AlertJobArtifactType;
|
|
247
|
+
/**
|
|
248
|
+
* Gets or sets the externally addressable artifact URL.
|
|
249
|
+
*/
|
|
250
|
+
url: string;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Identifies the supported artifact types produced by an alert job.
|
|
254
|
+
*/
|
|
255
|
+
export declare enum AlertJobArtifactType {
|
|
256
|
+
/**
|
|
257
|
+
* An artifact type not recognized by this client version.
|
|
258
|
+
*/
|
|
259
|
+
Unknown = 0,
|
|
260
|
+
/**
|
|
261
|
+
* An Azure Repos pull request.
|
|
262
|
+
*/
|
|
263
|
+
PullRequest = 1
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Identifies the supported alert job workflows.
|
|
267
|
+
*/
|
|
268
|
+
export declare enum AlertJobType {
|
|
269
|
+
/**
|
|
270
|
+
* An alert job type not recognized by this client version.
|
|
271
|
+
*/
|
|
272
|
+
Unknown = 0,
|
|
273
|
+
/**
|
|
274
|
+
* A WIM workflow that creates a pull request.
|
|
275
|
+
*/
|
|
276
|
+
WIMAutoPR = 1,
|
|
277
|
+
/**
|
|
278
|
+
* An AI alert consolidation workflow.
|
|
279
|
+
*/
|
|
280
|
+
AIAlertConsolidation = 2
|
|
281
|
+
}
|
|
182
282
|
export declare enum AlertListExpandOption {
|
|
183
283
|
/**
|
|
184
284
|
* No Expands.
|
|
@@ -191,7 +291,11 @@ export declare enum AlertListExpandOption {
|
|
|
191
291
|
/**
|
|
192
292
|
* Return only the count of active alerts grouped by alert type.
|
|
193
293
|
*/
|
|
194
|
-
Count = 2
|
|
294
|
+
Count = 2,
|
|
295
|
+
/**
|
|
296
|
+
* Return the AI metadata blob reference in AI code alerts.
|
|
297
|
+
*/
|
|
298
|
+
AIMetadataBlobReference = 3
|
|
195
299
|
}
|
|
196
300
|
/**
|
|
197
301
|
* Alert metadata.
|
|
@@ -245,6 +349,17 @@ export declare enum AlertMetadataErrorPolicy {
|
|
|
245
349
|
*/
|
|
246
350
|
Omit = 2
|
|
247
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Criteria for the POST alerts query endpoint. Only metadata type filtering is supported here; use GET alerts with SearchCriteria for other filters.
|
|
354
|
+
*/
|
|
355
|
+
export interface AlertMetadataQueryCriteria {
|
|
356
|
+
/**
|
|
357
|
+
* Filters alerts by linkage to specific metadata types (e.g. "pullRequest", "WorkItem"). A value of "true" requires the alert to be linked to that metadata type, "false" requires it not be linked. All entries must be satisfied for an alert to be returned.
|
|
358
|
+
*/
|
|
359
|
+
metadataTypeFilters: {
|
|
360
|
+
[key: string]: boolean;
|
|
361
|
+
};
|
|
362
|
+
}
|
|
248
363
|
export interface AlertStateUpdate {
|
|
249
364
|
dismissedComment: string;
|
|
250
365
|
dismissedReason: DismissalType;
|
|
@@ -267,7 +382,7 @@ export interface AlertStateUpdateForAlert {
|
|
|
267
382
|
*/
|
|
268
383
|
dismissedReason: DismissalType;
|
|
269
384
|
/**
|
|
270
|
-
* The state to transition the alert to
|
|
385
|
+
* The state to transition the alert to. Only Active and Dismissed are supported.
|
|
271
386
|
*/
|
|
272
387
|
state: State;
|
|
273
388
|
}
|
|
@@ -295,7 +410,11 @@ export declare enum AlertType {
|
|
|
295
410
|
/**
|
|
296
411
|
* The code contains a weakness determined by AI-powered analysis.
|
|
297
412
|
*/
|
|
298
|
-
AICode = 5
|
|
413
|
+
AICode = 5,
|
|
414
|
+
/**
|
|
415
|
+
* The code uses a dependency flagged as malware by the GitHub Advisory Database.
|
|
416
|
+
*/
|
|
417
|
+
Malware = 6
|
|
299
418
|
}
|
|
300
419
|
export declare enum AlertValidationRequestStatus {
|
|
301
420
|
/**
|
|
@@ -489,7 +608,19 @@ export declare enum AutofixCallbackStatus {
|
|
|
489
608
|
/**
|
|
490
609
|
* The pipeline completed successfully but the autofix binary produced no changes, so no pull request was created.
|
|
491
610
|
*/
|
|
492
|
-
NoChangesProduced = 2
|
|
611
|
+
NoChangesProduced = 2,
|
|
612
|
+
/**
|
|
613
|
+
* The pipeline completed successfully and determined that the alert is a false positive, so no pull request was created.
|
|
614
|
+
*/
|
|
615
|
+
FalsePositive = 3,
|
|
616
|
+
/**
|
|
617
|
+
* The target file referenced by the analysis could not be found.
|
|
618
|
+
*/
|
|
619
|
+
TargetFileNotFound = 4,
|
|
620
|
+
/**
|
|
621
|
+
* The push was rejected by the commit author email validation policy.
|
|
622
|
+
*/
|
|
623
|
+
CommitAuthorEmailValidationFailed = 5
|
|
493
624
|
}
|
|
494
625
|
/**
|
|
495
626
|
* Represents an autofix request resource.
|
|
@@ -498,6 +629,7 @@ export interface AutofixRequest {
|
|
|
498
629
|
createdDate: Date;
|
|
499
630
|
failedReason: AutofixRequestFailedReason;
|
|
500
631
|
pipelinePlanId: string;
|
|
632
|
+
pullRequestId: number;
|
|
501
633
|
requestId: number;
|
|
502
634
|
status: AutofixRequestStatus;
|
|
503
635
|
}
|
|
@@ -528,7 +660,27 @@ export declare enum AutofixRequestFailedReason {
|
|
|
528
660
|
/**
|
|
529
661
|
* The pipeline completed successfully but produced no changes, so no pull request was created. A valid terminal outcome surfaced as a failure with this distinct reason.
|
|
530
662
|
*/
|
|
531
|
-
NoChanges = 5
|
|
663
|
+
NoChanges = 5,
|
|
664
|
+
/**
|
|
665
|
+
* The target project's agent pool could not be found or has not been authorized for use, so the validation pipeline could not be queued. This is a user/configuration error.
|
|
666
|
+
*/
|
|
667
|
+
AgentPoolUnavailable = 6,
|
|
668
|
+
/**
|
|
669
|
+
* The alert ref cannot be resolved to an existing branch because the pull request or merge ref, source branch, or normal branch no longer exists.
|
|
670
|
+
*/
|
|
671
|
+
BranchNotResolvable = 7,
|
|
672
|
+
/**
|
|
673
|
+
* The pipeline completed successfully and determined that the alert is a false positive, so no pull request was created. This is a terminal non-PR result, not an operational pipeline failure.
|
|
674
|
+
*/
|
|
675
|
+
FalsePositive = 8,
|
|
676
|
+
/**
|
|
677
|
+
* The target file referenced by the analysis could not be found.
|
|
678
|
+
*/
|
|
679
|
+
TargetFileNotFound = 9,
|
|
680
|
+
/**
|
|
681
|
+
* The push was rejected by the commit author email validation policy.
|
|
682
|
+
*/
|
|
683
|
+
CommitAuthorEmailValidationFailed = 10
|
|
532
684
|
}
|
|
533
685
|
/**
|
|
534
686
|
* Indicates the lifecycle status of an autofix request. Maps to TINYINT in the database.
|
|
@@ -1170,7 +1322,7 @@ export interface SearchCriteria {
|
|
|
1170
1322
|
*/
|
|
1171
1323
|
fromDate: Date;
|
|
1172
1324
|
/**
|
|
1173
|
-
* If provided, filters alerts based on whether they have linked work items. \<br /\>Set to "true" to return only alerts with linked work items. \<br /\>Set to "false" to return only alerts without linked work items. \<br /\>If not provided, returns all alerts regardless of linked work items. \<br /\>Not applicable for secret and dependency scanning alerts.
|
|
1325
|
+
* If provided, filters alerts based on whether they have linked work items. \<br /\>Set to "true" to return only alerts with linked work items. \<br /\>Set to "false" to return only alerts without linked work items. \<br /\>If not provided, returns all alerts regardless of linked work items. \<br /\>Not applicable for secret and dependency scanning alerts. \<br /\>This property will be deprecated in the future; prefer filtering by metadata type instead.
|
|
1174
1326
|
*/
|
|
1175
1327
|
hasLinkedWorkItems: boolean;
|
|
1176
1328
|
/**
|
package/Alert/Alert.js
CHANGED
|
@@ -5,7 +5,39 @@
|
|
|
5
5
|
* ---------------------------------------------------------
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ValidationResult = exports.State = exports.Severity = exports.SarifJobStatus = exports.ResultType = exports.MetadataOperation = exports.MetadataChangeType = exports.LicenseType = exports.LicenseState = exports.ExpandOption = exports.DismissalType = exports.DependencyScope = exports.DependencyKind = exports.Confidence = exports.ComponentType = exports.AutofixRequestStatus = exports.AutofixRequestFailedReason = exports.AutofixCallbackStatus = exports.AnalysisConfigurationType = exports.AlertValidityStatus = exports.AlertValidationRequestStatus = exports.AlertType = exports.AlertMetadataErrorPolicy = exports.AlertListExpandOption = void 0;
|
|
8
|
+
exports.ValidationResult = exports.State = exports.Severity = exports.SarifJobStatus = exports.ResultType = exports.MetadataOperation = exports.MetadataChangeType = exports.LicenseType = exports.LicenseState = exports.ExpandOption = exports.DismissalType = exports.DependencyScope = exports.DependencyKind = exports.Confidence = exports.ComponentType = exports.AutofixRequestStatus = exports.AutofixRequestFailedReason = exports.AutofixCallbackStatus = exports.AnalysisConfigurationType = exports.AlertValidityStatus = exports.AlertValidationRequestStatus = exports.AlertType = exports.AlertMetadataErrorPolicy = exports.AlertListExpandOption = exports.AlertJobType = exports.AlertJobArtifactType = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Identifies the supported artifact types produced by an alert job.
|
|
11
|
+
*/
|
|
12
|
+
var AlertJobArtifactType;
|
|
13
|
+
(function (AlertJobArtifactType) {
|
|
14
|
+
/**
|
|
15
|
+
* An artifact type not recognized by this client version.
|
|
16
|
+
*/
|
|
17
|
+
AlertJobArtifactType[AlertJobArtifactType["Unknown"] = 0] = "Unknown";
|
|
18
|
+
/**
|
|
19
|
+
* An Azure Repos pull request.
|
|
20
|
+
*/
|
|
21
|
+
AlertJobArtifactType[AlertJobArtifactType["PullRequest"] = 1] = "PullRequest";
|
|
22
|
+
})(AlertJobArtifactType || (exports.AlertJobArtifactType = AlertJobArtifactType = {}));
|
|
23
|
+
/**
|
|
24
|
+
* Identifies the supported alert job workflows.
|
|
25
|
+
*/
|
|
26
|
+
var AlertJobType;
|
|
27
|
+
(function (AlertJobType) {
|
|
28
|
+
/**
|
|
29
|
+
* An alert job type not recognized by this client version.
|
|
30
|
+
*/
|
|
31
|
+
AlertJobType[AlertJobType["Unknown"] = 0] = "Unknown";
|
|
32
|
+
/**
|
|
33
|
+
* A WIM workflow that creates a pull request.
|
|
34
|
+
*/
|
|
35
|
+
AlertJobType[AlertJobType["WIMAutoPR"] = 1] = "WIMAutoPR";
|
|
36
|
+
/**
|
|
37
|
+
* An AI alert consolidation workflow.
|
|
38
|
+
*/
|
|
39
|
+
AlertJobType[AlertJobType["AIAlertConsolidation"] = 2] = "AIAlertConsolidation";
|
|
40
|
+
})(AlertJobType || (exports.AlertJobType = AlertJobType = {}));
|
|
9
41
|
var AlertListExpandOption;
|
|
10
42
|
(function (AlertListExpandOption) {
|
|
11
43
|
/**
|
|
@@ -20,6 +52,10 @@ var AlertListExpandOption;
|
|
|
20
52
|
* Return only the count of active alerts grouped by alert type.
|
|
21
53
|
*/
|
|
22
54
|
AlertListExpandOption[AlertListExpandOption["Count"] = 2] = "Count";
|
|
55
|
+
/**
|
|
56
|
+
* Return the AI metadata blob reference in AI code alerts.
|
|
57
|
+
*/
|
|
58
|
+
AlertListExpandOption[AlertListExpandOption["AIMetadataBlobReference"] = 3] = "AIMetadataBlobReference";
|
|
23
59
|
})(AlertListExpandOption || (exports.AlertListExpandOption = AlertListExpandOption = {}));
|
|
24
60
|
/**
|
|
25
61
|
* Enum to control error policy in a bulk get alert metadata items request.
|
|
@@ -61,6 +97,10 @@ var AlertType;
|
|
|
61
97
|
* The code contains a weakness determined by AI-powered analysis.
|
|
62
98
|
*/
|
|
63
99
|
AlertType[AlertType["AICode"] = 5] = "AICode";
|
|
100
|
+
/**
|
|
101
|
+
* The code uses a dependency flagged as malware by the GitHub Advisory Database.
|
|
102
|
+
*/
|
|
103
|
+
AlertType[AlertType["Malware"] = 6] = "Malware";
|
|
64
104
|
})(AlertType || (exports.AlertType = AlertType = {}));
|
|
65
105
|
var AlertValidationRequestStatus;
|
|
66
106
|
(function (AlertValidationRequestStatus) {
|
|
@@ -129,6 +169,18 @@ var AutofixCallbackStatus;
|
|
|
129
169
|
* The pipeline completed successfully but the autofix binary produced no changes, so no pull request was created.
|
|
130
170
|
*/
|
|
131
171
|
AutofixCallbackStatus[AutofixCallbackStatus["NoChangesProduced"] = 2] = "NoChangesProduced";
|
|
172
|
+
/**
|
|
173
|
+
* The pipeline completed successfully and determined that the alert is a false positive, so no pull request was created.
|
|
174
|
+
*/
|
|
175
|
+
AutofixCallbackStatus[AutofixCallbackStatus["FalsePositive"] = 3] = "FalsePositive";
|
|
176
|
+
/**
|
|
177
|
+
* The target file referenced by the analysis could not be found.
|
|
178
|
+
*/
|
|
179
|
+
AutofixCallbackStatus[AutofixCallbackStatus["TargetFileNotFound"] = 4] = "TargetFileNotFound";
|
|
180
|
+
/**
|
|
181
|
+
* The push was rejected by the commit author email validation policy.
|
|
182
|
+
*/
|
|
183
|
+
AutofixCallbackStatus[AutofixCallbackStatus["CommitAuthorEmailValidationFailed"] = 5] = "CommitAuthorEmailValidationFailed";
|
|
132
184
|
})(AutofixCallbackStatus || (exports.AutofixCallbackStatus = AutofixCallbackStatus = {}));
|
|
133
185
|
/**
|
|
134
186
|
* Indicates the reason an autofix request failed. Maps to TINYINT (nullable) in the database.
|
|
@@ -159,6 +211,26 @@ var AutofixRequestFailedReason;
|
|
|
159
211
|
* The pipeline completed successfully but produced no changes, so no pull request was created. A valid terminal outcome surfaced as a failure with this distinct reason.
|
|
160
212
|
*/
|
|
161
213
|
AutofixRequestFailedReason[AutofixRequestFailedReason["NoChanges"] = 5] = "NoChanges";
|
|
214
|
+
/**
|
|
215
|
+
* The target project's agent pool could not be found or has not been authorized for use, so the validation pipeline could not be queued. This is a user/configuration error.
|
|
216
|
+
*/
|
|
217
|
+
AutofixRequestFailedReason[AutofixRequestFailedReason["AgentPoolUnavailable"] = 6] = "AgentPoolUnavailable";
|
|
218
|
+
/**
|
|
219
|
+
* The alert ref cannot be resolved to an existing branch because the pull request or merge ref, source branch, or normal branch no longer exists.
|
|
220
|
+
*/
|
|
221
|
+
AutofixRequestFailedReason[AutofixRequestFailedReason["BranchNotResolvable"] = 7] = "BranchNotResolvable";
|
|
222
|
+
/**
|
|
223
|
+
* The pipeline completed successfully and determined that the alert is a false positive, so no pull request was created. This is a terminal non-PR result, not an operational pipeline failure.
|
|
224
|
+
*/
|
|
225
|
+
AutofixRequestFailedReason[AutofixRequestFailedReason["FalsePositive"] = 8] = "FalsePositive";
|
|
226
|
+
/**
|
|
227
|
+
* The target file referenced by the analysis could not be found.
|
|
228
|
+
*/
|
|
229
|
+
AutofixRequestFailedReason[AutofixRequestFailedReason["TargetFileNotFound"] = 9] = "TargetFileNotFound";
|
|
230
|
+
/**
|
|
231
|
+
* The push was rejected by the commit author email validation policy.
|
|
232
|
+
*/
|
|
233
|
+
AutofixRequestFailedReason[AutofixRequestFailedReason["CommitAuthorEmailValidationFailed"] = 10] = "CommitAuthorEmailValidationFailed";
|
|
162
234
|
})(AutofixRequestFailedReason || (exports.AutofixRequestFailedReason = AutofixRequestFailedReason = {}));
|
|
163
235
|
/**
|
|
164
236
|
* Indicates the lifecycle status of an autofix request. Maps to TINYINT in the database.
|
package/Alert/Alert.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationResult=exports.State=exports.Severity=exports.SarifJobStatus=exports.ResultType=exports.MetadataOperation=exports.MetadataChangeType=exports.LicenseType=exports.LicenseState=exports.ExpandOption=exports.DismissalType=exports.DependencyScope=exports.DependencyKind=exports.Confidence=exports.ComponentType=exports.AutofixRequestStatus=exports.AutofixRequestFailedReason=exports.AutofixCallbackStatus=exports.AnalysisConfigurationType=exports.AlertValidityStatus=exports.AlertValidationRequestStatus=exports.AlertType=exports.AlertMetadataErrorPolicy=exports.AlertListExpandOption=void 0;var AlertListExpandOption;!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal",e[e.Count=2]="Count"}(AlertListExpandOption||(exports.AlertListExpandOption=AlertListExpandOption={}));var AlertMetadataErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(AlertMetadataErrorPolicy||(exports.AlertMetadataErrorPolicy=AlertMetadataErrorPolicy={}));var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidationRequestStatus;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(AlertValidationRequestStatus||(exports.AlertValidationRequestStatus=AlertValidationRequestStatus={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var AnalysisConfigurationType;!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(AnalysisConfigurationType||(exports.AnalysisConfigurationType=AnalysisConfigurationType={}));var AutofixCallbackStatus;!function(e){e[e.Done=0]="Done",e[e.Failed=1]="Failed",e[e.NoChangesProduced=2]="NoChangesProduced"}(AutofixCallbackStatus||(exports.AutofixCallbackStatus=AutofixCallbackStatus={}));var AutofixRequestFailedReason;!function(e){e[e.None=0]="None",e[e.PipelineFailed=1]="PipelineFailed",e[e.PipelineTimedOut=2]="PipelineTimedOut",e[e.CallbackNotReceived=3]="CallbackNotReceived",e[e.ProcessorJobFailed=4]="ProcessorJobFailed",e[e.NoChanges=5]="NoChanges"}(AutofixRequestFailedReason||(exports.AutofixRequestFailedReason=AutofixRequestFailedReason={}));var AutofixRequestStatus;!function(e){e[e.None=0]="None",e[e.Pending=1]="Pending",e[e.PipelineRunning=2]="PipelineRunning",e[e.Done=3]="Done",e[e.Failed=4]="Failed"}(AutofixRequestStatus||(exports.AutofixRequestStatus=AutofixRequestStatus={}));var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(exports.ComponentType=ComponentType={}));var Confidence;!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(Confidence||(exports.Confidence=Confidence={}));var DependencyKind;!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(DependencyKind||(exports.DependencyKind=DependencyKind={}));var DependencyScope;!function(e){e[e.Runtime=0]="Runtime",e[e.Development=1]="Development"}(DependencyScope||(exports.DependencyScope=DependencyScope={}));var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(exports.DismissalType=DismissalType={}));var ExpandOption;!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint",e[e.AIMetadataBlobReference=2]="AIMetadataBlobReference"}(ExpandOption||(exports.ExpandOption=ExpandOption={}));var LicenseState;!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(LicenseState||(exports.LicenseState=LicenseState={}));var LicenseType;!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(LicenseType||(exports.LicenseType=LicenseType={}));var MetadataChangeType;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(MetadataChangeType||(exports.MetadataChangeType=MetadataChangeType={}));var MetadataOperation;!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(MetadataOperation||(exports.MetadataOperation=MetadataOperation={}));var ResultType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(ResultType||(exports.ResultType=ResultType={}));var SarifJobStatus;!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued",e[e.ConcurrentProcessing=5]="ConcurrentProcessing",e[e.Consolidated=6]="Consolidated",e[e.WaitingConsolidation=7]="WaitingConsolidation"}(SarifJobStatus||(exports.SarifJobStatus=SarifJobStatus={}));var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(exports.Severity=Severity={}));var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(exports.State=State={}));var ValidationResult;!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported",e[e.TransientError=5]="TransientError"}(ValidationResult||(exports.ValidationResult=ValidationResult={}));
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationResult=exports.State=exports.Severity=exports.SarifJobStatus=exports.ResultType=exports.MetadataOperation=exports.MetadataChangeType=exports.LicenseType=exports.LicenseState=exports.ExpandOption=exports.DismissalType=exports.DependencyScope=exports.DependencyKind=exports.Confidence=exports.ComponentType=exports.AutofixRequestStatus=exports.AutofixRequestFailedReason=exports.AutofixCallbackStatus=exports.AnalysisConfigurationType=exports.AlertValidityStatus=exports.AlertValidationRequestStatus=exports.AlertType=exports.AlertMetadataErrorPolicy=exports.AlertListExpandOption=exports.AlertJobType=exports.AlertJobArtifactType=void 0;var AlertJobArtifactType;!function(e){e[e.Unknown=0]="Unknown",e[e.PullRequest=1]="PullRequest"}(AlertJobArtifactType||(exports.AlertJobArtifactType=AlertJobArtifactType={}));var AlertJobType;!function(e){e[e.Unknown=0]="Unknown",e[e.WIMAutoPR=1]="WIMAutoPR",e[e.AIAlertConsolidation=2]="AIAlertConsolidation"}(AlertJobType||(exports.AlertJobType=AlertJobType={}));var AlertListExpandOption;!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal",e[e.Count=2]="Count",e[e.AIMetadataBlobReference=3]="AIMetadataBlobReference"}(AlertListExpandOption||(exports.AlertListExpandOption=AlertListExpandOption={}));var AlertMetadataErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(AlertMetadataErrorPolicy||(exports.AlertMetadataErrorPolicy=AlertMetadataErrorPolicy={}));var AlertType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License",e[e.AICode=5]="AICode",e[e.Malware=6]="Malware"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidationRequestStatus;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(AlertValidationRequestStatus||(exports.AlertValidationRequestStatus=AlertValidationRequestStatus={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var AnalysisConfigurationType;!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(AnalysisConfigurationType||(exports.AnalysisConfigurationType=AnalysisConfigurationType={}));var AutofixCallbackStatus;!function(e){e[e.Done=0]="Done",e[e.Failed=1]="Failed",e[e.NoChangesProduced=2]="NoChangesProduced",e[e.FalsePositive=3]="FalsePositive",e[e.TargetFileNotFound=4]="TargetFileNotFound",e[e.CommitAuthorEmailValidationFailed=5]="CommitAuthorEmailValidationFailed"}(AutofixCallbackStatus||(exports.AutofixCallbackStatus=AutofixCallbackStatus={}));var AutofixRequestFailedReason;!function(e){e[e.None=0]="None",e[e.PipelineFailed=1]="PipelineFailed",e[e.PipelineTimedOut=2]="PipelineTimedOut",e[e.CallbackNotReceived=3]="CallbackNotReceived",e[e.ProcessorJobFailed=4]="ProcessorJobFailed",e[e.NoChanges=5]="NoChanges",e[e.AgentPoolUnavailable=6]="AgentPoolUnavailable",e[e.BranchNotResolvable=7]="BranchNotResolvable",e[e.FalsePositive=8]="FalsePositive",e[e.TargetFileNotFound=9]="TargetFileNotFound",e[e.CommitAuthorEmailValidationFailed=10]="CommitAuthorEmailValidationFailed"}(AutofixRequestFailedReason||(exports.AutofixRequestFailedReason=AutofixRequestFailedReason={}));var AutofixRequestStatus;!function(e){e[e.None=0]="None",e[e.Pending=1]="Pending",e[e.PipelineRunning=2]="PipelineRunning",e[e.Done=3]="Done",e[e.Failed=4]="Failed"}(AutofixRequestStatus||(exports.AutofixRequestStatus=AutofixRequestStatus={}));var ComponentType;!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(ComponentType||(exports.ComponentType=ComponentType={}));var Confidence;!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(Confidence||(exports.Confidence=Confidence={}));var DependencyKind;!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(DependencyKind||(exports.DependencyKind=DependencyKind={}));var DependencyScope;!function(e){e[e.Runtime=0]="Runtime",e[e.Development=1]="Development"}(DependencyScope||(exports.DependencyScope=DependencyScope={}));var DismissalType;!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(DismissalType||(exports.DismissalType=DismissalType={}));var ExpandOption;!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint",e[e.AIMetadataBlobReference=2]="AIMetadataBlobReference"}(ExpandOption||(exports.ExpandOption=ExpandOption={}));var LicenseState;!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(LicenseState||(exports.LicenseState=LicenseState={}));var LicenseType;!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(LicenseType||(exports.LicenseType=LicenseType={}));var MetadataChangeType;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(MetadataChangeType||(exports.MetadataChangeType=MetadataChangeType={}));var MetadataOperation;!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(MetadataOperation||(exports.MetadataOperation=MetadataOperation={}));var ResultType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(ResultType||(exports.ResultType=ResultType={}));var SarifJobStatus;!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued",e[e.ConcurrentProcessing=5]="ConcurrentProcessing",e[e.Consolidated=6]="Consolidated",e[e.WaitingConsolidation=7]="WaitingConsolidation"}(SarifJobStatus||(exports.SarifJobStatus=SarifJobStatus={}));var Severity;!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(Severity||(exports.Severity=Severity={}));var State;!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed",e[e.Draft=16]="Draft"}(State||(exports.State=State={}));var ValidationResult;!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported",e[e.TransientError=5]="TransientError"}(ValidationResult||(exports.ValidationResult=ValidationResult={}));
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -16,6 +16,16 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
16
16
|
* @param submissionId -
|
|
17
17
|
*/
|
|
18
18
|
getSarifContent(submissionId: number): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Get the alert jobs associated with an alert.
|
|
21
|
+
*
|
|
22
|
+
* @param project - Project ID or project name
|
|
23
|
+
* @param repository - The name or ID of the repository
|
|
24
|
+
* @param alertId - The ID of the alert
|
|
25
|
+
* @param top - The maximum number of jobs to return
|
|
26
|
+
* @param continuationToken - If there are more jobs than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of jobs
|
|
27
|
+
*/
|
|
28
|
+
getJobsForAlert(project: string, repository: string, alertId: number, top?: number, continuationToken?: string): Promise<WebApi.PagedList<Alert.AlertJob>>;
|
|
19
29
|
/**
|
|
20
30
|
* Get an alert.
|
|
21
31
|
*
|
|
@@ -74,6 +84,18 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
74
84
|
* @param repository - The name or ID of the repository
|
|
75
85
|
*/
|
|
76
86
|
updateAlertsBatch(request: Alert.AlertBatchStateUpdateRequest, project: string, repository: string): Promise<Alert.Alert[]>;
|
|
87
|
+
/**
|
|
88
|
+
* Query alerts for a repository by metadata type linkage.
|
|
89
|
+
*
|
|
90
|
+
* @param criteria - Metadata type filters to limit the alerts returned
|
|
91
|
+
* @param project - Project ID or project name
|
|
92
|
+
* @param repository - The name or ID of the repository
|
|
93
|
+
* @param top - The maximum number of alerts to return
|
|
94
|
+
* @param orderBy - Must be "id" "firstSeen" "lastSeen" "fixedOn" or "severity" Defaults to "id"
|
|
95
|
+
* @param expand - Options to expand the response, e.g. returning alert counts instead of alerts
|
|
96
|
+
* @param continuationToken - If there are more alerts than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of alerts
|
|
97
|
+
*/
|
|
98
|
+
queryAlerts(criteria: Alert.AlertMetadataQueryCriteria, project: string, repository: string, top?: number, orderBy?: string, expand?: Alert.AlertListExpandOption, continuationToken?: string): Promise<WebApi.PagedList<Alert.Alert>>;
|
|
77
99
|
/**
|
|
78
100
|
* Returns the branches for which analysis results were submitted.
|
|
79
101
|
*
|
|
@@ -93,32 +115,41 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
93
115
|
*/
|
|
94
116
|
getUxFilters(project: string, repository: string, alertType: Alert.AlertType): Promise<Alert.UxFilters>;
|
|
95
117
|
/**
|
|
96
|
-
*
|
|
118
|
+
* Create an autofix request for the specified alert.
|
|
97
119
|
*
|
|
98
|
-
* @param callbackRequest - The callback payload containing requestId, status, and optional pullRequestId.
|
|
99
120
|
* @param project - Project ID or project name
|
|
100
|
-
* @param repository - The name or ID of the repository.
|
|
101
121
|
* @param alertId - The ID of the alert to create an autofix for.
|
|
122
|
+
* @param repository - The name or ID of the repository.
|
|
123
|
+
* @param ref - The Git ref (e.g. refs/heads/feature/x) the autofix should target.
|
|
102
124
|
*/
|
|
103
|
-
|
|
125
|
+
createAutofixRequest(project: string, alertId: number, repository: string, ref: string): Promise<Alert.AutofixRequest>;
|
|
104
126
|
/**
|
|
105
|
-
*
|
|
127
|
+
* Get all autofix requests for the specified alert.
|
|
106
128
|
*
|
|
107
129
|
* @param project - Project ID or project name
|
|
108
|
-
* @param alertId - The ID of the alert
|
|
130
|
+
* @param alertId - The ID of the alert.
|
|
109
131
|
* @param repository - The name or ID of the repository.
|
|
110
|
-
* @param ref -
|
|
132
|
+
* @param ref - The Git ref (e.g. refs/heads/feature/x) the autofix should target.
|
|
111
133
|
*/
|
|
112
|
-
|
|
134
|
+
getAutofixRequestsByAlertId(project: string, alertId: number, repository: string, ref: string): Promise<Alert.AutofixRequest[]>;
|
|
113
135
|
/**
|
|
114
|
-
*
|
|
136
|
+
* Receives a callback from the autofix pipeline with the outcome of the run. Idempotent: repeated calls for a request already in a terminal state return 200 without changes.
|
|
115
137
|
*
|
|
138
|
+
* @param callbackRequest - The callback payload containing requestId, status, and optional pullRequestId.
|
|
116
139
|
* @param project - Project ID or project name
|
|
117
|
-
* @param alertId - The ID of the alert.
|
|
118
140
|
* @param repository - The name or ID of the repository.
|
|
119
|
-
* @param ref - Optional Git ref (e.g. refs/heads/feature/x) the autofix should target. When omitted, the repository's default branch is used.
|
|
120
141
|
*/
|
|
121
|
-
|
|
142
|
+
autofixCallback(callbackRequest: Alert.AutofixCallbackRequest, project: string, repository: string): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Get Draft alerts for a repository.
|
|
145
|
+
*
|
|
146
|
+
* @param project - Project ID or project name
|
|
147
|
+
* @param repository - The name or ID of the repository
|
|
148
|
+
* @param top - The maximum number of alerts to return
|
|
149
|
+
* @param orderBy - Must be "id", "firstSeen", "lastSeen", "fixedOn", or "severity". Defaults to "id"
|
|
150
|
+
* @param continuationToken - If there are more alerts than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of alerts
|
|
151
|
+
*/
|
|
152
|
+
getDraftAlerts(project: string, repository: string, top?: number, orderBy?: string, continuationToken?: string): Promise<WebApi.PagedList<Alert.Alert>>;
|
|
122
153
|
/**
|
|
123
154
|
* Upload a SARIF to GitHub Code Scanning via a GitOps app.
|
|
124
155
|
*
|
|
@@ -138,6 +169,31 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
138
169
|
* @param ref -
|
|
139
170
|
*/
|
|
140
171
|
getAlertInstances(project: string, alertId: number, repository: string, ref?: string): Promise<Alert.AlertAnalysisInstance[]>;
|
|
172
|
+
/**
|
|
173
|
+
* Create an alert job.
|
|
174
|
+
*
|
|
175
|
+
* @param body -
|
|
176
|
+
* @param project - Project ID or project name
|
|
177
|
+
* @param repository - The name or ID of the repository
|
|
178
|
+
*/
|
|
179
|
+
createJob(body: any, project: string, repository: string): Promise<Alert.AlertJob>;
|
|
180
|
+
/**
|
|
181
|
+
* Get an alert job by ID.
|
|
182
|
+
*
|
|
183
|
+
* @param project - Project ID or project name
|
|
184
|
+
* @param repository - The name or ID of the repository
|
|
185
|
+
* @param jobId - The provider-assigned job identifier
|
|
186
|
+
*/
|
|
187
|
+
getJob(project: string, repository: string, jobId: string): Promise<Alert.AlertJob>;
|
|
188
|
+
/**
|
|
189
|
+
* Update an alert job.
|
|
190
|
+
*
|
|
191
|
+
* @param patch - The patch describing the fields to update
|
|
192
|
+
* @param project - Project ID or project name
|
|
193
|
+
* @param repository - The name or ID of the repository
|
|
194
|
+
* @param jobId - The provider-assigned job identifier
|
|
195
|
+
*/
|
|
196
|
+
updateJob(patch: any, project: string, repository: string, jobId: string): Promise<Alert.AlertJob>;
|
|
141
197
|
/**
|
|
142
198
|
* Create legal review. This creates the legal review associated with the alert. It include the review work item url.
|
|
143
199
|
*
|