Skip to content

Settings ​

Settings live in YAML files. See The policy file and trust for where they live and how layers combine. Most people only need the commands in Tell it what is sensitive.

Example .pii-airlock/config.yaml:

yaml
languages: [en, fr]
score_threshold: 0.5
entity_actions:
  SECRET: block
  IBAN_CODE: redact

Lowest to highest priority:

text
bundled defaults → ~/.config/pii-airlock/config.yaml (you, every project)
  → <project>/.pii-airlock/config.yaml (this project) → command-line options

Where it is active ​

SettingDefaultMeaning
activationprojectHooks run in projects that contain .pii-airlock/. always runs them everywhere. Set it in ~/.config/pii-airlock/config.yaml.

Detection ​

SettingDefaultMeaning
languages[en, fr]Languages to analyse
modelsen_core_web_md, fr_core_news_mdModel used per language. A missing spaCy model is stood in for by another installed size of it (doctor says so)
score_threshold0.5Minimum confidence. Lower catches more and flags more false positives.
score_thresholds{}Per-type minimum, for example {PERSON: 0.7}
entities[]Only these types. Empty means all.
exclude_entitiessee What it detectsTypes to skip
builtin_recognizerstrueUse the checked recognizers (IDs, phones, secrets)
ner_backendspacyspacy or gliner
allow_list[]Terms never treated as personal
deny_list{}Terms always sensitive, grouped by label
custom_patterns[]Your own regular expressions
entity_actions{}Per type: tokenize, redact, allow, block

Placeholders ​

SettingDefaultMeaning
token_stylestablestable, surrogate (realistic fakes) or sequential (numbered)
token_rotationdayday, week or never

See Placeholders explained.

Hooks ​

SettingDefaultMeaning
hook_decisionaskTool calls: ask or deny
prompt_decisionblockPrompts: block or warn
hook_on_errorclosedIf detection fails: closed treats input as sensitive, open skips the check
hook_max_file_bytes2000000Larger files count as a detection failure
hook_daemonautoKeep models loaded between calls. off disables it.
hook_daemon_idle_minutes30Stop the helper after this much idle time
hook_fallbackinprocessIf the helper is down: load models, or regex for fast pattern-only checks that do not find names or places

Gateway ​

SettingDefaultMeaning
binary_partsscanImages, audio and files inside a gateway request. scan: PDF and Word text is checked and the request refused if it holds personal data; images and audio are forwarded with a warning; other files are refused. block: refuse every one. allow: forward all unchecked.
passthrough_paths[]Path fragments forwarded without cleaning. Use only when you are sure they carry no personal data.
mapping_backendmemorymemory keeps nothing on disk. file stores mappings, encrypted.
mapping_dirFolder for the file backend
mapping_encryptiontrueSet false only for debugging
analysis_cache_size2048Texts remembered so repeated history is not re-analysed. 0 turns it off.

How mappings are stored and encrypted, and what to do with the key: Data handling.

Full reference ​

The complete annotated file is config.default.yaml.

Released under the MIT License.