azure-devops-extension-api 4.228.0 → 4.230.0
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/Alert/Alert.d.ts +256 -1
- package/Alert/Alert.js +47 -0
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +12 -6
- package/Alert/AlertClient.js +16 -8
- package/Alert/AlertClient.min.js +1 -1
- package/Git/Git.d.ts +16 -0
- package/Git/GitClient.d.ts +7 -4
- package/Git/GitClient.js +25 -7
- package/Git/GitClient.min.js +1 -1
- package/Management/Management.d.ts +87 -0
- package/Management/ManagementClient.d.ts +6 -0
- package/Management/ManagementClient.js +23 -0
- package/Management/ManagementClient.min.js +1 -1
- package/WebApi/WebApi.d.ts +9 -0
- package/WebApi/WebApi.js +10 -0
- package/WebApi/WebApi.min.js +1 -1
- package/package.json +1 -1
package/Alert/Alert.d.ts
CHANGED
|
@@ -60,6 +60,10 @@ export interface Alert {
|
|
|
60
60
|
* Tools that have detected this issue.
|
|
61
61
|
*/
|
|
62
62
|
tools: Tool[];
|
|
63
|
+
/**
|
|
64
|
+
* ValidationFingerprints for the secret liveness check. Only return on demanded
|
|
65
|
+
*/
|
|
66
|
+
validationFingerprints: ValidationFingerprint[];
|
|
63
67
|
}
|
|
64
68
|
/**
|
|
65
69
|
* Summary of the state of the alert for a given analysis configuration.
|
|
@@ -96,9 +100,21 @@ export interface AlertStateUpdate {
|
|
|
96
100
|
state: State;
|
|
97
101
|
}
|
|
98
102
|
export declare enum AlertType {
|
|
103
|
+
/**
|
|
104
|
+
* The code has an unspecified vulnerability type
|
|
105
|
+
*/
|
|
99
106
|
Unknown = 0,
|
|
107
|
+
/**
|
|
108
|
+
* The code uses a dependency with a known vulnerability.
|
|
109
|
+
*/
|
|
100
110
|
Dependency = 1,
|
|
111
|
+
/**
|
|
112
|
+
* The code contains a secret that has now been compromised and must be revoked.
|
|
113
|
+
*/
|
|
101
114
|
Secret = 2,
|
|
115
|
+
/**
|
|
116
|
+
* The code contains a weakness determined by static analysis.
|
|
117
|
+
*/
|
|
102
118
|
Code = 3
|
|
103
119
|
}
|
|
104
120
|
/**
|
|
@@ -269,25 +285,76 @@ export declare enum ComponentType {
|
|
|
269
285
|
*/
|
|
270
286
|
Vcpkg = 16
|
|
271
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* Information about a vulnerable dependency
|
|
290
|
+
*/
|
|
272
291
|
export interface Dependency {
|
|
292
|
+
/**
|
|
293
|
+
* Dependency name
|
|
294
|
+
*/
|
|
273
295
|
componentName: string;
|
|
296
|
+
/**
|
|
297
|
+
* Source of the dependency
|
|
298
|
+
*/
|
|
274
299
|
componentType: ComponentType;
|
|
300
|
+
/**
|
|
301
|
+
* Version information
|
|
302
|
+
*/
|
|
275
303
|
componentVersion: string;
|
|
304
|
+
/**
|
|
305
|
+
* Unique ID for the dependency
|
|
306
|
+
*/
|
|
276
307
|
dependencyId: number;
|
|
277
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* An instance of a vulnerable dependency that was detected
|
|
311
|
+
*/
|
|
278
312
|
export interface DependencyResult {
|
|
313
|
+
/**
|
|
314
|
+
* Information about the vulnerable dependency that was found
|
|
315
|
+
*/
|
|
279
316
|
dependency: Dependency;
|
|
317
|
+
/**
|
|
318
|
+
* Unique ID for this dependency
|
|
319
|
+
*/
|
|
280
320
|
dependencyResultId: number;
|
|
321
|
+
/**
|
|
322
|
+
* ID for the Result that this instance belongs to
|
|
323
|
+
*/
|
|
281
324
|
resultId: number;
|
|
325
|
+
/**
|
|
326
|
+
* Heirarchal information when multiple instances are found
|
|
327
|
+
*/
|
|
282
328
|
rootDependencyId: number;
|
|
329
|
+
/**
|
|
330
|
+
* Information about where the dependency was found
|
|
331
|
+
*/
|
|
283
332
|
versionControlFilePath: VersionControlFilePath;
|
|
284
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Information about an alert dismissal
|
|
336
|
+
*/
|
|
285
337
|
export interface Dismissal {
|
|
338
|
+
/**
|
|
339
|
+
* Unique ID for this dismissal
|
|
340
|
+
*/
|
|
286
341
|
dismissalId: number;
|
|
342
|
+
/**
|
|
343
|
+
* Reason for the dismissal
|
|
344
|
+
*/
|
|
287
345
|
dismissalType: DismissalType;
|
|
346
|
+
/**
|
|
347
|
+
* Informational message attached to the dismissal
|
|
348
|
+
*/
|
|
288
349
|
message: string;
|
|
289
350
|
requestedOn: Date;
|
|
351
|
+
/**
|
|
352
|
+
* Identity that dismissed the alert
|
|
353
|
+
*/
|
|
290
354
|
stateChangedBy: string;
|
|
355
|
+
/**
|
|
356
|
+
* Identity that dismissed the alert
|
|
357
|
+
*/
|
|
291
358
|
stateChangedByIdentity: WebApi.IdentityRef;
|
|
292
359
|
}
|
|
293
360
|
export declare enum DismissalType {
|
|
@@ -308,6 +375,16 @@ export declare enum DismissalType {
|
|
|
308
375
|
*/
|
|
309
376
|
FalsePositive = 3
|
|
310
377
|
}
|
|
378
|
+
export declare enum ExpandOption {
|
|
379
|
+
/**
|
|
380
|
+
* No Expands.
|
|
381
|
+
*/
|
|
382
|
+
None = 0,
|
|
383
|
+
/**
|
|
384
|
+
* Return validationFingerprints in Alert.
|
|
385
|
+
*/
|
|
386
|
+
ValidationFingerprint = 1
|
|
387
|
+
}
|
|
311
388
|
export interface LogicalLocation {
|
|
312
389
|
fullyQualifiedName: string;
|
|
313
390
|
/**
|
|
@@ -315,9 +392,21 @@ export interface LogicalLocation {
|
|
|
315
392
|
*/
|
|
316
393
|
kind: string;
|
|
317
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
* Location in the source control system where the issue was found
|
|
397
|
+
*/
|
|
318
398
|
export interface PhysicalLocation {
|
|
399
|
+
/**
|
|
400
|
+
* Path of the file where the issue was found
|
|
401
|
+
*/
|
|
319
402
|
filePath: string;
|
|
403
|
+
/**
|
|
404
|
+
* Details about the location where the issue was found including a snippet
|
|
405
|
+
*/
|
|
320
406
|
region: Region;
|
|
407
|
+
/**
|
|
408
|
+
* Source control system-specific information about the location
|
|
409
|
+
*/
|
|
321
410
|
versionControl: VersionControlDetails;
|
|
322
411
|
}
|
|
323
412
|
export interface Pipeline {
|
|
@@ -327,49 +416,127 @@ export interface Pipeline {
|
|
|
327
416
|
phaseId: string;
|
|
328
417
|
}
|
|
329
418
|
export interface Region {
|
|
419
|
+
/**
|
|
420
|
+
* The column where the code snippet ends
|
|
421
|
+
*/
|
|
330
422
|
columnEnd: number;
|
|
423
|
+
/**
|
|
424
|
+
* The column where the code snippet starts
|
|
425
|
+
*/
|
|
331
426
|
columnStart: number;
|
|
427
|
+
/**
|
|
428
|
+
* A subset of the code snippet highlighting the issue
|
|
429
|
+
*/
|
|
332
430
|
highlightSnippet: string;
|
|
431
|
+
/**
|
|
432
|
+
* The line number where the code snippet ends
|
|
433
|
+
*/
|
|
333
434
|
lineEnd: number;
|
|
435
|
+
/**
|
|
436
|
+
* The line number where the code snippet starts
|
|
437
|
+
*/
|
|
334
438
|
lineStart: number;
|
|
439
|
+
/**
|
|
440
|
+
* The full code snippet
|
|
441
|
+
*/
|
|
335
442
|
snippet: string;
|
|
336
443
|
}
|
|
337
444
|
export interface Result {
|
|
445
|
+
/**
|
|
446
|
+
* Additional information about the alert. Valid when ResultType is Dependency
|
|
447
|
+
*/
|
|
338
448
|
dependencyResult: DependencyResult;
|
|
449
|
+
/**
|
|
450
|
+
* Full fingerprint of the Result. This is used to detect duplicate instances of the same alert
|
|
451
|
+
*/
|
|
339
452
|
fingerprint: string;
|
|
453
|
+
/**
|
|
454
|
+
* Unique ID of the fingerprint of the Result
|
|
455
|
+
*/
|
|
340
456
|
fingerprintId: number;
|
|
457
|
+
/**
|
|
458
|
+
* Unique ID of the Result
|
|
459
|
+
*/
|
|
341
460
|
resultId: number;
|
|
342
461
|
/**
|
|
343
462
|
* This is the index into the SARIF Results array. If we have to do any tool specific insertions, we'll use this key to index back into the SARIF Results array.
|
|
344
463
|
*/
|
|
345
464
|
resultIndex: number;
|
|
465
|
+
/**
|
|
466
|
+
* Detailed description of the rule that triggered the alert
|
|
467
|
+
*/
|
|
346
468
|
resultMessage: string;
|
|
469
|
+
/**
|
|
470
|
+
* The type of rule that triggered the alert
|
|
471
|
+
*/
|
|
347
472
|
resultType: ResultType;
|
|
473
|
+
/**
|
|
474
|
+
* ID of the rule that the triggered the alert
|
|
475
|
+
*/
|
|
348
476
|
ruleId: number;
|
|
477
|
+
/**
|
|
478
|
+
* Short description of the rule that triggered the alert
|
|
479
|
+
*/
|
|
349
480
|
ruleShortDescription: string;
|
|
481
|
+
/**
|
|
482
|
+
* The severity of the alert
|
|
483
|
+
*/
|
|
350
484
|
severity: Severity;
|
|
485
|
+
/**
|
|
486
|
+
* Additional information about the alert. Valid when ResultType is VersionControl
|
|
487
|
+
*/
|
|
351
488
|
versionControlResult: VersionControlResult;
|
|
352
489
|
}
|
|
353
490
|
/**
|
|
354
491
|
* This enum defines the different result types.
|
|
355
492
|
*/
|
|
356
493
|
export declare enum ResultType {
|
|
494
|
+
/**
|
|
495
|
+
* The result was found from an unspecified analysis type
|
|
496
|
+
*/
|
|
357
497
|
Unknown = 0,
|
|
498
|
+
/**
|
|
499
|
+
* The result was found from dependency analysis
|
|
500
|
+
*/
|
|
358
501
|
Dependency = 1,
|
|
502
|
+
/**
|
|
503
|
+
* The result was found from static code analysis
|
|
504
|
+
*/
|
|
359
505
|
VersionControl = 2
|
|
360
506
|
}
|
|
361
507
|
/**
|
|
362
508
|
* The analysis rule that caused the alert.
|
|
363
509
|
*/
|
|
364
510
|
export interface Rule {
|
|
511
|
+
/**
|
|
512
|
+
* Additional properties of this rule
|
|
513
|
+
*/
|
|
514
|
+
additionalProperties: {
|
|
515
|
+
[key: string]: any;
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* Description of what this rule detects
|
|
519
|
+
*/
|
|
365
520
|
description: string;
|
|
521
|
+
/**
|
|
522
|
+
* Plain-text rule identifier
|
|
523
|
+
*/
|
|
366
524
|
friendlyName: string;
|
|
525
|
+
/**
|
|
526
|
+
* Additional information about this rule
|
|
527
|
+
*/
|
|
367
528
|
helpMessage: string;
|
|
529
|
+
/**
|
|
530
|
+
* Tool-specific rule identifier
|
|
531
|
+
*/
|
|
368
532
|
opaqueId: string;
|
|
369
533
|
/**
|
|
370
534
|
* Markdown-formatted list of resources to learn more about the Rule. In some cases, RuleInfo.AdditionalProperties.advisoryUrls is used instead.
|
|
371
535
|
*/
|
|
372
536
|
resources: string;
|
|
537
|
+
/**
|
|
538
|
+
* Classification tags for this rule
|
|
539
|
+
*/
|
|
373
540
|
tags: string[];
|
|
374
541
|
}
|
|
375
542
|
export interface SearchCriteria {
|
|
@@ -390,7 +557,7 @@ export interface SearchCriteria {
|
|
|
390
557
|
*/
|
|
391
558
|
keywords: string;
|
|
392
559
|
/**
|
|
393
|
-
* If true, only return alerts found on the default branch of the repository. \<br /\>If there have been no runs completed on the default branch, the last run is used instead regardless of the branch used for that run. \<br /\>This option is ignored if
|
|
560
|
+
* If true, only return alerts found on the default branch of the repository. \<br /\>If there have been no runs completed on the default branch, the last run is used instead regardless of the branch used for that run. \<br /\>This option is ignored if ref is provided.
|
|
394
561
|
*/
|
|
395
562
|
onlyDefaultBranchAlerts: boolean;
|
|
396
563
|
/**
|
|
@@ -437,48 +604,136 @@ export declare enum Severity {
|
|
|
437
604
|
Critical = 3
|
|
438
605
|
}
|
|
439
606
|
export declare enum State {
|
|
607
|
+
/**
|
|
608
|
+
* Alert is in an indeterminate state
|
|
609
|
+
*/
|
|
440
610
|
Unknown = 0,
|
|
611
|
+
/**
|
|
612
|
+
* Alert has been detected in the code
|
|
613
|
+
*/
|
|
441
614
|
Active = 1,
|
|
615
|
+
/**
|
|
616
|
+
* Alert was dismissed by a user
|
|
617
|
+
*/
|
|
442
618
|
Dismissed = 2,
|
|
619
|
+
/**
|
|
620
|
+
* The issue is no longer detected in the code
|
|
621
|
+
*/
|
|
443
622
|
Fixed = 4,
|
|
623
|
+
/**
|
|
624
|
+
* The tool has determined that the issue is no longer a risk
|
|
625
|
+
*/
|
|
444
626
|
AutoDismissed = 8
|
|
445
627
|
}
|
|
628
|
+
/**
|
|
629
|
+
* An Analysis tool that can generate security alerts
|
|
630
|
+
*/
|
|
446
631
|
export interface Tool {
|
|
632
|
+
/**
|
|
633
|
+
* Name of the tool
|
|
634
|
+
*/
|
|
447
635
|
name: string;
|
|
636
|
+
/**
|
|
637
|
+
* The rules that the tool defines
|
|
638
|
+
*/
|
|
448
639
|
rules: Rule[];
|
|
449
640
|
}
|
|
450
641
|
export interface UxFilters {
|
|
642
|
+
/**
|
|
643
|
+
* Branches to display alerts for. If empty, show alerts from all branches
|
|
644
|
+
*/
|
|
451
645
|
branches: Branch[];
|
|
452
646
|
packages: Dependency[];
|
|
647
|
+
/**
|
|
648
|
+
* Pipelines to show alerts for. If empty, show alerts for all pipelines
|
|
649
|
+
*/
|
|
453
650
|
pipelines: Pipeline[];
|
|
454
651
|
progressPercentage: number;
|
|
455
652
|
rules: Rule[];
|
|
456
653
|
secretTypes: string[];
|
|
654
|
+
/**
|
|
655
|
+
* Alert severities to show. If empty show all alert servities
|
|
656
|
+
*/
|
|
457
657
|
severities: Severity[];
|
|
658
|
+
/**
|
|
659
|
+
* Alert states to show. If empty show all alert states
|
|
660
|
+
*/
|
|
458
661
|
states: State[];
|
|
459
662
|
}
|
|
663
|
+
export interface ValidationFingerprint {
|
|
664
|
+
validationFingerprintHash: string;
|
|
665
|
+
validationFingerprintJson: string;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Information for locating files in a source control system
|
|
669
|
+
*/
|
|
460
670
|
export interface VersionControlDetails {
|
|
461
671
|
commitHash: string;
|
|
462
672
|
itemUrl: string;
|
|
463
673
|
}
|
|
464
674
|
export interface VersionControlFilePath {
|
|
675
|
+
/**
|
|
676
|
+
* Path of the file in the version control system
|
|
677
|
+
*/
|
|
465
678
|
filePath: string;
|
|
679
|
+
/**
|
|
680
|
+
* Hash of the file in the version control system
|
|
681
|
+
*/
|
|
466
682
|
filePathHash: number[];
|
|
683
|
+
/**
|
|
684
|
+
* Unique ID for the file in the version control system
|
|
685
|
+
*/
|
|
467
686
|
versionControlFilePathId: number;
|
|
468
687
|
}
|
|
469
688
|
export interface VersionControlResult {
|
|
689
|
+
/**
|
|
690
|
+
* The ID to associate this structure with the cooresponding Result
|
|
691
|
+
*/
|
|
470
692
|
resultId: number;
|
|
693
|
+
/**
|
|
694
|
+
* Information about the snippet where the Result was found
|
|
695
|
+
*/
|
|
471
696
|
versionControlSnippet: VersionControlSnippet;
|
|
472
697
|
}
|
|
473
698
|
export interface VersionControlSnippet {
|
|
699
|
+
/**
|
|
700
|
+
* column in the code file where the snippet ends
|
|
701
|
+
*/
|
|
474
702
|
endColumn: number;
|
|
703
|
+
/**
|
|
704
|
+
* line in the code file where the snippet ends
|
|
705
|
+
*/
|
|
475
706
|
endLine: number;
|
|
707
|
+
/**
|
|
708
|
+
* subset of the code snippet highlighting the alert issue
|
|
709
|
+
*/
|
|
476
710
|
highlightSnippet: string;
|
|
711
|
+
/**
|
|
712
|
+
* larger code snippet
|
|
713
|
+
*/
|
|
477
714
|
snippet: string;
|
|
715
|
+
/**
|
|
716
|
+
* column in the code file where the snippet starts
|
|
717
|
+
*/
|
|
478
718
|
startColumn: number;
|
|
719
|
+
/**
|
|
720
|
+
* line in the code file where the snippet starts
|
|
721
|
+
*/
|
|
479
722
|
startLine: number;
|
|
723
|
+
/**
|
|
724
|
+
* Version control system where the code was found
|
|
725
|
+
*/
|
|
480
726
|
versionControl: string;
|
|
727
|
+
/**
|
|
728
|
+
* path of the code file in the version control system
|
|
729
|
+
*/
|
|
481
730
|
versionControlFilePath: VersionControlFilePath;
|
|
731
|
+
/**
|
|
732
|
+
* Unique Id number for the file path
|
|
733
|
+
*/
|
|
482
734
|
versionControlFilePathId: number;
|
|
735
|
+
/**
|
|
736
|
+
* Unique Id number for this snippet
|
|
737
|
+
*/
|
|
483
738
|
versionControlSnippetId: number;
|
|
484
739
|
}
|
package/Alert/Alert.js
CHANGED
|
@@ -8,9 +8,21 @@ define(["require", "exports"], function (require, exports) {
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
var AlertType;
|
|
10
10
|
(function (AlertType) {
|
|
11
|
+
/**
|
|
12
|
+
* The code has an unspecified vulnerability type
|
|
13
|
+
*/
|
|
11
14
|
AlertType[AlertType["Unknown"] = 0] = "Unknown";
|
|
15
|
+
/**
|
|
16
|
+
* The code uses a dependency with a known vulnerability.
|
|
17
|
+
*/
|
|
12
18
|
AlertType[AlertType["Dependency"] = 1] = "Dependency";
|
|
19
|
+
/**
|
|
20
|
+
* The code contains a secret that has now been compromised and must be revoked.
|
|
21
|
+
*/
|
|
13
22
|
AlertType[AlertType["Secret"] = 2] = "Secret";
|
|
23
|
+
/**
|
|
24
|
+
* The code contains a weakness determined by static analysis.
|
|
25
|
+
*/
|
|
14
26
|
AlertType[AlertType["Code"] = 3] = "Code";
|
|
15
27
|
})(AlertType = exports.AlertType || (exports.AlertType = {}));
|
|
16
28
|
var AnalysisConfigurationType;
|
|
@@ -108,13 +120,33 @@ define(["require", "exports"], function (require, exports) {
|
|
|
108
120
|
*/
|
|
109
121
|
DismissalType[DismissalType["FalsePositive"] = 3] = "FalsePositive";
|
|
110
122
|
})(DismissalType = exports.DismissalType || (exports.DismissalType = {}));
|
|
123
|
+
var ExpandOption;
|
|
124
|
+
(function (ExpandOption) {
|
|
125
|
+
/**
|
|
126
|
+
* No Expands.
|
|
127
|
+
*/
|
|
128
|
+
ExpandOption[ExpandOption["None"] = 0] = "None";
|
|
129
|
+
/**
|
|
130
|
+
* Return validationFingerprints in Alert.
|
|
131
|
+
*/
|
|
132
|
+
ExpandOption[ExpandOption["ValidationFingerprint"] = 1] = "ValidationFingerprint";
|
|
133
|
+
})(ExpandOption = exports.ExpandOption || (exports.ExpandOption = {}));
|
|
111
134
|
/**
|
|
112
135
|
* This enum defines the different result types.
|
|
113
136
|
*/
|
|
114
137
|
var ResultType;
|
|
115
138
|
(function (ResultType) {
|
|
139
|
+
/**
|
|
140
|
+
* The result was found from an unspecified analysis type
|
|
141
|
+
*/
|
|
116
142
|
ResultType[ResultType["Unknown"] = 0] = "Unknown";
|
|
143
|
+
/**
|
|
144
|
+
* The result was found from dependency analysis
|
|
145
|
+
*/
|
|
117
146
|
ResultType[ResultType["Dependency"] = 1] = "Dependency";
|
|
147
|
+
/**
|
|
148
|
+
* The result was found from static code analysis
|
|
149
|
+
*/
|
|
118
150
|
ResultType[ResultType["VersionControl"] = 2] = "VersionControl";
|
|
119
151
|
})(ResultType = exports.ResultType || (exports.ResultType = {}));
|
|
120
152
|
var Severity;
|
|
@@ -126,10 +158,25 @@ define(["require", "exports"], function (require, exports) {
|
|
|
126
158
|
})(Severity = exports.Severity || (exports.Severity = {}));
|
|
127
159
|
var State;
|
|
128
160
|
(function (State) {
|
|
161
|
+
/**
|
|
162
|
+
* Alert is in an indeterminate state
|
|
163
|
+
*/
|
|
129
164
|
State[State["Unknown"] = 0] = "Unknown";
|
|
165
|
+
/**
|
|
166
|
+
* Alert has been detected in the code
|
|
167
|
+
*/
|
|
130
168
|
State[State["Active"] = 1] = "Active";
|
|
169
|
+
/**
|
|
170
|
+
* Alert was dismissed by a user
|
|
171
|
+
*/
|
|
131
172
|
State[State["Dismissed"] = 2] = "Dismissed";
|
|
173
|
+
/**
|
|
174
|
+
* The issue is no longer detected in the code
|
|
175
|
+
*/
|
|
132
176
|
State[State["Fixed"] = 4] = "Fixed";
|
|
177
|
+
/**
|
|
178
|
+
* The tool has determined that the issue is no longer a risk
|
|
179
|
+
*/
|
|
133
180
|
State[State["AutoDismissed"] = 8] = "AutoDismissed";
|
|
134
181
|
})(State = exports.State || (exports.State = {}));
|
|
135
182
|
});
|
package/Alert/Alert.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code"}(n.AlertType||(n.AlertType={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!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"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical"}(n.Severity||(n.Severity={}));!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"}(n.State||(n.State={}))});
|
|
1
|
+
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code"}(n.AlertType||(n.AlertType={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!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"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical"}(n.Severity||(n.Severity={}));!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"}(n.State||(n.State={}))});
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -5,12 +5,15 @@ import * as WebApi from "../WebApi/WebApi";
|
|
|
5
5
|
export declare class AlertRestClient extends RestClientBase {
|
|
6
6
|
constructor(options: IVssRestClientOptions);
|
|
7
7
|
/**
|
|
8
|
+
* Get an alert.
|
|
9
|
+
*
|
|
8
10
|
* @param project - Project ID or project name
|
|
9
|
-
* @param alertId -
|
|
10
|
-
* @param repository -
|
|
11
|
+
* @param alertId - ID of alert to retrieve
|
|
12
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
11
13
|
* @param ref -
|
|
14
|
+
* @param expand - Expand alert attributes. Possible options are \{ValidationFingerprint, None\}
|
|
12
15
|
*/
|
|
13
|
-
getAlert(project: string, alertId: number, repository: string, ref?: string): Promise<Alert.Alert>;
|
|
16
|
+
getAlert(project: string, alertId: number, repository: string, ref?: string, expand?: Alert.ExpandOption): Promise<Alert.Alert>;
|
|
14
17
|
/**
|
|
15
18
|
* Get alerts for a repository
|
|
16
19
|
*
|
|
@@ -23,12 +26,15 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
23
26
|
*/
|
|
24
27
|
getAlerts(project: string, repository: string, top?: number, orderBy?: string, criteria?: Alert.SearchCriteria, continuationToken?: string): Promise<WebApi.PagedList<Alert.Alert>>;
|
|
25
28
|
/**
|
|
29
|
+
* Get an alert.
|
|
30
|
+
*
|
|
26
31
|
* @param project - Project ID or project name
|
|
27
|
-
* @param alertId -
|
|
28
|
-
* @param repository -
|
|
32
|
+
* @param alertId - ID of alert to retrieve
|
|
33
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
29
34
|
* @param ref -
|
|
35
|
+
* @param expand - Expand alert attributes. Possible options are \{ValidationFingerprint, None\}
|
|
30
36
|
*/
|
|
31
|
-
getAlertSarif(project: string, alertId: number, repository: string, ref?: string): Promise<string>;
|
|
37
|
+
getAlertSarif(project: string, alertId: number, repository: string, ref?: string, expand?: Alert.ExpandOption): Promise<string>;
|
|
32
38
|
/**
|
|
33
39
|
* Update the status of an alert
|
|
34
40
|
*
|
package/Alert/AlertClient.js
CHANGED
|
@@ -57,17 +57,21 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
57
57
|
return _super.call(this, options) || this;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
+
* Get an alert.
|
|
61
|
+
*
|
|
60
62
|
* @param project - Project ID or project name
|
|
61
|
-
* @param alertId -
|
|
62
|
-
* @param repository -
|
|
63
|
+
* @param alertId - ID of alert to retrieve
|
|
64
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
63
65
|
* @param ref -
|
|
66
|
+
* @param expand - Expand alert attributes. Possible options are \{ValidationFingerprint, None\}
|
|
64
67
|
*/
|
|
65
|
-
AlertRestClient.prototype.getAlert = function (project, alertId, repository, ref) {
|
|
68
|
+
AlertRestClient.prototype.getAlert = function (project, alertId, repository, ref, expand) {
|
|
66
69
|
return __awaiter(this, void 0, void 0, function () {
|
|
67
70
|
var queryValues;
|
|
68
71
|
return __generator(this, function (_a) {
|
|
69
72
|
queryValues = {
|
|
70
|
-
ref: ref
|
|
73
|
+
ref: ref,
|
|
74
|
+
expand: expand
|
|
71
75
|
};
|
|
72
76
|
return [2 /*return*/, this.beginRequest({
|
|
73
77
|
apiVersion: "7.2-preview.1",
|
|
@@ -128,17 +132,21 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
128
132
|
});
|
|
129
133
|
};
|
|
130
134
|
/**
|
|
135
|
+
* Get an alert.
|
|
136
|
+
*
|
|
131
137
|
* @param project - Project ID or project name
|
|
132
|
-
* @param alertId -
|
|
133
|
-
* @param repository -
|
|
138
|
+
* @param alertId - ID of alert to retrieve
|
|
139
|
+
* @param repository - Name or id of a repository that alert is part of
|
|
134
140
|
* @param ref -
|
|
141
|
+
* @param expand - Expand alert attributes. Possible options are \{ValidationFingerprint, None\}
|
|
135
142
|
*/
|
|
136
|
-
AlertRestClient.prototype.getAlertSarif = function (project, alertId, repository, ref) {
|
|
143
|
+
AlertRestClient.prototype.getAlertSarif = function (project, alertId, repository, ref, expand) {
|
|
137
144
|
return __awaiter(this, void 0, void 0, function () {
|
|
138
145
|
var queryValues;
|
|
139
146
|
return __generator(this, function (_a) {
|
|
140
147
|
queryValues = {
|
|
141
|
-
ref: ref
|
|
148
|
+
ref: ref,
|
|
149
|
+
expand: expand
|
|
142
150
|
};
|
|
143
151
|
return [2 /*return*/, this.beginRequest({
|
|
144
152
|
apiVersion: "7.2-preview.1",
|
package/Alert/AlertClient.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(n,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,s)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(6===r[0]&&s.label<i[1]){s.label=i[1],i=r;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(r);break}i[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAlert=function(e,t,r,o,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(a){return i={ref:o,expand:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.getAlerts=function(e,t,r,n,i,a){return __awaiter(this,void 0,void 0,function(){var s,u=this;return __generator(this,function(p){return s={top:r,orderBy:n,criteria:i,continuationToken:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(u,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(o.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getAlertSarif=function(e,t,r,o,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(a){return i={ref:o,expand:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:t,alertId:r,repository:o},body:e})]})})},t.prototype.getAlertInstances=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.uploadSarif=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:t,repository:r},customHeaders:{"Content-Type":"application/octet-stream"},body:e})]})})},t.prototype.getUxFilters=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={alertType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters",routeValues:{project:e,repository:t},queryParams:o})]})})},t.prototype.getSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t}(r.RestClientBase);t.AlertRestClient=n});
|
package/Git/Git.d.ts
CHANGED
|
@@ -146,6 +146,14 @@ export interface BillableCommitterDetail extends BillableCommitter {
|
|
|
146
146
|
* Time reported by the commit.
|
|
147
147
|
*/
|
|
148
148
|
commitTime: Date;
|
|
149
|
+
/**
|
|
150
|
+
* DisplayName of the Pusher.
|
|
151
|
+
*/
|
|
152
|
+
displayName: string;
|
|
153
|
+
/**
|
|
154
|
+
* MailNickName of the Pusher.
|
|
155
|
+
*/
|
|
156
|
+
mailNickName: string;
|
|
149
157
|
/**
|
|
150
158
|
* Project Id commit was pushed to.
|
|
151
159
|
*/
|
|
@@ -158,6 +166,10 @@ export interface BillableCommitterDetail extends BillableCommitter {
|
|
|
158
166
|
* Time of the push that contained the commit.
|
|
159
167
|
*/
|
|
160
168
|
pushedTime: Date;
|
|
169
|
+
/**
|
|
170
|
+
* Pusher Id for the push.
|
|
171
|
+
*/
|
|
172
|
+
pusherId: string;
|
|
161
173
|
/**
|
|
162
174
|
* Push Id that contained the commit.
|
|
163
175
|
*/
|
|
@@ -166,6 +178,10 @@ export interface BillableCommitterDetail extends BillableCommitter {
|
|
|
166
178
|
* Repository name commit was pushed to.
|
|
167
179
|
*/
|
|
168
180
|
repoName: string;
|
|
181
|
+
/**
|
|
182
|
+
* SamAccountName of the Pusher.
|
|
183
|
+
*/
|
|
184
|
+
samAccountName: string;
|
|
169
185
|
}
|
|
170
186
|
/**
|
|
171
187
|
* Used by AdvSec to estimate billable pushers for a Host or Project.
|