Fix BU drift checker: derive EXPECTED_BUS from IVANTI_BU_FILTER env var instead of hardcoded 2 BUs

This commit is contained in:
Jordan Ramos
2026-05-12 15:18:44 -06:00
parent f3d7f2ac1d
commit 537cf96a0a

View File

@@ -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 };