Skip to content

Release 0.14.1 - #86

Merged
stefanoferi merged 7 commits into
mainfrom
release/0.14.1
Oct 8, 2026
Merged

stefanoferi merged 7 commits into
mainfrom
release/0.14.1

Conversation

@stefanoferi

@stefanoferi stefanoferi commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Patch release; the [0.14.1] section of CHANGELOG.md lists the changes.

  • Rust PII scanner: Luhn check on card numbers; the phone formats of the Python redactor (North American, Italian), with the same boundaries.
  • PII engines: a PERSON entity is masked only when it has no digit, no e-mail/path character and no lowercase stop word (English, Italian, German, French, Spanish, Portuguese); names written in lowercase are masked (PII redactor, spacy-regex, Presidio).
  • Tests: the event-loop stall is bounded by the duration of the slow job (1 s).
  • Redteam: the baseline is regenerated. PII false positives are Python 3/24, Rust 0/24 and Presidio 9/24.
  • Version: 0.14.1 in the eight manifests.

Local checks: pytest 4584 passed; cargo fmt, clippy and 30 tests; redteam gate; twine check --strict.

…mats of the Python redactor

The Rust PII scanner reports a credit_card match only when its digits pass
the Luhn checksum. Its phone pattern is the one of the Python redactor:
North American numbers and Italian mobile and landline numbers, with or
without +39 or 0039. The regex crate has no lookarounds, so each pattern
carries an accept function that checks what the regex cannot: the
checksum, and the characters before and after a phone number. redact()
masks and counts only the accepted matches, and scan() counts them.
An ISBN, a build number and a 16-digit number that fails the Luhn check
are no longer reported.
admina.domains.data_sovereignty.names.is_name_like() holds for a span with
no digit and a word with a capital initial. The PII redactor, the
spacy-regex engine and the Presidio engine skip the PERSON entities of the
NER model for which it does not hold: the English spaCy model labels
lowercase phrases of other languages as PERSON ("il codice articolo",
"la pratica n. 2026/000457"). A name written all in lowercase is not
masked either.
The event-loop tests run a 1 s job and accept a stall shorter than the
job. A loop that runs the job, or waits for it without yielding, stalls
for at least the whole job, so the tests fail for it whatever the load;
with the loop free, a stall reaches the bound only if the scheduler holds
the loop for a second. Checked with an executor that waits for the worker
thread on the loop: the three tests fail with stalls of 1.0 to 8.0 s.
PII false positives: Python 4/24, Rust 0/24, Presidio 8/24; Presidio
type-level recall 0.586. MODEL_CARD gives the numbers, the Luhn check and
the phone formats of both engines, the IBAN checks of each engine, and the
false positives that remain: ORG/GPE on non-English sentences, PERSON on
German sentences, and PERSON on "Friday" and PHONE on an Italian reference
number with Presidio.
…ords

is_name_like() rejects a span with a digit, a character of an e-mail
address or a path (@ / \ _ # : =), or a lowercase word that is a stop word
of English, Italian, German, French, Spanish or Portuguese (the lists of
spaCy, without the words that are also first names: will, may, sara, mia,
ali). Capitalised words are not checked. Names written in lowercase, which
the English spaCy model labels as PERSON ("john smith", "giovanni
esposito"), are masked again; phrases such as "il codice articolo", "ci
vediamo domani" or "das Wetter" are not.
…RSON

PII false positives: Python 3/24, Rust 0/24, Presidio 9/24; Presidio
type-level recall 0.586. MODEL_CARD and the [0.14.1] section of CHANGELOG
describe the rule and the remaining false positives.
@stefanoferi
stefanoferi merged commit ef47d15 into main Oct 8, 2026
20 checks passed
@stefanoferi
stefanoferi deleted the release/0.14.1 branch October 8, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant