@victor-software-house/is-node-vulnerable 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["scheduleData","securityData","process","securityData","process"],"sources":["../data/security.json","../logger.ts","../data/schedule.json","../schemas.ts","../schedule.ts","../types.ts","../vulnerability.ts","../cli.ts","../index.ts"],"sourcesContent":["","/**\n * Logging utility for debug output\n */\n\nconst isDebugEnabled = (): boolean => {\n\treturn process.env.DEBUG === '1';\n};\n\nexport function debug(message: string): void {\n\tif (isDebugEnabled()) {\n\t\tconsole.debug(`[DEBUG] ${message}`);\n\t}\n}\n\nexport function error(message: string): void {\n\tconsole.error(`[ERROR] ${message}`);\n}\n\nexport function info(message: string): void {\n\tconsole.log(message);\n}\n\nexport function warn(message: string): void {\n\tconsole.warn(`[WARN] ${message}`);\n}\n","","/**\n * Zod schemas for Node.js security data validation\n */\n\nimport { z } from 'zod';\n\nexport const vulnerabilityEntrySchema = z.object({\n\taffectedEnvironments: z.array(z.string()).optional(),\n\tcve: z.array(z.string()),\n\tdescription: z.string().optional(),\n\toverview: z.string().optional(),\n\tpatched: z.string(),\n\tref: z.string().optional(),\n\tseverity: z.enum(['critical', 'high', 'low', 'medium', 'unknown']),\n\tvulnerable: z.string(),\n});\n\nexport const securityDatabaseSchema = z.record(\n\tz.string(),\n\tvulnerabilityEntrySchema,\n);\n\nexport const releaseScheduleEntrySchema = z.object({\n\tcodename: z.string().optional(),\n\tend: z.string().optional(),\n\tlts: z.string().optional(),\n\tmaintenance: z.string().optional(),\n\tstart: z.string(),\n});\n\nexport const releaseScheduleSchema = z.record(\n\tz.string(),\n\treleaseScheduleEntrySchema,\n);\n","/**\n * Node.js release schedule checking\n */\n\nimport { satisfies } from 'semver';\nimport { z } from 'zod';\n\nimport type { ReleaseScheduleEntry } from '@/types';\n\nimport scheduleData from '@/data/schedule.json' with { type: 'json' };\nimport { releaseScheduleSchema } from '@/schemas';\n\n/**\n * Check if a Node.js version is end-of-life\n *\n * @param version - Node.js version (e.g., \"v20.10.0\", \"18.0.0\")\n * @returns True if the version is end-of-life, false otherwise\n * @throws Error if version information cannot be loaded\n *\n * @example\n * ```typescript\n * const isEOL = isNodeEOL('v16.0.0');\n * console.log(isEOL); // true\n * ```\n */\nexport function isNodeEOL(version: string): boolean {\n\tconst versionInfo = getVersionInfo(version);\n\n\tif (versionInfo === null) {\n\t\tthrow new Error(`Could not load version information for ${version}`);\n\t}\n\n\t// No end date means version is unreleased (not yet EOL)\n\tif (versionInfo.end === undefined) {\n\t\treturn false;\n\t}\n\n\tconst now = new Date();\n\tconst endDate = new Date(versionInfo.end);\n\n\treturn now > endDate;\n}\n\nfunction getVersionInfo(version: string): null | ReleaseScheduleEntry {\n\tconst schedule = z.parse(releaseScheduleSchema, scheduleData);\n\n\tconst normalized = version.toLowerCase();\n\tconst directMatch = schedule[normalized];\n\tif (directMatch !== undefined) {\n\t\treturn directMatch;\n\t}\n\n\tfor (const [key, value] of Object.entries(schedule)) {\n\t\tif (satisfies(version, key)) {\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn null;\n}\n","/**\n * Type definitions for Node.js security checker\n */\n\nimport * as z4 from 'zod/v4/core';\n\nimport type {\n\treleaseScheduleEntrySchema,\n\treleaseScheduleSchema,\n\tsecurityDatabaseSchema,\n\tvulnerabilityEntrySchema,\n} from '@/schemas';\n\nexport type ReleaseSchedule = z4.output<typeof releaseScheduleSchema>;\nexport type ReleaseScheduleEntry = z4.output<typeof releaseScheduleEntrySchema>;\nexport type SecurityDatabase = z4.output<typeof securityDatabaseSchema>;\nexport type VulnerabilityEntry = z4.output<typeof vulnerabilityEntrySchema>;\n\nexport const PLATFORMS = [\n\t'aix',\n\t'android',\n\t'darwin',\n\t'freebsd',\n\t'linux',\n\t'openbsd',\n\t'sunos',\n\t'win32',\n] as const;\n\nexport type Platform = (typeof PLATFORMS)[number];\n","/**\n * Vulnerability checking logic\n */\n\nimport { satisfies, valid } from 'semver';\nimport { z } from 'zod';\nimport * as z4 from 'zod/v4/core';\n\nimport type { Platform, VulnerabilityEntry } from '@/types';\n\nimport securityData from '@/data/security.json' with { type: 'json' };\nimport { isNodeEOL } from '@/schedule';\nimport { securityDatabaseSchema } from '@/schemas';\nimport { PLATFORMS } from '@/types';\n\ntype SecurityDatabase = z4.output<typeof securityDatabaseSchema>;\n\n/**\n * Validate that a platform string is a valid Platform type\n *\n * @param platform - Platform string to validate\n * @throws Error if platform is not valid\n */\nexport function checkPlatform(\n\tplatform?: string,\n): asserts platform is Platform | undefined {\n\tif (platform !== undefined && !PLATFORMS.includes(platform as Platform)) {\n\t\tthrow new Error(\n\t\t\t`Platform '${platform}' is not valid. Use: ${PLATFORMS.join(', ')}`,\n\t\t);\n\t}\n}\n\nexport function getVulnerabilityList(\n\tcurrentVersion: string,\n\tplatform?: Platform,\n\tsecurityDb?: SecurityDatabase,\n): VulnerabilityEntry[] {\n\tconst vulnerabilities: VulnerabilityEntry[] = [];\n\n\tfor (const vuln of Object.values(securityDb ?? {})) {\n\t\tconst isVulnerable =\n\t\t\tsatisfies(currentVersion, vuln.vulnerable) &&\n\t\t\t!satisfies(currentVersion, vuln.patched);\n\n\t\tconst isPlatformAffected = isSystemAffected(\n\t\t\tvuln.affectedEnvironments,\n\t\t\tplatform,\n\t\t);\n\n\t\tif (isVulnerable && isPlatformAffected) {\n\t\t\tvulnerabilities.push(vuln);\n\t\t}\n\t}\n\n\treturn vulnerabilities;\n}\n\n/**\n * Check if a Node.js version is vulnerable to known CVEs\n *\n * @param version - Node.js version (e.g., \"v20.10.0\", \"18.0.0\")\n * @param platform - Optional platform (darwin, linux, win32, etc.)\n * @returns True if vulnerable or end-of-life, false otherwise\n * @throws Error if version or platform is invalid\n *\n * @example\n * ```typescript\n * const vulnerable = isNodeVulnerable('v20.10.0', 'darwin');\n * console.log(vulnerable); // false\n * ```\n */\nexport function isNodeVulnerable(\n\tplatform?: Platform,\n\tversion?: string,\n): boolean {\n\tvalidateVersion(version ?? '');\n\tcheckPlatform(platform);\n\n\tconst isEOL = isNodeEOL(version ?? '');\n\tif (isEOL) {\n\t\treturn true;\n\t}\n\n\tconst securityDb = z.parse(securityDatabaseSchema, securityData);\n\n\tconst vulnerabilities = getVulnerabilityList(\n\t\tversion ?? '',\n\t\tplatform,\n\t\tsecurityDb,\n\t);\n\n\treturn vulnerabilities.length > 0;\n}\n\nfunction isSystemAffected(\n\taffectedEnvironments?: string[],\n\tplatform?: Platform,\n): boolean {\n\tif (platform === undefined || !Array.isArray(affectedEnvironments)) {\n\t\treturn true;\n\t}\n\n\treturn (\n\t\taffectedEnvironments.includes(platform) ||\n\t\taffectedEnvironments.includes('all')\n\t);\n}\n\n/**\n * Validate a semver version string\n *\n * @param version - Version string to validate\n * @throws Error if version is invalid\n */\nfunction validateVersion(version: string): void {\n\tif (valid(version) === null) {\n\t\tthrow new Error(`Invalid semver version: ${version}`);\n\t}\n}\n","/**\n * CLI interface for Node.js security checker\n */\n\nimport process from 'node:process';\nimport { z } from 'zod';\n\nimport type { VulnerabilityEntry } from '@/types';\n\nimport securityData from '@/data/security.json' with { type: 'json' };\nimport { error, info } from '@/logger';\nimport { isNodeEOL } from '@/schedule';\nimport { securityDatabaseSchema } from '@/schemas';\nimport { checkPlatform, getVulnerabilityList } from '@/vulnerability';\n\nexport function runCLI(): void {\n\tconst nodeVersion = process.version;\n\tconst platformString = process.platform;\n\n\tcheckPlatform(platformString);\n\tconst platform = platformString;\n\n\tinfo('Node.js Security Vulnerability Check\\n');\n\tinfo(`Current Node.js version: ${nodeVersion}`);\n\tinfo(`Platform: ${platform}\\n`);\n\n\tconst isEOL = isNodeEOL(nodeVersion);\n\n\tif (isEOL) {\n\t\terror('[FAIL] Node.js version is end-of-life.\\n');\n\t\terror(\n\t\t\t`${nodeVersion} is end-of-life. There are high chances of being vulnerable.`,\n\t\t);\n\t\terror('RECOMMENDED ACTION: Upgrade to a supported version.\\n');\n\t\tprocess.exit(1);\n\t}\n\n\tconst securityDb = z.parse(securityDatabaseSchema, securityData);\n\n\tconst vulnerabilities = getVulnerabilityList(\n\t\tnodeVersion,\n\t\tplatform,\n\t\tsecurityDb,\n\t);\n\n\tif (vulnerabilities.length > 0) {\n\t\terror(\n\t\t\t`[VULNERABLE] Node.js ${nodeVersion} has ${vulnerabilities.length} known CVE(s):\\n`,\n\t\t);\n\n\t\tfor (const vuln of vulnerabilities) {\n\t\t\terror(` ${formatVulnerability(vuln)}\\n`);\n\t\t}\n\n\t\terror('RECOMMENDED ACTION: Upgrade to a patched version.\\n');\n\t\tprocess.exit(1);\n\t}\n\n\tinfo(`[PASS] Node.js ${nodeVersion} has no known vulnerabilities.\\n`);\n\tprocess.exit(0);\n}\n\nfunction formatVulnerability(vuln: VulnerabilityEntry): string {\n\tconst severity =\n\t\tvuln.severity === 'unknown' ? '' : `(${vuln.severity.toUpperCase()})`;\n\tconst cveList = vuln.cve.length > 0 ? vuln.cve.join(', ') : 'No CVE';\n\tconst description = vuln.description ?? vuln.overview ?? 'No description';\n\n\treturn [\n\t\t`${cveList} ${severity}`,\n\t\t`Description: ${description}`,\n\t\t`Patched versions: ${vuln.patched}`,\n\t].join('\\n ');\n}\n","#!/usr/bin/env node\n/**\n * Node.js Security Vulnerability Checker\n *\n * Based on is-my-node-vulnerable with proper TypeScript typing and bundled security data.\n *\n * Security data is bundled with the package and updated daily via GitHub Actions.\n *\n * Usage:\n * pnpm run check # Check current Node.js version\n * SKIP_NODE_SECURITY_CHECK=1 pnpm build # Skip check (emergency)\n * DEBUG=1 pnpm run check # Enable debug output\n *\n * Exit codes:\n * 0 - Node.js version is secure\n * 1 - Node.js version is vulnerable or EOL\n * 2 - Check failed (unexpected error)\n */\n\nimport process from 'node:process';\n\nimport { runCLI } from '@/cli';\nimport { error, warn } from '@/logger';\n\n// Re-export public API\nexport { isNodeEOL } from '@/schedule';\nexport type {\n\tPlatform,\n\tReleaseSchedule,\n\tReleaseScheduleEntry,\n\tSecurityDatabase,\n\tVulnerabilityEntry,\n} from '@/types';\nexport { isNodeVulnerable } from '@/vulnerability';\n\n// CLI execution when run directly\nif (\n\timport.meta.url.endsWith('/index.ts') ||\n\timport.meta.url.endsWith('/index.mjs') ||\n\timport.meta.url.endsWith('/index')\n) {\n\tif (process.env.SKIP_NODE_SECURITY_CHECK === '1') {\n\t\twarn('[SKIP] Security check skipped (SKIP_NODE_SECURITY_CHECK=1)\\n');\n\t\tprocess.exit(0);\n\t}\n\n\ttry {\n\t\trunCLI();\n\t} catch (err: unknown) {\n\t\terror('[ERROR] Security check failed:');\n\t\tconsole.error(err);\n\t\tprocess.exit(2);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A+D;AACpE,YAAQ,KAAK,EAAE;;AAGhB,KAAI;AACH,UAAQ;UACA,KAAc;AACtB,QAAM,iCAAiC;AACvC,UAAQ,MAAM,IAAI;AAClB,YAAQ,KAAK,EAAE"}
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@victor-software-house/is-node-vulnerable",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript-based Node.js security vulnerability checker with Zod validation and bundled security data",
5
+ "type": "module",
6
+ "main": "./dist/index.mjs",
7
+ "types": "./dist/index.d.mts",
8
+ "bin": {
9
+ "is-node-vulnerable": "./dist/index.mjs"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.mts",
14
+ "import": "./dist/index.mjs"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "data",
20
+ "README.md"
21
+ ],
22
+ "lint-staged": {
23
+ "*.{ts,js,json,md}": "eslint --fix"
24
+ },
25
+ "keywords": [
26
+ "node",
27
+ "security",
28
+ "vulnerability",
29
+ "cve",
30
+ "checker",
31
+ "typescript"
32
+ ],
33
+ "author": "Victor Araújo",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/victor-software-house/is-node-vulnerable.git"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/victor-software-house/is-node-vulnerable/issues"
41
+ },
42
+ "homepage": "https://github.com/victor-software-house/is-node-vulnerable#readme",
43
+ "dependencies": {
44
+ "semver": "^7.7.3",
45
+ "zod": "^4.3.5"
46
+ },
47
+ "devDependencies": {
48
+ "@dword-design/eslint-plugin-import-alias": "^8.1.3",
49
+ "@eslint/js": "^9.39.2",
50
+ "@tool-belt/type-predicates": "^1.4.1",
51
+ "@types/node": "^25.0.8",
52
+ "@types/semver": "^7.7.1",
53
+ "@vitest/coverage-v8": "^4.0.17",
54
+ "eslint": "^9.39.2",
55
+ "eslint-config-prettier": "^10.1.8",
56
+ "eslint-plugin-perfectionist": "^5.3.1",
57
+ "eslint-plugin-prettier": "^5.5.5",
58
+ "husky": "^9.1.7",
59
+ "lint-staged": "^16.2.7",
60
+ "prettier": "^3.7.4",
61
+ "tsdown": "0.20.0-beta.3",
62
+ "tsx": "^4.21.0",
63
+ "typescript": "^5.9.3",
64
+ "typescript-eslint": "^8.53.0",
65
+ "vitest": "^4.0.17"
66
+ },
67
+ "engines": {
68
+ "node": ">=18.0.0"
69
+ },
70
+ "scripts": {
71
+ "build": "tsdown",
72
+ "check": "node --import tsx ./index.ts",
73
+ "format": "prettier --write .",
74
+ "format:check": "prettier --check .",
75
+ "lint": "eslint .",
76
+ "lint:fix": "eslint . --fix",
77
+ "test": "vitest run",
78
+ "test:watch": "vitest",
79
+ "test:coverage": "vitest run --coverage",
80
+ "typecheck": "tsc --noEmit"
81
+ }
82
+ }