A fence with two ends

anvil security

Text that comes from outside needs a fence, so the model reads it as data and not as orders. A fence is only as good as its ends.

One fence in the Forge first stripped its end marker in a single pass. A marker nested inside itself came back out of that one pass as a valid marker. The fix is to strip until the text stops changing, count what was removed, fence both ends, and assemble the pieces inside the package so their order is built in, not left to the caller.

Anvil frames what an MCP server returns another way. Each call gets a fresh random 128-bit marker for both ends, and the frame says that only the marker with that value ends the output. A server cannot forge the end of the frame because it cannot know the value.

Two ways of solving one problem. Both start by assuming the text will try.

Hit it. Check it.

Brannoch