diff --git a/src/offat/tester/post_test_processor.py b/src/offat/tester/post_test_processor.py index f7b6ceb..af49eb4 100644 --- a/src/offat/tester/post_test_processor.py +++ b/src/offat/tester/post_test_processor.py @@ -97,6 +97,10 @@ def detect_exposure(data: str) -> dict: for pattern_name, pattern in sensitive_data_regex_patterns.items(): matches = findall(pattern, data) if matches: + if isinstance(matches, list) and isinstance(matches[0], tuple): + matches = set.union(*[set(match_tuple) for match_tuple in matches]) + matches.discard('') + matches = list(matches) detected_exposures[pattern_name] = matches return detected_exposures