JMCP: Papers - jmcp/moderation-abuse-prevention-and-anonymit-5QGr6Yrh#3
Closed
landigf wants to merge 1 commit into
Closed
JMCP: Papers - jmcp/moderation-abuse-prevention-and-anonymit-5QGr6Yrh#3landigf wants to merge 1 commit into
landigf wants to merge 1 commit into
Conversation
Owner
Author
|
Closing: will integrate valuable features directly on main to avoid cascade merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I now have a complete picture. Here's the review:
Review: Moderation, Abuse Prevention, and Anonymity Safety
Change Summary
This branch bootstraps the full Papers platform — a research-sharing product with feed, papers, conferences with peer review, profiles, daily digest, and opportunities. Key safety-relevant features:
visibilityMode: "blind", which nullifiesownerIdandpublicAuthorProfilein public-facing serialization (serializePublicPaper). Comments on blind papers also stripauthorProfile.spam,harassment,misinformation,identity_leak,off_topic,other). Rate-limited to 10 flags/hour/user, with duplicate-per-target prevention.GrokProvider.assertSafe()blocks blind/private content from being sent to the external LLM.Validation Confidence: Medium-High
The core anonymity boundary (blind papers, blind comments, AI gate) is structurally sound. Moderation primitives are present with rate limiting. Demo auth is explicitly scoped and cookie-based.
Risks That Still Remain
createPeerReviewstoresreviewerProfile: viewer.profileand the conference page rendersreview.reviewerProfile?.displayName. For blind submissions, reviewers are fully identified — this breaks double-blind. The reviewer's identity should be hidden when the submission is blind.visibilityMode === "public"getProfileByHandlefilters papers withpaper.visibilityMode === "public", so blind papers won't appear. This is correct but fragile — if a third mode is added, it defaults to visible. Consider an allowlist pattern.saveInterestActionopen redirectredirectTois taken directly from form data (formData.get("redirectTo")) and passed toredirect()without validation. An attacker could craft a form postingredirectTo=https://evil.com. Same pattern inflagContentAction.papers_demo_viewer) has no additional CSRF token. Acceptable for demo, but needs hardening before production."open"but there is no action or UI to transition flags to"reviewing"or"resolved". Flags accumulate without action.bodyis rendered as plain text (<p>{comment.body}</p>) in React, so XSS is safe. But there's no content-level moderation (slur filter, PII detection) before storage.isBlindSafeis always hardcodedtrueisBlindSafe: truewithout checking whether the comment text itself contains author-identifying information. The field exists but is never computed.readDemoState→ mutate →writeDemoStatehas a race condition under concurrent requests. Acceptable for demo, not for production.Top Recommendation
The reviewer identity leak on blind submissions is the most critical issue. On the conference page, when a submission has
visibilityMode === "blind", the reviewer's full profile is still displayed. This should be masked (e.g., "Reviewer 1", "Reviewer 2") to preserve double-blind integrity. TheredirectToopen-redirect pattern should also be fixed before any public deployment.