Scan your whole stack
From OX Research Newsroom
Are you using polanon?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.4.4
polanon was last scanned on 24 Nov 2026 at version 0.4.4. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.4.4 LATEST | 24 Nov 2026 | No rules fired |
| 0.4.3 | 22 Nov 2026 | No rules fired |
| 0.4.2 | 22 Nov 2026 | No rules fired |
| 0.4.1 | 19 Nov 2026 | Not shown |
| 0.4.0 | 17 Nov 2026 | Not shown |
Findings for v0.4.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.4.4; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
English | Polski
Reversible PII masking for LLM calls, Polish-first. Mask personal data before a prompt leaves your network, send only tokens to the model, and put the originals back into its answer, even while it streams. Pure Python: the standard library is the whole core.
Without writing code, with the gateway in Docker. Claude Code, n8n, Open WebUI, LibreChat, Hermes Agent and any other tool that speaks the OpenAI or Anthropic API keep working as they did, and every call is masked before it leaves:
export POLANON_UPSTREAM_KEY=sk-... # your provider's key
export POLANON_GATEWAY_KEY=$(openssl rand -hex 16) # the key your tools will send
docker run --rm -p 127.0.0.1:8787:8787 -e POLANON_UPSTREAM_KEY -e POLANON_GATEWAY_KEY \
ghcr.io/boromat/polanon-gateway:0.4 --upstream https://api.openai.com/v1
Then give the tool http://127.0.0.1:8787/v1 as its base URL and the value of
POLANON_GATEWAY_KEY as its API key. One gateway serves one provider: for Claude Code start
another with --upstream https://api.anthropic.com/v1, an Anthropic key and
-p 127.0.0.1:8788:8787, then run
ANTHROPIC_BASE_URL=http://127.0.0.1:8788 ANTHROPIC_API_KEY=$POLANON_GATEWAY_KEY claude. Every
tool, the gateway without Docker, and what it does with a call are in
the gateway's section.
In Python, in your own code: mask a text, send it, restore the answer.
pip install polanon
from polanon import Anonymizer, default_guards
anonymizer = Anonymizer(default_guards(with_ner=False))
result = anonymizer.anonymize_sync(
"Proszę o korektę faktury dla Jana Kowalskiego, PESEL 50810112354, "
"konto PL61109010140000071219812874, mail jan.kowalski@example.com."
)
print(result.anonymized)
# Proszę o korektę faktury dla <OSOBA_1>, PESEL <PESEL_1>, konto <IBAN_1>, mail <EMAIL_1>.
answer = "Korekta dla <OSOBA_1> (PESEL <PESEL_1>) jest gotowa." # what the model replied
print(Anonymizer.restore(answer, result.mapping))
# Korekta dla Jana Kowalskiego (PESEL 50810112354) jest gotowa.
The model only ever sees <OSOBA_1>. The mapping that turns it back into a name never leaves your
process. anonymize_sync works in scripts, Django and Flask views, Celery tasks and notebooks; in
async code, await anonymizer.anonymize(...) does the same work in a worker thread.
General-purpose tools are built around English. Polish data needs three things they do not do out of the box:
persName, not PERSON. A pipeline
configured for English labels finds no names at all, and says nothing about it.It also reads foreign invoices: EU, UK and Swiss VAT numbers, company register numbers, Bankgiro, Plusgiro and sort codes, international phone numbers, street addresses and postcodes.
| polanon | Presidio | pii-veil | piimask | |
|---|---|---|---|---|
| Restores the model's answer | Yes, from stable tokens such as <OSOBA_1>, also while it streams |
Not built in: its deanonymizer decrypts spans at known positions; its docs include a sample that restores an LLM answer | Yes, from stable tokens and a saved mapping | Yes, from stable tokens |
| Polish identifiers with a checksum | PESEL, NIP, REGON, ID card, IBAN, payment cards | PESEL; IBAN and payment cards in general | PESEL, NIP, REGON, IBAN, payment cards; ID card and passport by pattern only | None; IBAN and payment cards in general |
| Polish names in every grammatical case | For listed first names and the surnames that agree with them, without a language model; spaCy adds the rest | With a Polish spaCy model and its persName label mapped |
Not detected | Not detected; its README suggests adding an NER model |
| What the core needs | Nothing beyond the standard library | spaCy, numpy, pydantic and a few more; a language model only for names and places | pii-core and typer | Nothing beyond the standard library |
| On Polish data neither was tuned on (OpenPII, KPWr) | 72% of 5,255 values masked whole with pl_core_news_md, 306 false alarms; 90% of people in real text |
66%, 2,641 false alarms; 90% of people (presidio-analyzer 2.2.366, same model) | Not measured | Not measured |
| On polanon's own sample documents, tuned on | 99% fully masked with pl_core_news_md, 93% with rules alone |
67% with the same model | Not measured | Not measured |
| License | MIT | MIT | Apache-2.0 | MIT |
Compared from each project's own documentation and source on 3 November 2026; measured on 17
November 2026. Only Presidio was run, with the scripts in benchmarks/. polanon's own thirteen
documents are not neutral ground: its author wrote them and tuned its rules on them, and Presidio
had only the Polish model, also for the three invoices from abroad. The Polish rows of ai4privacy's
OpenPII and CLARIN-PL's KPWr are: polanon was never tuned on the parts measured, and on them the
gap narrows to five points and eight times fewer false alarms, with a tie on people, where the same
spaCy model does the work. Presidio wins on random codes written without a label, which it reads
with low-score patterns that also mark product codes and order numbers. Each has its place:
Presidio for many languages, structured data and its Azure integration; pii-veil for Polish
identifiers under Apache-2.0 when names do not matter; piimask for language-neutral identifiers
(e-mail, phone numbers, payment cards, IBAN, IP addresses, URLs) and US social security numbers,
with fake-value, hashing and partial strategies and an encrypted vault. polanon is for Polish text
on its way to a model, where the names in it
and the restored answer matter as much as the numbers.
| You want | Install |
|---|---|
| Identifiers, contacts, secrets, Polish names, companies by legal form | pip install polanon |
| Also places, and names and organisations no rule can see | pip install "polanon[ner]" then python -m spacy download pl_core_news_md |
| The stage-2 judges (a local Ollama model, or a remote one) | pip install "polanon[judge]" |
| Components for Haystack 3 pipelines | pip install "polanon[haystack]" |
| A gateway for tools that use the OpenAI API | pip install "polanon[gateway]" |
| The gateway as a Docker image, with the spaCy model inside | docker pull ghcr.io/boromat/polanon-gateway:0.4 |
Then use default_guards() with the model, or default_guards(with_ner=False) without it.
Another spaCy model is one argument away: default_guards(spacy_model="pl_core_news_lg").
Package names copied from pip work too (pl-core-news-lg). A local model directory can be passed
as a path; it must contain meta.json and config.cfg. Missing packages or model directories are
reported when the guards are built, while the model itself loads on first use.
An installed model package takes priority over a local path with the same name.
Text comes from the arguments, from a file with --file, or from standard input. Masked text goes
to stdout and the mapping to stderr, or to a file with --mapping:
polanon --version # print the installed version
polanon "Jan Kowalski, PESEL 50810112354"
polanon --file umowa.txt --ner --mapping mapping.json > masked.txt
cat umowa.txt | polanon --ner > masked.txt 2> mapping.json
polanon --restore --mapping mapping.json --file answer.txt # the model's answer, restored
polanon --json "Jan Kowalski, PESEL 50810112354" # {"text": "...", "mapping": {...}}
--restore puts the originals back into masked text, such as the model's answer, with the mapping
--mapping wrote, a person named in another case included; a token the mapping does not hold
stays as it is. --json writes one JSON object to stdout instead, for a script: the text, and the
mapping unless --mapping takes it.
A non-zero exit status means something went wrong and stderr says what. --file reads the file's
bytes itself and tells UTF-8, UTF-16 (what Windows PowerShell 5.1 writes with >) and cp1250
apart; text it cannot decode for certain is refused rather than masked half-blind. --ner --paranoid masks every name the model finds, also in English prose and code, as
mode="paranoid" does.
On Windows, prefer --file and --mapping to pipes and redirection. Windows PowerShell 5.1
re-encodes text piped into a program as ASCII, so Polish letters arrive as ? and a garbled name
is not recognised, and its 2> wraps stderr in error records. If you do pipe, run
$OutputEncoding = [System.Text.UTF8Encoding]::new($false) first; in cmd.exe, run chcp 65001.
A provider streams arbitrary fragments, so <OSOBA_1> can arrive as <OSO and BA_1>. The
restorer holds back anything that could still grow into a token:
restorer = Anonymizer.stream_restorer(result.mapping)
for chunk in stream: # "Dzień dobry <OSO", "BA_1>, PESEL <PESEL", "_1> zweryfikowany."
print(restorer.feed(chunk), end="")
print(restorer.flush())
# Dzień dobry Jana Kowalskiego, PESEL 50810112354 zweryfikowany.
Mask before the call, restore while the answer streams. With the Anthropic SDK:
import anthropic
from polanon import Anonymizer, default_guards
anonymizer = Anonymizer(default_guards(with_ner=False))
masked = anonymizer.anonymize_sync(question)
restorer = Anonymizer.stream_restorer(masked.mapping)
with anthropic.Anthropic().messages.stream(
model="claude-opus-5-5",
max_tokens=64000,
system="Personal data is replaced by tokens such as <OSOBA_1>. Copy a token exactly as written.",
messages=[{"role": "user", "content": masked.anonymized}],
) as stream:
for text in stream.text_stream:
print(restorer.feed(text), end="")
print(restorer.flush())
Telling the model what the tokens are keeps it from rewriting them. The
examples go further:
openai_chat.py does the same for any OpenAI-compatible endpoint (OpenAI, OpenRouter, Azure, vLLM,
a local Ollama), and anthropic_chat.py holds a conversation whose history keeps masked text only,
so an answer restored for the reader is never sent back in the clear. Both are tested in CI against
the real SDKs, offline.
A turn of a chat with tools sends more than the question: the history, and the result of every tool
the model calls. anonymizer.turn() masks all of it with one mapping, puts the originals back into
the tool arguments and the answer, and refuses instead of sending anything it could not mask:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.