Repository navigation
Hyperspace CLI v5.95.0 (the machine defends itself — day-scale detection, platform posture, protections actually connected)
Latestcli-v5.95.0 — the machine defends itself
67 commits since 5.94.0. Hyperspace now watches the host it runs on, not only the agents it spawns — and several protections that existed on paper are now actually connected.
Detection that survives patience
- Day-scale behaviour. Every behavioural detector was tuned for bursts (>20 calls in 10s, >10 tools in 30s) and the rules window covered about three hours. An agent that simply goes slowly tripped none of it.
long_horizonkeeps 24 hourly counters per agent and fires on volume spread across many hours, which is what separates a campaign from a productive afternoon. - Refused work as a signal. avmd counted three consecutive blocks and never asked what fraction of an agent's work was being refused over a long stretch. A sustained refusal rate is the signature of automated probing: an operator who keeps getting blocked stops and asks why; a search process does not.
- Severity that reflects what happened. Findings carry an
effective_severitythat escalates when a correlation actually spanned identities or blew through its threshold, because an alert graded like a routine one gets triaged like a routine one.
Rules you can write, and correlation across agents
- Detections are now data: drop a file in
~/.hyperspace/avm-rules.d/, no rebuild. Override a shipped rule by id with a version at least as high; a lower version is refused and reported, so a stale copy cannot silently downgrade a detection. - Cross-agent scope. Every existing detector keys on one
agent_id, so "agent A read the secret, agent B sent it" was invisible to all of them. Rules may require a match to span distinct identities — which matters because registering a new agent resets every per-agent baseline to zero. - Findings land in the hash-chained audit log carrying the sequence numbers that produced them, so tampering with a finding breaks the same verification as tampering with an event.
The machine's own defenses
security_posturereads SIP, Gatekeeper, FileVault, the application firewall and XProtect. macOS ships antivirus; nothing here was checking it was on.- Tampering is refused. Not one of
csrutil,spctl,fdesetup,globalstateorcom.apple.quarantineappeared anywhere in avmd before. Disabling Gatekeeper or SIP is now blocked — includingxattr -d com.apple.quarantine, which launders a download past Gatekeeper while leaving every global setting looking clean. Reading posture (csrutil status) stays allowed; a detector that refuses to let you inspect a setting teaches people to switch it off. - Persistence watch. LaunchAgents, LaunchDaemons, login items, cron, systemd units and shell rc files are fingerprinted, so a size-preserving in-place edit — hijacking an entry that is already trusted — is caught, while a bare
touchis not. The first sweep only records a baseline.
Ingress
- Typosquat detection as gate 0 of every install. The existing gates all reason about the package you asked for; none noticed you asked for the wrong one. A typosquat's provenance and lockfile hashes are perfectly valid — for the wrong package. Ecosystem names (
react-dom,yargs-parser) are exempted, and very short names are not distance-matched at all. quarantine_scaninspects where bytes land, reusing the existing shape analysis and adding the one signal it lacked: whether the file will be run. A high-entropy blob is a bundle; the same blob with an executable bit is a different claim. It reports only — nothing is moved or deleted.agents_scanfinds the AI agents on the host that avmd does not govern, and the credential files they leave on disk.
Peer credentials, guarded at the layer that can tell the difference
codex reading ~/.codex/auth.json is a process reading its own credentials. A script reading the same file is exfiltration. Same bytes, different acts.
A filesystem deny cannot separate them: a Seatbelt profile applies to the whole process tree, and run_command execs SHELL -c <command>, so codex exec … arrives as a grandchild wearing the agent's box. A deny there stops codex authenticating at all.
So the guard sits where intent is legible. A tool loading its own token does so inside the process and never presents a path; anything exfiltrating it has to name the file. avmd sees the command string, and blocks the second while never firing on the first. Your own secrets — .ssh, .aws, .gnupg, Keychains — remain denied in the sandbox profile.
Fixes
- Per-agent state outlived every agent, forever. Six global maps had correct cleanup functions reachable only from an RPC nothing called. Two of those made it a security matter, not just memory: a network capability or standing tool approval outliving its agent is a grant in force for a principal that no longer exists.
- Two test suites were suppressing real detection. A test raised a threshold via a process-global env var while the rest of the suite ran in parallel, so
OversizedRootFilenever fired — and with it every critical escalation in that module. The suppressed detection looked exactly like a passing suite. - The release script can no longer silently drop things a release must contain: prism assets are carried forward from the previous release rather than skipped, and a missing
thordfails the cut instead of printing a warning nobody reads.hyperspace-tui,hyandhy-memoryship again after being bundled from a dead build-box path.
Not in this release, deliberately
The egress wall is built and not armed. avmd's ACL is correct — default-deny, private ranges and cloud metadata refused, enforced at CONNECT — and the sandbox profile can deny everything except a loopback proxy so an agent ignoring HTTPS_PROXY reaches nothing.
Arming it would break every install. The default allowlist permits two hosts, while the CLI needs huggingface.co, github.com, download.pytorch.org, agents.hyper.space and more just to fetch models, take updates and join the network. And confined children inherit an environment carrying no HTTPS_PROXY, so they would attempt direct connections and be refused by the kernel — reaching nothing at all, including the two hosts that are allowed.
Either alone is a total loss of agent networking. The machinery and its tests ship; two tests pin the invariant and carry the checklist for arming it, one of which fails deliberately once the allowlist grows.
Verified on the built binary
pod dissolve parks rather than executes; a shell-metacharacter argument arrives as one literal argv entry and nothing is executed; /api/v1/corpus and /api/v1/schedules answer 200; the CLI registry reports 1592 commands. Linux binaries were executed on real x86_64 hardware, not merely cross-compiled.
avmd
2.1.3 → 2.8.0.