Repository navigation
fix(core): refuse caller-supplied part columns of multi-column fields - #1769
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TwFY9j4BfPu3Kamfcq5hCx
🦋 Changeset detectedLatest commit: 7c15cdf The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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. |
Code review: PR #1769 (refuse caller-supplied part columns of multi-column fields, fixes #1645)Reviewed at high effort. No blocking correctness bugs outside the first item below, but several changes are requested. Requested changes
Cleanups
Tests
Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TwFY9j4BfPu3Kamfcq5hCx
|
CI Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c58cbac9b8
ℹ️ 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".
| if (splitColumnOwners.has(fieldName)) { | ||
| filtered[fieldName] = value |
There was a problem hiding this comment.
Preserve access checks for hook-produced part columns
When a list-level resolveInput hook replaces a caller-supplied logical field with its physical columns (for example, removes media and returns media_url/media_size), callerFields still records media, while the keyed check above skips the logical-field access check. This unconditional pass-through then persists those columns without calling checkFieldAccess, so a non-sudo caller denied access to media can update it; the removed splitColumnOwner branch previously enforced access in this case. Keep the direct-raw-input refusal, but retain the owning-field access check for part columns that cannot be proven to have come from splitColumns.
AGENTS.md reference: AGENTS.md:L160-L168
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch. The access check for part columns is restored (a part column that isn't caller-supplied still checks the owning field's write access when the caller named that field), with a regression test for a hook swapping a denied logical key for its part columns. Direct caller-supplied part columns are still refused.
Generated by Claude Code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TwFY9j4BfPu3Kamfcq5hCx
Coverage Report for Core Package Coverage (./packages/core)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Coverage Report for UI Package Coverage (./packages/ui)
File CoverageNo changed files found. |
Coverage Report for CLI Package Coverage (./packages/cli)
File CoverageNo changed files found. |
Coverage Report for Auth Package Coverage (./packages/auth)
File CoverageNo changed files found. |
Coverage Report for Storage Package Coverage (./packages/storage)
File CoverageNo changed files found. |
Coverage Report for RAG Package Coverage (./packages/rag)
File CoverageNo changed files found. |
Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)
File CoverageNo changed files found. |
Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)
File CoverageNo changed files found. |
Summary
filterWritableFieldsnow throws aValidationErrorwhen caller input (inputData) names a raw part column of a multi-column field (avatar_url,doc_filename, …). The error names the column and the owning field, and points at the logical field /context.unsafe.sudo(), on create and update.splitColumnsstill pass, so logical-key writes (and their validation andauthorizeStoredMetadata) are unchanged.Test plan
pnpm vitest run src/access src/hooks src/contextin corepnpm lint,pnpm formatCloses #1645
🤖 Generated with Claude Code
https://claude.ai/code/session_01TwFY9j4BfPu3Kamfcq5hCx
Generated by Claude Code