/**
 * @license
 * Copyright 2026 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
/**
 * The base macOS Seatbelt (SBPL) profile for tool execution.
 *
 * This uses a strict allowlist (deny default) but imports Apple's base system profile
 * to handle undocumented internal dependencies, sysctls, and IPC mach ports required
 * by standard tools to avoid "Abort trap: 6".
 */
export declare const BASE_SEATBELT_PROFILE = "(version 1)\n(deny default)\n\n(import \"system.sb\")\n\n\n; Core execution requirements\n(allow process-exec)\n(allow process-fork)\n(allow signal (target same-sandbox))\n(allow process-info*)\n\n(allow file-write-data\n  (require-all\n    (path \"/dev/null\")\n    (vnode-type CHARACTER-DEVICE)))\n\n; sysctls permitted.\n(allow sysctl-read\n  (sysctl-name \"hw.activecpu\")\n  (sysctl-name \"hw.busfrequency_compat\")\n  (sysctl-name \"hw.byteorder\")\n  (sysctl-name \"hw.cacheconfig\")\n  (sysctl-name \"hw.cachelinesize_compat\")\n  (sysctl-name \"hw.cpufamily\")\n  (sysctl-name \"hw.cpufrequency_compat\")\n  (sysctl-name \"hw.cputype\")\n  (sysctl-name \"hw.l1dcachesize_compat\")\n  (sysctl-name \"hw.l1icachesize_compat\")\n  (sysctl-name \"hw.l2cachesize_compat\")\n  (sysctl-name \"hw.l3cachesize_compat\")\n  (sysctl-name \"hw.logicalcpu_max\")\n  (sysctl-name \"hw.machine\")\n  (sysctl-name \"hw.model\")\n  (sysctl-name \"hw.memsize\")\n  (sysctl-name \"hw.ncpu\")\n  (sysctl-name \"hw.nperflevels\")\n  (sysctl-name-prefix \"hw.optional.arm.\")\n  (sysctl-name-prefix \"hw.optional.armv8_\")\n  (sysctl-name \"hw.packages\")\n  (sysctl-name \"hw.pagesize_compat\")\n  (sysctl-name \"hw.pagesize\")\n  (sysctl-name \"hw.physicalcpu\")\n  (sysctl-name \"hw.physicalcpu_max\")\n  (sysctl-name \"hw.logicalcpu\")\n  (sysctl-name \"hw.cpufrequency\")\n  (sysctl-name \"hw.tbfrequency_compat\")\n  (sysctl-name \"hw.vectorunit\")\n  (sysctl-name \"machdep.cpu.brand_string\")\n  (sysctl-name \"kern.argmax\")\n  (sysctl-name \"kern.hostname\")\n  (sysctl-name \"kern.maxfilesperproc\")\n  (sysctl-name \"kern.maxproc\")\n  (sysctl-name \"kern.osproductversion\")\n  (sysctl-name \"kern.osrelease\")\n  (sysctl-name \"kern.ostype\")\n  (sysctl-name \"kern.osvariant_status\")\n  (sysctl-name \"kern.osversion\")\n  (sysctl-name \"kern.secure_kernel\")\n  (sysctl-name \"kern.usrstack64\")\n  (sysctl-name \"kern.version\")\n  (sysctl-name \"sysctl.proc_cputype\")\n  (sysctl-name \"vm.loadavg\")\n  (sysctl-name-prefix \"hw.perflevel\")\n  (sysctl-name-prefix \"kern.proc.pgrp.\")\n  (sysctl-name-prefix \"kern.proc.pid.\")\n  (sysctl-name-prefix \"net.routetable.\")\n)\n\n(allow sysctl-write\n  (sysctl-name \"kern.grade_cputype\"))\n\n\n(allow mach-lookup\n  (global-name \"com.apple.sysmond\")\n)\n\n; IOKit\n(allow iokit-open\n  (iokit-registry-entry-class \"RootDomainUserClient\")\n)\n\n(allow mach-lookup\n  (global-name \"com.apple.system.opendirectoryd.libinfo\")\n)\n\n; Needed for python multiprocessing on MacOS for the SemLock\n(allow ipc-posix-sem)\n\n(allow mach-lookup\n  (global-name \"com.apple.PowerManagement.control\")\n)\n\n; PTY and Terminal support\n(allow pseudo-tty)\n(allow file-read* file-write* file-ioctl (literal \"/dev/ptmx\"))\n(allow file-read* file-write*\n  (require-all\n    (regex #\"^/dev/ttys[0-9]+\")\n    (extension \"com.apple.sandbox.pty\")))\n(allow file-ioctl (regex #\"^/dev/ttys[0-9]+\"))\n\n; Allow basic read access to system frameworks and libraries required to run\n(allow file-read*\n  (subpath \"/System\")\n  (subpath \"/usr/lib\")\n  (subpath \"/usr/share\")\n  (subpath \"/usr/bin\")\n  (subpath \"/bin\")\n  (subpath \"/sbin\")\n  (subpath \"/usr/local/bin\")\n  (subpath \"/opt/homebrew\")\n  (subpath \"/Library\")\n  (subpath \"/private/var/run\")\n  (subpath \"/private/var/db\")\n  (subpath \"/private/etc\")\n)\n\n; Allow read/write access to temporary directories and common device nodes\n(allow file-read* file-write*\n  (literal \"/dev/null\")\n  (literal \"/dev/zero\")\n  (subpath \"/tmp\")\n  (subpath \"/private/tmp\")\n  (subpath (param \"TMPDIR\"))\n)\n\n; Workspace access using parameterized paths\n(allow file-read*\n  (subpath (param \"WORKSPACE\"))\n)\n\n";
/**
 * The network-specific macOS Seatbelt (SBPL) profile rules.
 *
 * These rules are appended to the base profile when network access is enabled,
 * allowing standard socket creation, DNS resolution, and TLS certificate validation.
 */
export declare const NETWORK_SEATBELT_PROFILE = "\n; Network Access\n(allow network-outbound)\n(allow network-inbound)\n(allow network-bind)\n\n(allow system-socket\n  (require-all\n    (socket-domain AF_SYSTEM)\n    (socket-protocol 2)\n  )\n)\n\n(allow mach-lookup\n    (global-name \"com.apple.bsd.dirhelper\")\n    (global-name \"com.apple.system.opendirectoryd.membership\")\n    (global-name \"com.apple.SecurityServer\")\n    (global-name \"com.apple.networkd\")\n    (global-name \"com.apple.ocspd\")\n    (global-name \"com.apple.trustd.agent\")\n    (global-name \"com.apple.mDNSResponder\")\n    (global-name \"com.apple.mDNSResponderHelper\")\n    (global-name \"com.apple.SystemConfiguration.DNSConfiguration\")\n    (global-name \"com.apple.SystemConfiguration.configd\")\n)\n\n(allow sysctl-read\n  (sysctl-name-regex #\"^net.routetable\")\n)\n";
