Skip to content

feat(commons): add anonhymizer to whitelist props in logs [WPB-24990]#8109

Open
e-maad wants to merge 2 commits into
mainfrom
feat/add-anonymizer-WPB-24990
Open

feat(commons): add anonhymizer to whitelist props in logs [WPB-24990]#8109
e-maad wants to merge 2 commits into
mainfrom
feat/add-anonymizer-WPB-24990

Conversation

@e-maad
Copy link
Copy Markdown
Contributor

@e-maad e-maad commented Apr 24, 2026

BugWPB-24990 [Web] User names are visible in the logs

Pull Request

Summary

Added anonymizer for whitelist properties visible in logs

Security Checklist (required)

  • External inputs are validated & sanitized on client and/or server where applicable.
  • API responses are validated; unexpected shapes are handled safely (fallbacks or errors).
  • No unsafe HTML is rendered; if unavoidable, sanitization is applied and documented where it happens.
  • Injection risks (XSS/SQL/command) are prevented via safe APIs and/or escaping.

Accessibility (required)

Standards Acknowledgement (required)


Screenshots or demo (if the user interface changed)

Notes for reviewers

  • Trade-offs:
  • Follow-ups (linked issues):
  • Linked PRs (e.g. web-packages):

@screendriver
Copy link
Copy Markdown
Member

anonhymizer should be anonymizer in the Git commit message and pull request description

@thisisamir98 thisisamir98 changed the title feat: add anonhymizer to whitelist props in logs [WPB-24990] feat(commons): add anonhymizer to whitelist props in logs [WPB-24990] Apr 24, 2026
Comment thread packages/commons/package.json Outdated
Comment thread packages/commons/src/types/uphold__anonymizer.d.ts Outdated
Comment thread packages/commons/src/index.ts Outdated
@sonarqubecloud
Copy link
Copy Markdown


import {anonymizer} from '@uphold/anonymizer';

export const anonymize = anonymizer({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm concerned that this change wires the app directly to the concrete @uphold/anonymizer implementation (anonymize is exported as a library-specific instance), instead of introducing an explicit boundary.

I recommend we keep this behind a stable interface and inject the implementation where needed. This keeps call sites decoupled, improves testability (easy deterministic stubs) and makes future library swaps/config changes low-risk.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants