1 | import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
|
2 | export interface Alert {
|
3 | /**
|
4 | * Identifier for the alert. It is unqiue within Azure DevOps organization.
|
5 | */
|
6 | alertId?: number;
|
7 | /**
|
8 | * Type of the alert. E.g. secret, code, etc.
|
9 | */
|
10 | alertType?: AlertType;
|
11 | /**
|
12 | * Confidence level of the alert.
|
13 | */
|
14 | confidence?: Confidence;
|
15 | /**
|
16 | * Contains information for the dismissal of the alert if the alert has been dismissed.
|
17 | */
|
18 | dismissal?: Dismissal;
|
19 | /**
|
20 | * This value is computed and returned by the service. This value represents the first time the service has seen this issue reported in an analysis instance.
|
21 | */
|
22 | firstSeenDate?: Date;
|
23 | /**
|
24 | * This value is computed and returned by the service. If the issue is fixed, this value represents the time the service has seen this issue fixed in an analysis instance.
|
25 | */
|
26 | fixedDate?: Date;
|
27 | /**
|
28 | * Reference to a git object, e.g. branch ref.
|
29 | */
|
30 | gitRef?: string;
|
31 | /**
|
32 | * This value is computed and returned by the service. This value represents the first time the vulnerability was introduced.
|
33 | */
|
34 | introducedDate?: Date;
|
35 | /**
|
36 | * This value is computed and returned by the service. This value represents the last time the service has seen this issue reported in an analysis instance.
|
37 | */
|
38 | lastSeenDate?: Date;
|
39 | /**
|
40 | * Logical locations for the alert. This value is computed and returned by the service. It is a value based on the results from all analysis configurations. An example of a logical location is a component.
|
41 | */
|
42 | logicalLocations?: LogicalLocation[];
|
43 | /**
|
44 | * This value is computed and returned by the service. It is a value based on the results from all analysis configurations. An example of a physical location is a file location.
|
45 | */
|
46 | physicalLocations?: PhysicalLocation[];
|
47 | /**
|
48 | * Repository URL where the alert was detected.
|
49 | */
|
50 | repositoryUrl?: string;
|
51 | /**
|
52 | * Severity of the alert.
|
53 | */
|
54 | severity?: Severity;
|
55 | /**
|
56 | * This value is computed and returned by the service. It is a value based on the results from all analysis configurations.
|
57 | */
|
58 | state?: State;
|
59 | /**
|
60 | * Title will only be rendered as text and does not support markdown formatting. There is a maximum character limit of 256.
|
61 | */
|
62 | title?: string;
|
63 | /**
|
64 | * Tools that have detected this issue.
|
65 | */
|
66 | tools?: Tool[];
|
67 | /**
|
68 | * A truncated/obfuscated version of the secret pertaining to the alert (if applicable).
|
69 | */
|
70 | truncatedSecret?: string;
|
71 | /**
|
72 | * ValidationFingerprints for the secret liveness check. Only returned on demand in Get API with Expand parameter set to be ValidationFingerprint (not returned in List API)
|
73 | */
|
74 | validationFingerprints?: ValidationFingerprint[];
|
75 | }
|
76 | /**
|
77 | * Summary of the state of the alert for a given analysis configuration.
|
78 | */
|
79 | export interface AlertAnalysisInstance {
|
80 | /**
|
81 | * Analysis configuration.
|
82 | */
|
83 | analysisConfiguration?: AnalysisConfiguration;
|
84 | /**
|
85 | * Analysis instance where the issue was first detected for a given analysis configuration.
|
86 | */
|
87 | firstSeen?: AnalysisInstance;
|
88 | /**
|
89 | * Analysis instance where the issue was fixed for a given analysis configuration.
|
90 | */
|
91 | fixedIn?: AnalysisInstance;
|
92 | /**
|
93 | * Analysis instance where the issue was last detected for a given analysis configuration.
|
94 | */
|
95 | lastSeen?: AnalysisInstance;
|
96 | /**
|
97 | * The most recent instatnce of the analysis.
|
98 | */
|
99 | recentAnalysisInstance?: AnalysisInstance;
|
100 | /**
|
101 | * Result state for a given analysis configuration.
|
102 | */
|
103 | state?: State;
|
104 | }
|
105 | /**
|
106 | * Alert metadata.
|
107 | */
|
108 | export interface AlertMetadata {
|
109 | /**
|
110 | * The ID of the alert.
|
111 | */
|
112 | alertId?: number;
|
113 | /**
|
114 | * A list of metadata to be associated with the alert.
|
115 | */
|
116 | metadata?: Metadata[];
|
117 | }
|
118 | /**
|
119 | * Used to represent an update in a relationship between an alert and an artifact.
|
120 | */
|
121 | export interface AlertMetadataChange {
|
122 | /**
|
123 | * The ID of the alert.
|
124 | */
|
125 | alertId?: number;
|
126 | /**
|
127 | * The change that occurred to the metadata.
|
128 | */
|
129 | metadataChange?: MetadataChange;
|
130 | }
|
131 | export interface AlertStateUpdate {
|
132 | dismissedComment?: string;
|
133 | dismissedReason?: DismissalType;
|
134 | state?: State;
|
135 | }
|
136 | export declare enum AlertType {
|
137 | /**
|
138 | * The code has an unspecified vulnerability type
|
139 | */
|
140 | Unknown = 0,
|
141 | /**
|
142 | * The code uses a dependency with a known vulnerability.
|
143 | */
|
144 | Dependency = 1,
|
145 | /**
|
146 | * The code contains a secret that has now been compromised and must be revoked.
|
147 | */
|
148 | Secret = 2,
|
149 | /**
|
150 | * The code contains a weakness determined by static analysis.
|
151 | */
|
152 | Code = 3
|
153 | }
|
154 | /**
|
155 | * AnalysisConfiguration class models a build definition.
|
156 | */
|
157 | export interface AnalysisConfiguration {
|
158 | /**
|
159 | * Details for the configuration. Populated values depend on the type of configuration.
|
160 | */
|
161 | analysisConfigurationDetails?: AnalysisConfigurationDetails;
|
162 | /**
|
163 | * Identifier for the analysis configuration.
|
164 | */
|
165 | analysisConfigurationId?: number;
|
166 | /**
|
167 | * Type of the configuration.
|
168 | */
|
169 | analysisConfigurationType?: AnalysisConfigurationType;
|
170 | /**
|
171 | * Name of the tool that ran on this configuration.
|
172 | */
|
173 | toolName?: string;
|
174 | /**
|
175 | * The latest version of the tool that ran on this configuration.
|
176 | */
|
177 | toolVersion?: string;
|
178 | }
|
179 | export interface AnalysisConfigurationDetails {
|
180 | /**
|
181 | * Reference to a git object, e.g. branch ref.
|
182 | */
|
183 | gitRef?: string;
|
184 | /**
|
185 | * Is this the default branch?
|
186 | */
|
187 | isDefaultBranch?: boolean;
|
188 | /**
|
189 | * Phase ID of the pipeline.
|
190 | */
|
191 | phaseId?: string;
|
192 | /**
|
193 | * Phase name.
|
194 | */
|
195 | phaseName?: string;
|
196 | /**
|
197 | * AzureDevOps pipeline id.
|
198 | */
|
199 | pipelineId?: number;
|
200 | /**
|
201 | * Name of the pipeline.
|
202 | */
|
203 | pipelineName?: string;
|
204 | }
|
205 | export declare enum AnalysisConfigurationType {
|
206 | /**
|
207 | * Default analysis configuration that is not attached to any other configuration data
|
208 | */
|
209 | Default = 0,
|
210 | /**
|
211 | * Ado Pipeline, contains branch, pipeline, phase, and ADOPipelineId
|
212 | */
|
213 | AdoPipeline = 1
|
214 | }
|
215 | /**
|
216 | * AnalysisInstance class models a build.
|
217 | */
|
218 | export interface AnalysisInstance {
|
219 | /**
|
220 | * CommitId is a commit id for that instance
|
221 | */
|
222 | commitId?: string;
|
223 | /**
|
224 | * Analysis configuration.
|
225 | */
|
226 | configuration?: AnalysisConfiguration;
|
227 | /**
|
228 | * Date when the analysis was created.
|
229 | */
|
230 | createdDate?: Date;
|
231 | /**
|
232 | * InstanceIdentifier is a key that uniquely establishes this instance
|
233 | */
|
234 | instanceIdentifier?: string;
|
235 | /**
|
236 | * Results that were reported by the analysis.
|
237 | */
|
238 | results?: AnalysisResult[];
|
239 | /**
|
240 | * Url is the permalink to the build.
|
241 | */
|
242 | url?: string;
|
243 | }
|
244 | export interface AnalysisResult {
|
245 | analysisResultId?: number;
|
246 | firstIntroducedInstanceId?: number;
|
247 | fixedInstanceId?: number;
|
248 | introducedInstanceId?: number;
|
249 | lastSeenInstanceId?: number;
|
250 | result?: Result;
|
251 | state?: State;
|
252 | }
|
253 | export interface Branch {
|
254 | branchId?: number;
|
255 | deletedDate?: Date;
|
256 | name?: string;
|
257 | }
|
258 | /**
|
259 | * This enum defines the dependency components.
|
260 | */
|
261 | export declare enum ComponentType {
|
262 | Unknown = 0,
|
263 | NuGet = 1,
|
264 | /**
|
265 | * Indicates the component is an Npm package.
|
266 | */
|
267 | Npm = 2,
|
268 | /**
|
269 | * Indicates the component is a Maven artifact.
|
270 | */
|
271 | Maven = 3,
|
272 | /**
|
273 | * Indicates the component is a Git repository.
|
274 | */
|
275 | Git = 4,
|
276 | /**
|
277 | * Indicates the component is not any of the supported component types by Governance.
|
278 | */
|
279 | Other = 5,
|
280 | /**
|
281 | * Indicates the component is a Ruby gem.
|
282 | */
|
283 | RubyGems = 6,
|
284 | /**
|
285 | * Indicates the component is a Cargo package.
|
286 | */
|
287 | Cargo = 7,
|
288 | /**
|
289 | * Indicates the component is a Pip package.
|
290 | */
|
291 | Pip = 8,
|
292 | /**
|
293 | * Indicates the component is a loose file. Not a package as understood by different package managers.
|
294 | */
|
295 | File = 9,
|
296 | /**
|
297 | * Indicates the component is a Go package.
|
298 | */
|
299 | Go = 10,
|
300 | /**
|
301 | * Indicates the component is a Docker Image
|
302 | */
|
303 | DockerImage = 11,
|
304 | /**
|
305 | * Indicates the component is a CocoaPods pod.
|
306 | */
|
307 | Pod = 12,
|
308 | /**
|
309 | * Indicates the component is found in a linux environment. A package understood by linux based package managers like apt and rpm.
|
310 | */
|
311 | Linux = 13,
|
312 | /**
|
313 | * Indicates the component is a Conda package.
|
314 | */
|
315 | Conda = 14,
|
316 | /**
|
317 | * Indicates the component is a Docker Reference.
|
318 | */
|
319 | DockerReference = 15,
|
320 | /**
|
321 | * Indicates the component is a Vcpkg Package.
|
322 | */
|
323 | Vcpkg = 16
|
324 | }
|
325 | export declare enum Confidence {
|
326 | /**
|
327 | * High confidence level for alert
|
328 | */
|
329 | High = 0,
|
330 | /**
|
331 | * Other confidence level for alert
|
332 | */
|
333 | Other = 1
|
334 | }
|
335 | /**
|
336 | * Information about a vulnerable dependency
|
337 | */
|
338 | export interface Dependency {
|
339 | /**
|
340 | * Dependency name
|
341 | */
|
342 | componentName?: string;
|
343 | /**
|
344 | * Source of the dependency
|
345 | */
|
346 | componentType?: ComponentType;
|
347 | /**
|
348 | * Version information
|
349 | */
|
350 | componentVersion?: string;
|
351 | /**
|
352 | * Unique ID for the dependency
|
353 | */
|
354 | dependencyId?: number;
|
355 | }
|
356 | /**
|
357 | * An instance of a vulnerable dependency that was detected
|
358 | */
|
359 | export interface DependencyResult {
|
360 | /**
|
361 | * Information about the vulnerable dependency that was found
|
362 | */
|
363 | dependency?: Dependency;
|
364 | /**
|
365 | * Unique ID for this dependency
|
366 | */
|
367 | dependencyResultId?: number;
|
368 | /**
|
369 | * ID for the Result that this instance belongs to
|
370 | */
|
371 | resultId?: number;
|
372 | /**
|
373 | * Heirarchal information when multiple instances are found
|
374 | */
|
375 | rootDependencyId?: number;
|
376 | /**
|
377 | * Information about where the dependency was found
|
378 | */
|
379 | versionControlFilePath?: VersionControlFilePath;
|
380 | }
|
381 | /**
|
382 | * Information about an alert dismissal
|
383 | */
|
384 | export interface Dismissal {
|
385 | /**
|
386 | * Unique ID for this dismissal
|
387 | */
|
388 | dismissalId?: number;
|
389 | /**
|
390 | * Reason for the dismissal
|
391 | */
|
392 | dismissalType?: DismissalType;
|
393 | /**
|
394 | * Informational message attached to the dismissal
|
395 | */
|
396 | message?: string;
|
397 | requestedOn?: Date;
|
398 | /**
|
399 | * Identity that dismissed the alert
|
400 | */
|
401 | stateChangedBy?: string;
|
402 | /**
|
403 | * Identity that dismissed the alert
|
404 | */
|
405 | stateChangedByIdentity?: VSSInterfaces.IdentityRef;
|
406 | }
|
407 | export declare enum DismissalType {
|
408 | /**
|
409 | * Dismissal type unknown
|
410 | */
|
411 | Unknown = 0,
|
412 | /**
|
413 | * Dismissal indicating alert has been fixed
|
414 | */
|
415 | Fixed = 1,
|
416 | /**
|
417 | * Dismissal indicating user is accepting a risk for the alert
|
418 | */
|
419 | AcceptedRisk = 2,
|
420 | /**
|
421 | * Dismissal indicating alert is a false positive and will likely not be fixed.
|
422 | */
|
423 | FalsePositive = 3
|
424 | }
|
425 | export declare enum ExpandOption {
|
426 | /**
|
427 | * No Expands.
|
428 | */
|
429 | None = 0,
|
430 | /**
|
431 | * Return validationFingerprints in Alert.
|
432 | */
|
433 | ValidationFingerprint = 1
|
434 | }
|
435 | export interface LogicalLocation {
|
436 | fullyQualifiedName?: string;
|
437 | /**
|
438 | * Possible values: "unknown" "rootDependency" and "vulnerableDependency"
|
439 | */
|
440 | kind?: string;
|
441 | }
|
442 | /**
|
443 | * The metadata operation to be performed on the alert.
|
444 | */
|
445 | export interface Metadata {
|
446 | /**
|
447 | * The type of operation to be performed.
|
448 | */
|
449 | op?: MetadataOperation;
|
450 | /**
|
451 | * The metadata value
|
452 | */
|
453 | value?: RelationMetadata;
|
454 | }
|
455 | /**
|
456 | * The change that has been made to the metadata.
|
457 | */
|
458 | export interface MetadataChange {
|
459 | /**
|
460 | * The type of change on the metadata.
|
461 | */
|
462 | changeType?: MetadataChangeType;
|
463 | /**
|
464 | * Represents a metadata association to an alert.
|
465 | */
|
466 | value?: RelationMetadata;
|
467 | }
|
468 | /**
|
469 | * The type of change that occurred to the metadata.
|
470 | */
|
471 | export declare enum MetadataChangeType {
|
472 | None = 0,
|
473 | Created = 1,
|
474 | Updated = 2,
|
475 | Deleted = 3
|
476 | }
|
477 | /**
|
478 | * The operation to be performed on the metadata.
|
479 | */
|
480 | export declare enum MetadataOperation {
|
481 | Add = 0,
|
482 | Remove = 1
|
483 | }
|
484 | /**
|
485 | * Location in the source control system where the issue was found
|
486 | */
|
487 | export interface PhysicalLocation {
|
488 | /**
|
489 | * Path of the file where the issue was found
|
490 | */
|
491 | filePath?: string;
|
492 | /**
|
493 | * Details about the location where the issue was found including a snippet
|
494 | */
|
495 | region?: Region;
|
496 | /**
|
497 | * Source control system-specific information about the location
|
498 | */
|
499 | versionControl?: VersionControlDetails;
|
500 | }
|
501 | export interface Pipeline {
|
502 | adoPipelineId?: number;
|
503 | name?: string;
|
504 | phase?: string;
|
505 | phaseId?: string;
|
506 | }
|
507 | export interface Region {
|
508 | /**
|
509 | * The column where the code snippet ends
|
510 | */
|
511 | columnEnd?: number;
|
512 | /**
|
513 | * The column where the code snippet starts
|
514 | */
|
515 | columnStart?: number;
|
516 | /**
|
517 | * The line number where the code snippet ends
|
518 | */
|
519 | lineEnd?: number;
|
520 | /**
|
521 | * The line number where the code snippet starts
|
522 | */
|
523 | lineStart?: number;
|
524 | }
|
525 | /**
|
526 | * The metadata to be associated with the alert.
|
527 | */
|
528 | export interface RelationMetadata {
|
529 | /**
|
530 | * Any additional attributes of the metadata.
|
531 | */
|
532 | attributes?: {
|
533 | [key: string]: any;
|
534 | };
|
535 | /**
|
536 | * The type of the metadata.
|
537 | */
|
538 | rel?: string;
|
539 | /**
|
540 | * The URL of the metadata.
|
541 | */
|
542 | url?: string;
|
543 | }
|
544 | export interface Result {
|
545 | /**
|
546 | * Additional information about the alert. Valid when ResultType is Dependency
|
547 | */
|
548 | dependencyResult?: DependencyResult;
|
549 | /**
|
550 | * Full fingerprint of the Result. This is used to detect duplicate instances of the same alert
|
551 | */
|
552 | fingerprint?: string;
|
553 | /**
|
554 | * Unique ID of the fingerprint of the Result
|
555 | */
|
556 | fingerprintId?: number;
|
557 | /**
|
558 | * Unique ID of the Result
|
559 | */
|
560 | resultId?: number;
|
561 | /**
|
562 | * 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.
|
563 | */
|
564 | resultIndex?: number;
|
565 | /**
|
566 | * Detailed description of the rule that triggered the alert
|
567 | */
|
568 | resultMessage?: string;
|
569 | /**
|
570 | * The type of rule that triggered the alert
|
571 | */
|
572 | resultType?: ResultType;
|
573 | /**
|
574 | * ID of the rule that the triggered the alert
|
575 | */
|
576 | ruleId?: number;
|
577 | /**
|
578 | * Short description of the rule that triggered the alert
|
579 | */
|
580 | ruleShortDescription?: string;
|
581 | /**
|
582 | * The severity of the alert
|
583 | */
|
584 | severity?: Severity;
|
585 | /**
|
586 | * Additional information about the alert. Valid when ResultType is VersionControl
|
587 | */
|
588 | versionControlResult?: VersionControlResult;
|
589 | }
|
590 | /**
|
591 | * This enum defines the different result types.
|
592 | */
|
593 | export declare enum ResultType {
|
594 | /**
|
595 | * The result was found from an unspecified analysis type
|
596 | */
|
597 | Unknown = 0,
|
598 | /**
|
599 | * The result was found from dependency analysis
|
600 | */
|
601 | Dependency = 1,
|
602 | /**
|
603 | * The result was found from static code analysis
|
604 | */
|
605 | VersionControl = 2
|
606 | }
|
607 | /**
|
608 | * The analysis rule that caused the alert.
|
609 | */
|
610 | export interface Rule {
|
611 | /**
|
612 | * Additional properties of this rule dependent on the rule type. For example, dependency rules may include the CVE ID if it is available.
|
613 | */
|
614 | additionalProperties?: {
|
615 | [key: string]: any;
|
616 | };
|
617 | /**
|
618 | * Description of what this rule detects
|
619 | */
|
620 | description?: string;
|
621 | /**
|
622 | * Plain-text rule identifier
|
623 | */
|
624 | friendlyName?: string;
|
625 | /**
|
626 | * Additional information about this rule
|
627 | */
|
628 | helpMessage?: string;
|
629 | /**
|
630 | * Tool-specific rule identifier
|
631 | */
|
632 | opaqueId?: string;
|
633 | /**
|
634 | * Markdown-formatted list of resources to learn more about the Rule. In some cases, RuleInfo.AdditionalProperties.advisoryUrls is used instead.
|
635 | */
|
636 | resources?: string;
|
637 | /**
|
638 | * Classification tags for this rule
|
639 | */
|
640 | tags?: string[];
|
641 | }
|
642 | export declare enum SarifJobStatus {
|
643 | /**
|
644 | * The job type when it is new
|
645 | */
|
646 | New = 0,
|
647 | /**
|
648 | * The job type when it is queued
|
649 | */
|
650 | Queued = 1,
|
651 | /**
|
652 | * The job type when it is completed
|
653 | */
|
654 | Completed = 2,
|
655 | /**
|
656 | * The job type when it fails
|
657 | */
|
658 | Failed = 3
|
659 | }
|
660 | export interface SarifUploadStatus {
|
661 | errors?: SarifValidationError[];
|
662 | processingStatus?: SarifJobStatus;
|
663 | }
|
664 | export interface SarifValidationError {
|
665 | nodePointer?: string;
|
666 | validationError?: string;
|
667 | }
|
668 | export interface SearchCriteria {
|
669 | /**
|
670 | * If provided, only return alerts with the ids specified. <br />Otherwise, return any alert.
|
671 | */
|
672 | alertIds?: number[];
|
673 | /**
|
674 | * If provided, only return alerts of this type. Otherwise, return alerts of all types.
|
675 | */
|
676 | alertType?: AlertType;
|
677 | /**
|
678 | * If provided, only return alerts at these confidence levels. <br />Otherwise, return alerts at any confidence level.
|
679 | */
|
680 | confidenceLevels?: Confidence[];
|
681 | /**
|
682 | * If provided, only alerts for this dependency are returned. <br />Otherwise, return alerts for all dependencies. <br />In a sarif submission, a dependency (or a vulnerable component) is specified in result.RelatedLocations[].logicalLocation.
|
683 | */
|
684 | dependencyName?: string;
|
685 | /**
|
686 | * If provided, only return alerts last seen after this date. <br />Otherwise return all alerts.
|
687 | */
|
688 | fromDate?: Date;
|
689 | /**
|
690 | * If provided, only return alerts whose titles match this pattern.
|
691 | */
|
692 | keywords?: string;
|
693 | /**
|
694 | * If provided, only return alerts that were modified since this date. <br />Otherwise return all alerts.
|
695 | */
|
696 | modifiedSince?: Date;
|
697 | /**
|
698 | * 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.
|
699 | */
|
700 | onlyDefaultBranchAlerts?: boolean;
|
701 | /**
|
702 | * If provided with pipelineName, only return alerts detected in this pipeline phase <br />Otherwise, return alerts detected in all phases.
|
703 | */
|
704 | phaseId?: string;
|
705 | /**
|
706 | * If provided with pipelineName, only return alerts detected in this pipeline phase <br />Otherwise, return alerts detected in all phases.
|
707 | */
|
708 | phaseName?: string;
|
709 | /**
|
710 | * If provided, only return alerts detected in this pipeline. <br />Otherwise, return alerts detected in all pipelines.
|
711 | */
|
712 | pipelineName?: string;
|
713 | /**
|
714 | * If provided, only include alerts for this ref. <br />If not provided and OnlyDefaultBranch is true, only include alerts found on the default branch or last run branch if there is no analysis configuration for the default branch. <br />Otherwise, include alerts from all branches.
|
715 | */
|
716 | ref?: string;
|
717 | /**
|
718 | * If provided, only return alerts for this rule. <br />Otherwise, return alerts of all rules.
|
719 | */
|
720 | ruleId?: string;
|
721 | /**
|
722 | * If provided, only return alerts for this rule. <br />Otherwise, return alerts for all rules.
|
723 | */
|
724 | ruleName?: string;
|
725 | /**
|
726 | * If provided, only return alerts at these severities. <br />Otherwise, return alerts at any serverity.
|
727 | */
|
728 | severities?: Severity[];
|
729 | /**
|
730 | * If provided, only return alerts in these states. <br />Otherwise, return alerts in any state.
|
731 | */
|
732 | states?: State[];
|
733 | /**
|
734 | * If provided, only return alerts last seen before this date. <br />Otherwise return all alerts.
|
735 | */
|
736 | toDate?: Date;
|
737 | /**
|
738 | * If provided with toolName, only return alerts detected by this tool. <br />Otherwise, return alerts detected by all tools.
|
739 | */
|
740 | toolName?: string;
|
741 | }
|
742 | export declare enum Severity {
|
743 | Low = 0,
|
744 | Medium = 1,
|
745 | High = 2,
|
746 | Critical = 3,
|
747 | Note = 4,
|
748 | Warning = 5,
|
749 | Error = 6
|
750 | }
|
751 | export declare enum State {
|
752 | /**
|
753 | * Alert is in an indeterminate state
|
754 | */
|
755 | Unknown = 0,
|
756 | /**
|
757 | * Alert has been detected in the code
|
758 | */
|
759 | Active = 1,
|
760 | /**
|
761 | * Alert was dismissed by a user
|
762 | */
|
763 | Dismissed = 2,
|
764 | /**
|
765 | * The issue is no longer detected in the code
|
766 | */
|
767 | Fixed = 4,
|
768 | /**
|
769 | * The tool has determined that the issue is no longer a risk
|
770 | */
|
771 | AutoDismissed = 8
|
772 | }
|
773 | /**
|
774 | * An Analysis tool that can generate security alerts
|
775 | */
|
776 | export interface Tool {
|
777 | /**
|
778 | * Name of the tool
|
779 | */
|
780 | name?: string;
|
781 | /**
|
782 | * The rules that the tool defines
|
783 | */
|
784 | rules?: Rule[];
|
785 | }
|
786 | export interface UxFilters {
|
787 | /**
|
788 | * Branches to display alerts for. If empty, show alerts from all branches
|
789 | */
|
790 | branches?: Branch[];
|
791 | /**
|
792 | * Confidence levels to show, only valid when AlertType is Secret.
|
793 | */
|
794 | confidenceLevels?: Confidence[];
|
795 | packages?: Dependency[];
|
796 | /**
|
797 | * Pipelines to show alerts for. If empty, show alerts for all pipelines
|
798 | */
|
799 | pipelines?: Pipeline[];
|
800 | progressPercentage?: number;
|
801 | rules?: Rule[];
|
802 | secretTypes?: string[];
|
803 | /**
|
804 | * Alert severities to show. If empty show all alert servities
|
805 | */
|
806 | severities?: Severity[];
|
807 | /**
|
808 | * Alert states to show. If empty show all alert states
|
809 | */
|
810 | states?: State[];
|
811 | tools?: Tool[];
|
812 | }
|
813 | export interface ValidationFingerprint {
|
814 | validationFingerprintHash?: string;
|
815 | validationFingerprintJson?: string;
|
816 | }
|
817 | /**
|
818 | * Information for locating files in a source control system
|
819 | */
|
820 | export interface VersionControlDetails {
|
821 | commitHash?: string;
|
822 | itemUrl?: string;
|
823 | }
|
824 | export interface VersionControlFilePath {
|
825 | /**
|
826 | * Path of the file in the version control system
|
827 | */
|
828 | filePath?: string;
|
829 | /**
|
830 | * Hash of the file in the version control system
|
831 | */
|
832 | filePathHash?: number[];
|
833 | /**
|
834 | * Unique ID for the file in the version control system
|
835 | */
|
836 | versionControlFilePathId?: number;
|
837 | }
|
838 | export interface VersionControlResult {
|
839 | /**
|
840 | * The ID to associate this structure with the cooresponding Result
|
841 | */
|
842 | resultId?: number;
|
843 | /**
|
844 | * Information about the snippet where the Result was found
|
845 | */
|
846 | versionControlSnippet?: VersionControlSnippet;
|
847 | }
|
848 | export interface VersionControlSnippet {
|
849 | /**
|
850 | * column in the code file where the snippet ends
|
851 | */
|
852 | endColumn?: number;
|
853 | /**
|
854 | * line in the code file where the snippet ends
|
855 | */
|
856 | endLine?: number;
|
857 | /**
|
858 | * column in the code file where the snippet starts
|
859 | */
|
860 | startColumn?: number;
|
861 | /**
|
862 | * line in the code file where the snippet starts
|
863 | */
|
864 | startLine?: number;
|
865 | /**
|
866 | * path of the code file in the version control system
|
867 | */
|
868 | versionControlFilePath?: VersionControlFilePath;
|
869 | /**
|
870 | * Unique Id number for the file path
|
871 | */
|
872 | versionControlFilePathId?: number;
|
873 | /**
|
874 | * Unique Id number for this snippet
|
875 | */
|
876 | versionControlSnippetId?: number;
|
877 | }
|
878 | export declare var TypeInfo: {
|
879 | Alert: any;
|
880 | AlertAnalysisInstance: any;
|
881 | AlertMetadata: any;
|
882 | AlertMetadataChange: any;
|
883 | AlertStateUpdate: any;
|
884 | AlertType: {
|
885 | enumValues: {
|
886 | unknown: number;
|
887 | dependency: number;
|
888 | secret: number;
|
889 | code: number;
|
890 | };
|
891 | };
|
892 | AnalysisConfiguration: any;
|
893 | AnalysisConfigurationType: {
|
894 | enumValues: {
|
895 | default: number;
|
896 | adoPipeline: number;
|
897 | };
|
898 | };
|
899 | AnalysisInstance: any;
|
900 | AnalysisResult: any;
|
901 | Branch: any;
|
902 | ComponentType: {
|
903 | enumValues: {
|
904 | unknown: number;
|
905 | nuGet: number;
|
906 | npm: number;
|
907 | maven: number;
|
908 | git: number;
|
909 | other: number;
|
910 | rubyGems: number;
|
911 | cargo: number;
|
912 | pip: number;
|
913 | file: number;
|
914 | go: number;
|
915 | dockerImage: number;
|
916 | pod: number;
|
917 | linux: number;
|
918 | conda: number;
|
919 | dockerReference: number;
|
920 | vcpkg: number;
|
921 | };
|
922 | };
|
923 | Confidence: {
|
924 | enumValues: {
|
925 | high: number;
|
926 | other: number;
|
927 | };
|
928 | };
|
929 | Dependency: any;
|
930 | DependencyResult: any;
|
931 | Dismissal: any;
|
932 | DismissalType: {
|
933 | enumValues: {
|
934 | unknown: number;
|
935 | fixed: number;
|
936 | acceptedRisk: number;
|
937 | falsePositive: number;
|
938 | };
|
939 | };
|
940 | ExpandOption: {
|
941 | enumValues: {
|
942 | none: number;
|
943 | validationFingerprint: number;
|
944 | };
|
945 | };
|
946 | Metadata: any;
|
947 | MetadataChange: any;
|
948 | MetadataChangeType: {
|
949 | enumValues: {
|
950 | none: number;
|
951 | created: number;
|
952 | updated: number;
|
953 | deleted: number;
|
954 | };
|
955 | };
|
956 | MetadataOperation: {
|
957 | enumValues: {
|
958 | add: number;
|
959 | remove: number;
|
960 | };
|
961 | };
|
962 | Result: any;
|
963 | ResultType: {
|
964 | enumValues: {
|
965 | unknown: number;
|
966 | dependency: number;
|
967 | versionControl: number;
|
968 | };
|
969 | };
|
970 | SarifJobStatus: {
|
971 | enumValues: {
|
972 | new: number;
|
973 | queued: number;
|
974 | completed: number;
|
975 | failed: number;
|
976 | };
|
977 | };
|
978 | SarifUploadStatus: any;
|
979 | SearchCriteria: any;
|
980 | Severity: {
|
981 | enumValues: {
|
982 | low: number;
|
983 | medium: number;
|
984 | high: number;
|
985 | critical: number;
|
986 | note: number;
|
987 | warning: number;
|
988 | error: number;
|
989 | };
|
990 | };
|
991 | State: {
|
992 | enumValues: {
|
993 | unknown: number;
|
994 | active: number;
|
995 | dismissed: number;
|
996 | fixed: number;
|
997 | autoDismissed: number;
|
998 | };
|
999 | };
|
1000 | UxFilters: any;
|
1001 | };
|