From 537cf96a0abea6e2eb600165761629280147b13c Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Tue, 12 May 2026 15:18:44 -0600 Subject: [PATCH] Fix BU drift checker: derive EXPECTED_BUS from IVANTI_BU_FILTER env var instead of hardcoded 2 BUs --- backend/routes/ivantiFindings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/routes/ivantiFindings.js b/backend/routes/ivantiFindings.js index 261d48c..9201daf 100644 --- a/backend/routes/ivantiFindings.js +++ b/backend/routes/ivantiFindings.js @@ -638,7 +638,7 @@ async function syncFPWorkflowCounts(openFindings, apiKey, clientId, skipTls) { // --------------------------------------------------------------------------- // BU Drift Checker — post-sync classification of newly archived findings // --------------------------------------------------------------------------- -const EXPECTED_BUS = new Set(['NTS-AEO-ACCESS-ENG', 'NTS-AEO-STEAM']); +const EXPECTED_BUS = new Set(BU_FILTER_VALUE.split(',').map(b => b.trim()).filter(Boolean)); async function runBUDriftChecker(newlyArchivedIds, apiKey, clientId, skipTls) { const summary = { bu_reassignment: 0, severity_drift: 0, closed_on_platform: 0, decommissioned: 0 };