fix: GraphQL error messages disclose pointer and relation target class names when public introspection is disabled (GHSA-r2g6-4f6j-f6rf)#10568
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
📝 WalkthroughWalkthroughGraphQL error sanitization now uses incoming operation text to preserve caller-referenced type names while redacting undisclosed pointer target classes. Tests cover coercion, validation, selection, fragment, stacktrace, master-key, and public-introspection cases. ChangesGraphQL error redaction
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant SchemaSuggestionsControlPlugin
participant stripSchemaIdentifiers
participant GraphQLResponse
Client->>SchemaSuggestionsControlPlugin: Send GraphQL query
SchemaSuggestionsControlPlugin->>stripSchemaIdentifiers: Pass error text and operation text
stripSchemaIdentifiers->>GraphQLResponse: Return redacted error text
SchemaSuggestionsControlPlugin->>Client: Send sanitized response
Possibly related PRs
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10568 +/- ##
==========================================
+ Coverage 92.67% 92.69% +0.01%
==========================================
Files 193 193
Lines 16990 17007 +17
Branches 248 248
==========================================
+ Hits 15745 15764 +19
+ Misses 1224 1222 -2
Partials 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/GraphQL/ParseGraphQLServer.js`:
- Around line 146-153: Escape all regular-expression metacharacters in bareName
before interpolating it into the RegExp constructed by isReferenced, while
preserving the existing word-boundary matching behavior and empty/type checks.
Use a standard regex-escape approach so unusual captured type names cannot throw
or alter the pattern.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1985520f-371e-4b4a-8f02-bc49160b7681
📒 Files selected for processing (1)
src/GraphQL/ParseGraphQLServer.js
|
@coderabbitai review your feedback conversations and resolve where you found a consensus |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="parse-community/parse-server"
pr=10568
echo "### Review comments (inline) ###"
gh api "repos/$repo/pulls/$pr/comments" --paginate | jq -r '.[] | "ID:\(.id) USER:\(.user.login) PATH:\(.path) LINE:\(.line // .original_line) IN_REPLY_TO:\(.in_reply_to_id // "null")\n\(.body)\n---"'
echo "### Issue (top-level) comments ###"
gh api "repos/$repo/issues/$pr/comments" --paginate | jq -r '.[] | "ID:\(.id) USER:\(.user.login)\n\(.body)\n---"'Length of output: 20041 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="parse-community/parse-server"
pr=10568
gh api graphql -f query='
query($owner:String!, $name:String!, $pr:Int!) {
repository(owner:$owner, name:$name) {
pullRequest(number:$pr) {
reviewThreads(first:50) {
nodes {
id
isResolved
comments(first:10) {
nodes { id databaseId author { login } body }
}
}
}
}
}
}' -f owner=parse-community -f name=parse-server -F pr=$pr | jq '.data.repository.pullRequest.reviewThreads.nodes[] | {id, isResolved, comments: [.comments.nodes[] | {databaseId, author: .author.login}]}'Length of output: 1077 The one review thread I have on this PR (regarding escaping/removing the dynamic
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
# [9.10.0-alpha.6](9.10.0-alpha.5...9.10.0-alpha.6) (2026-07-10) ### Bug Fixes * GraphQL error messages disclose pointer and relation target class names when public introspection is disabled ([GHSA-r2g6-4f6j-f6rf](GHSA-r2g6-4f6j-f6rf)) ([#10568](#10568)) ([cb9b542](cb9b542))
|
🎉 This change has been released in version 9.10.0-alpha.6 |
Issue
GraphQL error messages disclose pointer and relation target class names when public introspection is disabled (GHSA-r2g6-4f6j-f6rf)
Tasks