microsoft / security-utilities

Security utilities for key generation, string redaction, etc.
MIT License
24 stars 9 forks source link

Fix identifiable scan behaviors and add hybrid scan capability. #42

Closed michaelcfanning closed 3 months ago

michaelcfanning commented 3 months ago

This change extends our unit testing to ensure that the high performance Rust library is exactly equivalent in behavior to the other libraries. I noticed a discrepancy in some ad hoc testing in redaction token production. Testing also closed a few other holes.

Opportunistically, to enable full testing I updated the high perf scanner to create a back-up masker for unimplemented rules. This allows the high performance masker to be initialized with arbitrary patterns. If it can assume responsibilities for detection, it does so, otherwise it uses a fallback masker.