feat: AI settings section - #2237
Conversation
Confidence Score: 3/5The PR is not safe to merge until processor creation and deletion enforce authorization server-side. Authenticated non-admins can bypass the UI gate and directly invoke both whitelisted mutation endpoints. Files Needing Attention: raven/ai/google_ai.py Reviews (3): Last reviewed commit: "fix: empty-state for InstructionPreview" | Re-trigger Greptile |
| const { call: createProcessor, loading: creating } = useFrappePostCall( | ||
| "raven.ai.google_ai.create_document_processor", | ||
| ) | ||
| const { call: deleteProcessor, loading: deleting } = useFrappePostCall( | ||
| "raven.ai.google_ai.delete_document_processor", | ||
| ) |
There was a problem hiding this comment.
Processor mutations lack authorization
Any authenticated non-admin can invoke these whitelisted endpoints directly because the server performs no permission check, enabling unauthorized billable processor creation or permanent deletion with bot-reference cleanup.
How this was verified: Both endpoint implementations perform the Google Cloud mutation without checking server-side permissions.
Context Used: Guidelines for reviewing Frappe Framework applicat... (source)
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/src/components/features/settings/panels/DocumentProcessors/DocumentProcessors.tsx
Line: 63-68
Comment:
**Processor mutations lack authorization**
Any authenticated non-admin can invoke these whitelisted endpoints directly because the server performs no permission check, enabling unauthorized billable processor creation or permanent deletion with bot-reference cleanup.
**How this was verified:** Both endpoint implementations perform the Google Cloud mutation without checking server-side permissions.
**Context Used:** Guidelines for reviewing Frappe Framework applicat... ([source](https://github.com/frappe/skills/blob/main/skills/quality-code-review/SKILL.md))
**Knowledge Base Used:**
- [AI features and bots](https://app.greptile.com/frappe/-/custom-context/knowledge-base/frappe/raven/-/docs/ai-features.md)
- [Server API surface](https://app.greptile.com/frappe/-/custom-context/knowledge-base/frappe/raven/-/docs/server-api.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
CleanShot.2026-08-25.at.16.49.38.mp4