security: run Fishnet as dedicated system user for process isolation#45
Open
security: run Fishnet as dedicated system user for process isolation#45
Conversation
…solation AI agents running as the same OS user can read Fishnet's process memory via task_for_pid/ptrace and extract signing keys. No userspace defense (mlock, zeroize, Secure Enclave UserPresence) prevents this. This change uses OS-level user separation as the isolation boundary instead. Key changes: - LaunchAgent → LaunchDaemon running as _fishnet user (macOS) - systemd user service → system service with User=fishnet (Linux) - Drop kSecAccessControlUserPresence from Secure Enclave key — user isolation now protects the key, removing the Touch ID prompt that blocked autonomous signing - Two-phase init: --system-only creates the system user, then full init runs as _fishnet to set up vault/credentials - cmd_stop detects daemon plist and uses launchctl instead of PID - Service install/uninstall use sudo for system-level paths - Linux env file for vault unlock in systemd EnvironmentFile Threat model: root=human, _fishnet=daemon, agent_user=AI agent. Root-as-agent is explicitly unsupported (industry standard). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_fishnetsystem user (macOS) /fishnetuser (Linux) via LaunchDaemon/systemd system service instead of user-level LaunchAgent/systemd user servicekSecAccessControlUserPresencefrom Secure Enclave key — OS user separation now protects the key, enabling fully autonomous signing without Touch ID promptsfishnet initwith--system-onlyflag for clean system user setup before vault initializationfishnet stopusinglaunchctlinstead of PID-based SIGTERMWhy
A rogue AI agent running as the same OS user can read Fishnet's process memory via
task_for_pid()/ptraceand extract signing keys. No userspace defense (mlock, zeroize, Secure Enclave UserPresence) prevents this. OS-level user separation is the only reliable isolation boundary.Threat model
Setup flow
Test plan
cargo check— compiles cleancargo test— 245 tests pass, 0 failuresfishnet service installdry-run prints correct LaunchDaemon plist withUserName=_fishnetfishnet init --system-only --apply-systemcreates_fishnetuser and data dirfishnet stopdetects daemon plist and usessudo launchctl unload🤖 Generated with Claude Code