From c8e1b3bf296bc405892b92eecd0258f747c866bd Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Wed, 21 Jan 2026 17:57:15 -0800 Subject: [PATCH] rename windowsDefenderEnabled --- messages/bg-BG.json | 1 - messages/cs-CZ.json | 1 - messages/de-DE.json | 1 - messages/en-US.json | 2 +- messages/es-ES.json | 1 - messages/fr-FR.json | 1 - messages/it-IT.json | 1 - messages/ko-KR.json | 1 - messages/nb-NO.json | 1 - messages/nl-NL.json | 1 - messages/pl-PL.json | 1 - messages/pt-PT.json | 1 - messages/ru-RU.json | 1 - messages/tr-TR.json | 1 - messages/zh-CN.json | 1 - server/db/pg/schema/schema.ts | 4 ++-- server/db/sqlite/schema/schema.ts | 4 ++-- server/routers/client/getClient.ts | 11 ++++------- server/routers/olm/fingerprintingUtils.ts | 10 +++++----- server/routers/olm/handleOlmRegisterMessage.ts | 6 ++++++ server/setup/scriptsPg/1.15.0.ts | 4 ++-- server/setup/scriptsSqlite/1.15.0.ts | 4 ++-- .../settings/clients/user/[niceId]/general/page.tsx | 8 ++++---- 23 files changed, 28 insertions(+), 39 deletions(-) diff --git a/messages/bg-BG.json b/messages/bg-BG.json index 0f29538c..dacf36b5 100644 --- a/messages/bg-BG.json +++ b/messages/bg-BG.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Активирана защитна стена.", "autoUpdatesEnabled": "Активирани автоматични актуализации.", "tpmAvailable": "TPM е на разположение.", - "windowsDefenderEnabled": "Windows Defender е активиран.", "macosSipEnabled": "Protection на системната цялост (SIP).", "macosGatekeeperEnabled": "Gatekeeper.", "macosFirewallStealthMode": "Скрит режим на защитната стена.", diff --git a/messages/cs-CZ.json b/messages/cs-CZ.json index cff24737..567ab4d4 100644 --- a/messages/cs-CZ.json +++ b/messages/cs-CZ.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Firewall povolen", "autoUpdatesEnabled": "Automatické aktualizace povoleny", "tpmAvailable": "TPM k dispozici", - "windowsDefenderEnabled": "Okna byla povolena", "macosSipEnabled": "Ochrana systémové integrity (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Režim neviditelnosti firewallu", diff --git a/messages/de-DE.json b/messages/de-DE.json index 8b5ece78..e0c85879 100644 --- a/messages/de-DE.json +++ b/messages/de-DE.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Firewall aktiviert", "autoUpdatesEnabled": "Automatische Updates aktiviert", "tpmAvailable": "TPM verfügbar", - "windowsDefenderEnabled": "Windows Defender aktiviert", "macosSipEnabled": "Schutz der Systemintegrität (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Firewall Stealth-Modus", diff --git a/messages/en-US.json b/messages/en-US.json index 6d2386e6..f2affe11 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -2510,7 +2510,7 @@ "firewallEnabled": "Firewall Enabled", "autoUpdatesEnabled": "Auto Updates Enabled", "tpmAvailable": "TPM Available", - "windowsDefenderEnabled": "Windows Defender Enabled", + "windowsAntivirusEnabled": "Antivirus Enabled", "macosSipEnabled": "System Integrity Protection (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Firewall Stealth Mode", diff --git a/messages/es-ES.json b/messages/es-ES.json index 4823e92e..b27d82ea 100644 --- a/messages/es-ES.json +++ b/messages/es-ES.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Cortafuegos activado", "autoUpdatesEnabled": "Actualizaciones automáticas habilitadas", "tpmAvailable": "TPM disponible", - "windowsDefenderEnabled": "Windows Defender activado", "macosSipEnabled": "Protección de integridad del sistema (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Modo Sigilo Firewall", diff --git a/messages/fr-FR.json b/messages/fr-FR.json index 779e7338..ed1fbc57 100644 --- a/messages/fr-FR.json +++ b/messages/fr-FR.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Pare-feu activé", "autoUpdatesEnabled": "Mises à jour automatiques activées", "tpmAvailable": "TPM disponible", - "windowsDefenderEnabled": "Windows Defender activé", "macosSipEnabled": "Protection contre l'intégrité du système (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Mode furtif du pare-feu", diff --git a/messages/it-IT.json b/messages/it-IT.json index f1029d76..cf26edd6 100644 --- a/messages/it-IT.json +++ b/messages/it-IT.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Firewall Abilitato", "autoUpdatesEnabled": "Aggiornamenti Automatici Abilitati", "tpmAvailable": "TPM Disponibile", - "windowsDefenderEnabled": "Windows Defender Abilitato", "macosSipEnabled": "Protezione Dell'Integrità Del Sistema (Sip)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Modo Furtivo Del Firewall", diff --git a/messages/ko-KR.json b/messages/ko-KR.json index 751e4325..7b97c7b0 100644 --- a/messages/ko-KR.json +++ b/messages/ko-KR.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "방화벽 활성화", "autoUpdatesEnabled": "자동 업데이트 활성화", "tpmAvailable": "TPM 사용 가능", - "windowsDefenderEnabled": "Windows Defender 활성화", "macosSipEnabled": "시스템 무결성 보호 (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "방화벽 스텔스 모드", diff --git a/messages/nb-NO.json b/messages/nb-NO.json index ef6d7516..33f8228b 100644 --- a/messages/nb-NO.json +++ b/messages/nb-NO.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Brannmur aktivert", "autoUpdatesEnabled": "Automatiske oppdateringer aktivert", "tpmAvailable": "TPM tilgjengelig", - "windowsDefenderEnabled": "Windows svarer aktivert", "macosSipEnabled": "System Integritetsbeskyttelse (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Brannmur Usynlig Modus", diff --git a/messages/nl-NL.json b/messages/nl-NL.json index 7ddbd03e..fe8a327e 100644 --- a/messages/nl-NL.json +++ b/messages/nl-NL.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Firewall ingeschakeld", "autoUpdatesEnabled": "Auto Updates Ingeschakeld", "tpmAvailable": "TPM beschikbaar", - "windowsDefenderEnabled": "Windows Verdediger ingeschakeld", "macosSipEnabled": "Systeemintegriteitsbescherming (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Firewall Verberg Modus", diff --git a/messages/pl-PL.json b/messages/pl-PL.json index a43fe425..97fc10be 100644 --- a/messages/pl-PL.json +++ b/messages/pl-PL.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Zapora włączona", "autoUpdatesEnabled": "Automatyczne aktualizacje włączone", "tpmAvailable": "TPM dostępne", - "windowsDefenderEnabled": "Obrońca Windows włączony", "macosSipEnabled": "Ochrona integralności systemu (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Tryb Stealth zapory", diff --git a/messages/pt-PT.json b/messages/pt-PT.json index 71f55640..ded18509 100644 --- a/messages/pt-PT.json +++ b/messages/pt-PT.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Firewall habilitado", "autoUpdatesEnabled": "Atualizações Automáticas Habilitadas", "tpmAvailable": "TPM disponível", - "windowsDefenderEnabled": "Defensor do Windows habilitado", "macosSipEnabled": "Proteção da Integridade do Sistema (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Modo Furtivo do Firewall", diff --git a/messages/ru-RU.json b/messages/ru-RU.json index 451ba592..a8f18219 100644 --- a/messages/ru-RU.json +++ b/messages/ru-RU.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Брандмауэр включен", "autoUpdatesEnabled": "Автоматические обновления включены", "tpmAvailable": "Доступно TPM", - "windowsDefenderEnabled": "Защитник Windows включен", "macosSipEnabled": "Защита целостности системы (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Стилс-режим брандмауэра", diff --git a/messages/tr-TR.json b/messages/tr-TR.json index 87b9a323..bd79b465 100644 --- a/messages/tr-TR.json +++ b/messages/tr-TR.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "Güvenlik Duvarı Etkin", "autoUpdatesEnabled": "Otomatik Güncellemeler Etkin", "tpmAvailable": "TPM Mevcut", - "windowsDefenderEnabled": "Windows Defender Etkin", "macosSipEnabled": "Sistem Bütünlüğü Koruması (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "Güvenlik Duvarı Gizlilik Modu", diff --git a/messages/zh-CN.json b/messages/zh-CN.json index f1a3038e..87a57c63 100644 --- a/messages/zh-CN.json +++ b/messages/zh-CN.json @@ -2510,7 +2510,6 @@ "firewallEnabled": "防火墙已启用", "autoUpdatesEnabled": "启用自动更新", "tpmAvailable": "TPM 可用", - "windowsDefenderEnabled": "Windows Defender 已启用", "macosSipEnabled": "系统完整性保护 (SIP)", "macosGatekeeperEnabled": "Gatekeeper", "macosFirewallStealthMode": "防火墙隐形模式", diff --git a/server/db/pg/schema/schema.ts b/server/db/pg/schema/schema.ts index 001e54cb..3c957470 100644 --- a/server/db/pg/schema/schema.ts +++ b/server/db/pg/schema/schema.ts @@ -778,7 +778,7 @@ export const currentFingerprint = pgTable("currentFingerprint", { // Windows-specific posture check information - windowsDefenderEnabled: boolean("windowsDefenderEnabled") + windowsAntivirusEnabled: boolean("windowsAntivirusEnabled") .notNull() .default(false), @@ -830,7 +830,7 @@ export const fingerprintSnapshots = pgTable("fingerprintSnapshots", { // Windows-specific posture check information - windowsDefenderEnabled: boolean("windowsDefenderEnabled") + windowsAntivirusEnabled: boolean("windowsAntivirusEnabled") .notNull() .default(false), diff --git a/server/db/sqlite/schema/schema.ts b/server/db/sqlite/schema/schema.ts index e4e6c6d7..4137db3c 100644 --- a/server/db/sqlite/schema/schema.ts +++ b/server/db/sqlite/schema/schema.ts @@ -475,7 +475,7 @@ export const currentFingerprint = sqliteTable("currentFingerprint", { // Windows-specific posture check information - windowsDefenderEnabled: integer("windowsDefenderEnabled", { + windowsAntivirusEnabled: integer("windowsAntivirusEnabled", { mode: "boolean" }) .notNull() @@ -549,7 +549,7 @@ export const fingerprintSnapshots = sqliteTable("fingerprintSnapshots", { // Windows-specific posture check information - windowsDefenderEnabled: integer("windowsDefenderEnabled", { + windowsAntivirusEnabled: integer("windowsAntivirusEnabled", { mode: "boolean" }) .notNull() diff --git a/server/routers/client/getClient.ts b/server/routers/client/getClient.ts index 18e99819..6bbf91b0 100644 --- a/server/routers/client/getClient.ts +++ b/server/routers/client/getClient.ts @@ -58,7 +58,7 @@ type PostureData = { firewallEnabled?: boolean | null; autoUpdatesEnabled?: boolean | null; tpmAvailable?: boolean | null; - windowsDefenderEnabled?: boolean | null; + windowsAntivirusEnabled?: boolean | null; macosSipEnabled?: boolean | null; macosGatekeeperEnabled?: boolean | null; macosFirewallStealthMode?: boolean | null; @@ -75,7 +75,7 @@ function getPlatformPostureData( const normalizedPlatform = platform?.toLowerCase() || "unknown"; const posture: PostureData = {}; - // Windows: Hard drive encryption, Firewall, Auto updates, TPM availability, Windows Defender + // Windows: Hard drive encryption, Firewall, Auto updates, TPM availability, Windows Antivirus status if (normalizedPlatform === "windows") { if (fingerprint.diskEncrypted !== null && fingerprint.diskEncrypted !== undefined) { posture.diskEncrypted = fingerprint.diskEncrypted; @@ -83,14 +83,11 @@ function getPlatformPostureData( if (fingerprint.firewallEnabled !== null && fingerprint.firewallEnabled !== undefined) { posture.firewallEnabled = fingerprint.firewallEnabled; } - if (fingerprint.autoUpdatesEnabled !== null && fingerprint.autoUpdatesEnabled !== undefined) { - posture.autoUpdatesEnabled = fingerprint.autoUpdatesEnabled; - } if (fingerprint.tpmAvailable !== null && fingerprint.tpmAvailable !== undefined) { posture.tpmAvailable = fingerprint.tpmAvailable; } - if (fingerprint.windowsDefenderEnabled !== null && fingerprint.windowsDefenderEnabled !== undefined) { - posture.windowsDefenderEnabled = fingerprint.windowsDefenderEnabled; + if (fingerprint.windowsAntivirusEnabled !== null && fingerprint.windowsAntivirusEnabled !== undefined) { + posture.windowsAntivirusEnabled = fingerprint.windowsAntivirusEnabled; } } // macOS: Hard drive encryption, Biometric configuration, Firewall, System Integrity Protection (SIP), Gatekeeper, Firewall stealth mode diff --git a/server/routers/olm/fingerprintingUtils.ts b/server/routers/olm/fingerprintingUtils.ts index 3fe445f1..90fafd3c 100644 --- a/server/routers/olm/fingerprintingUtils.ts +++ b/server/routers/olm/fingerprintingUtils.ts @@ -22,7 +22,7 @@ function fingerprintSnapshotHash(fingerprint: any, postures: any): string { autoUpdatesEnabled: postures.autoUpdatesEnabled ?? false, tpmAvailable: postures.tpmAvailable ?? false, - windowsDefenderEnabled: postures.windowsDefenderEnabled ?? false, + windowsAntivirusEnabled: postures.windowsAntivirusEnabled ?? false, macosSipEnabled: postures.macosSipEnabled ?? false, macosGatekeeperEnabled: postures.macosGatekeeperEnabled ?? false, @@ -87,7 +87,7 @@ export async function handleFingerprintInsertion( autoUpdatesEnabled: postures.autoUpdatesEnabled, tpmAvailable: postures.tpmAvailable, - windowsDefenderEnabled: postures.windowsDefenderEnabled, + windowsAntivirusEnabled: postures.windowsAntivirusEnabled, macosSipEnabled: postures.macosSipEnabled, macosGatekeeperEnabled: postures.macosGatekeeperEnabled, @@ -117,7 +117,7 @@ export async function handleFingerprintInsertion( autoUpdatesEnabled: postures.autoUpdatesEnabled, tpmAvailable: postures.tpmAvailable, - windowsDefenderEnabled: postures.windowsDefenderEnabled, + windowsAntivirusEnabled: postures.windowsAntivirusEnabled, macosSipEnabled: postures.macosSipEnabled, macosGatekeeperEnabled: postures.macosGatekeeperEnabled, @@ -162,7 +162,7 @@ export async function handleFingerprintInsertion( autoUpdatesEnabled: postures.autoUpdatesEnabled, tpmAvailable: postures.tpmAvailable, - windowsDefenderEnabled: postures.windowsDefenderEnabled, + windowsAntivirusEnabled: postures.windowsAntivirusEnabled, macosSipEnabled: postures.macosSipEnabled, macosGatekeeperEnabled: postures.macosGatekeeperEnabled, @@ -197,7 +197,7 @@ export async function handleFingerprintInsertion( autoUpdatesEnabled: postures.autoUpdatesEnabled, tpmAvailable: postures.tpmAvailable, - windowsDefenderEnabled: postures.windowsDefenderEnabled, + windowsAntivirusEnabled: postures.windowsAntivirusEnabled, macosSipEnabled: postures.macosSipEnabled, macosGatekeeperEnabled: postures.macosGatekeeperEnabled, diff --git a/server/routers/olm/handleOlmRegisterMessage.ts b/server/routers/olm/handleOlmRegisterMessage.ts index 958c4568..b8d4dc01 100644 --- a/server/routers/olm/handleOlmRegisterMessage.ts +++ b/server/routers/olm/handleOlmRegisterMessage.ts @@ -46,6 +46,12 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => { return; } + logger.debug("Handling fingerprint insertion for olm register...", { + olmId: olm.olmId, + fingerprint, + postures + }); + await handleFingerprintInsertion(olm, fingerprint, postures); if ( diff --git a/server/setup/scriptsPg/1.15.0.ts b/server/setup/scriptsPg/1.15.0.ts index 1ccf001b..0b96345b 100644 --- a/server/setup/scriptsPg/1.15.0.ts +++ b/server/setup/scriptsPg/1.15.0.ts @@ -49,7 +49,7 @@ export default async function migration() { "firewallEnabled" boolean DEFAULT false NOT NULL, "autoUpdatesEnabled" boolean DEFAULT false NOT NULL, "tpmAvailable" boolean DEFAULT false NOT NULL, - "windowsDefenderEnabled" boolean DEFAULT false NOT NULL, + "windowsAntivirusEnabled" boolean DEFAULT false NOT NULL, "macosSipEnabled" boolean DEFAULT false NOT NULL, "macosGatekeeperEnabled" boolean DEFAULT false NOT NULL, "macosFirewallStealthMode" boolean DEFAULT false NOT NULL, @@ -75,7 +75,7 @@ export default async function migration() { "firewallEnabled" boolean DEFAULT false NOT NULL, "autoUpdatesEnabled" boolean DEFAULT false NOT NULL, "tpmAvailable" boolean DEFAULT false NOT NULL, - "windowsDefenderEnabled" boolean DEFAULT false NOT NULL, + "windowsAntivirusEnabled" boolean DEFAULT false NOT NULL, "macosSipEnabled" boolean DEFAULT false NOT NULL, "macosGatekeeperEnabled" boolean DEFAULT false NOT NULL, "macosFirewallStealthMode" boolean DEFAULT false NOT NULL, diff --git a/server/setup/scriptsSqlite/1.15.0.ts b/server/setup/scriptsSqlite/1.15.0.ts index c8a3a221..dc0638d4 100644 --- a/server/setup/scriptsSqlite/1.15.0.ts +++ b/server/setup/scriptsSqlite/1.15.0.ts @@ -53,7 +53,7 @@ CREATE TABLE 'currentFingerprint' ( 'firewallEnabled' integer DEFAULT false NOT NULL, 'autoUpdatesEnabled' integer DEFAULT false NOT NULL, 'tpmAvailable' integer DEFAULT false NOT NULL, - 'windowsDefenderEnabled' integer DEFAULT false NOT NULL, + 'windowsAntivirusEnabled' integer DEFAULT false NOT NULL, 'macosSipEnabled' integer DEFAULT false NOT NULL, 'macosGatekeeperEnabled' integer DEFAULT false NOT NULL, 'macosFirewallStealthMode' integer DEFAULT false NOT NULL, @@ -83,7 +83,7 @@ CREATE TABLE 'fingerprintSnapshots' ( 'firewallEnabled' integer DEFAULT false NOT NULL, 'autoUpdatesEnabled' integer DEFAULT false NOT NULL, 'tpmAvailable' integer DEFAULT false NOT NULL, - 'windowsDefenderEnabled' integer DEFAULT false NOT NULL, + 'windowsAntivirusEnabled' integer DEFAULT false NOT NULL, 'macosSipEnabled' integer DEFAULT false NOT NULL, 'macosGatekeeperEnabled' integer DEFAULT false NOT NULL, 'macosFirewallStealthMode' integer DEFAULT false NOT NULL, diff --git a/src/app/[orgId]/settings/clients/user/[niceId]/general/page.tsx b/src/app/[orgId]/settings/clients/user/[niceId]/general/page.tsx index ed9a5f49..0cd86bd8 100644 --- a/src/app/[orgId]/settings/clients/user/[niceId]/general/page.tsx +++ b/src/app/[orgId]/settings/clients/user/[niceId]/general/page.tsx @@ -656,17 +656,17 @@ export default function GeneralPage() { )} - {client.posture.windowsDefenderEnabled !== null && - client.posture.windowsDefenderEnabled !== undefined && ( + {client.posture.windowsAntivirusEnabled !== null && + client.posture.windowsAntivirusEnabled !== undefined && ( - {t("windowsDefenderEnabled")} + {t("windowsAntivirusEnabled")} {isPaidUser ? formatPostureValue( client.posture - .windowsDefenderEnabled + .windowsAntivirusEnabled ) : "-"}