fix(cdc): keep raw exception diagnostics out of dead-letter headers - #192
Draft
seonghobae wants to merge 2 commits into
Draft
fix(cdc): keep raw exception diagnostics out of dead-letter headers#192seonghobae wants to merge 2 commits into
seonghobae wants to merge 2 commits into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 10, 2026
Open
[Security evidence] Fail closed when Trivy cannot resolve Maven BOM-managed dependency versions
#196
Open
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.
Purpose
Advance #181 with one bounded data-governance/security slice from protected
develop@622e5e6c3d534f230c390f10e3832efadfc01825. Protected replica-consumer dead-letter recovery inherited Spring Kafka defaults that published raw exception-message and exception-stacktrace headers with the failed record. JDBC/provider/credential-adjacent diagnostics do not belong in the replay envelope.This direct-
developDraft changes only the real Kafka error-handler/test boundary. It does not choose a broker retention period, ACL system, encryption provider, tenant namespace, automatic replay policy, alternate payload store, or exactly-once claim. The failed record key/value and bounded origin/classification metadata remain recovery evidence in this first slice; full DLT retention/access/redrive governance stays in #181.Exact current identity
develop@622e5e6c3d534f230c390f10e3832efadfc01825;fix/cdc-dlt-safe-exception-headers-622e5e6;901a98e3bef05f63002602da8f228963ff698e63;58e21a9bda5aa1fe3fa2654f1f70f6c45bd3bbfd;910958c403635583ce2c353f04d033741cb6114e;Every check/review from a predecessor source head is historical and does not transfer.
RCA
DeadLetterPublishingRecovererwas created without narrowing its default exception headers.KafkaConfigTestverified recoverer/backoff existence but never examined the actual produced DLT record/header boundary.TDD evidence
RED —
901a98e3bef05f63002602da8f228963ff698e63The fail-first commit changed only
KafkaConfigTest. It obtains the actual production-configuredDeadLetterPublishingRecoverer, recovers a realistic failed Kafka record whose exception contains a credential-bearing PostgreSQL URL, captures the realProducerRecord, and requires:.DLTdestination;CI
31347680708, macOS job93332556332, checked out synthetic mergea3818e868509d60bd7522d5ddf9a35480fd7731b(Merge 901a98e... into 622e5e6...). Production and tests compiled, ETL passed, and CDC ran 107 tests with exactly the new DLT test failing and zero test errors/skips. The failed assertion foundkafka_dlt-exception-message, whose payload carried the credential-bearing JDBC diagnostic. The first failing boundary was therefore the intended framework/production dead-letter contract rather than setup/import/fixture code.GREEN —
58e21a9bda5aa1fe3fa2654f1f70f6c45bd3bbfdThe production fix retains the existing recoverer and destination mapping but excludes only
HeadersToAdd.EX_MSGandHeadersToAdd.EX_STACKTRACE. Original record content, source metadata and finite exception class/cause classification remain available for the current recovery model. No regex masking, truncation or alternate storage path is introduced.KafkaConfigand both public bean factory methods also document the dead-letter privacy/recovery boundary in beginner-readable Javadoc.CI
31347862962completed successfully on macOS, Ubuntu and Windows. macOS job93333070863checked out synthetic merge910958c403635583ce2c353f04d033741cb6114e, ranKafkaConfigTest6/6 green, CDC 107/107 green, ETL 275/275 green, gateway tests green, and completed the full reactor withBUILD SUCCESS.The same CI job independently reproduces the inherited protected JaCoCo defect: report and check each say
Analyzed bundle 'etl-service' with 0 classesand then report the coverage checks met. #162/#164 owns that root-cause repair; this CI result is not non-vacuous 100% owned-production coverage evidence.The current protected CI workflow also checked out the GitHub PR merge ref, not literal source head
58e21a9...; the successful CI aggregate is integration-tree behavior evidence, not accepted literal-source proof.Security Scan completeness RCA — aggregate green is not accepted evidence
Security Scan
31347862957completed with aggregatesuccess, but the hard Trivy filesystem job93333070855is not accepted as a complete vulnerability gate for two independent reasons:910958c403635583ce2c353f04d033741cb6114e, not literal source head58e21a9...; andDependency version cannot be determined. Child dependencies will not be found.before reporting0 CRITICAL/HIGH/MEDIUM findings.Issue #196 now owns this scanner-completeness defect. A zero-findings SARIF cannot prove absence of vulnerable BOM-managed Maven dependencies when the scanner itself states dependency resolution is incomplete. The current result is therefore
incomplete / non-passingunder mightyETL acceptance despite the aggregate green conclusion.This does not supersede shared Jackson remediation #160. The protected dependency baseline still requires resolved same-revision advisory evidence; one incomplete Trivy run cannot establish that the inherited Jackson line is clean. Do not duplicate #160's BOM change here, suppress the scanner warning, add an ignore, reduce severity, or treat another scanner as an automatic substitute without proving same-revision completeness.
Current gate state
For exact source head
58e21a9bda5aa1fe3fa2654f1f70f6c45bd3bbfd:31347862962: aggregate success on macOS/Ubuntu/Windows, but source execution is synthetic-merge-only;31347862973: success;31347862956: success;31347862943: success;31347862957: aggregate success, not accepted because hard Trivy is synthetic-source and Maven dependency resolution is incomplete ([Security evidence] Fail closed when Trivy cannot resolve Maven BOM-managed dependency versions #196);Documentation / data-governance boundary
This slice closes only raw exception diagnostic transport in DLT headers. #181 still owns the larger production decision for payload/header data classification, broker retention, tenant/owner access, encryption and key ownership, deletion, replay/redrive authorization, schema/version compatibility, poison-message handling, audit evidence, recovery testing and operator runbooks. Canonical PRD/TRD/Architecture/UML/security/data-governance/traceability should reconcile this
active_pronly when the #149 documentation writer lane is safe; nothing here isimplemented_on_developbefore protected integration.Merge boundary
Keep Draft. Do not merge until the unchanged exact source head has accepted literal-source CI/security evidence under integrated controls, complete same-revision dependency/vulnerability evidence with no unresolved scanner-completeness gap, non-vacuous owned-production coverage under #162/#164 or an equivalent accepted repair, every current dependency/SBOM/SAST/security gate passes, zero valid unresolved review findings remain, and qualifying independent non-author approval exists where governance requires it. No predecessor-head, other-PR, status-only, skipped-required, pending, incomplete-scanner, or synthetic-merge-only evidence transfers into that decision.