-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathgeneral.d.ts
69 lines (60 loc) · 1.75 KB
/
general.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import { AuditLevel, Severity } from './level';
export interface CommandOptions {
readonly exclude?: string;
readonly moduleIgnore?: string;
readonly production?: boolean;
readonly level?: AuditLevel;
readonly registry?: string;
readonly includeColumns?: string;
}
export interface NpmAuditJson {
readonly advisories?: v6Advisories;
readonly vulnerabilities?: v7Vulnerabilities;
}
export interface v6Advisories {
readonly [key: string]: v6Advisory;
}
export interface v6Advisory {
readonly id: number;
readonly cves: string[];
readonly cwe: string;
// eslint-disable-next-line camelcase
readonly module_name: string;
readonly title: string;
readonly severity: AuditLevel;
readonly url: string;
readonly findings: {
version: string;
paths: string[];
}[];
}
export interface v7Vulnerabilities {
readonly [key: string]: v7Vulnerability | string;
}
export interface v7Vulnerability {
readonly name: string;
readonly via: v7VulnerabilityVia[] | string[];
readonly nodes: string[];
}
export interface v7VulnerabilityVia {
readonly source: number;
readonly name: string;
readonly title: string;
readonly severity: Severity;
readonly url: string;
readonly range: string;
readonly dependency: string;
}
export interface ProcessedResult {
readonly unhandledIds: string[];
readonly vulnerabilityIds: string[]; // Currently unused, but very valuable info so leave it here for now
readonly vulnerabilityModules: string[]; // Currently unused, but very valuable info so leave it here for now
readonly report: string[][];
readonly failed?: boolean;
unusedExceptionIds: string[];
unusedExceptionModules: string[];
}
export interface ProcessedReport {
readonly exceptionIds: string[];
readonly report: string[][];
}