Two-pass PII redaction with multi-country pattern packs
Pass 1: deterministic regex with Nordic/European/ECHR/Global packs covering fødselsnummer, Swedish personnummer, Danish/Finnish CPR, UK NI, French INSEE, IBAN, EU phones, ECHR application numbers, DOB, and national ID label patterns. Pass 2: LLM semantic scan (Azure OpenAI) finds names, orgs, places and identifying descriptions missed by regex. Runs on pre-redacted text so no raw PII reaches the LLM. Adds region selector (Nordic/European/ECHR/Global) to the Redact UI. Falls back gracefully when Azure is not yet configured. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -160,6 +160,7 @@ async function runTool(event) {
|
||||
}
|
||||
if (state.activeTool === 'redact') {
|
||||
payload.mode = currentRedactionMode();
|
||||
payload.region = currentRedactionRegion();
|
||||
}
|
||||
|
||||
setBusy(true);
|
||||
@@ -236,6 +237,10 @@ function currentRedactionMode() {
|
||||
return document.querySelector('input[name="redactionMode"]:checked')?.value || 'standard';
|
||||
}
|
||||
|
||||
function currentRedactionRegion() {
|
||||
return document.querySelector('input[name="redactionRegion"]:checked')?.value || 'nordic';
|
||||
}
|
||||
|
||||
function renderResults(data) {
|
||||
const sections = [];
|
||||
sections.push(sectionHtml('What We Found', renderMainFinding(data)));
|
||||
|
||||
Reference in New Issue
Block a user