Fix secure evaluator access - #30
Merged
Merged
Conversation
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.
What changed
privateschema with read/write RPCs restricted toservice_roleanonandauthenticatednon-2xxSDK messageRoot cause
submit-codecalled.schema("private")through the Supabase Data API. The schema is intentionally not exposed, so PostgREST rejected the hidden-test query and the submission stopped before Judge0 evaluation.mission-adminused the same broken path for staff solutions and mission editing. Fresh Supabase databases also showed thatservice_roletable access depended on historical default grants, so the migration now declares those backend privileges explicitly.User impact
Students can submit assigned work and run hidden tests without gaining access to those tests. Mentor solution and version-editing flows use the same secure server-only boundary. Future HTTP failures expose a useful Spanish reason in the results console.
Validation
pnpm check(16 legacy tests, TypeScript, Edge Functions, 21 v2 tests, 60 reference solutions and production build)pnpm test:e2e(9/9)pnpm typecheck:edgedeno fmt --checkfor the new TypeScript filesgit diff --checkCloses #29