yara-gateRecorded demo · no live scanSource on GitHub

What reaches the agent?

Start with a vendor shortlist. Compare two versions of the same RSS feed and see how the selected policy handles a directive rebuilt from its markup.

Synthetic scenarios. Real scanner results. This public demo replays fixed recordings; it never scans, uploads, or connects to your machine.

The totals below describe selected synthetic examples. Zero findings on their twins is not a production false-positive rate; unseen attacks can pass.

  1. 1 · Inspect the inputPick a fictional task and read what changed in its synthetic pair.
  2. 2 · Follow the evidenceSee the rule, reader view, and finding severity.
  3. 3 · Compare the policyChange the read policy; check the verdict and exit code.
  4. 4 · Check the boundaryA real caller must enforce the result on the same bytes. No agent runs here.

These are detected examples at the recorded revision, including previously fixed gaps; they are not a list of current bypasses. An attack may be advisory under manual or document policy and held under message policy. Other pairs include a PDF line in a plain font beside another font's map, a workbook written with the Open XML SDK's prefix, and an email whose body sits past 8 KiB of relay headers, each beside a twin with the same layout around an ordinary sentence. All three attacks were recorded clean before the change that reads them.

Loading recorded examples. No scan is running.

Low noise needs evidence, not a promise

In this curated synthetic set, every attack has a benign twin that the same build recorded as clean, with no findings, under all three policies. Most twins are near-misses on purpose: the same file type, layout, and encoding, and often the same opening words. Beyond these examples, the bundled rules are measured against benign files on every change:

328 generated benign files

Rechecked at 1426e7f: four distinct files had findings (4/328, 1.22%), each from a different Windows shortcut-family rule (0.30% per rule). The other 85 of 89 rules and all structural checks had no hits; all scans completed. CI checks per-rule limits, which do not bound the combined hold rate.

15,140 files already on a Linux host

When the SVG scope test and the full-depth tool-list walk arrived, HTML, SVG, Markdown, JSON, XML, and PDF files under /usr, /opt, and home directories kept every verdict and finding. See the scope and budget record.

An inline SVG false positive

A page with an inline icon and an unrelated script used to be blocked as active SVG. The rule now needs the script inside the svg element; the pair above records both sides, and a page the scanner cannot scope keeps the strict block.

Merged PDFs read page by page

A merged PDF keeps each source's font named F1. Read through every font that name meant anywhere in the file, an ordinary eight-source bundle was held as unreadable. Each page is now read through its own fonts, so the bundle twin is clean and the override on its last page is found. See the page-font record.

Hidden text needs an instruction

Templates, review notes, and OCR layers hide text all the time. Hidden Word, PDF, or HTML text is reported only when an instruction rule also matches inside it. HTML counts as hidden only on one exact inline declaration a browser accepts, checked against Chromium; text the page also shows is not reported. See the hidden-text and hidden HTML records.

SVG and zero-width rules on installed files

When the scriptless-SVG and zero-width rules arrived, 20,000 installed text files, a second set of 8,116, and 4,142 icon-theme SVGs kept every finding. Diagram labels, do-nothing links, Persian joiners, and emoji stay clean; the pairs above record each. See the record.

Office files, as a parser reads them

When Office XML began to be read through comments, CDATA, and internal entities, and OpenDocument gained a reader, 206 real files (LibreOffice's bundled templates and samples, and Word, Excel, and PowerPoint files it wrote from them) kept every verdict and finding. Thirty-two OpenDocument fixtures were put to LibreOffice and pandoc: where either shows a sentence, the gate holds it. See the record.

PDF fonts, Office prefixes, and mail, on 14,013 files

When fonts began to be read through their own dictionaries, Office runs by their namespace, and mail opened where a mail reader opens it, no benign file gained a finding or became incomplete: 4,216 PDFs from eight writers, 1,811 Office files, 413 loose Office XML and OpenDocument files, 1,886 messages, and 5,687 installed files that look like headers. Three PDFs lost a false unreadable-text finding. See the record.

Real third-party files

132 PDFs from the pikepdf and pypdf test suites gained no findings from the PDF text view. 65 joblib test pickles gave the same results as before the deeper pickle walk.

Published configuration

Across 112 devcontainer.json files from published npm and PyPI packages, the dev container rule reported one: an inline sh -c host script, the shape it exists to flag. The other 61 lifecycle commands did not match it.

Chat-template openers, read from each template

When the turn openers of Kimi K2, MiniMax M2, Granite 4.0, and Inkling 2 were added from each model's published template, 6,042 installed files and 70 public templates and parser sources that hold such tokens kept every finding. An opener alone is not reported; one of the rule's verbs must follow it. See the record.

PDF fonts that readers disagree on

When escaped font keys began to be read, and conflicting font declarations and disputed font references began to keep the unmapped-text note, 216 distinct installed PDFs kept every verdict, finding, and offset. Directed cases were compared with PDFium, pdfminer.six, and pypdf. See the font coverage and resource key records.

Web pages are noisier than these twins. On the 3,680-page test split of BrowseSafe-Bench, a synthetic benchmark of web pages with and without injections, agent-ingest held 11.7% of the benign pages (194 of those 217 for Unicode-formatting notes alone) and 42.5% of the attack pages; agent-document held 1.2% and 19.3%. Hidden-HTML findings fell on 224 attack pages and on no benign page. It is a regression baseline for one ruleset, not a consumer's traffic. See the web benchmark record.

These are generated, benchmark, test-suite, published-package, and host files, not your upload traffic, so they are not a production false-positive rate. The rules also carry recorded near-miss pairs that CI requires to stay clean. See measured precision and the verification records.

Run the real scanner on your own machine

With Git, Python 3.12, and uv installed:

git clone https://github.com/cgfixit/yara-gate.git
cd yara-gate
uv sync --frozen
uv run yara-gate demo --rules rules

Cloning and dependency installation use the network. After installation, the loopback app scans the same catalog locally with bundled rules, one pair side by side or every pair at once with the same breakdown by how each attack was caught, and accepts short pastes; this public page cannot. Vendor installation is a separate, explicit step.

Messages & tool results

Use agent-ingest before an SMS, chat message, or tool response reaches the model. Require a complete clean result.

Synced documents

Use agent-document for corpus files that may quote attacks. Accept only complete clean or the exact notes-only record.

Keep the boundary

Read the same bytes that were scanned. Keep content fenced as data and keep the agent's approval controls. Neither demo installs a consumer integration.

Before you enforce the gate, yara-gate replay scans a capture of the text your model was handed and prints the gate's decision beside your own; it admits and holds nothing. After an upgrade, yara-gate conform checks the installed package's own fixtures against the verdicts and exit codes recorded for them. See replaying captured model input and the conformance kit.

Local setup guide · Full integration contract · Rules and limits

Privacy and limits, plainly

The demo has no analytics, cookies, browser storage, or content submission. Its scripts make no API calls and cannot connect to localhost. Only the static page and its assets load; documentation links navigate when you choose them.

GitHub hosts this public site and logs visitors' IP addresses for security. This is not an anonymous or offline service. See GitHub Pages data collection.

Recorded results cover only these examples and their pinned source revision. A real clean scan is not proof that content is trustworthy: matching finds patterns someone has written down, with no semantic understanding, OCR, or general decryption, and unsupported or unfinished scans must be held.

For example, the PDF reader does not decode page streams under CCITTFax, JBIG2, or JPX, or LZW past 2 MiB. Recognized unread page streams can produce the note heuristic_pdf_content_unread. If your extractor reads those streams, scan its text before passing it to an agent.

Readers are lexical, not renderers. Text hidden by a stylesheet, by layout, or by a background the page does not declare is read as shown text, not as hidden text, and a captured terminal log is read without a terminal's redraws. See the browser and terminal measurements.