Skip to content

Restrict data exposure on public RestAPI endpoints#1560

Merged
Adammatthiesen merged 9 commits into
mainfrom
api-spec-fix
Jul 11, 2026
Merged

Restrict data exposure on public RestAPI endpoints#1560
Adammatthiesen merged 9 commits into
mainfrom
api-spec-fix

Conversation

@Adammatthiesen

@Adammatthiesen Adammatthiesen commented Jul 11, 2026

Copy link
Copy Markdown
Member

This pull request focuses on tightening the data exposure of the public REST API endpoints to enhance privacy and security. The main change restricts the fields returned by the user schema, ensuring that sensitive and private information is not exposed.

API Data Exposure Restrictions:

  • The UsersTableBase schema in schemas.ts now omits additional sensitive fields (updatedAt, createdAt, emailVerified, and notifications) alongside email and password from public API responses to prevent leaking private user information.

Documentation:

  • Added a changeset note describing that public REST API endpoints now restrict available data to avoid exposing private information.

@coderabbitai ignore

@changeset-bot

changeset-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c2bab80

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@withstudiocms/api-spec Patch

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

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 65b2b4a3-2f7b-496d-8403-afca153ef9ae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch api-spec-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Adammatthiesen Adammatthiesen changed the title Api spec fix Restrict data exposure on public RestAPI endpoints Jul 11, 2026
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Allure Test Report for this PR:

Allure Report | History

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...es/@withstudiocms/api-spec/src/rest-api/schemas.ts 0.00% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

@pkg-pr-new

pkg-pr-new Bot commented Jul 11, 2026

Copy link
Copy Markdown
create-studiocms

npm i https://pkg.pr.new/create-studiocms@1560

effectify

npm i https://pkg.pr.new/effectify@1560

studiocms

npm i https://pkg.pr.new/studiocms@1560

@studiocms/auth0

npm i https://pkg.pr.new/@studiocms/auth0@1560

@studiocms/blog

npm i https://pkg.pr.new/@studiocms/blog@1560

@studiocms/cloudinary-image-service

npm i https://pkg.pr.new/@studiocms/cloudinary-image-service@1560

@studiocms/devapps

npm i https://pkg.pr.new/@studiocms/devapps@1560

@studiocms/discord

npm i https://pkg.pr.new/@studiocms/discord@1560

@studiocms/github

npm i https://pkg.pr.new/@studiocms/github@1560

@studiocms/google

npm i https://pkg.pr.new/@studiocms/google@1560

@studiocms/html

npm i https://pkg.pr.new/@studiocms/html@1560

@studiocms/markdoc

npm i https://pkg.pr.new/@studiocms/markdoc@1560

@studiocms/markdown-remark

npm i https://pkg.pr.new/@studiocms/markdown-remark@1560

@studiocms/md

npm i https://pkg.pr.new/@studiocms/md@1560

@studiocms/mdx

npm i https://pkg.pr.new/@studiocms/mdx@1560

@studiocms/s3-storage

npm i https://pkg.pr.new/@studiocms/s3-storage@1560

@studiocms/upgrade

npm i https://pkg.pr.new/@studiocms/upgrade@1560

@studiocms/wysiwyg

npm i https://pkg.pr.new/@studiocms/wysiwyg@1560

@withstudiocms/api-spec

npm i https://pkg.pr.new/@withstudiocms/api-spec@1560

@withstudiocms/auth-kit

npm i https://pkg.pr.new/@withstudiocms/auth-kit@1560

@withstudiocms/cli-kit

npm i https://pkg.pr.new/@withstudiocms/cli-kit@1560

@withstudiocms/component-registry

npm i https://pkg.pr.new/@withstudiocms/component-registry@1560

@withstudiocms/config-utils

npm i https://pkg.pr.new/@withstudiocms/config-utils@1560

@withstudiocms/effect

npm i https://pkg.pr.new/@withstudiocms/effect@1560

@withstudiocms/internal_helpers

npm i https://pkg.pr.new/@withstudiocms/internal_helpers@1560

@withstudiocms/kysely

npm i https://pkg.pr.new/@withstudiocms/kysely@1560

@withstudiocms/sdk

npm i https://pkg.pr.new/@withstudiocms/sdk@1560

@withstudiocms/template-lang

npm i https://pkg.pr.new/@withstudiocms/template-lang@1560

commit: c2bab80

@Adammatthiesen Adammatthiesen marked this pull request as ready for review July 11, 2026 01:02
@Adammatthiesen Adammatthiesen requested a review from a team as a code owner July 11, 2026 01:02
Base automatically changed from fix-zod-to-effect to main July 11, 2026 01:24
@Adammatthiesen Adammatthiesen merged commit fa83227 into main Jul 11, 2026
30 checks passed
@Adammatthiesen Adammatthiesen deleted the api-spec-fix branch July 11, 2026 01:51
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