Fixes #24798: Prevent avro parser from leaking file content in warning logs#27498
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
6b5d865 to
3fbe124
Compare
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved 1 resolved / 1 findingsRedacted sensitive file content from Avro parser warning logs and decoupled integration tests from MinIO dependency. No issues found. ✅ 1 resolved✅ Quality: Integration test unnecessarily requires MinIO for a pure function
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
Ready for review. Addressed the gitar-bot feedback — moved the test to unit tests. |
Describe your changes:
Fixes #24798
When the avro schema parser fails to parse a file during S3 ingestion, the exception message includes the actual file content. This was being logged at WARNING level via
logger.warning(f"Unable to parse the avro schema: {exc}"), which can leak sensitive data into log storage.Changed warning logs to only include the exception type name instead of the full exception message. Full exception details remain available at DEBUG level through the existing
traceback.format_exc()call.Before:
WARNING - Unable to parse the avro schema: No "type" property: {"secret_key": "super_secret_value_12345"}After:
WARNING - Unable to parse the avro schema: SchemaParseExceptionAdded a unit test to verify warning-level logs do not contain any of the sensitive file content.
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>