Repository navigation
GuardFil v0.1.0-alpha.3
Pre-releaseThird alpha release · 2026-11-21 · GNU AGPL v3
GuardFil runs supported AI coding agents in a constrained executor and applies
owner policy to their shell, file and tool requests. This source release builds
on v0.1.0-alpha.2 with hardening for the mediated
workspace filesystem, executor raw-mount admission and runtime snapshotting,
session cleanup, starter-policy coverage and Go spending-ledger durability
error handling. It is for a single user on a Linux machine with Docker; the
quickstart builds the local container image, and no prebuilt binaries or
registry images are attached.
Install
You need Linux (kernel 5.6+) with FUSE 3 (user_allow_other enabled in
/etc/fuse.conf), Docker with Compose, Python 3.11+, and the native agent you
want to run installed on the host. CI tested Codex 0.166.0 and Claude Code
2.1.318. Other versions are not covered by this release's native-agent
evidence.
echo user_allow_other | sudo tee -a /etc/fuse.conf
git clone --branch v0.1.0-alpha.3 --single-branch https://github.com/reviaro/GuardFil.git
cd GuardFil
deployments/local/guardfil-local.sh check
deployments/local/guardfil-local.sh init --ui activeContinue with the README quickstart to add a
host-only provider key, start GuardFil and run an agent. Provider requests
cost money and are subject to the spending ledger; each provider starts with
its own $2.00 ceiling.
Upgrading from alpha.2
- Run
deployments/local/guardfil-local.sh upto rebuild the service container
image and extract updatedguardfil-broker,guardfil-mcp-proxyand
guardfil-workspacehelpers. - Existing installations keep their customized
$GF_HOME/config/policy.yaml.
Explicitly merge the five new starter host-run deny rules
(block-host-run-devcontainer-file,block-host-run-mise-local,
block-host-run-mise-dot-local,block-host-run-mise-config,
block-host-run-mise-config-plain) and updateblock-workspace-dotfiles
(/workspace/**/.codex/**) andblock-workspace-claude-settings
(/workspace/**/.claude/**) forcodex-agentand any named--agent
principals. See the
starter policy walkthrough
and host setup and existing policies. - Keep extra raw mounts free of hard-linked files and separate from workspace
storage (including storage mounted beneath the workspace); the executor now
refuses such mounts before launch.
New since alpha.2
- Mediated workspace hardening. Cycle-bearing directory symlinks (such as
self -> .or multi-link cycles) are refused on traversal (ELOOP), symlink
caching is disabled, and non-cyclic symlink alias expansion is bounded
(1,024 names) and fails closed. Relative symlink targets containing..
after a normal component are refused on creation and move. New entries, links
and rename destinations are enforced across every visible bind alias of the
parent directory. Symlink scans prune excluded non-storage mounts (such as
/proc) so an excluded sibling mount does not block ordinary workspace
storage. - Executor raw-mount admission and runtime snapshotting. Codex, Claude Code
and Python launchers copy only the required executables into a private
per-sessionruntime_bindirectory (checked on the opened descriptor, fresh
single-link inodes) instead of mounting the host binary directory; snapshots
are removed on stop, and stale snapshots from killed launchers are swept on
the next Codex or Claude Code launch once no container of that session
remains.Executor.startvalidates additional raw mounts before starting
the workspace view or any container, refusing mounts with hard-linked
regular files (up to 1,024 inspected entries) or direct/nested
/proc/self/mountinfobind aliases of workspace storage (including storage
mounted beneath the workspace). - Session cleanup reliability. Cleanup runs each teardown step
independently, keeps failed owner-session revocations retryable, awaits
broker shutdown, confirms container exit before removing the workspace view,
and reports every failure. - Starter-policy coverage. Added deny rules for
.devcontainer.json,
mise.local.toml,.mise.local.toml,.mise/**andmise/**, and
broadened.codex/**and.claude/**blocks to match nested directories. - Ledger durability error handling. The Go spending ledger propagates
directory-sync, short-write and completion-witness unlink errors and disables
handles after failure, backed by deterministic fault-injection and
reopening tests.
Everything in alpha.2 is still included.
Verification
This release runs all three hosted CI jobs (verify, escape-suite,
quickstart) visible on the repository's Actions page:
- Full Go format check,
go mod verify,go vet, unit tests and race tests
(including deterministic Go ledger write, sync, close and rename failure and
reopening tests), fail-closed verification, API gateway end-to-end, headless
CLI/owner-approval/Python-client checks, and the isolated reproducibility
build gate. - 141 Python unit tests covering executor isolation, raw-mount admission,
executable snapshotting, session cleanup, workspace configuration, agent
identity and red-team helpers. - 5 real Docker bind-mount admission checks
(deployments/local/test_mount_alias_binds.py --docker). - 32 filesystem tests in
internal/workspacefsunderGUARDFIL_FUSE_TEST=1
(including 9 security regression tests for symlink cycles, semantic..
targets, bind-alias destinations and local-only privacy propagation), plus the
root-only nested storage and bind-mount test
(TestMountedStorageMountsAndBindAliases) underGUARDFIL_MOUNT_TEST=1on
CI. - 27 executor escape cases, 11 headless Python-runtime checks in the real
executor, scripted Codex and Claude Code red-team and command-rule suites,
and the clean-runner README quickstart check.
These checks use scripted provider stand-ins or mocks on Ubuntu 24.04 CI
runners. They are bounded evidence, not a new live-model run or a complete
security audit; the last live-model runs predate the alpha releases, and no
paid provider calls were needed ($0 spend).
Known limits
- Local, single-user deployment. The quickstart UI uses loopback HTTP.
Remote hosting and SSO are outside this alpha's scope. - Host setup.
user_allow_otheris a host-wide FUSE option that needs an
administrator. Only Linux is supported. - Commands. An allowed program can still run its own code. Command rules
match what GuardFil can resolve from the command line. - Model provider. Data the agent may read can be sent to the model
provider unless its path is local-only. Local-only access stops cloud turns;
it does not switch to a local model or recall data already sent. Directory
listings and lookups count as access. - Filesystem and raw mounts. Escaping links, cycle-bearing directory
symlinks, relative link targets with..after a normal component, device
nodes, kernel API mounts, other FUSE sources, extended attributes and shared
mmap are refused or unsupported. Alias expansion and raw-mount hard-link
inspection are bounded at 1,024 entries; shared storage not visible in
/proc/self/mountinfo(such as an overlay lower directory or the same
network export mounted twice) is not detected. Mount topology must stay
stable during a run, and large-workspace performance has not been
characterized. See
filesystem alias limits. - Host-run rules and policy migration. The starter policy's host-run blocks
do not cover build files you run yourself (Makefile,package.json
scripts,.npmrc), arbitrary.code-workspacefilenames or every
application-specific config name. Existing installations must merge new
starter rules explicitly. - Result filtering. Native shell and file-tool results cannot be filtered.
Response-content rules on those calls fail withTRANSFORM_UNAVAILABLE;
scope them to MCP, the gateway or the Pythonguardclient. - Website scope. Rules cover supported HTTPS URLs at the gateway and the
initial managed WebFetch URL. Redirects, URL-shaped MCP arguments and
allowed shell commands are not covered. - Accounting. Ambiguous billing retains the reservation and halts spend.
Deterministic Go-ledger write/sync/close/rename failure and reopening tests
pass, but real power-loss and storage-hardware durability are untested. - Audit coverage. Subsequent bounded AI reviews covered the executor,
host-file policy, mediated filesystem and runtime mounts, with fixes applied
within the limits above. A follow-up independent re-review was not completed
across the final diff, and no comprehensive or third-party security audit has
been performed. Use disposable, non-sensitive workspaces for evaluation.
Claude Code refused the model-driven adversarial prompt; its adversarial
coverage is scripted.
Report vulnerabilities privately; see SECURITY.md.