Beispiel #1
0
 def _create_nessus_cve_cvss3_vector(item, cve):
     cvss3_vector = get_value(item.find('cvss3_vector'))
     if cvss3_vector:
         cvss3_vector = NessusReportParser.parse_vector(cvss3_vector, 'CVSS:3.0/')
         cve.attack_vector_v3 = metrics.AttackVectorV3(cvss3_vector['AV'])
         cve.attack_complexity_v3 = metrics.AttackComplexityV3(cvss3_vector['AC'])
         cve.privileges_required_v3 = metrics.PrivilegesRequiredV3(cvss3_vector['PR'])
         cve.user_interaction_v3 = metrics.UserInteractionV3(cvss3_vector['AV'])
         cve.scope_v3 = metrics.ScopeV3(cvss3_vector['S'])
         cve.confidentiality_impact_v3 = metrics.ImpactV3(cvss3_vector['C'])
         cve.integrity_impact_v3 = metrics.ImpactV3(cvss3_vector['I'])
         cve.availability_impact_v3 = metrics.ImpactV3(cvss3_vector['A'])
     return cve
Beispiel #2
0
 def privileges_required_v3(item: dict) -> metrics.PrivilegesRequiredV3:
     pr = CveFactory.value_from_base_metrics('cvssV3', 'privilegesRequired',
                                             item)
     return metrics.PrivilegesRequiredV3(pr).value
Beispiel #3
0
 def get_privileges_required_v3_value(self) -> float:
     scope = metrics.ScopeV3(self.scope_v3)
     return float(
         metrics.PrivilegesRequiredV3(
             self.privileges_required_v3).value_with_scope(scope))