Coverage for csaf/vuln_types.py: 100.00%
120 statements
« prev ^ index » next coverage.py v7.4.1, created at 2024-02-04 16:28:45 +00:00
« prev ^ index » next coverage.py v7.4.1, created at 2024-02-04 16:28:45 +00:00
1"""CVSS 2/3.0/3.1 general definitions."""
3from __future__ import annotations
5from enum import Enum
6from typing import Annotated
8from pydantic import Field, RootModel
11class AccessVectorType(Enum):
12 network = 'NETWORK'
13 adjacent_network = 'ADJACENT_NETWORK'
14 local = 'LOCAL'
17class AccessComplexityType(Enum):
18 high = 'HIGH'
19 medium = 'MEDIUM'
20 low = 'LOW'
23class AuthenticationType(Enum):
24 multiple = 'MULTIPLE'
25 single = 'SINGLE'
26 none = 'NONE'
29class CiaType(Enum):
30 none = 'NONE'
31 low = 'LOW'
32 high = 'HIGH'
35class ExploitabilityType(Enum):
36 unproven = 'UNPROVEN'
37 proof_of_concept = 'PROOF_OF_CONCEPT'
38 functional = 'FUNCTIONAL'
39 high = 'HIGH'
40 not_defined = 'NOT_DEFINED'
43class RemediationLevelType(Enum):
44 official_fix = 'OFFICIAL_FIX'
45 temporary_fix = 'TEMPORARY_FIX'
46 workaround = 'WORKAROUND'
47 unavailable = 'UNAVAILABLE'
48 not_defined = 'NOT_DEFINED'
51class ReportConfidenceType(Enum):
52 unconfirmed = 'UNCONFIRMED'
53 uncorroborated = 'UNCORROBORATED'
54 confirmed = 'CONFIRMED'
55 not_defined = 'NOT_DEFINED'
58class CollateralDamagePotentialType(Enum):
59 none = 'NONE'
60 low = 'LOW'
61 low_medium = 'LOW_MEDIUM'
62 medium_high = 'MEDIUM_HIGH'
63 high = 'HIGH'
64 not_defined = 'NOT_DEFINED'
67class TargetDistributionType(Enum):
68 none = 'NONE'
69 low = 'LOW'
70 medium = 'MEDIUM'
71 high = 'HIGH'
72 not_defined = 'NOT_DEFINED'
75class CiaRequirementType(Enum):
76 low = 'LOW'
77 medium = 'MEDIUM'
78 high = 'HIGH'
79 not_defined = 'NOT_DEFINED'
82class AttackVectorType(Enum):
83 network = 'NETWORK'
84 adjacent_network = 'ADJACENT_NETWORK'
85 local = 'LOCAL'
86 physical = 'PHYSICAL'
89class ModifiedAttackVectorType(Enum):
90 network = 'NETWORK'
91 adjacent_network = 'ADJACENT_NETWORK'
92 local = 'LOCAL'
93 physical = 'PHYSICAL'
94 not_defined = 'NOT_DEFINED'
97class AttackComplexityType(Enum):
98 high = 'HIGH'
99 low = 'LOW'
102class ModifiedAttackComplexityType(Enum):
103 high = 'HIGH'
104 low = 'LOW'
105 not_defined = 'NOT_DEFINED'
108class PrivilegesRequiredType(Enum):
109 high = 'HIGH'
110 low = 'LOW'
111 none = 'NONE'
114class ModifiedPrivilegesRequiredType(Enum):
115 high = 'HIGH'
116 low = 'LOW'
117 none = 'NONE'
118 not_defined = 'NOT_DEFINED'
121class UserInteractionType(Enum):
122 none = 'NONE'
123 required = 'REQUIRED'
126class ModifiedUserInteractionType(Enum):
127 none = 'NONE'
128 required = 'REQUIRED'
129 not_defined = 'NOT_DEFINED'
132class ScopeType(Enum):
133 unchanged = 'UNCHANGED'
134 changed = 'CHANGED'
137class ModifiedScopeType(Enum):
138 unchanged = 'UNCHANGED'
139 changed = 'CHANGED'
140 not_defined = 'NOT_DEFINED'
143class ModifiedCiaType(Enum):
144 none = 'NONE'
145 low = 'LOW'
146 high = 'HIGH'
147 not_defined = 'NOT_DEFINED'
150class ExploitCodeMaturityType(Enum):
151 unproven = 'UNPROVEN'
152 proof_of_concept = 'PROOF_OF_CONCEPT'
153 functional = 'FUNCTIONAL'
154 high = 'HIGH'
155 not_defined = 'NOT_DEFINED'
158class ConfidenceType(Enum):
159 unknown = 'UNKNOWN'
160 reasonable = 'REASONABLE'
161 confirmed = 'CONFIRMED'
162 not_defined = 'NOT_DEFINED'
165class ScoreType(RootModel[Annotated[float, Field(ge=0.0, le=10.0)]]):
166 pass
169class SeverityType(Enum):
170 none = 'NONE'
171 low = 'LOW'
172 medium = 'MEDIUM'
173 high = 'HIGH'
174 critical = 'CRITICAL'