fix: remove unused critical-RCE dependency, bump node-cron to drop uuid vuln

- node-whois was declared in package.json but required/imported nowhere
  in the codebase (verified via repo-wide grep) -- pure dead weight that
  was dragging in a critical arbitrary-code-execution chain (underscore
  1.5.2 via optimist, CVSS 9.8). No fixed version exists upstream (latest
  2.1.3 still depends on the same vulnerable optimist/underscore), so the
  only real fix was removal. Zero behavior change since nothing called it.
- node-cron 3.0.3 -> 4.6.0: only real usage is two plain cron.schedule()
  calls in src/features/hijack-alerts/retry-scheduler.ts and
  src/features/aspa-adoption/scheduler.ts -- API unchanged, low risk.
  4.6.0 has zero runtime deps (drops the vulnerable uuid transitive dep)
  and ships its own TS types, so @types/node-cron was also removed to
  avoid duplicate/conflicting type declarations.
- repository/bugs URLs in package.json corrected from the GitHub repo
  (deleted 2026-07-14) to the actual Gitea repo.

12 -> 6 vulnerabilities (6 critical/1 high/5 moderate -> 2 critical/1
high/3 moderate). Remaining 6 are entirely in the vitest/vite/esbuild
dev-tooling chain (vite dev-server SSRF, GHSA-67mh-4wv8-2f99) -- not
production-exposed, and fixing requires a vitest 2.x -> 4.x major bump
that needs its own test-suite verification pass, not folded into this
commit.

tsc --noEmit confirms no new type errors from the node-cron/types
change (remaining TS6133 unused-var warnings in src/sources/*.ts are
pre-existing skeleton-source stubs, unrelated to this commit).
This commit is contained in:
Rene Fichtmueller 2026-07-16 09:36:07 +02:00
parent ceb49d0ab6
commit 3b978c4427
2 changed files with 8 additions and 1208 deletions

1208
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -53,10 +53,10 @@
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/renefichtmueller/PeerCortex.git" "url": "https://gitea.context-x.org/rene/PeerCortex.git"
}, },
"bugs": { "bugs": {
"url": "https://github.com/renefichtmueller/PeerCortex/issues" "url": "https://gitea.context-x.org/rene/PeerCortex/issues"
}, },
"homepage": "https://peercortex.org", "homepage": "https://peercortex.org",
"engines": { "engines": {
@ -71,8 +71,7 @@
"cheerio": "^1.0.0", "cheerio": "^1.0.0",
"fastify": "^5.8.5", "fastify": "^5.8.5",
"joi": "^17.11.0", "joi": "^17.11.0",
"node-cron": "^3.0.3", "node-cron": "^4.6.0",
"node-whois": "^2.1.3",
"ollama": "^0.5.12", "ollama": "^0.5.12",
"pg": "^8.11.0", "pg": "^8.11.0",
"playwright": "^1.40.0", "playwright": "^1.40.0",
@ -83,7 +82,6 @@
"@playwright/test": "^1.40.0", "@playwright/test": "^1.40.0",
"@types/better-sqlite3": "^7.6.12", "@types/better-sqlite3": "^7.6.12",
"@types/node": "^22.10.0", "@types/node": "^22.10.0",
"@types/node-cron": "^3.0.0",
"@types/pg": "^8.11.0", "@types/pg": "^8.11.0",
"@typescript-eslint/eslint-plugin": "^8.18.0", "@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0", "@typescript-eslint/parser": "^8.18.0",