Skip to content

fix(cdc): keep replicated DDL out of logs - #171

Closed
seonghobae wants to merge 3 commits into
developfrom
fix/schema-ddl-log-redaction-622e5e6
Closed

fix(cdc): keep replicated DDL out of logs#171
seonghobae wants to merge 3 commits into
developfrom
fix/schema-ddl-log-redaction-622e5e6

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Fix the protected CDC schema-replication confidentiality defect test-first. SchemaChangeReplicaApplier historically wrote normalized raw DDL into INFO/WARN/ERROR logs and attached parser/database exception diagnostics. DDL can contain literals, object names, tenant/customer identifiers, comments, storage paths, and other deployment-sensitive material. Truncation is a volume bound, not a confidentiality boundary.

This remains a direct-develop, path-disjoint Draft. It changes only SchemaChangeReplicaApplier and focused logging regressions. Nothing here is implemented_on_develop before protected integration.

Exact current identity

  • protected/live base: develop@622e5e6c3d534f230c390f10e3832efadfc01825;
  • branch: fix/schema-ddl-log-redaction-622e5e6;
  • fail-first head: a4276cb66bf479fe9da4c2855198bdbadebb156a;
  • exact current source head: 977797d133570662f9f9111705100263cd7aee7b;
  • current synthetic merge preview: c5e940dc2e5797fb6e31a3e69fe2e2d754c10f93;
  • exact live-base comparison: 3 commits ahead, 0 behind, merge base = protected develop;
  • GitHub mergeability: true;
  • Draft: true;
  • formal reviews: none;
  • unresolved review threads: zero at the latest refresh.

Every predecessor-head/base check or review is historical and does not transfer.

RCA

  • Immediate cause: success, duplicate, blocked and execution-failure paths transported raw DDL; malformed JSON and JDBC failures transported exception objects/stack diagnostics.
  • Technical root cause: execution/policy classification was coupled to untrusted SQL/provider diagnostic transport.
  • Control failure: existing functional tests asserted operation behavior but not confidentiality of ordinary logs.

RED → GREEN

Fail-first a4276cb66bf479fe9da4c2855198bdbadebb156a adds logging assertions at the real production boundary using a DDL literal and provider diagnostics that must not be republished.

The current implementation preserves DDL validation, idempotent rewriting, JDBC execution, duplicate classification and exception propagation, while ordinary logs now retain only stable finite outcome/policy metadata. Raw DDL, parser exception objects, JDBC exception objects and stack traces are no longer serialized merely for routine observability. SchemaChangeReplicaApplierLoggingTest covers success, policy block, duplicate, execution failure and malformed-event paths.

Current hosted evidence

For exact source head 977797d133570662f9f9111705100263cd7aee7b:

  • CI 31342832592: success;
  • Dependency Review 31342832631: success;
  • CycloneDX SBOM 31342832572: success;
  • SAST Semgrep 31342832600: success;
  • Security Scan 31342832564: failure.

The hard Trivy job completed its scan and reported the six inherited protected-base Jackson findings (CVE-2026-54515, CVE-2026-59889, and GHSA-mhm7-754m-9p8w through root/ETL dependency views). This PR changes no Maven dependency. Shared remediation #160 owns that root cause; duplicating the BOM change or suppressing the findings here is rejected.

The same scanner also warns that some BOM-managed Maven dependency versions cannot be determined. Issue #196 separately requires such incomplete dependency-resolution evidence to fail closed even when a future SARIF has zero findings.

Current protected PR workflows execute GitHub's synthetic merge preview rather than accepted literal source. Protected JaCoCo can also report Analyzed bundle 'etl-service' with 0 classes until #162/#164 integrates. Source identity, dependency vulnerability/completeness, and non-vacuous coverage are independent evidence dimensions.

Documentation / traceability boundary

#159 already tracks diagnostic-confidentiality reconciliation in the canonical documentation graph. Active PR #174 carries broader CDC diagnostic-confidentiality doctoring covering raw DDL, parser/driver diagnostics, purpose-bound observability, CWE-532 and OWASP Logging Cheat Sheet guidance; that active-PR document is not shipped truth and does not transfer merge evidence to this branch. Do not duplicate canonical prose simply to make this bounded source PR larger.

Merge boundary

Keep Draft. Merge only after shared dependency remediation is integrated and this unchanged behavior is revalidated against the resulting live base; accepted literal-source CI/security evidence exists; complete same-revision dependency/vulnerability evidence has no #196 incompleteness; non-vacuous owned-production coverage passes; zero valid unresolved findings remain; and qualifying independent non-author approval exists where governance requires it. No predecessor-head, other-PR, incomplete-scanner, status-only, skipped-required, or synthetic-merge-only evidence transfers.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 18c87926-b297-4e13-bc4b-09545354d957

📥 Commits

Reviewing files that changed from the base of the PR and between 622e5e6 and 977797d.

📒 Files selected for processing (2)
  • cdc-service/src/main/java/com/xtrmetl/cdc/replication/SchemaChangeReplicaApplier.java
  • cdc-service/src/test/java/com/xtrmetl/cdc/replication/SchemaChangeReplicaApplierLoggingTest.java

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant