Skip to content

Error sanitize#919

Merged
snadrus merged 10 commits into
mainfrom
err-sanitize
Feb 9, 2026
Merged

Error sanitize#919
snadrus merged 10 commits into
mainfrom
err-sanitize

Conversation

@snadrus

@snadrus snadrus commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

Stop sharing internal details users do not need.

  1. Handlers fixed
  2. pgx no-longer carries password in its connection string
  3. harmonydb find & remove, just-in-case

@snadrus snadrus requested a review from a team as a code owner January 24, 2026 21:08
Comment thread harmony/harmonydb/userfuncs.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR implements error sanitization to prevent exposing internal system details to users. The changes focus on three main areas: sanitizing HTTP error responses in handlers, masking passwords in database connection strings, and filtering database errors that may contain sensitive information.

Changes:

  • HTTP handlers now log detailed errors internally while returning generic error messages to clients
  • Database connection strings mask passwords with asterisks before being used in error messages
  • A new errFilter function in harmonydb intercepts database errors containing sensitive patterns (password, host=, ://) and redacts them
  • Security documentation added explaining what information should be protected and what can be safely shared
  • Updated yugabyte/pgx dependency from v5.5.3-yb-5 to v5.7.6-yb-1

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pdp/handlers.go Sanitizes error messages in HTTP responses by logging errors internally with detailed context while returning generic messages to clients; adds zondax/golem logger import
market/mk20/http/http.go Removes error details from authentication failure responses
market/mk12/mk12_utils.go Sanitizes database query errors in deal status endpoint
harmony/harmonydb/userfuncs.go Integrates errFilter function into all database operations; improves variable naming
harmony/harmonydb/harmonydb.go Masks password in connection strings with asterisks; adds errFilter function to detect and redact errors containing sensitive database connection information
go.mod Upgrades yugabyte/pgx to v5.7.6-yb-1; moves zondax/golem from indirect to direct dependency
go.sum Updates checksums for yugabyte/pgx version change
documentation/en/design/README.md Adds security boundary documentation explaining what system components should be protected and what can be safely shared with untrusted parties

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

Comment thread pdp/handlers.go Outdated
Comment thread market/mk20/http/http.go Outdated
Comment thread harmony/harmonydb/harmonydb.go Outdated
Comment thread documentation/en/design/README.md
Comment thread documentation/en/design/README.md Outdated
@snadrus snadrus merged commit 551da78 into main Feb 9, 2026
3 checks passed
@snadrus snadrus deleted the err-sanitize branch February 9, 2026 17:59
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.

4 participants