fix(serializer): mask pydantic secret values - #1886
Conversation
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
|
@claude review |
There was a problem hiding this comment.
Claude Code Review
No review was started: this request came from a bot account. Manual reviews can only be requested by someone with write access to this repository. Ask a maintainer to comment @claude review, or have your automation post the comment from a user account with write access.
Tip: disable this comment in your organization's Code Review settings.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ad676f92a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
What does this PR do?
Prevents Pydantic
SecretStrandSecretByteswrappers from being reflected into serialized trace data. The serializer now returns a stable<secret>placeholder before generic object handling.Adds focused coverage for bare secrets and secrets nested in Pydantic models.
Type of change
Verification
A direct trace-attribute serialization check confirmed neither synthetic raw value remains in the serialized input and both values serialize as
<secret>.The repository-wide format check was not used as evidence because unrelated
tests/unit/test_media.pyis already reported as needing reformatting; both changed files pass the format check.Checklist
code_review.md..env.templatedo not require updates.This PR is not safe to merge because it adds assertions for secret masking without implementing that masking, leaving the disclosure path unresolved.
Summary
This PR adds regression tests intended to ensure Pydantic
SecretStrandSecretBytesvalues are masked during event serialization, both as bare values and within Pydantic models. However, it does not add the serializer behavior required by those assertions.Reviews (1) · Last reviewed commit: "test(serializer): cover pydantic secret ..."