MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / getVulnerabilityUrl

Function getVulnerabilityUrl

server/utils/dependency-analysis.ts:140–149  ·  view source on GitHub ↗
(vuln: OsvVulnerability)

Source from the content-addressed store, hash-verified

138}
139
140function getVulnerabilityUrl(vuln: OsvVulnerability): string {
141 if (vuln.id.startsWith('GHSA-')) {
142 return `https://github.com/advisories/${vuln.id}`
143 }
144 const cveAlias = vuln.aliases?.find(a => a.startsWith('CVE-'))
145 if (cveAlias) {
146 return `https://nvd.nist.gov/vuln/detail/${cveAlias}`
147 }
148 return `https://osv.dev/vulnerability/${vuln.id}`
149}
150
151/**
152 * Parse OSV range events into introduced/fixed pairs.

Callers 1

queryOsvDetailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected