main
ts 149 lines 2.81 KB
Raw
1 // TODO-FE: refactor
2 export interface CVSSInfo {
3 base: number | null
4 vector: string | null
5 }
6
7 export interface EPSSInfo {
8 score: number | null
9 percentile: number | null
10 date: string | null
11 }
12
13 export interface KEVInfo {
14 in_kev: boolean
15 date_added: string | null
16 due_date: string | null
17 required_action: string | null
18 known_ransomware_campaign_use: string | null
19 vendor_project: string | null
20 product: string | null
21 vulnerability_name: string | null
22 short_description: string | null
23 notes: string | null
24 }
25
26 export interface AffectedProduct {
27 product: string
28 family: ProductFamily
29 component_hint: string | null
30 }
31
32 export interface RemediationInfo {
33 kbs: string[]
34 }
35
36 export interface PrioritizationInfo {
37 priority: PriorityLevel
38 reason: string[]
39 suggested_sla: string
40 }
41
42 export interface SourceInfo {
43 msrc_cvrf_id: string
44 msrc_cvrf_url: string
45 cisa_kev_url: string
46 }
47
48 export interface PatchTuesdayItem {
49 cycle: string
50 release_type: string
51 cve: string
52 title: string | null
53 severity: string | null
54 cvss: CVSSInfo
55 epss: EPSSInfo
56 kev: KEVInfo
57 affected: AffectedProduct
58 remediation: RemediationInfo
59 prioritization: PrioritizationInfo
60 source: SourceInfo
61 timestamp_utc: string
62 }
63
64 export interface PriorityCounts {
65 P0: number
66 P1: number
67 P2: number
68 P3: number
69 }
70
71 export interface PatchTuesdaySummary {
72 cycle: string
73 patch_tuesday_date: string
74 generated_utc: string
75 unique_cves: number
76 total_records: number
77 by_priority: PriorityCounts
78 by_family: Record<string, number>
79 by_severity: Record<string, number>
80 }
81
82 export interface PatchTuesdayResponse {
83 success: boolean
84 message: string
85 summary: PatchTuesdaySummary | null
86 items: PatchTuesdayItem[]
87 }
88
89 export interface PatchTuesdaySummaryResponse {
90 success: boolean
91 message: string
92 summary: PatchTuesdaySummary | null
93 top_items: PatchTuesdayItem[]
94 }
95
96 export interface AvailableCyclesResponse {
97 success: boolean
98 message: string
99 cycles: string[]
100 current_cycle: string
101 next_patch_tuesday: string
102 }
103
104 export interface PatchTuesdayQuery {
105 cycle?: string
106 include_epss?: boolean
107 include_kev?: boolean
108 }
109
110 export interface PatchTuesdaySummaryQuery extends PatchTuesdayQuery {
111 top_n?: number
112 }
113
114 export interface PatchTuesdaySearchQuery {
115 cve_ids: string[]
116 cycle?: string
117 }
118
119 export interface PatchTuesdayPriorityQuery extends PatchTuesdayQuery {
120 priority_level: PriorityLevel
121 }
122
123 export enum PriorityLevel {
124 P0 = "P0",
125 P1 = "P1",
126 P2 = "P2",
127 P3 = "P3"
128 }
129
130 export enum ProductFamily {
131 Windows = "Windows",
132 WindowsServer = "Windows Server",
133 OfficeM365 = "Office/M365",
134 Exchange = "Exchange",
135 SharePoint = "SharePoint",
136 SQLServer = "SQL Server",
137 DeveloperPlatform = "Developer Platform",
138 Edge = "Edge",
139 Azure = "Azure",
140 Dynamics = "Dynamics",
141 Other = "Other"
142 }
143
144 export enum MicrosoftSeverity {
145 Critical = "Critical",
146 Important = "Important",
147 Moderate = "Moderate",
148 Low = "Low"
149 }