Skip to content

Choose what happens ​

By default every personal item is swapped for a placeholder and restored later. You can pick another behaviour for each type of item (names, emails, bank numbers…).

The four choices ​

ChoiceWhat happensUse it when
tokenizeSwapped for a placeholder, restored in the answer. The default.Normal work
redactReplaced by a label such as [IBAN_CODE]. Not restorable, and the real value is never stored.The AI never needs it and you do not want to keep it
allowLeft alone and not flaggedThe type is noise for you, for example locations
blockNothing is sent at allThe value must never leave, for example API keys

Set one ​

bash
pii-airlock action IBAN_CODE redact
pii-airlock action SECRET block
pii-airlock action LOCATION allow
pii-airlock action CREDIT_CARD block --scope user    # all projects

What block does in each tool ​

  • Gateway: answers with an error (403) and sends nothing.
  • Command line: scrub writes nothing.
  • Hooks: the tool call is denied, even when you normally get asked. Prompts are blocked too.

Messages say which type and how many, never the value.

If you work with real customer data, this is a sensible policy:

yaml
entity_actions:
  IBAN_CODE: redact
  CREDIT_CARD: block
  SECRET: block        # API keys and passwords never leave the machine

Put it in .pii-airlock.yaml or in the block of your project policy.

If you set EMAIL_ADDRESS: allow, emails stay readable. But a bare marie that matches a "Marie Dubois" found elsewhere in the text is still hidden.

Released under the MIT License.