fix: laat redactie de ingestelde landenpakketten volgen #529
No reviewers
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck!529
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/redactie-regios"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
PrivacyProjection._projectbuilt its ownPrivacyScannerwithoutregions:, falling back todefaultPrivacyRegions, whileprivacy_provider.dartpassed the configured set. Turn a country pack off and you got black boxes over values OciWacht never reported — so the quality panel no longer predicted what the export would contain, which is exactly what the user reads it for.Closes #512
Direction of the bug
Over-redaction, not a leak:
allPrivacyRegions == defaultPrivacyRegionstoday, so only "pack turned off" is reachable. Worth saying plainly — this was a trust and consistency defect, not an exposure.Wider than the issue described
The issue named
_project. Two more scanners were built the same way and would have kept the disagreement alive, just moved:redaction_manifest_service.dart:130— the manifest of what was redacted. This is the sharpest one: an entry for a block that is not in the export sends the recipient looking for a redaction that does not exist, undermining the very trust the manifest exists to establish.app_shell_main_layout.dart:811— the export-gate summary.All five
forAudiencecall sites now passsettings.privacyRegions.Two deliberate boundaries
The default stays
defaultPrivacyRegions, notconst {}. A caller who forgets must redact more, not less. Fail-closed, matching the reasoning already written on_project.forExternalProcessingdeliberately takes noregionsparameter. Someone switching off the Dutch pack because it fires too often in their deck is making a statement about their own quality panel and their own export — not granting permission to send a BSN to a third party's model. Same reasoning the file already applies to disposition: stricter, because data that leaves the device cannot be recalled. The decision is pinned by a test with the reasoning attached, so a futureregions:there has to argue its case first.Verification
test/privacy_region_projection_parity_test.dart, red first (the parameter did not exist). Four assertions, two of them calibration: without checking that the scanner does report the BSN with the pack on and does not with it off, the real assertion could sit green because detection itself broke. A fourth pins that the universal layer — IBAN, e-mail, passport — keeps redacting underregions: {}, so this fix cannot become a leak.Gates
make checkgreen (86.2%).make check-secrets/make saststill red for the pre-existing reasons in #522 and #521.Principles
Touches the privacy boundary, which is the one place where getting it wrong is not recoverable. Weighed and recorded above: the fix moves towards what the user was told, the two asymmetries (fail-closed default, stricter external route) are deliberate, and the universal rules were explicitly re-tested rather than assumed.
PrivacyProjection._project bouwde zijn eigen scanner zonder regions en viel terug op defaultPrivacyRegions, terwijl privacy_provider de ingestelde pakketten wél doorgaf. Wie een land uitzette kreeg zwarte blokken over waarden die nooit gemeld waren: het kwaliteitspaneel voorspelde niet meer wat er in de export zou staan. Doorgegeven langs de hele keten — projectie, redactiemanifest en de exportsamenvatting. Het manifest is daarbij het scherpst: een entry voor een blok dat niet in de export staat laat de ontvanger zoeken naar een redactie die er niet is, en ondermijnt precies het vertrouwen dat het manifest hoort te vestigen. Twee bewuste grenzen. De standaardwaarde blijft defaultPrivacyRegions en niet const {}: een aanroeper die dit vergeet moet méér redigeren, niet minder. En forExternalProcessing neemt bewust géén regions — dat iemand het nl-pakket uitzet omdat het in zijn deck te vaak aanslaat, is een uitspraak over zijn eigen paneel, niet om een BSN naar een model van een derde te sturen. Die keuze staat nu ook als test vastgepind. Closes #512 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>