93 lines
3.4 KiB
YAML
93 lines
3.4 KiB
YAML
schema_version: 3
|
|
provider: fai
|
|
name: text-anonymize
|
|
version: 0.1.0
|
|
|
|
provides:
|
|
- capability: text.anonymize
|
|
version: 0.1.0
|
|
|
|
inputs:
|
|
text:
|
|
type: text
|
|
description:
|
|
en: |
|
|
The text to anonymize. Plain UTF-8, any length the host
|
|
tolerates as a Payload::Text (operator policy caps).
|
|
de: |
|
|
Der zu anonymisierende Text. UTF-8, in jeder Länge die
|
|
der Host als Payload::Text zulässt (operator policy).
|
|
custom_terms:
|
|
type: text
|
|
description:
|
|
en: |
|
|
Optional newline-separated list of additional bare terms
|
|
(operator-supplied names of people, organisations, or
|
|
places the regex patterns won't catch) to redact in
|
|
addition to the built-in categories. Empty string
|
|
disables this extension. Each line is matched
|
|
whole-word, case-insensitive.
|
|
de: |
|
|
Optional zeilengetrennte Liste zusätzlicher Begriffe
|
|
(operator-gepflegte Namen von Personen, Organisationen
|
|
oder Orten, die die Regex-Patterns nicht abfangen), die
|
|
zusätzlich zu den eingebauten Kategorien geschwärzt
|
|
werden. Leer = Erweiterung aus. Jede Zeile wird
|
|
wortweise, case-insensitive, gematcht.
|
|
|
|
outputs:
|
|
anonymized:
|
|
type: text
|
|
description:
|
|
en: |
|
|
The anonymized text. Each detected entity is replaced
|
|
with a token of the shape ⟦TYPE_N⟧ where TYPE is the
|
|
category (EMAIL, PHONE, IBAN, BIC, IPV4, GERMAN_TAX_ID,
|
|
NAME, CUSTOM) and N is a stable counter starting at 1
|
|
per category, in order of first occurrence. The
|
|
opening / closing characters are U+27E6 / U+27E7
|
|
(mathematical white square brackets) so the token never
|
|
collides with plain […] already present in the source.
|
|
de: |
|
|
Der anonymisierte Text. Jede erkannte Entität wird durch
|
|
einen Token der Form ⟦TYPE_N⟧ ersetzt, wobei TYPE die
|
|
Kategorie ist (EMAIL, PHONE, IBAN, BIC, IPV4,
|
|
GERMAN_TAX_ID, NAME, CUSTOM) und N ein stabiler Zähler
|
|
je Kategorie. Die Klammerzeichen sind U+27E6 / U+27E7,
|
|
damit der Token nie mit normalen […] aus der Quelle
|
|
kollidiert.
|
|
report:
|
|
type: json
|
|
description:
|
|
en: |
|
|
JSON report describing each redaction:
|
|
{
|
|
"redactions": [
|
|
{ "type": "EMAIL", "token": "⟦EMAIL_1⟧",
|
|
"original": "foo@bar.de", "offset": 42 }
|
|
],
|
|
"counts": { "EMAIL": 3, "PHONE": 1, ... }
|
|
}
|
|
The full `original` text is included so the operator can
|
|
run a verify-pass against the redacted file (compliance:
|
|
GDPR Art. 32(1)(a) "ability to undo" requirement). Hub
|
|
operators that want a pseudo-anonymisation-only flow can
|
|
discard this output downstream.
|
|
de: |
|
|
JSON-Report mit jeder Schwärzung:
|
|
{
|
|
"redactions": [
|
|
{ "type": "EMAIL", "token": "⟦EMAIL_1⟧",
|
|
"original": "foo@bar.de", "offset": 42 }
|
|
],
|
|
"counts": { "EMAIL": 3, "PHONE": 1, ... }
|
|
}
|
|
Der vollständige `original`-Text ist enthalten, damit
|
|
Operatoren eine Verify-Pass gegen die geschwärzte Datei
|
|
fahren können (DSGVO Art. 32(1)(a) "Wiederherstellungs-
|
|
fähigkeit"). Wer Pseudo-Anonymisierung allein will,
|
|
verwirft diesen Output nachgelagert.
|
|
|
|
# Pure-Rust, regex-only, in-WASM. No filesystem, no network,
|
|
# no LLM.
|
|
permissions: []
|