fix: the post /reset endpoint in git_routes in git_routes.ts#41779
fix: the post /reset endpoint in git_routes in git_routes.ts#41779orbisai0security wants to merge 1 commit intoappsmithorg:releasefrom
Conversation
Automated security fix generated by Orbis Security AI
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdded internal authentication middleware to git routes that validates a request header against an environment variable, returning 403 if the key is invalid. The middleware is applied before existing validation and controller logic. ChangesInternal Authentication for Git Routes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
Fix high severity security issue in
app/client/packages/rts/src/routes/git_routes.ts.Vulnerability
V-003app/client/packages/rts/src/routes/git_routes.ts:9Description: The POST /reset endpoint in git_routes.ts at line 9 chains only validator.validateRequest and gitController.reset — no authorization middleware is present in the route definition to verify that the requesting user holds a role (developer or admin) with write access to the target workspace. A lower-privileged user (e.g., viewer role) who discovers this endpoint can submit a valid request body that passes schema validation and trigger a git reset, reverting the application to an arbitrary prior commit.
Changes
app/client/packages/rts/src/routes/git_routes.tsVerification
Automated security fix by OrbisAI Security
Summary by CodeRabbit