apus security audit

Run this after any config change or before exposing network surfaces:

apus security audit
apus security audit --deep    # attempts a live Gateway check
apus security audit --fix     # apply safe remediations
apus security audit --json

--fix is intentionally narrow: it flips open group policies to allowlists, tightens state/config/include-file permissions (600 files, 700 dirs), and on Windows uses ACL resets instead of POSIX chmod.

What the audit checks (high level)

Each finding has a structured checkId (for example gateway.bind_no_auth, tools.exec.security_full_configured). Prefixes: fs.* (permissions), gateway.* (bind/auth/Tailscale/Control UI/trusted-proxy), hooks.*/browser.*/sandbox.*/tools.exec.* (per-surface hardening), plugins.*/skills.* (supply chain), security.exposure.* (access policy x tool blast radius), security.trust_model.* (shared-context and cross-agent defaults). Full catalog with severity and auto-fix support: Security audit checks. See also Formal Verification.

Priority order when triaging findings

  1. Anything "open" + tools enabled: lock down DMs/groups first (pairing/allowlists), then tighten tool policy/sandboxing.
  2. Public network exposure (LAN bind, Funnel, missing auth): fix immediately.
  3. Browser control remote exposure: treat like operator access (tailnet-only, pair nodes deliberately, no public exposure).
  4. Permissions: state/config/credentials/auth must not be group/world-readable.
  5. Plugins: load only what you explicitly trust.