Repository navigation
Redaction Presets
A preset is a named set of detectors and categories, chosen at upload. It changes what is looked for and nothing else — not how removal works, not how verification runs, not what the export report records.
Canonical source: docs/presets.md. The data itself is lib/redaction/presets/presets.json.
A preset called "HIPAA" that somebody applies and then believes they have a compliant document is a worse outcome than having no presets at all. It turns a tool that helps into one that misleads, on exactly the question where being misled is most expensive.
So presets are named for what they search for, never for what they achieve. And the rule is enforced rather than documented: a preset whose id, label or description contains a regulation's name or a compliance claim fails validation at import (lib/redaction/presets.ts).
A narrowed search is carried forward everywhere it matters, because a short list of removals means either a clean document or a narrow search, and those are not the same thing:
- the caveat sits under the chooser,
- the editor says which preset the document was analyzed with,
- the export report records it.
categoryAllowed applies to model proposals too, not just to the deterministic detectors: the model's per-chunk text detections and its spreadsheet column judgements are both filtered by it, and so are detections written by the workflow's expansion path. Asking a model to stay inside the preset is not the same as it having done so, and a narrowed preset that the contextual pass ignored would be a preset in name only. See Security Model §8.
PRESET_DISCLAIMER is a constant, so it cannot drift between the places it appears:
A preset changes what we look for, not what you are responsible for. It is a starting point for your review — nothing here certifies a document, and anything a preset does not look for stays in the file.
| Where | What is shown |
|---|---|
| Upload panel | the full disclaimer under the chooser, with the preset's "looks for" list |
| Workspace header | "looked for ", so an empty inspector is not read as a clean document |
| Export report |
lookedFor { presetId, presetLabel, categories, narrowed }, plus a note when narrowed: anything outside them was never proposed, so its absence from these counts is not evidence it is absent from the file
|
| Export dialog | the same idea, before you download |
presetNarrows keeps the warning honest: the default preset is still a choice you made, but it narrows nothing, so it shows no narrowing note. A warning that does not apply is how real warnings stop being read.
detectors: null and categories: null mean "no restriction" — every detector runs and every category is in scope.
The default. Every detector, contextual pass unrestricted.
| Detectors | all (null) |
| Categories | all (null) |
Looks for: email/phone/postal addresses, people's names and customer/patient-named organizations, government identifiers, payment cards and bank/account numbers, dates of birth and customer/case references, credentials and API keys and token-bearing links, faces and signatures in images.
The things that identify a person directly, and nothing else.
| Detectors |
email-address, phone-number, street-address
|
| Categories |
person, address, phone, email, face
|
Looks for: people's names, email addresses and telephone numbers, postal and street addresses, faces and signatures in images.
Reference numbers and dates that pin a record to a person.
| Detectors |
us-social-security, labelled-reference, labelled-date-of-birth
|
| Categories |
government-id, customer-id, date-of-birth
|
Looks for: government identifiers (e.g. Social Security numbers), customer / client / member / policy / case / patient references, dates labelled as a date of birth.
Money: cards, bank accounts, and the numbers that reach them.
| Detectors |
payment-card, iban, labelled-account-number
|
| Categories |
financial, bank-account
|
Looks for: Luhn-valid payment card numbers, IBANs, numbers labelled as an account or sort code, financial facts tied to a named party.
What leaks out of engineering documents: secrets and private links.
| Detectors |
credential, link-with-token
|
| Categories |
api-key, url, confidential
|
Looks for: API keys, tokens and provider credential formats, links carrying a token / invite / reset path, text marked confidential or internal.
Presets are data, so changing what one covers is a reviewable diff rather than a code change.
- Edit
lib/redaction/presets/presets.json. - Give it an id, a label and a description that describe what is looked for. Anything naming a regulation or claiming compliance will fail import validation.
- List
detectorsandcategories, ornullfor no restriction. - Run
pnpm test— preset validation is covered.
PRESET_DISCLAIMER (lib/redaction/presets.ts) is the text that travels with a narrowed preset. It exists so the narrowing is visible at the moment somebody is deciding whether the result looks complete.
- A preset narrows detection only. Search and rules are not limited by it: they match the pattern you type, so you can always find and redact something the preset did not look for.
- The benchmark harness uses an internal preset with an empty detector list to measure "model-only" analysis. It is not a preset anyone can pick. See Testing and Benchmarks.
- Redaction Engine: what the detectors and the contextual pass actually do
- Security Model: how preset enforcement is verified
- Search and Rules: finding what a preset did not look for
Anonify: AI proposes, the application applies, and only what a person accepted is removed.
Repository · Report a bug · Request a feature · Security policy · Apache-2.0
This wiki describes v1.10.0 and summarises and links the in-repo documentation. Where the two disagree, the files under docs/, CHANGELOG.md and SECURITY.md are canonical.
Getting going
Using it
- Supported Formats
- Review Workspace
- Search and Rules
- Hush Assistant
- Redaction Presets
- Export and Anonymisation
- Batches and Mailboxes
How it works
- Architecture
- Processing Workflow
- Redaction Engine
- Storage and Encryption
- Streaming IO
- Data Model
- API Reference
- Security Model
When it breaks
Contributing
Repository · Issues · Releases · Changelog