mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-23 20:50:18 +02:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 316b7e5653 | |||
| 00fc1da33c | |||
| 9ef93df54f | |||
| fd9fdf6399 | |||
| 8fa1701e06 | |||
| 4abe83f8a9 |
@@ -35,6 +35,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://docs.pangolin.net/careers/join-us">
|
||||||
|
<img src="https://img.shields.io/badge/🚀_We're_Hiring!-Join_Our_Team-brightgreen?style=for-the-badge" alt="We're Hiring!" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>
|
<strong>
|
||||||
Start testing Pangolin at <a href="https://app.pangolin.net/auth/signup">app.pangolin.net</a>
|
Start testing Pangolin at <a href="https://app.pangolin.net/auth/signup">app.pangolin.net</a>
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Активирана защитна стена.",
|
"firewallEnabled": "Активирана защитна стена.",
|
||||||
"autoUpdatesEnabled": "Активирани автоматични актуализации.",
|
"autoUpdatesEnabled": "Активирани автоматични актуализации.",
|
||||||
"tpmAvailable": "TPM е на разположение.",
|
"tpmAvailable": "TPM е на разположение.",
|
||||||
"windowsDefenderEnabled": "Windows Defender е активиран.",
|
|
||||||
"macosSipEnabled": "Protection на системната цялост (SIP).",
|
"macosSipEnabled": "Protection на системната цялост (SIP).",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper.",
|
"macosGatekeeperEnabled": "Gatekeeper.",
|
||||||
"macosFirewallStealthMode": "Скрит режим на защитната стена.",
|
"macosFirewallStealthMode": "Скрит режим на защитната стена.",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Firewall povolen",
|
"firewallEnabled": "Firewall povolen",
|
||||||
"autoUpdatesEnabled": "Automatické aktualizace povoleny",
|
"autoUpdatesEnabled": "Automatické aktualizace povoleny",
|
||||||
"tpmAvailable": "TPM k dispozici",
|
"tpmAvailable": "TPM k dispozici",
|
||||||
"windowsDefenderEnabled": "Okna byla povolena",
|
|
||||||
"macosSipEnabled": "Ochrana systémové integrity (SIP)",
|
"macosSipEnabled": "Ochrana systémové integrity (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Režim neviditelnosti firewallu",
|
"macosFirewallStealthMode": "Režim neviditelnosti firewallu",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Firewall aktiviert",
|
"firewallEnabled": "Firewall aktiviert",
|
||||||
"autoUpdatesEnabled": "Automatische Updates aktiviert",
|
"autoUpdatesEnabled": "Automatische Updates aktiviert",
|
||||||
"tpmAvailable": "TPM verfügbar",
|
"tpmAvailable": "TPM verfügbar",
|
||||||
"windowsDefenderEnabled": "Windows Defender aktiviert",
|
|
||||||
"macosSipEnabled": "Schutz der Systemintegrität (SIP)",
|
"macosSipEnabled": "Schutz der Systemintegrität (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Firewall Stealth-Modus",
|
"macosFirewallStealthMode": "Firewall Stealth-Modus",
|
||||||
|
|||||||
+1
-1
@@ -2510,7 +2510,7 @@
|
|||||||
"firewallEnabled": "Firewall Enabled",
|
"firewallEnabled": "Firewall Enabled",
|
||||||
"autoUpdatesEnabled": "Auto Updates Enabled",
|
"autoUpdatesEnabled": "Auto Updates Enabled",
|
||||||
"tpmAvailable": "TPM Available",
|
"tpmAvailable": "TPM Available",
|
||||||
"windowsDefenderEnabled": "Windows Defender Enabled",
|
"windowsAntivirusEnabled": "Antivirus Enabled",
|
||||||
"macosSipEnabled": "System Integrity Protection (SIP)",
|
"macosSipEnabled": "System Integrity Protection (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Firewall Stealth Mode",
|
"macosFirewallStealthMode": "Firewall Stealth Mode",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Cortafuegos activado",
|
"firewallEnabled": "Cortafuegos activado",
|
||||||
"autoUpdatesEnabled": "Actualizaciones automáticas habilitadas",
|
"autoUpdatesEnabled": "Actualizaciones automáticas habilitadas",
|
||||||
"tpmAvailable": "TPM disponible",
|
"tpmAvailable": "TPM disponible",
|
||||||
"windowsDefenderEnabled": "Windows Defender activado",
|
|
||||||
"macosSipEnabled": "Protección de integridad del sistema (SIP)",
|
"macosSipEnabled": "Protección de integridad del sistema (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Modo Sigilo Firewall",
|
"macosFirewallStealthMode": "Modo Sigilo Firewall",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Pare-feu activé",
|
"firewallEnabled": "Pare-feu activé",
|
||||||
"autoUpdatesEnabled": "Mises à jour automatiques activées",
|
"autoUpdatesEnabled": "Mises à jour automatiques activées",
|
||||||
"tpmAvailable": "TPM disponible",
|
"tpmAvailable": "TPM disponible",
|
||||||
"windowsDefenderEnabled": "Windows Defender activé",
|
|
||||||
"macosSipEnabled": "Protection contre l'intégrité du système (SIP)",
|
"macosSipEnabled": "Protection contre l'intégrité du système (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Mode furtif du pare-feu",
|
"macosFirewallStealthMode": "Mode furtif du pare-feu",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Firewall Abilitato",
|
"firewallEnabled": "Firewall Abilitato",
|
||||||
"autoUpdatesEnabled": "Aggiornamenti Automatici Abilitati",
|
"autoUpdatesEnabled": "Aggiornamenti Automatici Abilitati",
|
||||||
"tpmAvailable": "TPM Disponibile",
|
"tpmAvailable": "TPM Disponibile",
|
||||||
"windowsDefenderEnabled": "Windows Defender Abilitato",
|
|
||||||
"macosSipEnabled": "Protezione Dell'Integrità Del Sistema (Sip)",
|
"macosSipEnabled": "Protezione Dell'Integrità Del Sistema (Sip)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Modo Furtivo Del Firewall",
|
"macosFirewallStealthMode": "Modo Furtivo Del Firewall",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "방화벽 활성화",
|
"firewallEnabled": "방화벽 활성화",
|
||||||
"autoUpdatesEnabled": "자동 업데이트 활성화",
|
"autoUpdatesEnabled": "자동 업데이트 활성화",
|
||||||
"tpmAvailable": "TPM 사용 가능",
|
"tpmAvailable": "TPM 사용 가능",
|
||||||
"windowsDefenderEnabled": "Windows Defender 활성화",
|
|
||||||
"macosSipEnabled": "시스템 무결성 보호 (SIP)",
|
"macosSipEnabled": "시스템 무결성 보호 (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "방화벽 스텔스 모드",
|
"macosFirewallStealthMode": "방화벽 스텔스 모드",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Brannmur aktivert",
|
"firewallEnabled": "Brannmur aktivert",
|
||||||
"autoUpdatesEnabled": "Automatiske oppdateringer aktivert",
|
"autoUpdatesEnabled": "Automatiske oppdateringer aktivert",
|
||||||
"tpmAvailable": "TPM tilgjengelig",
|
"tpmAvailable": "TPM tilgjengelig",
|
||||||
"windowsDefenderEnabled": "Windows svarer aktivert",
|
|
||||||
"macosSipEnabled": "System Integritetsbeskyttelse (SIP)",
|
"macosSipEnabled": "System Integritetsbeskyttelse (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Brannmur Usynlig Modus",
|
"macosFirewallStealthMode": "Brannmur Usynlig Modus",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Firewall ingeschakeld",
|
"firewallEnabled": "Firewall ingeschakeld",
|
||||||
"autoUpdatesEnabled": "Auto Updates Ingeschakeld",
|
"autoUpdatesEnabled": "Auto Updates Ingeschakeld",
|
||||||
"tpmAvailable": "TPM beschikbaar",
|
"tpmAvailable": "TPM beschikbaar",
|
||||||
"windowsDefenderEnabled": "Windows Verdediger ingeschakeld",
|
|
||||||
"macosSipEnabled": "Systeemintegriteitsbescherming (SIP)",
|
"macosSipEnabled": "Systeemintegriteitsbescherming (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Firewall Verberg Modus",
|
"macosFirewallStealthMode": "Firewall Verberg Modus",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Zapora włączona",
|
"firewallEnabled": "Zapora włączona",
|
||||||
"autoUpdatesEnabled": "Automatyczne aktualizacje włączone",
|
"autoUpdatesEnabled": "Automatyczne aktualizacje włączone",
|
||||||
"tpmAvailable": "TPM dostępne",
|
"tpmAvailable": "TPM dostępne",
|
||||||
"windowsDefenderEnabled": "Obrońca Windows włączony",
|
|
||||||
"macosSipEnabled": "Ochrona integralności systemu (SIP)",
|
"macosSipEnabled": "Ochrona integralności systemu (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Tryb Stealth zapory",
|
"macosFirewallStealthMode": "Tryb Stealth zapory",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Firewall habilitado",
|
"firewallEnabled": "Firewall habilitado",
|
||||||
"autoUpdatesEnabled": "Atualizações Automáticas Habilitadas",
|
"autoUpdatesEnabled": "Atualizações Automáticas Habilitadas",
|
||||||
"tpmAvailable": "TPM disponível",
|
"tpmAvailable": "TPM disponível",
|
||||||
"windowsDefenderEnabled": "Defensor do Windows habilitado",
|
|
||||||
"macosSipEnabled": "Proteção da Integridade do Sistema (SIP)",
|
"macosSipEnabled": "Proteção da Integridade do Sistema (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Modo Furtivo do Firewall",
|
"macosFirewallStealthMode": "Modo Furtivo do Firewall",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Брандмауэр включен",
|
"firewallEnabled": "Брандмауэр включен",
|
||||||
"autoUpdatesEnabled": "Автоматические обновления включены",
|
"autoUpdatesEnabled": "Автоматические обновления включены",
|
||||||
"tpmAvailable": "Доступно TPM",
|
"tpmAvailable": "Доступно TPM",
|
||||||
"windowsDefenderEnabled": "Защитник Windows включен",
|
|
||||||
"macosSipEnabled": "Защита целостности системы (SIP)",
|
"macosSipEnabled": "Защита целостности системы (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Стилс-режим брандмауэра",
|
"macosFirewallStealthMode": "Стилс-режим брандмауэра",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "Güvenlik Duvarı Etkin",
|
"firewallEnabled": "Güvenlik Duvarı Etkin",
|
||||||
"autoUpdatesEnabled": "Otomatik Güncellemeler Etkin",
|
"autoUpdatesEnabled": "Otomatik Güncellemeler Etkin",
|
||||||
"tpmAvailable": "TPM Mevcut",
|
"tpmAvailable": "TPM Mevcut",
|
||||||
"windowsDefenderEnabled": "Windows Defender Etkin",
|
|
||||||
"macosSipEnabled": "Sistem Bütünlüğü Koruması (SIP)",
|
"macosSipEnabled": "Sistem Bütünlüğü Koruması (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "Güvenlik Duvarı Gizlilik Modu",
|
"macosFirewallStealthMode": "Güvenlik Duvarı Gizlilik Modu",
|
||||||
|
|||||||
@@ -2510,7 +2510,6 @@
|
|||||||
"firewallEnabled": "防火墙已启用",
|
"firewallEnabled": "防火墙已启用",
|
||||||
"autoUpdatesEnabled": "启用自动更新",
|
"autoUpdatesEnabled": "启用自动更新",
|
||||||
"tpmAvailable": "TPM 可用",
|
"tpmAvailable": "TPM 可用",
|
||||||
"windowsDefenderEnabled": "Windows Defender 已启用",
|
|
||||||
"macosSipEnabled": "系统完整性保护 (SIP)",
|
"macosSipEnabled": "系统完整性保护 (SIP)",
|
||||||
"macosGatekeeperEnabled": "Gatekeeper",
|
"macosGatekeeperEnabled": "Gatekeeper",
|
||||||
"macosFirewallStealthMode": "防火墙隐形模式",
|
"macosFirewallStealthMode": "防火墙隐形模式",
|
||||||
|
|||||||
@@ -778,7 +778,7 @@ export const currentFingerprint = pgTable("currentFingerprint", {
|
|||||||
|
|
||||||
// Windows-specific posture check information
|
// Windows-specific posture check information
|
||||||
|
|
||||||
windowsDefenderEnabled: boolean("windowsDefenderEnabled")
|
windowsAntivirusEnabled: boolean("windowsAntivirusEnabled")
|
||||||
.notNull()
|
.notNull()
|
||||||
.default(false),
|
.default(false),
|
||||||
|
|
||||||
@@ -830,7 +830,7 @@ export const fingerprintSnapshots = pgTable("fingerprintSnapshots", {
|
|||||||
|
|
||||||
// Windows-specific posture check information
|
// Windows-specific posture check information
|
||||||
|
|
||||||
windowsDefenderEnabled: boolean("windowsDefenderEnabled")
|
windowsAntivirusEnabled: boolean("windowsAntivirusEnabled")
|
||||||
.notNull()
|
.notNull()
|
||||||
.default(false),
|
.default(false),
|
||||||
|
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ export const currentFingerprint = sqliteTable("currentFingerprint", {
|
|||||||
|
|
||||||
// Windows-specific posture check information
|
// Windows-specific posture check information
|
||||||
|
|
||||||
windowsDefenderEnabled: integer("windowsDefenderEnabled", {
|
windowsAntivirusEnabled: integer("windowsAntivirusEnabled", {
|
||||||
mode: "boolean"
|
mode: "boolean"
|
||||||
})
|
})
|
||||||
.notNull()
|
.notNull()
|
||||||
@@ -549,7 +549,7 @@ export const fingerprintSnapshots = sqliteTable("fingerprintSnapshots", {
|
|||||||
|
|
||||||
// Windows-specific posture check information
|
// Windows-specific posture check information
|
||||||
|
|
||||||
windowsDefenderEnabled: integer("windowsDefenderEnabled", {
|
windowsAntivirusEnabled: integer("windowsAntivirusEnabled", {
|
||||||
mode: "boolean"
|
mode: "boolean"
|
||||||
})
|
})
|
||||||
.notNull()
|
.notNull()
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { fromError } from "zod-validation-error";
|
|||||||
import { OpenAPITags, registry } from "@server/openApi";
|
import { OpenAPITags, registry } from "@server/openApi";
|
||||||
import { getUserDeviceName } from "@server/db/names";
|
import { getUserDeviceName } from "@server/db/names";
|
||||||
import { build } from "@server/build";
|
import { build } from "@server/build";
|
||||||
|
import { isLicensedOrSubscribed } from "@server/lib/isLicencedOrSubscribed";
|
||||||
|
|
||||||
const getClientSchema = z.strictObject({
|
const getClientSchema = z.strictObject({
|
||||||
clientId: z
|
clientId: z
|
||||||
@@ -58,7 +59,7 @@ type PostureData = {
|
|||||||
firewallEnabled?: boolean | null;
|
firewallEnabled?: boolean | null;
|
||||||
autoUpdatesEnabled?: boolean | null;
|
autoUpdatesEnabled?: boolean | null;
|
||||||
tpmAvailable?: boolean | null;
|
tpmAvailable?: boolean | null;
|
||||||
windowsDefenderEnabled?: boolean | null;
|
windowsAntivirusEnabled?: boolean | null;
|
||||||
macosSipEnabled?: boolean | null;
|
macosSipEnabled?: boolean | null;
|
||||||
macosGatekeeperEnabled?: boolean | null;
|
macosGatekeeperEnabled?: boolean | null;
|
||||||
macosFirewallStealthMode?: boolean | null;
|
macosFirewallStealthMode?: boolean | null;
|
||||||
@@ -75,7 +76,7 @@ function getPlatformPostureData(
|
|||||||
const normalizedPlatform = platform?.toLowerCase() || "unknown";
|
const normalizedPlatform = platform?.toLowerCase() || "unknown";
|
||||||
const posture: PostureData = {};
|
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 (normalizedPlatform === "windows") {
|
||||||
if (fingerprint.diskEncrypted !== null && fingerprint.diskEncrypted !== undefined) {
|
if (fingerprint.diskEncrypted !== null && fingerprint.diskEncrypted !== undefined) {
|
||||||
posture.diskEncrypted = fingerprint.diskEncrypted;
|
posture.diskEncrypted = fingerprint.diskEncrypted;
|
||||||
@@ -83,14 +84,11 @@ function getPlatformPostureData(
|
|||||||
if (fingerprint.firewallEnabled !== null && fingerprint.firewallEnabled !== undefined) {
|
if (fingerprint.firewallEnabled !== null && fingerprint.firewallEnabled !== undefined) {
|
||||||
posture.firewallEnabled = fingerprint.firewallEnabled;
|
posture.firewallEnabled = fingerprint.firewallEnabled;
|
||||||
}
|
}
|
||||||
if (fingerprint.autoUpdatesEnabled !== null && fingerprint.autoUpdatesEnabled !== undefined) {
|
|
||||||
posture.autoUpdatesEnabled = fingerprint.autoUpdatesEnabled;
|
|
||||||
}
|
|
||||||
if (fingerprint.tpmAvailable !== null && fingerprint.tpmAvailable !== undefined) {
|
if (fingerprint.tpmAvailable !== null && fingerprint.tpmAvailable !== undefined) {
|
||||||
posture.tpmAvailable = fingerprint.tpmAvailable;
|
posture.tpmAvailable = fingerprint.tpmAvailable;
|
||||||
}
|
}
|
||||||
if (fingerprint.windowsDefenderEnabled !== null && fingerprint.windowsDefenderEnabled !== undefined) {
|
if (fingerprint.windowsAntivirusEnabled !== null && fingerprint.windowsAntivirusEnabled !== undefined) {
|
||||||
posture.windowsDefenderEnabled = fingerprint.windowsDefenderEnabled;
|
posture.windowsAntivirusEnabled = fingerprint.windowsAntivirusEnabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// macOS: Hard drive encryption, Biometric configuration, Firewall, System Integrity Protection (SIP), Gatekeeper, Firewall stealth mode
|
// macOS: Hard drive encryption, Biometric configuration, Firewall, System Integrity Protection (SIP), Gatekeeper, Firewall stealth mode
|
||||||
@@ -137,15 +135,10 @@ function getPlatformPostureData(
|
|||||||
}
|
}
|
||||||
// iOS: Biometric configuration
|
// iOS: Biometric configuration
|
||||||
else if (normalizedPlatform === "ios") {
|
else if (normalizedPlatform === "ios") {
|
||||||
if (fingerprint.biometricsEnabled !== null && fingerprint.biometricsEnabled !== undefined) {
|
// none supported yet
|
||||||
posture.biometricsEnabled = fingerprint.biometricsEnabled;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Android: Screen lock, Biometric configuration, Hard drive encryption
|
// Android: Screen lock, Biometric configuration, Hard drive encryption
|
||||||
else if (normalizedPlatform === "android") {
|
else if (normalizedPlatform === "android") {
|
||||||
if (fingerprint.biometricsEnabled !== null && fingerprint.biometricsEnabled !== undefined) {
|
|
||||||
posture.biometricsEnabled = fingerprint.biometricsEnabled;
|
|
||||||
}
|
|
||||||
if (fingerprint.diskEncrypted !== null && fingerprint.diskEncrypted !== undefined) {
|
if (fingerprint.diskEncrypted !== null && fingerprint.diskEncrypted !== undefined) {
|
||||||
posture.diskEncrypted = fingerprint.diskEncrypted;
|
posture.diskEncrypted = fingerprint.diskEncrypted;
|
||||||
}
|
}
|
||||||
@@ -258,12 +251,18 @@ export async function getClient(
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
// Build posture data if available (platform-specific)
|
// Build posture data if available (platform-specific)
|
||||||
|
// Only return posture data if org is licensed/subscribed
|
||||||
let postureData: PostureData | null = null;
|
let postureData: PostureData | null = null;
|
||||||
if (build !== "oss") {
|
if (build !== "oss") {
|
||||||
postureData = getPlatformPostureData(
|
const isOrgLicensed = await isLicensedOrSubscribed(
|
||||||
client.currentFingerprint?.platform || null,
|
client.clients.orgId
|
||||||
client.currentFingerprint
|
|
||||||
);
|
);
|
||||||
|
if (isOrgLicensed) {
|
||||||
|
postureData = getPlatformPostureData(
|
||||||
|
client.currentFingerprint?.platform || null,
|
||||||
|
client.currentFingerprint
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const data: GetClientResponse = {
|
const data: GetClientResponse = {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function fingerprintSnapshotHash(fingerprint: any, postures: any): string {
|
|||||||
autoUpdatesEnabled: postures.autoUpdatesEnabled ?? false,
|
autoUpdatesEnabled: postures.autoUpdatesEnabled ?? false,
|
||||||
tpmAvailable: postures.tpmAvailable ?? false,
|
tpmAvailable: postures.tpmAvailable ?? false,
|
||||||
|
|
||||||
windowsDefenderEnabled: postures.windowsDefenderEnabled ?? false,
|
windowsAntivirusEnabled: postures.windowsAntivirusEnabled ?? false,
|
||||||
|
|
||||||
macosSipEnabled: postures.macosSipEnabled ?? false,
|
macosSipEnabled: postures.macosSipEnabled ?? false,
|
||||||
macosGatekeeperEnabled: postures.macosGatekeeperEnabled ?? false,
|
macosGatekeeperEnabled: postures.macosGatekeeperEnabled ?? false,
|
||||||
@@ -87,7 +87,7 @@ export async function handleFingerprintInsertion(
|
|||||||
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
||||||
tpmAvailable: postures.tpmAvailable,
|
tpmAvailable: postures.tpmAvailable,
|
||||||
|
|
||||||
windowsDefenderEnabled: postures.windowsDefenderEnabled,
|
windowsAntivirusEnabled: postures.windowsAntivirusEnabled,
|
||||||
|
|
||||||
macosSipEnabled: postures.macosSipEnabled,
|
macosSipEnabled: postures.macosSipEnabled,
|
||||||
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
||||||
@@ -117,7 +117,7 @@ export async function handleFingerprintInsertion(
|
|||||||
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
||||||
tpmAvailable: postures.tpmAvailable,
|
tpmAvailable: postures.tpmAvailable,
|
||||||
|
|
||||||
windowsDefenderEnabled: postures.windowsDefenderEnabled,
|
windowsAntivirusEnabled: postures.windowsAntivirusEnabled,
|
||||||
|
|
||||||
macosSipEnabled: postures.macosSipEnabled,
|
macosSipEnabled: postures.macosSipEnabled,
|
||||||
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
||||||
@@ -162,7 +162,7 @@ export async function handleFingerprintInsertion(
|
|||||||
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
||||||
tpmAvailable: postures.tpmAvailable,
|
tpmAvailable: postures.tpmAvailable,
|
||||||
|
|
||||||
windowsDefenderEnabled: postures.windowsDefenderEnabled,
|
windowsAntivirusEnabled: postures.windowsAntivirusEnabled,
|
||||||
|
|
||||||
macosSipEnabled: postures.macosSipEnabled,
|
macosSipEnabled: postures.macosSipEnabled,
|
||||||
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
||||||
@@ -197,7 +197,7 @@ export async function handleFingerprintInsertion(
|
|||||||
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
autoUpdatesEnabled: postures.autoUpdatesEnabled,
|
||||||
tpmAvailable: postures.tpmAvailable,
|
tpmAvailable: postures.tpmAvailable,
|
||||||
|
|
||||||
windowsDefenderEnabled: postures.windowsDefenderEnabled,
|
windowsAntivirusEnabled: postures.windowsAntivirusEnabled,
|
||||||
|
|
||||||
macosSipEnabled: postures.macosSipEnabled,
|
macosSipEnabled: postures.macosSipEnabled,
|
||||||
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
macosGatekeeperEnabled: postures.macosGatekeeperEnabled,
|
||||||
|
|||||||
@@ -46,6 +46,12 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("Handling fingerprint insertion for olm register...", {
|
||||||
|
olmId: olm.olmId,
|
||||||
|
fingerprint,
|
||||||
|
postures
|
||||||
|
});
|
||||||
|
|
||||||
await handleFingerprintInsertion(olm, fingerprint, postures);
|
await handleFingerprintInsertion(olm, fingerprint, postures);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default async function migration() {
|
|||||||
"firewallEnabled" boolean DEFAULT false NOT NULL,
|
"firewallEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"autoUpdatesEnabled" boolean DEFAULT false NOT NULL,
|
"autoUpdatesEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"tpmAvailable" 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,
|
"macosSipEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"macosGatekeeperEnabled" boolean DEFAULT false NOT NULL,
|
"macosGatekeeperEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"macosFirewallStealthMode" 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,
|
"firewallEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"autoUpdatesEnabled" boolean DEFAULT false NOT NULL,
|
"autoUpdatesEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"tpmAvailable" 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,
|
"macosSipEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"macosGatekeeperEnabled" boolean DEFAULT false NOT NULL,
|
"macosGatekeeperEnabled" boolean DEFAULT false NOT NULL,
|
||||||
"macosFirewallStealthMode" boolean DEFAULT false NOT NULL,
|
"macosFirewallStealthMode" boolean DEFAULT false NOT NULL,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ CREATE TABLE 'currentFingerprint' (
|
|||||||
'firewallEnabled' integer DEFAULT false NOT NULL,
|
'firewallEnabled' integer DEFAULT false NOT NULL,
|
||||||
'autoUpdatesEnabled' integer DEFAULT false NOT NULL,
|
'autoUpdatesEnabled' integer DEFAULT false NOT NULL,
|
||||||
'tpmAvailable' 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,
|
'macosSipEnabled' integer DEFAULT false NOT NULL,
|
||||||
'macosGatekeeperEnabled' integer DEFAULT false NOT NULL,
|
'macosGatekeeperEnabled' integer DEFAULT false NOT NULL,
|
||||||
'macosFirewallStealthMode' integer DEFAULT false NOT NULL,
|
'macosFirewallStealthMode' integer DEFAULT false NOT NULL,
|
||||||
@@ -83,7 +83,7 @@ CREATE TABLE 'fingerprintSnapshots' (
|
|||||||
'firewallEnabled' integer DEFAULT false NOT NULL,
|
'firewallEnabled' integer DEFAULT false NOT NULL,
|
||||||
'autoUpdatesEnabled' integer DEFAULT false NOT NULL,
|
'autoUpdatesEnabled' integer DEFAULT false NOT NULL,
|
||||||
'tpmAvailable' 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,
|
'macosSipEnabled' integer DEFAULT false NOT NULL,
|
||||||
'macosGatekeeperEnabled' integer DEFAULT false NOT NULL,
|
'macosGatekeeperEnabled' integer DEFAULT false NOT NULL,
|
||||||
'macosFirewallStealthMode' integer DEFAULT false NOT NULL,
|
'macosFirewallStealthMode' integer DEFAULT false NOT NULL,
|
||||||
|
|||||||
@@ -656,17 +656,17 @@ export default function GeneralPage() {
|
|||||||
</InfoSection>
|
</InfoSection>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{client.posture.windowsDefenderEnabled !== null &&
|
{client.posture.windowsAntivirusEnabled !== null &&
|
||||||
client.posture.windowsDefenderEnabled !== undefined && (
|
client.posture.windowsAntivirusEnabled !== undefined && (
|
||||||
<InfoSection>
|
<InfoSection>
|
||||||
<InfoSectionTitle>
|
<InfoSectionTitle>
|
||||||
{t("windowsDefenderEnabled")}
|
{t("windowsAntivirusEnabled")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.windowsDefenderEnabled
|
.windowsAntivirusEnabled
|
||||||
)
|
)
|
||||||
: "-"}
|
: "-"}
|
||||||
</InfoSectionContent>
|
</InfoSectionContent>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import React from "react";
|
|||||||
import { Button } from "@app/components/ui/button";
|
import { Button } from "@app/components/ui/button";
|
||||||
import { Download } from "lucide-react";
|
import { Download } from "lucide-react";
|
||||||
import { FaApple, FaWindows, FaLinux } from "react-icons/fa";
|
import { FaApple, FaWindows, FaLinux } from "react-icons/fa";
|
||||||
|
import { SiAndroid } from "react-icons/si";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import DismissableBanner from "./DismissableBanner";
|
import DismissableBanner from "./DismissableBanner";
|
||||||
@@ -61,6 +62,34 @@ export const ClientDownloadBanner = () => {
|
|||||||
Linux
|
Linux
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="https://pangolin.net/downloads/ios"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
className="gap-2 hover:bg-primary/10 hover:border-primary/50 transition-colors"
|
||||||
|
>
|
||||||
|
<FaApple className="w-4 h-4" />
|
||||||
|
iOS
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="https://pangolin.net/downloads/android"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
className="gap-2 hover:bg-primary/10 hover:border-primary/50 transition-colors"
|
||||||
|
>
|
||||||
|
<SiAndroid className="w-4 h-4" />
|
||||||
|
Android
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
</DismissableBanner>
|
</DismissableBanner>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user