Repository navigation
Fix credential redaction across exported session data - #49
Merged
Merged
Conversation
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.
Credential redaction could miss provider-specific formats, suffixed secret names, and values outside known message fields. Overlapping detections could also leave part of a credential visible. This change scans the complete session structure, uses secret-named fields to protect opaque values, expands provider coverage, and redacts the union of overlapping matches.
Adds 102 synthetic regressions covering nested metadata, embedded JSON, dictionary-key collisions, authorization headers, punctuation, allowlist bypasses, and binary-heuristic bypasses. No captured credentials are included.
Validation: 660 tests passed with
python3.11 -m pytest -q -m 'not pii'; Ruff and diff checks pass. The optional live PII-model test cannot load because the installed Transformers does not supportopenai_privacy_filter.Limits remain documented: binary attachments/base64 are not decoded or OCRed, embedded JSON traversal is bounded to eight wrappers, and unknown credential formats may escape heuristic detection. This source change does not rewrite previously published datasets.