Updated CVE scripts to include backfill support.
All checks were successful
Build & Deploy Backend / build (push) Successful in 55s
Build & Deploy Backend / deploy (push) Successful in 31s

This commit is contained in:
2025-10-08 10:02:35 +08:00
parent 2517db791c
commit 80c6aae9c2
3 changed files with 59 additions and 0 deletions

View File

@@ -46,3 +46,55 @@
[27 May 2025, 12:57:21 pm] ✅ CVE import complete!
[27 May 2025, 12:57:21 pm] ✅ CVE import complete!
[27 May 2025, 12:57:21 pm] ✅ fetchCVE.js finished with exit code: 0
[08 Oct 2025, 01:12:44 am] 🚀 📡 CVE sync launched in background.
[08 Oct 2025, 09:12:44 am] 🧪 Getting CVEs from the last 30 of days
[08 Oct 2025, 09:12:44 am] 🚀 CVE sync started
[08 Oct 2025, 09:12:44 am] 🔄 Initializing script...
[08 Oct 2025, 09:12:44 am] 📍 Launching script
[08 Oct 2025, 09:12:44 am] 📅 Starting CVE sync from 2025-09-08T01:12:44.659Z to 2025-10-08T01:12:44.659Z
[08 Oct 2025, 09:12:44 am] 📡 Fetching modified CVEs from 08 Sept 2025 to 08 Oct 2025...
[08 Oct 2025, 09:12:44 am] 🧪 Getting CVEs from the last 30 of days
[08 Oct 2025, 09:12:44 am] 🚀 CVE sync started
[08 Oct 2025, 09:12:44 am] 🔄 Initializing script...
[08 Oct 2025, 09:12:44 am] 📍 Launching script
[08 Oct 2025, 09:12:44 am] 📅 Starting CVE sync from 2025-09-08T01:12:44.659Z to 2025-10-08T01:12:44.659Z
[08 Oct 2025, 09:12:44 am] 📡 Fetching modified CVEs from 08 Sept 2025 to 08 Oct 2025...
[08 Oct 2025, 09:12:47 am] 📄 Page 1 — Processing 2000 CVEs from index 0 of ~9434
[08 Oct 2025, 09:12:47 am] 📄 Page 1 — Processing 2000 CVEs from index 0 of ~9434
[08 Oct 2025, 09:13:50 am] 📄 Page 2 — Processing 2000 CVEs from index 2000 of ~9434
[08 Oct 2025, 09:13:50 am] 📄 Page 2 — Processing 2000 CVEs from index 2000 of ~9434
[08 Oct 2025, 09:14:56 am] 📄 Page 3 — Processing 2000 CVEs from index 4000 of ~9434
[08 Oct 2025, 09:14:56 am] 📄 Page 3 — Processing 2000 CVEs from index 4000 of ~9434
[08 Oct 2025, 09:15:28 am] 📄 Page 4 — Processing 2000 CVEs from index 6000 of ~9434
[08 Oct 2025, 09:15:28 am] 📄 Page 4 — Processing 2000 CVEs from index 6000 of ~9434
[08 Oct 2025, 09:15:52 am] 📄 Page 5 — Processing 1434 CVEs from index 8000 of ~9434
[08 Oct 2025, 09:15:52 am] 📄 Page 5 — Processing 1434 CVEs from index 8000 of ~9434
[08 Oct 2025, 09:16:03 am] ✅ CVE import complete!
[08 Oct 2025, 09:16:03 am] ✅ CVE import complete!
[08 Oct 2025, 01:16:03 am] ✅ fetchCVE.js finished with exit code: 0
[08 Oct 2025, 01:19:08 am] 🚀 📡 CVE sync launched in background.
[08 Oct 2025, 09:19:08 am] 🧪 Getting CVEs from the last 30 of days
[08 Oct 2025, 09:19:08 am] 🧪 Getting CVEs from the last 30 of days
[08 Oct 2025, 09:19:08 am] 🚀 CVE sync started
[08 Oct 2025, 09:19:08 am] 🔄 Initializing script...
[08 Oct 2025, 09:19:08 am] 📍 Launching script
[08 Oct 2025, 09:19:08 am] 📅 Starting CVE sync from 2025-09-08T01:19:08.312Z to 2025-10-08T01:19:08.312Z
[08 Oct 2025, 09:19:08 am] 📡 Fetching modified CVEs from 08 Sept 2025 to 08 Oct 2025...
[08 Oct 2025, 09:19:08 am] 🚀 CVE sync started
[08 Oct 2025, 09:19:08 am] 🔄 Initializing script...
[08 Oct 2025, 09:19:08 am] 📍 Launching script
[08 Oct 2025, 09:19:08 am] 📅 Starting CVE sync from 2025-09-08T01:19:08.312Z to 2025-10-08T01:19:08.312Z
[08 Oct 2025, 09:19:08 am] 📡 Fetching modified CVEs from 08 Sept 2025 to 08 Oct 2025...
[08 Oct 2025, 09:19:10 am] 📄 Page 1 — Processing 2000 CVEs from index 0 of ~9439
[08 Oct 2025, 09:19:10 am] 📄 Page 1 — Processing 2000 CVEs from index 0 of ~9439
[08 Oct 2025, 09:20:17 am] 📄 Page 2 — Processing 2000 CVEs from index 2000 of ~9439
[08 Oct 2025, 09:20:17 am] 📄 Page 2 — Processing 2000 CVEs from index 2000 of ~9439
[08 Oct 2025, 09:21:24 am] 📄 Page 3 — Processing 2000 CVEs from index 4000 of ~9439
[08 Oct 2025, 09:21:24 am] 📄 Page 3 — Processing 2000 CVEs from index 4000 of ~9439
[08 Oct 2025, 09:21:53 am] 📄 Page 4 — Processing 2000 CVEs from index 6000 of ~9439
[08 Oct 2025, 09:21:53 am] 📄 Page 4 — Processing 2000 CVEs from index 6000 of ~9439
[08 Oct 2025, 09:22:14 am] 📄 Page 5 — Processing 1439 CVEs from index 8000 of ~9439
[08 Oct 2025, 09:22:14 am] 📄 Page 5 — Processing 1439 CVEs from index 8000 of ~9439
[08 Oct 2025, 09:22:22 am] ✅ CVE import complete!
[08 Oct 2025, 09:22:22 am] ✅ CVE import complete!
[08 Oct 2025, 01:22:22 am] ✅ fetchCVE.js finished with exit code: 0

View File

@@ -451,6 +451,7 @@ async function importCVEEnrichmentFast() {
// This script runs enrichment mode - use fetchCVE_withMORE.js for backfill
importCVEEnrichmentFast().catch((err) => {
log(`❌ Fatal error during enrichment: ${err.message}`);
logFile.end();

View File

@@ -66,6 +66,12 @@ public class ScriptController {
return triggerScript("fetchCVE.js", "📡 CVE sync launched in background.", getCveLogFile());
}
@PreAuthorize("hasRole('ADMIN')")
@PostMapping("/fetch-cve-backfill")
public ResponseEntity<String> runCveBackfillScript(@AuthenticationPrincipal Object user) {
return triggerScript("fetchCVE_withMORE.js", "📡 CVE backfill launched - will sync back to 2002.", getCveLogFile());
}
@PreAuthorize("hasRole('ADMIN')")
@PostMapping("/fetch-kev")
public ResponseEntity<String> runKevScript(@AuthenticationPrincipal Object user) {