Skip to content

feat(analyzer): Add AU bank details recognizer with tests#2182

Open
randiratnayake wants to merge 2 commits into
data-privacy-stack:mainfrom
randiratnayake:feature/au-bank-numbers
Open

feat(analyzer): Add AU bank details recognizer with tests#2182
randiratnayake wants to merge 2 commits into
data-privacy-stack:mainfrom
randiratnayake:feature/au-bank-numbers

Conversation

@randiratnayake

Copy link
Copy Markdown

Change Description

Added a new Australian bank details recognizer for Presidio Analyzer.

What this PR includes:

  • New recognizer for AU bank details (entity: AU_BANK_DETAILS) that detects BSB + account number pairs.
  • Structural validation logic to reduce false positives (valid BSB/account shape and basic plausibility checks).
  • Export wiring so the recognizer is available through predefined recognizers.
  • Registry wiring in default recognizer configuration (disabled by default, country code au).
  • Documentation update in supported entities.
  • Changelog update under unreleased analyzer additions.
  • New unit tests covering valid formats and invalid/edge cases.

Checklist

  • I have reviewed the contribution guidelines
  • I agree to follow this project's Code of Conduct
  • I confirm that I have the right to submit this contribution and that it does not knowingly contain proprietary or confidential code.
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

Copilot AI review requested due to automatic review settings July 22, 2026 04:26
@randiratnayake randiratnayake changed the title Add AU bank details recognizer with tests feat(analyzer): Add AU bank details recognizer with tests Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Presidio Analyzer predefined recognizer for Australian bank details (BSB + account number) and wires it into the predefined-recognizers exports, default registry configuration (disabled by default), documentation, changelog, and unit tests.

Changes:

  • Introduces AuBankDetailsRecognizer (AU_BANK_DETAILS) with regex patterns plus structural validation.
  • Wires the recognizer into predefined recognizers and default_recognizers.yaml (country_code au, disabled).
  • Adds unit tests and updates docs/supported_entities.md and CHANGELOG.md.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/australia/au_bank_details_recognizer.py Adds the AU bank details pattern recognizer + validation logic.
presidio-analyzer/tests/test_au_bank_details_recognizer.py Adds unit tests for valid/invalid AU bank detail formats.
presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/australia/init.py Exports the new AU bank details recognizer from the Australia package.
presidio-analyzer/presidio_analyzer/predefined_recognizers/init.py Exposes AuBankDetailsRecognizer via the top-level predefined recognizers module.
presidio-analyzer/presidio_analyzer/conf/default_recognizers.yaml Registers the recognizer in the default registry (disabled, country_code: au).
docs/supported_entities.md Documents the new AU_BANK_DETAILS supported entity.
CHANGELOG.md Adds an “Unreleased” analyzer entry for the new recognizer.

Copilot AI review requested due to automatic review settings July 22, 2026 04:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants