feat: added IBAN and passport number detection patterns to PII scanner - #27
Open
AaronProbha18 wants to merge 4 commits into
Open
feat: added IBAN and passport number detection patterns to PII scanner#27AaronProbha18 wants to merge 4 commits into
AaronProbha18 wants to merge 4 commits into
Conversation
20 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds IBAN and passport-number PII detection to all five active PII-scanning sites in the Python SDK (
redaction.py,google_adk.py,observe/pii_scanner.py,pipeline/modules/pre/pii_scanner.py,pipeline/modules/post/output_pii.py), matching them acrossdict- anddataclass-based sites with consistentiban/passportkey naming. Also updates the pre-existing property test that asserted a closed PII-type set, and documentation referencing detected PII categories.Fixes #457
Type of Change
Changes Made
ibanandpassportregex patterns toPII_PATTERNS/_PII_PATTERNSdicts incore/audit/redaction.py,integrations/google_adk.py, andobserve/pii_scanner.pyiban(confidence 0.9) andpassport(confidence 0.7)PIIPatternentries toDEFAULT_PII_PATTERNSinpipeline/modules/pre/pii_scanner.pyandpipeline/modules/post/output_pii.py, keeping the two lists identicalIBANPattern/PassportPatternand corresponding map entries to the Go sidecar'sgovernance/patterns.gotests/core/audit/test_redaction.py, and new test files forobserve/pii_scanner.py, both pipeline modules,integrations/google_adk.py, and the Go sidecartests/test_observe_properties.py'sTestPIINonInterferencetype assertion to includeiban/passportpackages/tealtiger-python/README.mdandpackages/tealtiger-sidecar/README.mdPII-category referencesTesting
pytest)mypy src)ruff check src tests)Checklist
Breaking Changes