Security

Tripwire governs structured file actions (file_read, file_write, file_patch, file_changeset) and owner-defined commands (run_command) that an agent sends through its MCP tools or CLI. This page says what that does and does not protect, then maps each claim to the test that checks it.

Trust boundary

PartyTrusted toNot trusted to
OwnerSet the task, policy and review threshold; approve proposalsNothing: the owner is the authority
Agent (MCP client)Request file actionsApprove anything, change the profile, pick its own task
Models (TF-IDF, optional Liquid)Raise an action to owner reviewLower a decision the policy has made
Other processes as the same OS userNothingThey can read private state; see limits below

What the gateway enforces

PropertyHowTest
Paths outside policy are denied before any file accessCapability policy: readable/writable roots, protected paths, byte limitstests/test_capabilities.py::test_hostile_paths_blocked
Unknown tools and malformed actions are deniedPolicy fails closedtests/test_capabilities.py::test_unknown_tools_and_malformed_actions_block
Writes need approval unless inside an auto_write_roots subtreePolicy v2tests/test_capabilities.py::test_writes_require_approval_and_obey_limit, tests/test_fusion.py::test_auto_roots
Symlinks, hard links to outside files and oversized files are refusedNo-follow path resolution, link-count check, byte boundstests/test_runtime.py::test_symlinks_and_limits, ::test_hard_link_to_external_file_is_denied
An approval is single-use and consumed before file I/OAtomic consume in the approval storetests/test_gateway.py::test_approval_consumed_once, tests/test_runtime.py::test_approval_binding_single_use_and_failure_consumption
An approval is bound to task, context, exact action and active profileReview hash over all fourtests/test_fusion.py::test_patch_and_review_binding, tests/test_gateway.py::test_execution_snapshots_caller_action_before_assessment
Approvals expire within five minutesExpiry timestamp checked at consumetests/test_runtime.py::test_expiry_and_db_placement
Changing the profile invalidates pending proposals and tickets, even if later revertedProfile digest in the review hashtests/test_gateway.py::test_reject_and_profile_change_invalidate, ::test_reverted_profile_requires_fresh_approval
Two gateway instances sharing a state directory cannot both approve or run one proposalFile lock on the state directorytests/test_gateway.py::test_separate_gateways_serialize_approval_and_replay
A rejected proposal cannot be resubmitted; a completed one needs a fresh approvalresubmit creates a new reviewtests/test_gateway.py::test_resubmit_requires_fresh_approval_and_rejection_stays_blocked
A stale patch (source changed since the read) is refusedexpected_sha256 checked under the write locktests/test_fusion.py::test_review_for_read_and_stale_patch
If the audit record cannot be written, no I/O happensAudit precedes executiontests/test_runtime.py::test_audit_failure_prevents_io
The operator console rejects bad origin, host, auth and oversized bodiesLoopback bind, per-run secret, strict JSON, security headerstests/test_operator_console.py::test_auth_origin_host_and_bounds, ::test_strict_json_and_security_headers
Untrusted text (paths, diffs) is rendered as text nodes, never HTMLtextContent onlytests/test_operator_console.py::test_ui_uses_text_nodes_for_untrusted_content
A blocked action never reaches the remote Liquid modelBlock is decided before advicetests/test_gateway.py::test_block_skips_liquid
A change set takes the strictest decision of its files; one blocked file blocks the setPer-file policy, combinedtests/test_changeset.py::test_policy_combines_files, tests/test_fusion_parity.py::test_fusion_browser_parity
One stale or missing precondition rejects the whole change set before any writeAll files inspected firsttests/test_changeset.py::test_one_stale_file_rejects_the_whole_set, ::test_create_refuses_existing_file_and_missing_folder
A change set that fails part-way, or a crash during one, leaves the original filesJournal of originals outside the workspace, rollback, recovery on starttests/test_changeset.py::test_failure_midway_rolls_back, ::test_crash_journal_is_recovered
Recovery never overwrites a file someone else changed meanwhileRestores only files holding the proposed content; conflicts block new setstests/test_changeset.py::test_recovery_conflict_keeps_journal_and_blocks_new_sets
Agent status and resume tools cannot approve; resume runs only the exact stored actionNo approval path in agent tools; resume re-enters the normal gateway checktests/test_proposal_status.py::test_pending_then_approved_then_resumed, tests/test_mcp_gateway.py::test_mcp_changeset_status_and_resume
An expired approval returns the proposal to the inbox; it is never run on a dead tokenToken expiry checked before usetests/test_proposal_status.py::test_expired_approval_returns_to_inbox
An agent can run only commands the owner defined, by name, without changing their argumentsrun_command takes only a name; argv comes from the profiletests/test_commands.py::test_decisions, tests/test_fusion_parity.py::test_fusion_browser_parity
Commands run without a shell, in the workspace, without the gateway's secrets in their environmentFixed argv, reduced environmenttests/test_commands.py::test_runs_without_shell_in_workspace_with_reduced_env
A command that overruns is killed with its child processesOwn process group, killed on timeouttests/test_commands.py::test_timeout_kills_the_process_group
A delete or rename in a change set needs the source digest; a rename never overwrites a targetDigest checked before the first write; target must be absent; journaled rollback covers bothtests/test_changeset.py::test_rename_onto_existing_or_stale_source_is_refused, ::test_failed_rename_and_delete_roll_back, ::test_crash_during_rename_is_recovered
Proxy enforce mode never forwards review or block callsDecision made before forwarding; the proxy answers with an error resulttests/test_proxy.py::test_enforce_stops_review_and_block_without_forwarding, ::test_unparseable_and_batched_calls_are_not_forwarded
The proxy log holds digests, not argument values, in private stateSHA-256 of canonical JSON plus sorted keys; state 700, log 600, no symlinkstests/test_proxy.py::test_log_never_contains_argument_values, ::test_state_dir_must_be_private
A proxied server gets only named environment variables; the proxy's local model fails closedPATH, HOME, LANG plus upstream.env; model errors raise allow to reviewtests/test_proxy.py::test_upstream_env_only_passes_named_variables, ::test_local_model_raises_and_fails_closed
Gateways sharing a state directory do not corrupt its databaseRunner never opens and closes an existing database file; every connection is closedtests/test_runtime.py::test_runner_never_opens_an_existing_database_file (stress probe in EVIDENCE 2026-11-18)
Policy rehearsal never runs actions, saves the profile or calls LiquidAssessment onlytests/test_rehearsal.py::test_rehearsal_does_not_change_state

Run them with make unit. The tests exercise the real gateway on temporary directories; they do not mock the file system.

What it does not do

Data flow

Audit metadata (tool, path, outcome) is stored in the private state directory. File contents are not audited. Proposal state holds the submitted action and context so the owner can review them. If the profile sets liquid: required, the task, action and context are sent to the configured OpenRouter model for each assessed action (at most 500 calls per gateway process, then actions wait for approval; ADR-0021); the key is read from the process environment only. With liquid: off, nothing leaves the machine.

Reporting

Open a private security advisory on the GitHub repository, or an issue without exploit details.