Reiki

Security proxy for agent and LLM traffic: isolates keys, filters what leaves, keeps access reliable

View the Project on GitHub ddproxy/reiki

Controlled information plugin

The controlled plugin stops controlled-information markings and identifier values from leaving in an outbound request. It checks each request body for banner markings and for identifiers next to their own label. In block mode a request that holds one is rejected before any key is used. In report mode the request goes through and the finding is logged.

It is a safeguard that catches common markings. It does not prove a request is free of controlled data. Read What it does not cover before relying on it.

Compiled in by the default plugin-controlled feature; inactive until a [plugins.controlled] table exists. The earlier name gov still works as a table name, a reiki scan plugin and a feature, and will be removed in a later major version.

Configure

[plugins.controlled]
mode = "report"                      # "block" or "report"; required
# kinds = ["cui", "ein"]            # default: cui, classification, dissemination
# upstreams = ["zen", "openrouter"]  # default: all upstreams
Key Default Meaning
mode required block rejects a request that holds a marking or identifier. report logs it and lets the request through.
kinds cui, classification, dissemination The kinds to look for.
upstreams all Check only requests to these upstreams. A request to any other upstream is not checked.

Start in report, read the log for false positives, then switch to block.

Kinds

Kind Default Matches
cui on An upper-case CUI banner: the whole line, ignoring surrounding whitespace and Markdown punctuation such as * or -; a line that starts with CUI// and a caveat marker such as CUI//SP-CTI; or a portion marking such as (CUI) at the start of a paragraph. A mention in prose, in quotes or in a JSON string is not a banner.
classification on TOP SECRET, SECRET or CONFIDENTIAL followed immediately by a // caveat chain, such as TOP SECRET//SI//NOFORN or SECRET//REL TO USA, GBR. A bare level is not reported.
dissemination on NOFORN or ORCON in the same banner shape as cui: alone on a line, as a // segment of a banner such as SECRET//NOFORN or TOP SECRET//SI//ORCON/NOFORN, or in a portion marking at the start of a paragraph. A mention in prose, in quotes or in a JSON string is not a banner.
ein off Two digits, a hyphen and seven digits after ein or employer identification number. No checksum; the label is the only gate.
itin off 9XX-XX-XXXX after itin or individual taxpayer identification number, with the historical group range 70-88, 90-92 or 94-99.
cage off Five characters from the CAGE alphabet (no I, O, Q or S) after cage or cage code.
uei off Twelve characters from the UEI alphabet (no I, O, Q or S) after uei or unique entity id.
edipi off Ten digits, not starting with zero, after edipi, dod id or dod_id.
eccn off A five-character export control number such as 5A002 after eccn, with an optional dot suffix.

The keyword-bound kinds are off by default because their shapes alone collide with ordinary numbers and codes. Turn them on for a corpus that carries contracts or export paperwork.

Run reiki scan over sample data to see what this plugin flags before you choose a mode.

Behavior

What it does not cover