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
def availability_impact_v3(item: dict) -> metrics.ImpactV3: ai = CveFactory.value_from_base_metrics('cvssV3', 'availabilityImpact', item) return metrics.ImpactV3(ai).value
def integrity_impact_v3(item: dict) -> metrics.ImpactV3: ii = CveFactory.value_from_base_metrics('cvssV3', 'integrityImpact', item) return metrics.ImpactV3(ii).value
def confidentiality_impact_v3(item: dict) -> metrics.ImpactV3: ci = CveFactory.value_from_base_metrics('cvssV3', 'confidentialityImpact', item) return metrics.ImpactV3(ci).value