MINUS runs on a single-user workstation, keeps personal memory on disk, holds API keys, and can run tools: a coding shell, torrent ingest, and a Windows guest that detonates untrusted files. This file records what is defended, how, and what is explicitly not guaranteed. When a change weakens a control here, that change needs a reason in its description.
- Every secret is read from the environment or
.env:OPENROUTER_API_KEY/MINUS_LLM_API_KEY, the three Google values,MINUS_QBITTORRENT_PASSWORD,MINUS_AIRVPN_PASSWORD,MINUS_WINDOWS_WINRM_PASSWORD. None of them is ever written by the dashboard (SECRETSincontrol/config_control.pyis a deny-list for both reads and writes), logged, or returned inget_config. - MINUS drives AirVPN's own suite (bluetit + goldcrest) when credentials are
configured, and still verifies the kernel route before any fetch. The password
is redacted from every client output and error; the client command is allowed a
passwordless
sudo -nretry through one sudoers drop-in because a freshairvpngroup is not in the current login session. .envis rewritten atomically at 0600 (services/env_file.py); a value that was never set is never invented.- Exposed secrets are rotated by the owner, not patched around: treat any value pasted into a chat, a shell history or a log as burned.
| data | mode |
|---|---|
memory/** JSON (transcripts, condensed, deep notes, coding sessions) |
0600, directories 0700 |
logs/** run and console logs (they contain transcripts) |
0600, directory 0700 |
memory/semantic_memory.db, quarantine/**, library/** |
0600 (JSON manifests; SQLite follows umask) |
.env |
0600, atomic replace preserving mode on rewrite |
| control socket | 0600 inside a 0700 parent; doubles as the single-instance lock |
| guest unattended install file | 0600, deleted in finally |
write_json sets the mode on the temporary file before the rename, so a file is
never visible with looser permissions than intended.
minus doctor (and minus doctor --json) prints the effective posture without
secrets and lists every dangerous condition in full sentences: provider endpoint
and whether a key is configured (never the key), VPN enforcement state, sandbox
availability and reason, plugin/memory status, control-socket and storage
permissions, and each risky flag. It is read-only and makes no network calls.
- qBittorrent is the downloader, so its binding is what is verified. The
preflight reads
current_network_interfacefrom qBittorrent's own/api/v2/app/preferencesand requires an exact match withMINUS_QBITTORRENT_VPN_INTERFACE; a mismatch, an empty preference, or no configured interface refuses the fetch. Per-user policy routing (the download user routed through a tunnel) cannot be proven from outside, which is why the client's own interface binding is the check and why binding it in qBittorrent as well is the recommended defence in depth. The host-route check (MINUS_VPN_INTERFACE) remains for setups where MINUS itself fetches. - VPN preflight is fail-closed. With
MINUS_REQUIRE_VPN_FOR_TRIAGEon (the default),TriagePipeline.downloadrefuses unlessMINUS_VPN_INTERFACEis set, the link is up, andip route get 1.1.1.1leaves through that interface. Enforcement on with no interface named is a refusal, not a pass. - Discovery results are attacker-influenced input.
triage/discovery.pyqueries public indexes and ranks what they return; its title, seed-count, "verified" and virus-score signals are a pre-filter for picking what to quarantine, never evidence that a file is safe. The selected magnet still goes throughdownload→scan→verdict, and auto-promotion is only reachable on acleanlabel. An empty or failing provider is reported, not guessed around.MINUS_DISCOVERY_ENABLED=falseremoves search entirely and leaves the typed-magnet path unchanged. - A Windows detonation is Windows-only. The guest launches Windows shapes
(
.exe,.bat,.ps1,.msi,.lnk,.scr,.com) and, in review mode, opens everything else with a Windows application — VLC for video (Windows Media Player when VLC is absent), Paint for images, Notepad for text, the shell association otherwise. A movie opened by a player is a real parser path and counts as a detonation when an explicit handler stays alive; the shell-association dialog is never counted, and a missing CD or an unopened kept file keeps the review incomplete. It is still a Windows parser path: the guest never runs ELF, Mach-O, Linux scripts, or.jarfiles.TriagePipeline.promotetherefore refuses acleanverdict when the staged tree contains those Linux-active files, even if another artifact was opened or detonated. They need a Linux-side detonation or manual quarantine review; a Windows-clean label is not proof they are safe on this host. - Manual release is explicit, passive-only and requires VM evidence.
triage reviewshows the static facts and runsffprobeover up to five media files under bubblewrap, with read-only input and no network; that is parser evidence, not a detonation, and it cannot satisfy the manual-release gate.triage promote --accept-reviewreleases only aneeds_reviewverdict whose files are passive media/text and whose static/airlock flags contain no executable, script, archive, document or other active content, and only whenverdict.jsonorvm_review.jsonrecordssandbox.detonatedorsandbox.opened > 0from the Windows guest. A dry run, a host-only scan, or--no-detonateis refused, and the error namesminus triage vm. Its provenance records the accepting user, UTC time, reason,detonatedandvm_reviewed: true.suspicious,maliciousand active-content payloads are never releasable this way. The model-facingtriage_promotetool can passaccept_reviewandreason, and the same evidence requirement applies to it. - The guest has no route anywhere. The QEMU NIC is
-netdev user,restrict=onplus a host→guest WinRM forward; QEMU's own documentation states the guest cannot contact the host and no guest packet is routed out, while forwarding rules are unaffected. In detonation mode artifacts are pushed and the report is pulled over WinRM; in review mode artifacts travel on a read-only ISO/CD that QEMU mounts withreadonly=on. Either way there is no guest→host connection at all. - No host filesystem in the guest. No shared folders, no SMB, no 9p. The base image is immutable; each run gets a throwaway qcow2 overlay that is deleted with the run directory. Review mode's ISO is a read-only second CD, not a share: the guest copies files into its own overlay and anything not kept is moved to a guest-side graveyard inside that overlay, which dies with the run.
- Untrusted filenames are sanitised before they become guest paths: a torrent
can name a file
..\..\Windows\x, and on Windows a backslash is a separator. Only[A-Za-z0-9._-]survives, with a numeric prefix that also rules out reserved device names. The ISO's ISO9660 names are reduced toA-Z0-9_, while the sanitised name rides in Joliet for Windows to display. - Released content is Jellyfin-ready and least-privilege:
library/is flat and MP4-only —library/<movie>.mp4, 0644 files in a 0755 directory, no group/write bits, an atomic publish (each selected file is copied and fsynced into a hidden staging directory, then renamed into place), and no-clobber suffixes. A selected.mkv, audio file or document is not copied; a promotion with no.mp4is refused. The 0600 provenance JSON lives outside the library atmemory/library_provenance/<slug>.provenance.json, so a media scanner sees only videos. The staged host tree is deleted after a successful promotion. - Bounded input: detonation uploads are bounded by
MINUS_WINDOWS_MAX_ARTIFACT_BYTES, per file and in total; anything over it is skipped and named in the verdict's notes, never silently dropped. Review mode instead refuses before building the ISO when a single file exceeds the ISO9660 level-3 per-file limit (just under 4 GiB) or the work volume lacks the image space plusMINUS_WINDOWS_MIN_FREE_BYTES.
Full Windows detonation needs qemu plus ~30 GiB of image, which this class of machine may
not have. triage/airlock.py is the no-execution alternative:
- static checks over the staged tree: private/executable permission flags, zip member path traversal, expansion bombs (size or ratio), encrypted archives, oversized archives and member-count/tree-size caps (so a hostile torrent cannot make the inspection the denial of service), corrupt-archive notes, and which malware engines (ClamAV/YARA) are present (absence is reported, never assumed clean);
run_isolated(root, argv)wraps anything that must run inbwrap --unshare-all(network, user, pid namespaces), read-only system binds, the staged tree read-only at/input, no host home, all capabilities dropped (--cap-drop ALL);- staging now strips the executable bit and forces 0600 files / 0700
directories before anything is inspected. A verdict still cannot be
cleanwithout a detonation, so promotion stays refused until a real guest exists. - The model review is advisory but asymmetric.
triage/review.pyreads code-shaped text files under caps and asks the configured model what they would do. The prompt treats every byte as data, not instructions, but prompt injection is still possible; that is why the review can only escalate. Amaliciousread deletes immediately,highis suspicious, andmediumor a failed review blockscleanrather than being treated as innocent. - Malicious verdicts delete the payload immediately (
MINUS_TRIAGE_DELETE_MALICIOUS, default on): the staged tree is removed in onermtree, aCRITICALline names the torrent and the reasons, and the scan result carries analertstring. The verdict survives as a 0600 record underquarantine/rejected/containing the hash, reasons and file names — never the bytes. - Auto-cleanup deletes the download only after a verdict.
MINUS_TRIAGE_AUTO_CLEANUP(default on) asks qBittorrent to remove the torrent and the files it downloaded once a promotion has succeeded — acleanrelease, or a manual--accept-reviewwhose provenance (operator, UTC time, reason,detonated,vm_reviewed: true) is already written undermemory/library_provenance/— or amaliciousverdict has been rejected. It never deletes before a verdict exists, and it keeps the download forneeds_reviewandsuspicious, which are exactly the states a human is meant to inspect and possibly release. A failed qBittorrent call is logged and does not undo the promotion or rejection. This changes only what happens to the duplicate copy; the trust boundary is unchanged — discovery is still a pre-filter and only a verdict can promote. - Boundary, stated plainly: without the Windows guest configured, storing a
file is inert; nothing in the airlock path executes Windows binaries (no
Wine/VM), so a PE cannot run, and the verdict stays
needs_review.run_isolatedis namespace containment, not a VM — kernel bugs remain in scope, and the downloader's own parser (qBittorrent/libtorrent) is attack surface MINUS does not sandbox. Keep qBittorrent updated, bind its WebUI to loopback, and mount quarantinenoexec,nosuid,nodevif the filesystem allows it. torrent_addaccepts only magnet/HTTP(S) strings — never a local path — so MINUS cannot be handed a file to seed; qBittorrent uses its own configured save path.
minus secrets-scanwalks the repository (skipping venvs, caches, runtime data) and reports key-shaped findings aspath:line kindwithout ever printing the match. Credential fields onSettingsarerepr=False, so a traceback or log line cannot leak them.minus doctorreports listening sockets fromss -ltnand flags public binds, plus every dangerous posture item.
minus mcp is a local stdio process with the user's privileges; it is not a
sandbox. It exposes the same registry the assistant uses, so the workspace
confinement, VPN gate, quarantine staging and promotion rule all still apply.
escalate and the coding tools are not exposed: one needs a live conversation,
the other needs an approval UI the client does not have. stdout carries only
JSON-RPC; logs go to stderr and the run log.
- Tool arguments are validated against generated schemas before the body runs
(
tools/registry.py); a disabled tool cannot be dispatched. - Coding tools are confined to the session workspace by
resolve_workspace_path(resolve before containment), which rejects absolute paths,.., and symlinks out. minus codegates every write/patch/shell behindApprovalRequest;--yes(auto-approve) is explicit, and a non-TTY without it is refused. Run--yesonly in a disposable workspace.- Lua plugins are off by default (
MINUS_PLUGINS_ENABLED=false).luparuns Lua in-process with no instruction or memory limit; removingos/io/requireprevents accidents, not an adversary. Enabling a plugin directory is equivalent to running its code with your account. - Prompt injection is real: torrent names, file contents, logs and web text can steer the model. The guards are the tool schema, the approval gate, the workspace confinement and the VPN gate — not the model's judgement.
- The guest is treated as hostile. Keep KVM/QEMU patched; the hypervisor is the isolation boundary and MINUS cannot add to it.
- Defender runs with
-DisableRemediationso evidence survives; the guest is discarded afterwards regardless. Sysmon is optional but preferred: the base image installs it fromminus vm-image --sysmon-zip, and without it the harness polls processes, TCP connections and theRunkeys instead. Polling sees less; it does not turn "nothing observed" into proof. - A verdict is evidence, not a guarantee.
cleanmeans "detonated and nothing was observed", never "safe". For a reviewed movie that means the guest's player opened the container and telemetry recorded no suspicious process, network, file or registry activity — exactly the parser a user's Windows machine would use, but still one guest, one build and one time window. Promotion refuses anything else. - Never detonate on the host, and never mount the library into the guest.
- Keep the guest's one network device restricted. The runner uses QEMU's
user,restrict=onNIC with a single host→guest WinRM forward; do not bridge it or add a host share, SMB or 9p mount for convenience. The guest is assumed compromised by the sample it runs, so any route out of it is a route from malware to the network MINUS was careful to keep it off. - Only official Microsoft media builds the guest. An official Windows 10 Enterprise LTSC
(or Enterprise Evaluation) x64 ISO is the input to
minus vm-image; trimmed builds such as "Tiny11" or "Lean11" are not acceptable whatever their size. They remove Defender, WinRM, PowerShell and often Sysmon — the baseline controls and the only control channel — so a sample that looks inert in one would not have been given a fair chance to act, and thecleanverdict it produced would be meaningless. - The guest's hardware is chosen to be boring. SeaBIOS, an IDE disk and an e1000 NIC all have Windows 10 in-box drivers, so the image can be built from official media with no OVMF/UEFI firmware, no emulated TPM and no virtio-win ISO. Fewer third-party drivers in the build path means fewer things that can fail silently before the sample ever runs; speed is not the requirement for a minutes-long detonation, and an optional virtio-win ISO exists only for whoever wants it.
- Image and run directories need an ext4 volume. The base image is a 64 GiB sparse qcow2,
~20–30 GiB of real blocks once Windows is installed. Keep
MINUS_WINDOWS_BASE_IMAGE,MINUS_WINDOWS_WORK_DIRon ext4 (the ~62 GiB root is fine) rather than on an NTFS volume shared with Windows: a hibernated or Fast-Startup NTFS still has Windows' journal open, so letting Linux replay it write-access corrupts the filesystem for both systems. If NTFS is unavoidable, disable Fast Startup and shut Windows down fully first, and treat it as temporary.MINUS_WINDOWS_MIN_FREE_BYTES(default 20 GiB) is checked before a run starts; the Windows ISO can be deleted once the base image exists, but the base image cannot.
- Transcripts and facts go to the configured model provider on every turn. That is the product, and it is worth knowing: a self-hosted endpoint is the only way to keep prompts local.
- A direct provider key (
MINUS_LLM_BASE_URL) changes who sees them.
- The Lua sandbox is not a security boundary (see above).
- The control socket is unauthenticated by design; it is protected by filesystem permissions on a 0700 directory and by the single-instance probe.
- A compromised user account, or any process running as that user, can read the
API keys in
.envand the memory database. - No audit log exists for tool calls beyond the run log.