UNPKG

15.5 kBJavaScriptView Raw
1/*
2 * ---------------------------------------------------------
3 * Copyright(C) Microsoft Corporation. All rights reserved.
4 * ---------------------------------------------------------
5 *
6 * ---------------------------------------------------------
7 * Generated file, DO NOT EDIT
8 * ---------------------------------------------------------
9 */
10"use strict";
11Object.defineProperty(exports, "__esModule", { value: true });
12exports.TypeInfo = exports.State = exports.Severity = exports.SarifJobStatus = exports.ResultType = exports.MetadataOperation = exports.MetadataChangeType = exports.ExpandOption = exports.DismissalType = exports.Confidence = exports.ComponentType = exports.AnalysisConfigurationType = exports.AlertType = void 0;
13var AlertType;
14(function (AlertType) {
15 /**
16 * The code has an unspecified vulnerability type
17 */
18 AlertType[AlertType["Unknown"] = 0] = "Unknown";
19 /**
20 * The code uses a dependency with a known vulnerability.
21 */
22 AlertType[AlertType["Dependency"] = 1] = "Dependency";
23 /**
24 * The code contains a secret that has now been compromised and must be revoked.
25 */
26 AlertType[AlertType["Secret"] = 2] = "Secret";
27 /**
28 * The code contains a weakness determined by static analysis.
29 */
30 AlertType[AlertType["Code"] = 3] = "Code";
31})(AlertType = exports.AlertType || (exports.AlertType = {}));
32var AnalysisConfigurationType;
33(function (AnalysisConfigurationType) {
34 /**
35 * Default analysis configuration that is not attached to any other configuration data
36 */
37 AnalysisConfigurationType[AnalysisConfigurationType["Default"] = 0] = "Default";
38 /**
39 * Ado Pipeline, contains branch, pipeline, phase, and ADOPipelineId
40 */
41 AnalysisConfigurationType[AnalysisConfigurationType["AdoPipeline"] = 1] = "AdoPipeline";
42})(AnalysisConfigurationType = exports.AnalysisConfigurationType || (exports.AnalysisConfigurationType = {}));
43/**
44 * This enum defines the dependency components.
45 */
46var ComponentType;
47(function (ComponentType) {
48 ComponentType[ComponentType["Unknown"] = 0] = "Unknown";
49 ComponentType[ComponentType["NuGet"] = 1] = "NuGet";
50 /**
51 * Indicates the component is an Npm package.
52 */
53 ComponentType[ComponentType["Npm"] = 2] = "Npm";
54 /**
55 * Indicates the component is a Maven artifact.
56 */
57 ComponentType[ComponentType["Maven"] = 3] = "Maven";
58 /**
59 * Indicates the component is a Git repository.
60 */
61 ComponentType[ComponentType["Git"] = 4] = "Git";
62 /**
63 * Indicates the component is not any of the supported component types by Governance.
64 */
65 ComponentType[ComponentType["Other"] = 5] = "Other";
66 /**
67 * Indicates the component is a Ruby gem.
68 */
69 ComponentType[ComponentType["RubyGems"] = 6] = "RubyGems";
70 /**
71 * Indicates the component is a Cargo package.
72 */
73 ComponentType[ComponentType["Cargo"] = 7] = "Cargo";
74 /**
75 * Indicates the component is a Pip package.
76 */
77 ComponentType[ComponentType["Pip"] = 8] = "Pip";
78 /**
79 * Indicates the component is a loose file. Not a package as understood by different package managers.
80 */
81 ComponentType[ComponentType["File"] = 9] = "File";
82 /**
83 * Indicates the component is a Go package.
84 */
85 ComponentType[ComponentType["Go"] = 10] = "Go";
86 /**
87 * Indicates the component is a Docker Image
88 */
89 ComponentType[ComponentType["DockerImage"] = 11] = "DockerImage";
90 /**
91 * Indicates the component is a CocoaPods pod.
92 */
93 ComponentType[ComponentType["Pod"] = 12] = "Pod";
94 /**
95 * Indicates the component is found in a linux environment. A package understood by linux based package managers like apt and rpm.
96 */
97 ComponentType[ComponentType["Linux"] = 13] = "Linux";
98 /**
99 * Indicates the component is a Conda package.
100 */
101 ComponentType[ComponentType["Conda"] = 14] = "Conda";
102 /**
103 * Indicates the component is a Docker Reference.
104 */
105 ComponentType[ComponentType["DockerReference"] = 15] = "DockerReference";
106 /**
107 * Indicates the component is a Vcpkg Package.
108 */
109 ComponentType[ComponentType["Vcpkg"] = 16] = "Vcpkg";
110})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
111var Confidence;
112(function (Confidence) {
113 /**
114 * High confidence level for alert
115 */
116 Confidence[Confidence["High"] = 0] = "High";
117 /**
118 * Other confidence level for alert
119 */
120 Confidence[Confidence["Other"] = 1] = "Other";
121})(Confidence = exports.Confidence || (exports.Confidence = {}));
122var DismissalType;
123(function (DismissalType) {
124 /**
125 * Dismissal type unknown
126 */
127 DismissalType[DismissalType["Unknown"] = 0] = "Unknown";
128 /**
129 * Dismissal indicating alert has been fixed
130 */
131 DismissalType[DismissalType["Fixed"] = 1] = "Fixed";
132 /**
133 * Dismissal indicating user is accepting a risk for the alert
134 */
135 DismissalType[DismissalType["AcceptedRisk"] = 2] = "AcceptedRisk";
136 /**
137 * Dismissal indicating alert is a false positive and will likely not be fixed.
138 */
139 DismissalType[DismissalType["FalsePositive"] = 3] = "FalsePositive";
140})(DismissalType = exports.DismissalType || (exports.DismissalType = {}));
141var ExpandOption;
142(function (ExpandOption) {
143 /**
144 * No Expands.
145 */
146 ExpandOption[ExpandOption["None"] = 0] = "None";
147 /**
148 * Return validationFingerprints in Alert.
149 */
150 ExpandOption[ExpandOption["ValidationFingerprint"] = 1] = "ValidationFingerprint";
151})(ExpandOption = exports.ExpandOption || (exports.ExpandOption = {}));
152/**
153 * The type of change that occurred to the metadata.
154 */
155var MetadataChangeType;
156(function (MetadataChangeType) {
157 MetadataChangeType[MetadataChangeType["None"] = 0] = "None";
158 MetadataChangeType[MetadataChangeType["Created"] = 1] = "Created";
159 MetadataChangeType[MetadataChangeType["Updated"] = 2] = "Updated";
160 MetadataChangeType[MetadataChangeType["Deleted"] = 3] = "Deleted";
161})(MetadataChangeType = exports.MetadataChangeType || (exports.MetadataChangeType = {}));
162/**
163 * The operation to be performed on the metadata.
164 */
165var MetadataOperation;
166(function (MetadataOperation) {
167 MetadataOperation[MetadataOperation["Add"] = 0] = "Add";
168 MetadataOperation[MetadataOperation["Remove"] = 1] = "Remove";
169})(MetadataOperation = exports.MetadataOperation || (exports.MetadataOperation = {}));
170/**
171 * This enum defines the different result types.
172 */
173var ResultType;
174(function (ResultType) {
175 /**
176 * The result was found from an unspecified analysis type
177 */
178 ResultType[ResultType["Unknown"] = 0] = "Unknown";
179 /**
180 * The result was found from dependency analysis
181 */
182 ResultType[ResultType["Dependency"] = 1] = "Dependency";
183 /**
184 * The result was found from static code analysis
185 */
186 ResultType[ResultType["VersionControl"] = 2] = "VersionControl";
187})(ResultType = exports.ResultType || (exports.ResultType = {}));
188var SarifJobStatus;
189(function (SarifJobStatus) {
190 /**
191 * The job type when it is new
192 */
193 SarifJobStatus[SarifJobStatus["New"] = 0] = "New";
194 /**
195 * The job type when it is queued
196 */
197 SarifJobStatus[SarifJobStatus["Queued"] = 1] = "Queued";
198 /**
199 * The job type when it is completed
200 */
201 SarifJobStatus[SarifJobStatus["Completed"] = 2] = "Completed";
202 /**
203 * The job type when it fails
204 */
205 SarifJobStatus[SarifJobStatus["Failed"] = 3] = "Failed";
206})(SarifJobStatus = exports.SarifJobStatus || (exports.SarifJobStatus = {}));
207var Severity;
208(function (Severity) {
209 Severity[Severity["Low"] = 0] = "Low";
210 Severity[Severity["Medium"] = 1] = "Medium";
211 Severity[Severity["High"] = 2] = "High";
212 Severity[Severity["Critical"] = 3] = "Critical";
213 Severity[Severity["Note"] = 4] = "Note";
214 Severity[Severity["Warning"] = 5] = "Warning";
215 Severity[Severity["Error"] = 6] = "Error";
216})(Severity = exports.Severity || (exports.Severity = {}));
217var State;
218(function (State) {
219 /**
220 * Alert is in an indeterminate state
221 */
222 State[State["Unknown"] = 0] = "Unknown";
223 /**
224 * Alert has been detected in the code
225 */
226 State[State["Active"] = 1] = "Active";
227 /**
228 * Alert was dismissed by a user
229 */
230 State[State["Dismissed"] = 2] = "Dismissed";
231 /**
232 * The issue is no longer detected in the code
233 */
234 State[State["Fixed"] = 4] = "Fixed";
235 /**
236 * The tool has determined that the issue is no longer a risk
237 */
238 State[State["AutoDismissed"] = 8] = "AutoDismissed";
239})(State = exports.State || (exports.State = {}));
240exports.TypeInfo = {
241 Alert: {},
242 AlertAnalysisInstance: {},
243 AlertMetadata: {},
244 AlertMetadataChange: {},
245 AlertStateUpdate: {},
246 AlertType: {
247 enumValues: {
248 "unknown": 0,
249 "dependency": 1,
250 "secret": 2,
251 "code": 3
252 }
253 },
254 AnalysisConfiguration: {},
255 AnalysisConfigurationType: {
256 enumValues: {
257 "default": 0,
258 "adoPipeline": 1
259 }
260 },
261 AnalysisInstance: {},
262 AnalysisResult: {},
263 Branch: {},
264 ComponentType: {
265 enumValues: {
266 "unknown": 0,
267 "nuGet": 1,
268 "npm": 2,
269 "maven": 3,
270 "git": 4,
271 "other": 5,
272 "rubyGems": 6,
273 "cargo": 7,
274 "pip": 8,
275 "file": 9,
276 "go": 10,
277 "dockerImage": 11,
278 "pod": 12,
279 "linux": 13,
280 "conda": 14,
281 "dockerReference": 15,
282 "vcpkg": 16
283 }
284 },
285 Confidence: {
286 enumValues: {
287 "high": 0,
288 "other": 1
289 }
290 },
291 Dependency: {},
292 DependencyResult: {},
293 Dismissal: {},
294 DismissalType: {
295 enumValues: {
296 "unknown": 0,
297 "fixed": 1,
298 "acceptedRisk": 2,
299 "falsePositive": 3
300 }
301 },
302 ExpandOption: {
303 enumValues: {
304 "none": 0,
305 "validationFingerprint": 1
306 }
307 },
308 Metadata: {},
309 MetadataChange: {},
310 MetadataChangeType: {
311 enumValues: {
312 "none": 0,
313 "created": 1,
314 "updated": 2,
315 "deleted": 3
316 }
317 },
318 MetadataOperation: {
319 enumValues: {
320 "add": 0,
321 "remove": 1
322 }
323 },
324 Result: {},
325 ResultType: {
326 enumValues: {
327 "unknown": 0,
328 "dependency": 1,
329 "versionControl": 2
330 }
331 },
332 SarifJobStatus: {
333 enumValues: {
334 "new": 0,
335 "queued": 1,
336 "completed": 2,
337 "failed": 3
338 }
339 },
340 SarifUploadStatus: {},
341 SearchCriteria: {},
342 Severity: {
343 enumValues: {
344 "low": 0,
345 "medium": 1,
346 "high": 2,
347 "critical": 3,
348 "note": 4,
349 "warning": 5,
350 "error": 6
351 }
352 },
353 State: {
354 enumValues: {
355 "unknown": 0,
356 "active": 1,
357 "dismissed": 2,
358 "fixed": 4,
359 "autoDismissed": 8
360 }
361 },
362 UxFilters: {},
363};
364exports.TypeInfo.Alert.fields = {
365 alertType: {
366 enumType: exports.TypeInfo.AlertType
367 },
368 confidence: {
369 enumType: exports.TypeInfo.Confidence
370 },
371 dismissal: {
372 typeInfo: exports.TypeInfo.Dismissal
373 },
374 firstSeenDate: {
375 isDate: true,
376 },
377 fixedDate: {
378 isDate: true,
379 },
380 introducedDate: {
381 isDate: true,
382 },
383 lastSeenDate: {
384 isDate: true,
385 },
386 severity: {
387 enumType: exports.TypeInfo.Severity
388 },
389 state: {
390 enumType: exports.TypeInfo.State
391 }
392};
393exports.TypeInfo.AlertAnalysisInstance.fields = {
394 analysisConfiguration: {
395 typeInfo: exports.TypeInfo.AnalysisConfiguration
396 },
397 firstSeen: {
398 typeInfo: exports.TypeInfo.AnalysisInstance
399 },
400 fixedIn: {
401 typeInfo: exports.TypeInfo.AnalysisInstance
402 },
403 lastSeen: {
404 typeInfo: exports.TypeInfo.AnalysisInstance
405 },
406 recentAnalysisInstance: {
407 typeInfo: exports.TypeInfo.AnalysisInstance
408 },
409 state: {
410 enumType: exports.TypeInfo.State
411 }
412};
413exports.TypeInfo.AlertMetadata.fields = {
414 metadata: {
415 isArray: true,
416 typeInfo: exports.TypeInfo.Metadata
417 }
418};
419exports.TypeInfo.AlertMetadataChange.fields = {
420 metadataChange: {
421 typeInfo: exports.TypeInfo.MetadataChange
422 }
423};
424exports.TypeInfo.AlertStateUpdate.fields = {
425 dismissedReason: {
426 enumType: exports.TypeInfo.DismissalType
427 },
428 state: {
429 enumType: exports.TypeInfo.State
430 }
431};
432exports.TypeInfo.AnalysisConfiguration.fields = {
433 analysisConfigurationType: {
434 enumType: exports.TypeInfo.AnalysisConfigurationType
435 }
436};
437exports.TypeInfo.AnalysisInstance.fields = {
438 configuration: {
439 typeInfo: exports.TypeInfo.AnalysisConfiguration
440 },
441 createdDate: {
442 isDate: true,
443 },
444 results: {
445 isArray: true,
446 typeInfo: exports.TypeInfo.AnalysisResult
447 }
448};
449exports.TypeInfo.AnalysisResult.fields = {
450 result: {
451 typeInfo: exports.TypeInfo.Result
452 },
453 state: {
454 enumType: exports.TypeInfo.State
455 }
456};
457exports.TypeInfo.Branch.fields = {
458 deletedDate: {
459 isDate: true,
460 }
461};
462exports.TypeInfo.Dependency.fields = {
463 componentType: {
464 enumType: exports.TypeInfo.ComponentType
465 }
466};
467exports.TypeInfo.DependencyResult.fields = {
468 dependency: {
469 typeInfo: exports.TypeInfo.Dependency
470 }
471};
472exports.TypeInfo.Dismissal.fields = {
473 dismissalType: {
474 enumType: exports.TypeInfo.DismissalType
475 },
476 requestedOn: {
477 isDate: true,
478 }
479};
480exports.TypeInfo.Metadata.fields = {
481 op: {
482 enumType: exports.TypeInfo.MetadataOperation
483 }
484};
485exports.TypeInfo.MetadataChange.fields = {
486 changeType: {
487 enumType: exports.TypeInfo.MetadataChangeType
488 }
489};
490exports.TypeInfo.Result.fields = {
491 dependencyResult: {
492 typeInfo: exports.TypeInfo.DependencyResult
493 },
494 resultType: {
495 enumType: exports.TypeInfo.ResultType
496 },
497 severity: {
498 enumType: exports.TypeInfo.Severity
499 }
500};
501exports.TypeInfo.SarifUploadStatus.fields = {
502 processingStatus: {
503 enumType: exports.TypeInfo.SarifJobStatus
504 }
505};
506exports.TypeInfo.SearchCriteria.fields = {
507 alertType: {
508 enumType: exports.TypeInfo.AlertType
509 },
510 confidenceLevels: {
511 isArray: true,
512 enumType: exports.TypeInfo.Confidence
513 },
514 fromDate: {
515 isDate: true,
516 },
517 modifiedSince: {
518 isDate: true,
519 },
520 severities: {
521 isArray: true,
522 enumType: exports.TypeInfo.Severity
523 },
524 states: {
525 isArray: true,
526 enumType: exports.TypeInfo.State
527 },
528 toDate: {
529 isDate: true,
530 }
531};
532exports.TypeInfo.UxFilters.fields = {
533 branches: {
534 isArray: true,
535 typeInfo: exports.TypeInfo.Branch
536 },
537 confidenceLevels: {
538 isArray: true,
539 enumType: exports.TypeInfo.Confidence
540 },
541 packages: {
542 isArray: true,
543 typeInfo: exports.TypeInfo.Dependency
544 },
545 severities: {
546 isArray: true,
547 enumType: exports.TypeInfo.Severity
548 },
549 states: {
550 isArray: true,
551 enumType: exports.TypeInfo.State
552 }
553};