mirror of
https://github.com/fleetdm/fleet
synced 2026-05-18 14:38:53 +00:00
# Changes I'm running orbit based osqueryd on a laptop with [Tuxedo OS](https://www.tuxedocomputers.com/en/TUXEDO-OS_1.tuxedo#). This OS identifies its platform via osquery as `tuxedo` and is therefore not recognized by the Fleet server: ```json { "err": "unrecognized platform", "hostID": 76, "level": "error", "platform": "tuxedo", "ts": "2024-05-15T13:17:34.513509387Z" } ``` This causes policy and scheduled queries to not being run on my system. With this PR Im adding `tuxedo` to all occurrences found when searching for `kali`. Additionally pre-commit checks were failing for me locally as it could not find the hook-id `RuboCop`. This could be solved by using `rubocop` instead. Afterwards all pre-commit checks succeeded locally. # Checklist for submitter - [x] Added/updated tests Signed-off-by: Andreas Ulm <andreas.ulm@prisma-capacity.eu>
80 lines
2.1 KiB
TypeScript
80 lines
2.1 KiB
TypeScript
export type OsqueryPlatform =
|
|
| "darwin"
|
|
| "macOS"
|
|
| "windows"
|
|
| "Windows"
|
|
| "linux"
|
|
| "Linux"
|
|
| "chrome"
|
|
| "ChromeOS";
|
|
|
|
export type SupportedPlatform = "darwin" | "windows" | "linux" | "chrome";
|
|
|
|
export const SUPPORTED_PLATFORMS: SupportedPlatform[] = [
|
|
"darwin",
|
|
"windows",
|
|
"linux",
|
|
"chrome",
|
|
];
|
|
export type SelectedPlatform = SupportedPlatform | "all";
|
|
|
|
export type SelectedPlatformString =
|
|
| ""
|
|
| SupportedPlatform
|
|
| `${SupportedPlatform},${SupportedPlatform}`
|
|
| `${SupportedPlatform},${SupportedPlatform},${SupportedPlatform}`
|
|
| `${SupportedPlatform},${SupportedPlatform},${SupportedPlatform},${SupportedPlatform}`;
|
|
|
|
// TODO: revisit this approach pending resolution of https://github.com/fleetdm/fleet/issues/3555.
|
|
export const MACADMINS_EXTENSION_TABLES: Record<string, OsqueryPlatform[]> = {
|
|
file_lines: ["darwin", "linux", "windows"],
|
|
filevault_users: ["darwin"],
|
|
google_chrome_profiles: ["darwin", "linux", "windows"],
|
|
macos_profiles: ["darwin"],
|
|
mdm: ["darwin"],
|
|
munki_info: ["darwin"],
|
|
munki_install: ["darwin"],
|
|
// network_quality: ["darwin"], // TODO: add this table if/when it is incorporated into orbit
|
|
puppet_info: ["darwin", "linux", "windows"],
|
|
puppet_logs: ["darwin", "linux", "windows"],
|
|
puppet_state: ["darwin", "linux", "windows"],
|
|
macadmins_unified_log: ["darwin"],
|
|
};
|
|
|
|
/**
|
|
* Host Linux OSs as defined by the Fleet server.
|
|
*
|
|
* @see https://github.com/fleetdm/fleet/blob/5a21e2cfb029053ddad0508869eb9f1f23997bf2/server/fleet/hosts.go#L780
|
|
*/
|
|
export const HOST_LINUX_PLATFORMS = [
|
|
"linux",
|
|
"ubuntu",
|
|
"debian",
|
|
"rhel",
|
|
"centos",
|
|
"sles",
|
|
"kali",
|
|
"gentoo",
|
|
"amzn",
|
|
"pop",
|
|
"arch",
|
|
"linuxmint",
|
|
"void",
|
|
"nixos",
|
|
"endeavouros",
|
|
"manjaro",
|
|
"opensuse-leap",
|
|
"opensuse-tumbleweed",
|
|
"tuxedo",
|
|
] as const;
|
|
|
|
/**
|
|
* Checks if the provided platform is a Linux-like OS. We can recieve many
|
|
* different types of host platforms so we need a check that will cover all
|
|
* the possible Linux-like platform values.
|
|
*/
|
|
export const isLinuxLike = (platform: string) => {
|
|
return HOST_LINUX_PLATFORMS.includes(
|
|
platform as typeof HOST_LINUX_PLATFORMS[number]
|
|
);
|
|
};
|