Skip to content

Prevent hosted database credentials from being sent to PostHog#1691

Merged
gugu merged 1 commit intomainfrom
fix/exclude-hosted-db-credentials-from-posthog
Mar 26, 2026
Merged

Prevent hosted database credentials from being sent to PostHog#1691
gugu merged 1 commit intomainfrom
fix/exclude-hosted-db-credentials-from-posthog

Conversation

@gugu
Copy link
Contributor

@gugu gugu commented Mar 26, 2026

Add ph-no-capture class to credential containers in the hosted database success dialog and password reset dialog so PostHog autocapture excludes sensitive data (host, port, username, password) from captured events.

Summary by CodeRabbit

  • Bug Fixes
    • Added security protection for database credentials in hosted database dialogs. Sensitive authentication information (host, port, username, password) displayed in success and password reset dialogs is now protected from capture.

Add ph-no-capture class to credential containers in the hosted database
success dialog and password reset dialog so PostHog autocapture excludes
sensitive data (host, port, username, password) from captured events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 26, 2026 21:31
@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c017b176-2894-4870-9467-4b9d9435e318

📥 Commits

Reviewing files that changed from the base of the PR and between b0d7ff0 and b002c35.

📒 Files selected for processing (2)
  • frontend/src/app/components/connections-list/hosted-database-success-dialog/hosted-database-success-dialog.component.html
  • frontend/src/app/components/hosted-databases/hosted-database-reset-password-dialog/hosted-database-reset-password-dialog.component.html

📝 Walkthrough

Walkthrough

Two hosted database dialog templates are updated to add the ph-no-capture class to credentials display containers. This privacy attribute is applied consistently across the success and reset-password dialogs to control how credentials are handled.

Changes

Cohort / File(s) Summary
Hosted Database Credentials Privacy
frontend/src/app/components/.../hosted-database-success-dialog/hosted-database-success-dialog.component.html, frontend/src/app/components/.../hosted-database-reset-password-dialog/hosted-database-reset-password-dialog.component.html
Added ph-no-capture class to credentials container divs in both dialogs to mark sensitive credential display areas for privacy handling.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A whisker of privacy, a hop toward care,
We cloak the credentials with a ph-no-capture prayer,
Database secrets tucked safe, out of sight,
Two dialogs now protected, dancing in the night! 🔐✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding ph-no-capture classes to prevent hosted database credentials from being sent to PostHog analytics.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Security Check ✅ Passed Pull request correctly adds ph-no-capture class to elements rendering sensitive database credentials, preventing PostHog autocapture without altering functionality or introducing security regressions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/exclude-hosted-db-credentials-from-posthog

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

@gugu gugu enabled auto-merge (squash) March 26, 2026 21:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds PostHog autocapture exclusions around hosted database credential displays to avoid leaking sensitive connection details (host, port, username, password) from dialogs.

Changes:

  • Add ph-no-capture to the credential container in the hosted database reset-password “result” dialog.
  • Add ph-no-capture to the credential container in the hosted database success dialog.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
frontend/src/app/components/hosted-databases/hosted-database-reset-password-dialog/hosted-database-reset-password-dialog.component.html Wraps the rendered reset credentials block with ph-no-capture to prevent PostHog DOM autocapture of new credentials.
frontend/src/app/components/connections-list/hosted-database-success-dialog/hosted-database-success-dialog.component.html Wraps the hosted DB success credentials block with ph-no-capture to prevent PostHog DOM autocapture of provisioned credentials.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gugu gugu merged commit 3546084 into main Mar 26, 2026
17 of 20 checks passed
@gugu gugu deleted the fix/exclude-hosted-db-credentials-from-posthog branch March 26, 2026 21:34
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.

2 participants