Skip to content

zod secret mixin#41

Merged
evantahler merged 1 commit into
mainfrom
secrts
Jun 18, 2025
Merged

zod secret mixin#41
evantahler merged 1 commit into
mainfrom
secrts

Conversation

@evantahler

Copy link
Copy Markdown
Member

No description provided.

@evantahler evantahler requested a review from Copilot June 18, 2025 04:25

Copilot AI left a comment

Copy link
Copy Markdown

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 introduces a Zod secret mixin that enables marking sensitive fields in Zod schemas as secret, ensuring that such fields are redacted from logs. Key changes include:

  • Adding a new utility in backend/util/zodSecretsMixin.ts that augments Zod types with a .secret() method.
  • Updating action input schemas in user and session actions to utilize the new .secret() mixin.
  • Integrating secret field handling in the connection sanitization logic and adding documentation and tests to support these changes.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/.prettierignore Added "types/" to be ignored by Prettier
backend/util/zodSecretsMixin.ts New file implementing the secret mixin for various Zod types, enabling secret field marking
backend/util/formatters.ts Removal of formatting utility functions; ensure this change is intentional and dependencies updated
backend/classes/Connection.ts Integrated secret field detection in request sanitization
backend/actions/user.ts and session.ts Updated password fields to apply the secret mixin
backend/tests/actions/user.test.ts Added test case to verify that secret fields are redacted in logging
backend/.prettierignore Added "types/" to be ignored by Prettier in the backend directory
README.md Updated documentation explaining the usage of the new .secret() mixin
Comments suppressed due to low confidence (1)

Comment thread backend/util/zodSecretsMixin.ts
@evantahler evantahler enabled auto-merge (squash) June 18, 2025 04:28
@evantahler evantahler merged commit 23acf75 into main Jun 18, 2025
10 checks passed
@evantahler evantahler deleted the secrts branch June 18, 2025 04:29
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