lib/unwrappr/writers/security_vulnerabilities.rb in unwrappr-0.8.0 vs lib/unwrappr/writers/security_vulnerabilities.rb in unwrappr-0.8.1
- old
+ new
@@ -83,15 +83,10 @@
def cve_url(id)
"https://nvd.nist.gov/vuln/detail/#{id}"
end
def cvss_v2(advisory)
- # rubocop:disable Style/GuardClause
- if advisory.cvss_v2
- "CVSS V2: [#{advisory.cvss_v2} #{advisory.criticality}]"\
- "(#{cvss_v2_url(advisory.cve_id)})"
- end
- # rubocop:enable Style/GuardClause
+ "CVSS V2: [#{advisory.cvss_v2} #{advisory.criticality}](#{cvss_v2_url(advisory.cve_id)})" if advisory.cvss_v2
end
def cvss_v2_url(id)
"https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator?name=#{id}"
end