Repository navigation
GuardFil v0.1.0-alpha.4
Pre-releaseGuardFil v0.1.0-alpha.4
Fourth alpha release · 2026-11-22 · 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.3 with graceful broker listener shutdown on
SIGTERM, secret-free upstream SSE error diagnostics in the OpenAI broker,
schema-v2 provider ledger naming with crash-safe CLI migration, and an
up --no-build startup option with bridge-DNS build troubleshooting. 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.4 --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.3
- Run
deployments/local/guardfil-local.sh upto rebuild the service container
image and extract updatedguardfil-broker,guardfil-mcp-proxyand
guardfil-workspacehelpers. (Ifdocker compose buildhits a bridge DNS
timeout on your host network, build on--network=hostfrom the repository
root and passup --no-build.) - If your
~/.local/state/guardfil/directory contains ledgers from earlier
alpha releases (t2a-experiment,anthropic-experiment, or
gemini-experiment-6), inspect and migrate them before starting an agent:
~/.guardfil-local/bin/guardfil-broker migrate-ledger --provider all --dry-run
~/.guardfil-local/bin/guardfil-broker migrate-ledger --provider allBrokers fail closed if an unmigrated legacy ledger is present so existing spend
accounting and halt states are never bypassed by opening a fresh $2.00
ledger.
New since alpha.3
- Prompt broker shutdown on
SIGTERM.MessagesBrokerServer.RequestStop
andNeutralBrokerServer.RequestStopnow track and close the Unix socket
listener under a dedicatedstopMu(separate from the in-flight request
lock), wakingAcceptimmediately instead of timing out teardown waits. - OpenAI
responsesSSE error diagnostics.ParseAndValidateSSEDetailed
extracts response identifiers (response_id,model,service_tier),
fixed parse-failure reason categories, and finite allowlisted upstream error
metadata (upstream_error_type,upstream_error_code, mapping unrecognized
tokens tootherand never reading raw errormessagetext or prompts),
scrubbing any broker credential or key-shaped token across outputs. Fail-closed
INVALID_RECEIPT_EVIDENCEretention and ledger halts remain unchanged while
recordingresponse_id,model,service_tier,parse_error,
upstream_error_type, andupstream_error_codeinto broker evidence JSONL;
parse_error,upstream_error_type,upstream_error_code, andresponse_id
to stderr; anderror,detail, plus optionalupstream_error_type/
upstream_error_codein the HTTP 502 JSON reply. - Provider ledger naming & schema-v2 migration. Provider ledgers now use
provider-named directories (~/.local/state/guardfil/{openai,anthropic,gemini}/)
and identifiers (guardfil-{openai,anthropic,gemini}-v1), backed by schema v2
(MIGRATEDjournal record,legacy_experiment_id, preserved historical
witness/replay checks, incremented inspection generation floor,RENAME_NOREPLACE
publishing, target-to-backup provenance verification, read-only--dry-run
inspection, and amigrated_to.json+ retiredledger/scaffold keeping both
migrated and fresh v2 installations non-reinitializable by older binaries). Adds
guardfil-broker migrate-ledger(--provider,--dry-run,--state-root)
and updates broker open behavior,--experiment-rootprovider-root guards,
demo, and red-team ledger paths. - Local startup
--no-build& bridge-DNS docs.guardfil-local.sh up [--no-build]
lets users start a pre-builtguardfil-local:devimage cleanly without
rebuilding; the updated troubleshooting guide
documents--network=hostpre-building and legacy ledger migration resolution.
Everything in alpha.3 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 schema-v2 migration, crash-recovery, double-spend prevention,
SSE diagnostic redaction, and prompt broker listener-shutdown tests),
fail-closed verification, API gateway end-to-end, headless CLI/owner-approval/Python-client
checks, and the isolated reproducibility build gate. - 145 Python unit tests covering executor isolation, raw-mount admission,
executable snapshotting, session cleanup, workspace configuration, CLI
options (up --no-build), 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
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.
In addition, live Ubuntu 24.04 alpha testing verified 7/7 boundary controls on a
live service/executor and a live Claude Code task inside the workspace
(6/6 fixture tests passing); other Linux distributions remain untested.
Known limits
- Local, single-user deployment. The quickstart UI uses loopback HTTP.
Remote hosting and SSO are outside this alpha's scope. - Host setup & OS coverage.
user_allow_otheris a host-wide FUSE option
that needs an administrator. Only Linux (Ubuntu 24.04) has been exercised;
other Linux distributions remain untested. - 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 or malformed upstream SSE streams retain the
reservation and halt the ledger fail-closed. Deterministic Go-ledger write,
sync, close, rename, and migration crash-recovery 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, runtime mounts, broker shutdown,
SSE error diagnostics, and ledger migration, with their reported findings
resolved before release. A follow-up independent filesystem 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.