Repository navigation
Releases
v0.2.9
What your agent reads can't decide what it does. cleimesh guard closes a gap a reader found: a tainted session could write a Makefile and then run make.
curl -fsSL https://github.com/cleitonaugusto/cleimesh/releases/latest/download/install.sh | sh
cleimesh guard installFixed
- A tainted session may edit code or run it, not both. Before, once a coding agent had read outside content, it could still write any file in the project and still run
make,cargo test,npm runorpytestfrom the allowed list. An injected issue could ask for a build target that sends.envout, then for the build, and each step passed on its own. Now, once a tainted session has written a file, list entries that run project code (builds, tests,make, and any you added) are refused until a person clears the session.git diff,git status,git addand the readers still run; a person commits after review.cleimesh guard statusshows which sessions wrote since they were tainted. Thanks to reidmarlow on dev.to. - git flags that escape the list are refused once tainted:
--output(writes a file anywhere),--ext-diff,--no-index(reads outside the repository),--exec-path. - More ways around the list, found reviewing the guard against itself, closed:
- flag values are checked as paths:
grep --file=~/.ssh/id_rsa,less --log-file=~/.bashrc; - symlinks are followed: a link in a cloned repository to
~/.ssh/id_rsacan't be read, and one to~/.bashrccan't be written; - unquoted globs are refused:
cat .e*is.envonce the shell expands it; - a recursive search (
grep -r,rg, the Grep tool) is refused over a directory with a secret under it; - a listed command given a file outside the project is refused:
make -f /tmp/x.mk,cargo test --manifest-path ...; - after a write,
git commit(hooks can live in the project throughcore.hooksPath) andcargo fmt(a project's.cargo/config.tomlcan alias it) are refused too.
- flag values are checked as paths:
New
- A receipt names the rule that allowed a call. An allowed guard decision carries
rule("allowed when tainted: cargo test","reader inside the project: cat"), so a surprising pass can be inspected like a refusal. A refusal after a write names that write's receipt (authority.edited_by). - Withholding a changed tool is a receipt. When a wrapped MCP server lists a tool whose definition no longer matches the one pinned at
mcp add, the tool is not offered and a signedcleimesh.tool_withheldreceipt records the approved and the current definition digests. It used to be only a line on stderr.audit viewand the OCSF export show it as blocked. - draft-sahu -01 conformance. The receipt verifier checks step_id repetition, the signed
seqprofile and the draft's head assertion, and agrees with all 18 vectors of the external suite (governex/agent-action-receipts-vectors): 16 log, 2 head. CleiMesh verifiesseqand the head assertion but does not emit them yet. - Guard: Codex sessions, and AgentHook
PreToolUseevents answered on stdout.
Dependencies
curve25519-dalek5.1.0 (RUSTSEC-2026-0620, AVX-512 backend). The 4.1.3 copy undered25519-dalekselects that backend only on nightly; releases are built on stable.
Verify a download
Each binary has a .sha256 and signed build provenance:
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimeshv0.2.8
v0.2.7
v0.2.6 — a timed-out call is recorded as unknown, and settled later
What your agent reads can't decide what it does. A call cut at its time limit is now recorded as unknown, not as failed, and a person can settle it later.
Changed
- Timeouts record an unknown outcome. The result receipt of a call cut at its time limit carries
observed.outcome: "unknown"andtimed_out_after_ms, and the agent is told the outcome is unknown. The receipt used to say the call failed, which the node can't know: the operation may land after the cut. (The receipt format'ssuccessstays false, meaning no success was observed;outcomesays what is known.)
New
cleimesh audit settle STEP --outcome succeeded|failed --evidence "..."records what an out-of-band check found (the payment exists, or it doesn't), as acleimesh.tool_settledreceipt linked to the unknown result. It is accepted once, only for a result still unknown, and the chain keeps verifying.- The evaluation kit (
examples/evaluation) checks both.
Verify a download
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimeshv0.2.5 — a Claude Code plugin, labels from the server's hints, remote servers
What your agent reads can't decide what it does. CleiMesh now installs as a Claude Code plugin, labels tools from the hints a server declares, and puts remote MCP servers behind a token too.
/plugin marketplace add cleitonaugusto/cleimesh
/plugin install cleimesh@cleimesh
or from a shell:
curl -fsSL https://github.com/cleitonaugusto/cleimesh/releases/latest/download/install.sh | sh
cleimesh mcp add mail -- mcp-email-server stdioNew
- Claude Code plugin. One
cleimeshserver for every server you add, plus/cleimesh:addand/cleimesh:status. - Labels from the server's own hints. Without
--taints/--clean-only,mcp addlabels each tool from its declaredreadOnlyHint,destructiveHintandopenWorldHint, and says which hint each label came from. A tool that changes things and reaches an open world gets both labels, the safe side; at a terminal,mcp addasks you which it does. A tool whose hints don't decide it is left unlabelled and named. Against a real mail server with no flags at all, the injected agent's send and forward are refused. - Remote MCP servers.
mcp add NAME --url https://... --bearer-env VAR: streamable HTTP,https(or plainhttpto this machine). Only the variable's name is saved; the token is read when connecting and never reaches the receipts. - The wrapper over HTTP.
mcp wrap --listen ADDR --listen-token-env VARserves/mcpto clients that only speak HTTP. It refuses any request without the bearer token, and won't start without one. Every session shares one node, one receipt log and one view of taint. mcp wrapwith nothing named serves the serversmcp addkeeps.cleimesh flow-check: one decision from the flow-label rule, for harnesses.
Fixed
webpki-root-certs1.0.12: the distrusted emSign roots are gone (RUSTSEC-2026-0383, caught by the supply-chain check before release).
Verify a download
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimeshv0.2.4 — a person can let one refused call through, once
What your agent reads can't decide what it does. When a tainted agent's action is refused, a person can now let that one call through, once.
curl -fsSL https://github.com/cleitonaugusto/cleimesh/releases/latest/download/install.sh | sh
cleimesh mcp add mail --taints get_emails_content --clean-only send_email \
--approvals ~/.config/cleimesh/approvals -- mcp-email-server stdioNew
--approvals DIR(mcp wrap,mcp add). A clean-only call refused because the agent is tainted is written toDIR/requests/<id>.json: the tool, the arguments, and their digest. A token from the node key that allows exactly that call, saved asDIR/granted/<id>.jsonwith the sametoolandargs_sha256, is presented for the next identical call, once, then removed. The node checks it like any other token: a different call is still refused, and so is the same call a second time.- Everything from 0.2.3 (
--when-tainted, the tool-definition digest in receipts) is included.
Verify a download
Each binary has a .sha256 and signed build provenance:
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimeshv0.2.3 — a tainted agent keeps what the token allows, and nothing else
What your agent reads can't decide what it does. A tainted agent no longer has to lose a tool entirely: the token can keep a narrower form of it.
curl -fsSL https://github.com/cleitonaugusto/cleimesh/releases/latest/download/install.sh | sh
cleimesh mcp add mail --taints get_emails_content --clean-only send_email \
--when-tainted send_email.account_name=work --when-tainted send_email.recipients=boss@corp.test \
--when-tainted send_email.subject='*' --when-tainted send_email.body='*' -- mcp-email-server stdioNew
--when-tainted TOOL.ARG=V1,V2|*. What a clean-only tool may still do once the agent has read untrusted content, with the values fixed in the token. Closed world: an argument the rule doesn't name (accnobody listed) refuses the call. Every link of the delegation chain is checked, so a subagent can't widen an earlier rule. Against a real mail server, after a poisoned read: mail to the allowed address goes through, mail to the attacker and mail with the attacker inccare refused. Keep the values fixed: "reply to the sender" is not a safe rule, since the sender can be the attacker.- Receipts name what the agent was shown. A decision receipt for a call to a wrapped server now carries
tool_definition_sha256, the digest the pin is checked against, so an auditor can match a call to the exact definition approved. A call admitted under--when-taintednames the receipt that tainted the agent (tainted_by).
Verify a download
Each binary has a .sha256 and signed build provenance:
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimeshv0.2.2 — read what each tool tells the model before you grant it
What your agent reads can't decide what it does. mcp add now shows you what each tool tells the model before you grant it, and registers for every project.
curl -fsSL https://github.com/cleitonaugusto/cleimesh/releases/latest/download/install.sh | sh
cleimesh mcp add fetch --taints fetch -- uvx mcp-server-fetchNew
- Read before you grant.
mcp addprints each granted tool with its taint label and what it tells the model, and marks phrases injected instructions tend to use, with where they sit (parameter descriptions included). That list helps the person approving read; it is not a control, since rewording beats it. - Invisible text is refused. A tool definition carrying invisible or formatting characters anywhere (zero-width, bidi controls, Unicode tag characters) makes
mcp addrefuse: they hide text from whoever approves it, and no tool description needs them.
Fixed
mcp addregisters with Claude Code at user scope (every project). Claude Code's default, local scope, only covered the directory the command ran in, so a server added from your home directory was missing from your projects.--scope localor--scope projectkeeps the narrower ones.
Verify a download
Each binary has a .sha256 and signed build provenance:
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimeshv0.2.1 — tool definitions pinned against MCP rug pulls
What your agent reads can't decide what it does. This release adds protection against MCP "rug pulls".
curl -fsSL https://github.com/cleitonaugusto/cleimesh/releases/latest/download/install.sh | sh
cleimesh mcp add fetch --taints fetch -- uvx mcp-server-fetchNew
- Tool definitions are pinned at
mcp add. A server can change a tool after you approved it: a new description that instructs the model, a wider schema.mcp addnow records a digest of each granted tool as the model sees it (name, title, description, schemas, annotations), and the wrapper stops offering a tool whose definition changed since, until you runmcp addagain. A description that was already hostile when you added it still gets through; the threat model says so. mcp add --toolmust name a tool the server lists.- The installer's next step points at
cleimesh demo redirectandcleimesh mcp add.
Upgrading from 0.2.0
Servers added with 0.2.0 keep working without pins. Run cleimesh mcp add again for each one to pin it.
Verify a download
Each binary has a .sha256 and signed build provenance:
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimeshv0.2.0 — any MCP server behind a token, in one command
Any MCP server behind a signed token, in one command — and what the agent reads through one server stops what it can do through another.
curl -fsSL https://github.com/cleitonaugusto/cleimesh/releases/latest/download/install.sh | sh
cleimesh mcp add fetch --taints fetch -- uvx mcp-server-fetch
cleimesh mcp add fs --clean-only write_file -- npx -y @modelcontextprotocol/server-filesystem ~/workNew
cleimesh mcp add: creates the keys if missing, asks the server for its tools, issues a token for exactly those, and registers it with Claude Code (--printfor Cursor and other clients). Every server added runs behind onecleimesh-mcpentry (mcp wrap --servers): one receipt log and one view of taint across all of them. Tested with the official fetch and filesystem servers in examples/mcp-add.- Egress decided on the connection, not the argument: the
fetch_urlbuilt-in goes through the host'shttp_fetch, which follows redirects itself, re-checks every hop against the grant (--host name[:port]), pins the resolved address and refuses private, loopback and link-local answers unless--allow-private.cleimesh demo redirectshows an exfiltration through a redirect refused, with receipts.
Fixed
- Allowance roots are checked against the owner key's issuer (step 3k of the AAT draft);
--issis gone. - A server behind
mcp wrap --serversis called under its own token only. - The allowance spend ledger is kept across restarts by default and locked by one gateway (it reset whenever the MCP client restarted the server).
- IPv6 forms that embed or reach a private address (6to4, local-use NAT64, Teredo, site-local) are refused like other private answers.
- Calls to a native MCP server get 60 s (WASM tools keep 5 s).
- WASI preview2 tool calls are refused instead of reporting a fake success.
Breaking
cleimesh allowance grantno longer takes--iss: the issuer is the owner key's RFC 9278 thumbprint. Allowances issued by 0.1.x are refused; issue them again.
Verify a download
Each binary has a .sha256 and signed build provenance:
gh attestation verify cleimesh-x86_64-unknown-linux-musl --repo cleitonaugusto/cleimesh