Open
Description
Enhancement
Description:
When log.redaction-enabled is set to true, TiDB should ensure that sensitive user data is not logged. However, there is currently no automated test to enforce this guarantee and detect accidental data leakage in logs. To improve security and compliance, I propose adding a log lint test to validate that TiDB logs do not contain raw data values when log redaction is enabled.
Related Issue:
#59279 - Existing discussion on potential log data leakage.
Proposal:
- Develop a log lint test as part of TiDB’s CI/CD pipeline to scan logs when log.redaction-enabled=true.
- Define a rule set to detect sensitive data patterns (e.g., SQL literals, raw query parameters, user-provided values).
- Ensure logs comply with redaction expectations by verifying placeholders (?) are used instead of actual values.
- Fail the test if data leakage is detected, ensuring regressions do not occur in future releases.
Activity