Repository navigation
fix(pii): recognize reserved placeholder email domains - #246
Conversation
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Self-review requested by the repository owner. I reproduced two issues in this diff and am addressing the inline findings before the final review.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Final personal self-review: both actionable inline findings are fixed in this head and both threads are resolved. The fix bounds local-part matching and preserves placeholder addresses followed by prose ellipses. All 471 tests in the affected security/PII test files pass; lint and source/wheel builds pass. Current-head CI is rerunning. I attempted the requested APPROVE review, but GitHub rejected it because this account authored the PR (HTTP 422: Can not approve your own pull request). This COMMENT review records the completed review; an independent maintainer must provide GitHub approval.
* fix(pii): recognize reserved placeholder email domains * test(pii): keep detection controls on ordinary domains * fix(pii): bound placeholder scans and preserve prose punctuation Signed-off-by: Narendran Raghavan <[email protected]>
Summary
PII-only validation flags RFC 2606 fixture addresses as HIGH personal email findings. Exempt reserved domains and their subdomains, mixed case, and trailing prose dots while retaining ordinary/lookalike domain detection and real addresses beside fixtures.
Bound the email local-part start so excluding a long placeholder cannot trigger quadratic rescanning. The review also caught ASCII ellipses being mistaken for domain continuations; the terminal guard now handles those without exempting real suffix domains.
Fixes #244.
Verification
CHANGELOG.md)make lintmake buildAt commit
71a753662065e72967e3b2003a3074a3c00f42c8:git diff --checkpassed. Both actionable inline review findings were fixed; the related threads are resolved.Release Impact
CHANGELOG.mdEarlier verification context
The complete Python 3.12/3.13 suites and all 17 CI checks passed on previous head
153759b. Those results are not presented as current-head CI results. Earlier local environment limitations are retained below for transparency.Prior-head local full-suite limitations (153759b)
The local full-suite run was interrupted after 22 failed, 14,878 passed, 19 skipped. This is not reported as a local green suite. The isolated PATH accidentally excluded the trusted Docker executable, causing 15 Docker-related failures. Restoring
/usr/local/binin a 20-case control against unchanged Harbor/Tier 3 code produced 17 passes and three failures. The remaining failures reproduce in unchanged code: the streamed-timeout stderr assertion receives an additional Bash termination diagnostic, and two Bedrock configuration probes time out and reportunavailable. FIFO CLI startup timeouts from the loaded full run passed in that control.The Docker-missing control reproduced 19 of the cleanup branch's 20 local failures on unchanged code; the other FIFO case was intermittent. Additional Bedrock failures in the email branch are recorded below. No unrelated production changes were included. The complete CI checks above provide the full-suite verification for the final PR head.
Failures observed in the interrupted local full run
tests/test_harbor_local_mode.py::test_streamed_timeout_callback_matches_result_and_contains_descendantstests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_classifies_real_invalid_region_as_fataltests/test_harbor_secure_docker_environment.py::test_service_stop_and_sidecar_downloads_scrub_main_compose_environmenttests/test_harbor_secure_docker_environment.py::test_service_stop_uses_label_scoped_raw_docker_when_compose_model_requires_secret[main]tests/test_harbor_secure_docker_environment.py::test_service_stop_uses_label_scoped_raw_docker_when_compose_model_requires_secret[helper]tests/test_harbor_secure_docker_environment.py::test_service_stop_accepts_service_declared_by_trusted_compose_includetests/test_harbor_secure_docker_environment.py::test_windows_main_downloads_use_scrubbed_docker_env_and_validated_archivestests/test_harbor_secure_docker_environment.py::test_windows_transfer_removes_output_if_diagnostic_spool_creation_failstests/test_harbor_secure_docker_environment.py::test_windows_transfer_enforces_combined_temporary_disk_budget[11-0-True]tests/test_harbor_secure_docker_environment.py::test_windows_transfer_enforces_combined_temporary_disk_budget[0-11-True]tests/test_harbor_secure_docker_environment.py::test_windows_transfer_enforces_combined_temporary_disk_budget[6-5-True]tests/test_harbor_secure_docker_environment.py::test_windows_transfer_enforces_combined_temporary_disk_budget[6-4-False]tests/test_harbor_secure_docker_environment.py::test_windows_transfer_timeout_reaps_process_and_removes_partial_outputtests/test_harbor_secure_docker_environment.py::test_windows_transfer_idle_timeout_resets_while_output_progressestests/test_harbor_secure_docker_environment.py::test_windows_transfer_growing_output_exceeding_budget_reaps_processtests/test_harbor_secure_docker_environment.py::test_windows_transfer_total_timeout_reaps_continuously_progressing_processtests/test_harbor_secure_docker_environment.py::test_windows_transfer_rejects_process_completion_after_total_deadlinetests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_rejects_unsafe_bearer_token_characters[bad\x7fvalue]tests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_classifies_malformed_effective_proxy_as_fatal[http://[::1]tests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_classifies_malformed_effective_proxy_as_fatal[http://127.0.0.1:banana]tests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_does_not_blame_proxy_bypassed_by_no_proxytests/tier3/test_workflow.py::test_fifo_dataset_is_rejected_without_blocking