-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redact only PII from QuineValue and cypher Expr ADTs
# Description The `QuineValue` and `cypher.Expr` datatypes are the most likely types to contain PII, but they're also the main thing the user controls. Having log messages that omit them entirely can be frustrating and encourage users to disable PII sanitization entirely. This PR adds new Loggable instances for these ADTs that preserve the structure of the value, its types, and any statically-defined symbols, while still omitting any literals or value contents. For example, logging a redacted string will display that it was a string, but not what the contents of the string were. Also fixes the Loggable instance for namespaceIds and marks QuineType and TemporalUnit as always safe Finally, clarifies some comments, documents the distinction between `cypher.Value.pretty` and `Loggable[cypher.Value]`, and fixes a bug in `cypher.Value.pretty`'s bytes case ## Type of change Delete options that are not relevant, add if necessary - [x] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) # How Has This Been Tested? Describe the tests performed, including instructions to reproduce, and relevant details for your test configuration - [x] New unit tests added and pass # Checklist: - [x] I have performed a self-review of my code - [x] I have verified my code doesn't add an implementation for something that already exists - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added tests that prove my change is effective and works - [x] New and existing unit tests pass locally with my changes GitOrigin-RevId: 4c6a9693cf1654d02f2fb6eb481b10f3a057114f
- Loading branch information
1 parent
343e8c8
commit f6ebabc
Showing
3 changed files
with
426 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.