import type { SecretName } from "../secrets/SecretStore.js"; export type PostureCheckId = "ROOT_UID" | "ROOT_WRITABLE" | "CWD_WRITABLE" | "SA_TOKEN_PRESENT" | "NODE_ENV" | "PROXY_ENV" | "NODE_OPTIONS" | "EXTRA_CA" | "TLS_REJECT_DISABLED" | "KEYLOG" | "INSPECTOR_ACTIVE" | "SECRET_IN_ENV" | "SECRET_FILE_OUTSIDE_DIR" | "SECRET_FILE_MODE" | "SECRET_FILE_OWNER" | "PERMISSION_MODEL_ABSENT" | "PERMISSION_FS_WRITE" | "PERMISSION_CHILD_PROCESS" | "PERMISSION_WORKER" | "GLOBAL_FETCH_UNLOCKED" | "PRINCIPALS_FILE_MODE" | "PRINCIPALS_FILE_OWNER"; /** The checks a deployment may waive by declaring development posture; the rest never are. */ export declare const WAIVABLE_CHECKS: ReadonlySet; /** The checks cheap enough to repeat while running, whose regression is drift. */ export declare const DRIFT_CHECKS: ReadonlySet; /** The environment keys the posture inspects. Their values are never reported. */ export declare const INSPECTED_ENVIRONMENT: readonly ["NODE_ENV", "NODE_OPTIONS", "NODE_EXTRA_CA_CERTS", "NODE_TLS_REJECT_UNAUTHORIZED", "SSLKEYLOGFILE", "HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "NO_PROXY", "NODE_USE_ENV_PROXY", "http_proxy", "https_proxy", "all_proxy", "no_proxy"]; export declare const SERVICE_ACCOUNT_TOKEN = "/var/run/secrets/kubernetes.io/serviceaccount/token"; export interface PostureFinding { readonly id: PostureCheckId; readonly ok: boolean; /** A secret name or a check detail that identifies where, never a value. */ readonly subject?: string; } /** What the checks need to know about the host; a fixture in tests, the process in production. */ export interface PostureFacts { readonly euid: number; readonly egid: number; readonly cwd: string; writable(path: string): boolean; fileStat(path: string): { readonly isFile: boolean; readonly mode: number; readonly uid: number; readonly gid: number; } | null; realpath(path: string): string | null; inspectorActive(): boolean; permission(): { readonly active: boolean; has(scope: string, reference?: string): boolean; }; /** Whether the global `fetch` is the refusing stub the process installs at start. */ globalFetchLocked(): boolean; } /** What the checks need to know about the configuration. */ export interface PostureConfig { readonly production: boolean; /** Present inspected environment keys; absent keys are not listed. */ readonly environment: Readonly>; /** Secrets supplied through the environment rather than a file. */ readonly secretsInEnvironment: readonly SecretName[]; readonly secretFiles: Readonly>>; readonly secretsDir: string | null; /** The principals file, checked for its mode and owner like a secret; it holds digests, not tokens. */ readonly principalsFile: string | null; } export declare function processFacts(): PostureFacts; /** Every check, in a stable order; a finding per check, never a value in it. */ export declare function evaluate(config: PostureConfig, facts: PostureFacts): PostureFinding[]; //# sourceMappingURL=PostureChecks.d.ts.map