physical.ScriptKindtypeno test imports ittype ScriptKind = "posix" | "windows";The system a script is for.
The probe's two scripts, as text: a POSIX shell script for Linux and macOS and a PowerShell script for Windows. Each answers facts, version and one osquery SELECT and refuses everything else, reads only, listens on nothing and needs no root. They are shipped with the library as files and read here, so that what is installed on a machine is exactly what was reviewed.
import { probeScript } from "./scripts.ts";
(await probeScript("posix")).startsWith("#!/bin/sh"); // truephysical.ScriptKindtypeno test imports ittype ScriptKind = "posix" | "windows";The system a script is for.
physical.probeScriptfunctionno test imports itfunction probeScript(kind: ScriptKind): Promise<string>The text of the probe script for a system.
physical.posixScriptPathfunctionno test imports itfunction posixScriptPath(): stringThe path of the POSIX script in the library, for a test or an installer that copies the file.
ScriptKindtypeno test imports ittype ScriptKind = "posix" | "windows";The system a script is for.
probeScriptfunctionfunction probeScript(kind: ScriptKind): Promise<string>The text of the probe script for a system.
posixScriptPathfunctionfunction posixScriptPath(): stringThe path of the POSIX script in the library, for a test or an installer that copies the file.