"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getVulnerabilityReferenceUrl = void 0; /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ const getVulnerabilityReferenceUrl = vulnerability => { var _vulnerability$cvss; const nvdDomain = 'https://nvd'; const nvdWebsite = `${nvdDomain}.nist.gov/vuln/detail/${vulnerability === null || vulnerability === void 0 ? void 0 : vulnerability.id}`; const vulnerabilityReference = vulnerability !== null && vulnerability !== void 0 && (_vulnerability$cvss = vulnerability.cvss) !== null && _vulnerability$cvss !== void 0 && _vulnerability$cvss.nvd ? nvdWebsite : vulnerability === null || vulnerability === void 0 ? void 0 : vulnerability.reference; return vulnerabilityReference; }; exports.getVulnerabilityReferenceUrl = getVulnerabilityReferenceUrl;