File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { VULNERABILITIES_URL } from '#site/next.constants.mjs' ;
2+
13/**
24 * Groups vulnerabilities by major version number extracted from the `vulnerable` string.
35 *
@@ -30,9 +32,7 @@ function groupVulnerabilitiesByMajor(vulnerabilities) {
3032 * @returns {Promise<import('#site/types/vulnerabilities').GroupedVulnerabilities> } Grouped vulnerabilities
3133 */
3234export default async function generateVulnerabilityData ( ) {
33- const response = await fetch (
34- 'https://raw.githubusercontent.com/nodejs/security-wg/main/vuln/core/index.json'
35- ) ;
35+ const response = await fetch ( VULNERABILITIES_URL ) ;
3636
3737 const data = await response . json ( ) ;
3838
Original file line number Diff line number Diff line change @@ -195,3 +195,9 @@ export const SEVERITY_KIND_MAP = {
195195 * Which Node.js versions do we want to display vulnerabilities for?
196196 */
197197export const EOL_VERSION_IDENTIFIER = 'End-of-life' ;
198+
199+ /**
200+ * The location of the Node.js Security Working Group Vulnerabilities data.
201+ */
202+ export const VULNERABILITIES_URL =
203+ 'https://raw.githubusercontent.com/nodejs/security-wg/main/vuln/core/index.json' ;
You can’t perform that action at this time.
0 commit comments